8000 combinatorial log by mantepse · Pull Request #40129 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

combinatorial log #40129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 130 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
d9b6bf3
provide is_constant
mantepse Aug 21, 2024
9e31e27
basic design, non-working __call__
mantepse Aug 21, 2024
e7db7a1
Merge branch 'simple-species' into lazy-species
mantepse Aug 22, 2024
96469f6
Merge branch 'simple-species' into lazy-species
mantepse Aug 25, 2024
7dd7db4
Merge branch 'simple-species' into lazy-species
mantepse Aug 26, 2024
43c1745
Merge branch 'simple-species' into lazy-species
mantepse Aug 26, 2024
64c4072
Merge branch 'simple-species' into lazy-species
mantepse Aug 27, 2024
041dcad
lazy composition possibly working, at least univariate
mantepse Aug 29, 2024
a1d42ef
fix multisort bugs
mantepse Aug 29, 2024
0496422
add weighted example
mantepse Aug 29, 2024
3c42364
simplify unisort _repr_
mantepse Aug 30, 2024
f070463
polish examples
mantepse Aug 30, 2024
fdc1d98
Merge branch 'simple-species' into lazy-species
mantepse Aug 30, 2024
259f844
add a doctest
mantepse Aug 30, 2024
cc32428
add a doctest
mantepse Aug 30, 2024
3c2a3d1
implement generating series, delegate sum and product to separate cla…
mantepse Aug 31, 2024
3ea68d1
start to fix multisort structures
mantepse Sep 3, 2024
04243ac
Merge branch 'simple-species' into lazy-species
mantepse Sep 9, 2024
7c8e8bf
alternative way to compute group
mantepse Sep 12, 2024
b335831
Merge branch 'simple-species' into lazy-species
mantepse Sep 12, 2024
f8b1d80
Merge branch 'simple-species' into lazy-species
mantepse Sep 12, 2024
11f9dae
Merge branch 'lazy-species' of https://github.com/mantepse/sage into …
mantepse Sep 14, 2024
73e8c3d
Merge branch 'simple-species' into lazy-species
mantepse Sep 14, 2024
f7bfd48
adapt doctests
mantepse Sep 14, 2024
956f42f
Merge branch 'simple-species' into lazy-species
mantepse Sep 23, 2024
48fb116
generic cycle_index_series for multisort species
mantepse Sep 23, 2024
55f334b
Merge branch 'simple-species' into lazy-species
mantepse Sep 25, 2024
7c0b2bb
fix a doctest
mantepse Sep 25, 2024
d98fe80
Merge branch 'simple-species' into lazy-species
mantepse Sep 26, 2024
53b7ada
Merge branch 'simple-species' into lazy-species
mantepse Sep 26, 2024
72b956b
Merge branch 'simple-species' into lazy-species
mantepse Sep 26, 2024
d80e2ae
Merge branch 'develop' into lazy-species
mantepse Sep 28, 2024
7259f66
Merge branch 'develop' into lazy-species
mantepse Sep 28, 2024
a42633b
Merge branch 'sagemath:develop' into lazy-species
mantepse Sep 29, 2024
8058889
Merge branch 'simple-species' into lazy-species
mantepse Oct 5, 2024
5db564d
Merge branch 'sagemath:develop' into lazy-species
mantepse Oct 13, 2024
0ee0905
Merge branch 'simple-species' into lazy-species
mantepse Oct 24, 2024
c981982
import PolynomialSpecies in doctests
mantepse Oct 24, 2024
fd12e53
Merge branch 'simple-species' into lazy-species
mantepse Oct 28, 2024
5aeef49
Merge branch 'simple-species' into lazy-species
mantepse Oct 28, 2024
53b28cd
Merge branch 'simple-species' into lazy-species
mantepse Oct 29, 2024
47c7814
adapt to changes in species.py
mantepse Oct 29, 2024 8000
902df45
Merge branch 'simple-species' into lazy-species
mantepse Nov 11, 2024
1d91d1e
extract __call__ into separate class, proof of concept for special sp…
mantepse Nov 11, 2024
cbf8b1d
fix bug in LazySpeciesElement.structures, add ProductSpeciesElement.s…
mantepse Nov 13, 2024
f4849ee
cosmetics
mantepse Nov 13, 2024
92ba51f
adapt doctest
mantepse Nov 13, 2024
84086df
preliminary support for generating structures of a composition
mantepse Nov 14, 2024
3c6159b
Merge branch 'set_partitions/arbitrary_labels' into lazy-species
mantepse Nov 16, 2024
a7ada76
Merge branch 'species/left_and_right_actions' into lazy-species
mantepse Nov 16, 2024
b918066
provide structures for atomic and molecular species
mantepse Nov 16, 2024
7af0ee8
simplify and correct structures
mantepse Nov 16, 2024
10c90e0
try to make structures more predictable
mantepse Nov 16, 2024
568df5f
add missing 'EXAMPLES::'
mantepse Nov 16, 2024
b62aa20
Merge branch 'sagemath:develop' into lazy-species
mantepse Nov 20, 2024
666abc0
Merge branch 'sagemath:develop' into lazy-species
mantepse Dec 9, 2024
a3525df
add (currently failing) tests
mantepse Dec 16, 2024
6b8f139
add forgotten import
mantepse Dec 16, 2024
d5f74fa
Merge branch 'sagemath:develop' into lazy-species
mantepse Dec 17, 2024
1fa4906
Merge branch 'sagemath:develop' into lazy-species
mantepse Dec 25, 2024
50d3082
provide reversion, switch to multiplicities in weighted_compositions
mantepse Dec 26, 2024
5340aac
provide non-trivial examples for molecular decompositions
mantepse Jan 5, 2025
f48e209
fix doctests and syntax error
mantepse Jan 5, 2025
ca92a7e
Merge branch 'sagemath:develop' into lazy-species
mantepse Jan 5, 2025
e781f39
Merge branch 'sagemath:develop' into lazy-species
mantepse Feb 4, 2025
8c3a64e
Merge branch 'species/rename' into lazy-species
mantepse Feb 7, 2025
3797aed
add class for restriction of species
mantepse Feb 7, 2025
ba8d214
Merge branch 'develop' into lazy-species
mantepse Feb 11, 2025
bb69c4c
Merge branch 'sagemath:develop' into lazy-species
mantepse Feb 25, 2025
05d2566
Merge branch 'lazy-species' of https://github.com/mantepse/sage into …
mantepse Feb 25, 2025
9aae5cb
final tweaks
mantepse Feb 25, 2025
9cd292b
fix reversion of exact species, remove useless imports and definitions
mantepse Feb 25, 2025
082b37e
provide a few docstrings
mantepse Feb 25, 2025
70a6114
Merge branch 'sagemath:develop' into lazy-species
mantepse Mar 3, 2025
5ef405b
Merge branch 'develop' into lazy-species
mantepse Apr 23, 2025
e4e1941
Merge branch 'sagemath:develop' into lazy-species
mantepse Apr 30, 2025
79fc6f9
Merge branch 'lazy-species' of github.com:mantepse/sage into lazy-spe…
mantepse May 1, 2025
31d8b29
make __call__ work if outer function is constant
mantepse May 1, 2025
6a60096
provide fast implementations for the generating series of simple graphs
mantepse May 8, 2025
266fe1a
slight simplification of isotype_generating_series
mantepse May 8, 2025
dd54b5b
provide a generic way to obtain the generating series from the cycle …
mantepse May 8, 2025
43dcf98
remove outdated (and now mysterious) comment
mantepse May 9, 2025
a62785a
Merge branch 'develop' into lazy-species
mantepse May 15, 2025
41de9c4
8000 provide isotypes, _test_structures, _test_isotypes
mantepse May 15, 2025
1df9dd2
softly deprecate combinat.species, adapt doctests
mantepse May 15, 2025
bc01e94
lazy_species.py is a new file
mantepse May 16, 2025
ad4da47
lazy import LazySpecies into global namespace
mantepse May 16, 2025
f3a56af
adapt doctests to deprecation and sorting
mantepse May 16, 2025
bc2bb3d
remove unnecessary import statements
mantepse May 16, 2025
e577637
add doc and pointer to new implementation
mantepse May 16, 2025
e766be4
fix documentation
mantepse May 18, 2025
8e60ffa
Merge branch 'develop' into lazy-species
mantepse May 18, 2025
3c1d2fc
implement the combinatorial logarithm as proposed by Labelle 2013
mantepse May 19, 2025
ec51d98
Merge branch 'develop' into combinatorial_log
mantepse May 19, 2025
7175062
make composition of molecular species much faster
mantepse May 21, 2025
099fc0b
check that LazySpeciesElement_generating_series_mixin works
mantepse May 26, 2025
ba796e8
Apply suggestions from code review
mantepse May 26, 2025
ac35129
Apply suggestions from code review, Co-authored-by: Travis Scrimshaw …
mantepse May 26, 2025
13522f2
fix import and undo one mistaken _Partitions
mantepse May 26, 2025
17090f5
nicer doctest examples
mantepse May 26, 2025
1578d9b
distinguish left and right summands
mantepse May 26, 2025
234ea2e
add polygons and oriented sets
mantepse May 30, 2025
4e86a21
fix docbug
mantepse May 30, 2025
7a5b66d
fix mistaken definition of right action
mantepse May 30, 2025
e926c3f
provide separate class for univariate species, unify documentation
mantepse May 30, 2025
7b72d05
use testing framework more properly
mantepse May 30, 2025
c904468
Merge branch 'lazy-species' into combinatorial_log
mantepse May 30, 2025
3edcb8b
add an illustrative example
mantepse Jun 1, 2025
559d8e2
fix doctest
mantepse Jun 1, 2025
adafd2b
remove erroneously added doctest
mantepse Jun 3, 2025
348fe05
Merge branch 'lazy-species' into combinatorial_log
mantepse Jun 3, 2025
8d755b5
atomic species with the same cycle index
mantepse Jun 3, 2025
aeb2825
make doctest deterministic
mantepse Jun 3, 2025
1ef3360
Apply suggestions from code review
mantepse Jun 4, 2025
040fa3a
rename mixin class to follow conventions
mantepse Jun 5, 2025
b6d1ff7
sort output of test to make it deterministic
mantepse Jun 5, 2025
0081358
sort output of test to make it deterministic, fix parenthesis
mantepse Jun 5, 2025
db7171b
raise NotImplementedError for isotypes with given labels
mantepse Jun 5, 2025
a10bf94
modify doctest to achieve deterministic output
mantepse Jun 8, 2025
07465ff
slightly more elaborate documentation
mantepse Jun 8, 2025
e94aa64
add the species of chains
mantepse Jun 9, 2025
652986c
better structures for chains
mantepse Jun 9, 2025
b9ba15e
Update src/sage/rings/lazy_species.py
mantepse Jun 12, 2025
39b7afe
Merge branch 'sagemath:develop' into combinatorial_log
mantepse Jun 13, 2025
c7d3fc4
Merge branch 'lazy-species' into combinatorial_log
mantepse Jun 13, 2025
3219144
sort module list by module name rather than path
8000 mantepse Jun 16, 2025
ebddbd4
replace LazySpecies by LazyCombinatorialSpecies
mantepse Jun 16, 2025
0edfc02
Merge branch 'sagemath:develop' into combinatorial_log
mantepse Jun 19, 2025
01dd21b
Merge branch 'lazy-species' into combinatorial_log
mantepse Jun 20, 2025
46f021c
adapt doctest
mantepse Jun 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/doc/en/reference/combinat/module_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Comprehensive Module List
sage/combinat/blob_algebra
sage/combinat/cartesian_product
sage/combinat/catalog_partitions
sage/rings/cfinite_sequence
sage/combinat/chas/all
sage/combinat/chas/fsym
sage/combinat/chas/wqsym
Expand Down Expand Up @@ -154,6 +155,7 @@ Comprehensive Module List
sage/combinat/key_polynomial
sage/combinat/knutson_tao_puzzles
sage/combinat/k_tableau
sage/rings/lazy_species
sage/combinat/lr_tableau
sage/combinat/matrices/all
sage/combinat/matrices/dancing_links
Expand Down Expand Up @@ -408,4 +410,3 @@ Comprehensive Module List
sage/combinat/words/word_options
sage/combinat/words/words
sage/combinat/yang_baxter_graph
sage/rings/cfinite_sequence
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3162,6 +3162,10 @@ REFERENCES:
descent algebra.* Adv. Math. **77** (1989).
https://web.archive.org/web/20210829143502/http://lacim-membre.uqam.ca/~christo/Publi%C3%A9s/1989/Decomposition%20Solomon.pdf

.. [GL2011] Ira M. Gessel, Ji Li.
*Enumeration of point-determining graphs*. Journal of
Combinatorial Theory, Series A, 118 (2011), pp. 591--612.

.. [GR1993] Ira M. Gessel, Christophe Reutenauer.
*Counting Permutations with Given Cycle Structure and Descent Set*. Journal of
Combinatorial Theory, Series A, 64 (1993), pp. 189--215.
Expand Down
69 changes: 65 additions & 4 deletions src/sage/combinat/species/all.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,66 @@
r"""
Combinatorial species

.. TODO:: Short blurb about species
A combinatorial species, as introduced by Joyal, is a functor from
the category of finite sets with bijections to the category of finite
sets with bijections. Alternatively, we can regard a combinatorial
species as a formal sum of group actions of the symmetric groups
`\mathfrak S_n`, for `n\in\NN`. For example, the trivial action of
`\mathfrak S_n` corresponds to the species `\mathcal E_n` of sets of
cardinality `n`.

.. TODO:: Proofread / point to the main classes rather than the modules?
More generally, a weighted multisort species in `k` sorts is a
functor from the category of `k`-tuples of finite sets with
bijections to the category of weighted finite sets with
weight-preserving bijections. We may think of the sorts as
variables, traditionally denoted by `X, Y, Z`.

Such a species is equivalent to a formal sum of group actions of
groups `\mathfrak S_{n_1} \times \cdots \times \mathfrak S_{n_k}` with
`(n_1,\ldots,n_k)\in\NN^k`, together with a weight on the orbits of
each group action. Yet more generally, a virtual weighted multisort
species is a formal difference of weighted multisort species.

We regard a combinatorial species as a sequence of group actions of
the symmetric groups `\mathfrak S_n`, for `n\in\NN`.

Coefficients of lazy species are computed on demand. They have
infinite precision, although equality can only be decided in special
cases.

There are currently two implementations of combinatorial species, one
of which is deprecated and will be removed once all of the
functionality has been ported to the new framework.

The recommended implementation is :ref:`sage.rings.lazy_species` and
used as the following examples illustrate.

EXAMPLES:

We define rooted ordered trees with leaves having weight `q`::

sage: R.<q> = QQ[]
sage: L.<X> = LazyCombinatorialSpecies(R)
sage: leaf = X
sage: node = q * X
sage: linorder = X/(1 - X)
sage: T = L.undefined(valuation=1)
sage: T.define(leaf + node * linorder(T))
sage: T.isotype_generating_series()
X + q*X^2 + ((q^2+q)*X^3) + ((q^3+3*q^2+q)*X^4) + ((q^4+6*q^3+6*q^2+q)*X^5)
+ ((q^5+10*q^4+20*q^3+10*q^2+q)*X^6) + O(X^7)

We define rooted unordered trees with leaves of sort `Y`. The
standard representation of a species is its molecular decomposition::

sage: L = LazyCombinatorialSpecies(R, "X")
sage: E = L.Sets()
sage: Ep = E.restrict(1)
sage: M.<X, Y> = LazyCombinatorialSpecies(R)
sage: A = M.undefined(valuation=1)
sage: A.define(Y + X * Ep(A))
sage: A.truncate(5)
Y + X*Y + (X^2*Y+X*E_2(Y)) + (X^3*Y+X^2*E_2(Y)+X^2*Y^2+X*E_3(Y))

Introductory material
---------------------
Expand Down Expand Up @@ -39,13 +96,17 @@

- :ref:`sage.combinat.species.structure`
- :ref:`sage.combinat.species.misc`

"""
# install the docstring of this module to the containing package
from sage.misc.namespace_package import install_doc
install_doc(__package__, __doc__)

from sage.misc.lazy_import import lazy_import
lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies")
lazy_import("sage.combinat.species", "library", as_='species')
lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies",
deprecation=(38544, "combinat.species is superseded by LazyCombinatorialSpecies"))

lazy_import("sage.combinat.species", "library", as_='species',
deprecation=(38544, "combinat.species is superseded by LazyCombinatorialSpecies"))
del lazy_import
del install_doc
3 changes: 3 additions & 0 deletions src/sage/combinat/species/characteristic_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def __repr__(self):
EXAMPLES::

sage: F = species.CharacteristicSpecies(3)
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: a = F.structures([1, 2, 3]).random_element(); a
{1, 2, 3}
sage: F = species.SingletonSpecies()
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/composition_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def __init__(self, parent, labels, pi, f, gs):
TESTS::

sage: E = species.SetSpecies(); C = species.CycleSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: L = E(C)
sage: a = L.structures(['a','b','c']).random_element() # needs sage.libs.flint
sage: a == loads(dumps(a)) # needs sage.libs.flint
Expand Down
4 changes: 4 additions & 0 deletions src/sage/combinat/species/cycle_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def __repr__(self):
EXAMPLES::

sage: S = species.CycleSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.

sage: S.structures(["a","b","c"])[0]
('a', 'b', 'c')
"""
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/empty_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation):
EXAMPLES::

CEB7 sage: X = species.EmptySpecies(); X
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
Empty species
sage: X.structures([]).list()
[]
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/functorial_composition_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def __init__(self, F, G, min=None, max=None, weight=None):
EXAMPLES::

sage: E = species.SetSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: E2 = species.SetSpecies(size=2)
sage: WP = species.SubsetSpecies()
sage: P2 = E2*E
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/generating_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ def functorial_composition(self, y):
EXAMPLES::

sage: G = species.SimpleGraphSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: g = G.generating_series()
sage: [g.coefficient(i) for i in range(10)]
[1, 1, 1, 4/3, 8/3, 128/15, 2048/45, 131072/315, 2097152/315, 536870912/2835]
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def SimpleGraphSpecies():
EXAMPLES::
F438
sage: S = species.SimpleGraphSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: S.generating_series().counts(10)
[1, 1, 2, 8, 64, 1024, 32768, 2097152, 268435456, 68719476736]
sage: S.cycle_index_series()[:5] # needs sage.modules
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/linear_order_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def canonical_label(self):
EXAMPLES::

sage: P = species.LinearOrderSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: s = P.structures(["a", "b", "c"]).random_element()
sage: s.canonical_label()
['a', 'b', 'c']
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/partition_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def __init__(self, parent, labels, list):

sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
sage: P = species.PartitionSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: s = PartitionSpeciesStructure(P, ['a','b','c'], [[1,2],[3]]); s
{{'a', 'b'}, {'c'}}
sage: s == loads(dumps(s))
Expand Down
4 changes: 4 additions & 0 deletions src/sage/combinat/species/permutation_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def canonical_label(self):
EXAMPLES::

sage: P = species.PermutationSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.

sage: S = P.structures(["a", "b", "c"])
sage: [s.canonical_label() for s in S]
[['a', 'b', 'c'],
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/product_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def __init__(self, parent, labels, subset, left, right):
TESTS::
sage: S = species.SetSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: F = S * S
sage: a = F.structures(['a','b','c']).random_element()
sage: a == loads(dumps(a))
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/recursive_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def __init__(self, min=None):
EXAMPLES::

sage: F = CombinatorialSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: loads(dumps(F))
Combinatorial species

Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/set_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def __repr__(self):
EXAMPLES::

sage: S = species.SetSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: a = S.structures(["a","b","c"]).random_element(); a
{'a', 'b', 'c'}
"""
Expand Down
6 changes: 6 additions & 0 deletions src/sage/combinat/species/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

sage: q = QQ['q'].gen()
sage: leaf = species.SingletonSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: internal_node = species.SingletonSpecies(weight=q)
sage: L = species.LinearOrderSpecies(min=1)
sage: T = species.CombinatorialSpecies(min=1)
Expand Down Expand Up @@ -139,6 +142,9 @@ def __eq__(self, x):
sage: X = species.SingletonSpecies()
sage: E = species.EmptySetSpecies()
sage: L = CombinatorialSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: L.define(E+X*L)
sage: K = CombinatorialSpecies()
sage: K.define(E+X*L)
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
Here we define this species using the default structures::

sage: ball = species.SingletonSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: bar = species.EmptySetSpecies()
sage: BB = CombinatorialSpecies()
sage: BB.define(ball + ball*BB + ball*bar*BB)
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/subset_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def __repr__(self):

sage: set_random_seed(0)
sage: S = species.SubsetSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: a = S.structures(["a","b","c"])[0]; a
{}
"""
Expand Down
3 changes: 3 additions & 0 deletions src/sage/combinat/species/sum_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def __init__(self, F, G, min=None, max=None, weight=None):
EXAMPLES::

sage: S = species.PermutationSpecies()
doctest:warning...
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
See https://github.com/sagemath/sage/issues/38544 for details.
sage: A = S+S
sage: A.generating_series()[:5]
[2, 2, 2, 2, 2]
Expand Down
3 changes: 3 additions & 0 deletions src/sage/rings/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing',
'LazySymmetricFunctions', 'LazyDirichletSeriesRing'])

# Lazy combinatorial species
lazy_import('sage.rings.lazy_species', 'LazyCombinatorialSpecies')

# Tate algebras
from sage.rings.tate_algebra import TateAlgebra

Expand Down
3 changes: 1 addition & 2 deletions src/sage/rings/lazy_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -7219,8 +7219,7 @@ def arithmetic_product(self, *args):
sage: L = LazySymmetricFunctions(m) # needs sage.modules

sage: # needs sage.modules
sage: C = species.CycleSpecies().cycle_index_series()
sage: c = L(lambda n: C[n])
sage: c = LazyCombinatorialSpecies(QQ, "X").Cycles().cycle_index_series()
sage: Lplus = L(lambda n: p([1]*n), valuation=1)
sage: r = c.arithmetic_product(Lplus); r # needs sage.libs.pari
m[1] + (3*m[1,1]+2*m[2])
Expand Down
Loading
Loading
0