Symmetric Ideals of Infinite Polynomial Rings#
This module provides an implementation of ideals of polynomial rings in a countably infinite number of variables that are invariant under variable permutation. Such ideals are called ‘Symmetric Ideals’ in the rest of this document. Our implementation is based on the theory of M. Aschenbrenner and C. Hillar.
AUTHORS:
Simon King <simon.king@nuigalway.ie>
EXAMPLES:
Here, we demonstrate that working in quotient rings of Infinite Polynomial Rings works, provided that one uses symmetric Groebner bases.
sage: R.<x> = InfinitePolynomialRing(QQ)
sage: I = R.ideal([x[1]*x[2] + x[3]])
>>> from sage.all import *
>>> R = InfinitePolynomialRing(QQ, names=('x',)); (x,) = R._first_ngens(1)
>>> I = R.ideal([x[Integer(1)]*x[Integer(2)] + x[Integer(3)]])
Note that I
is not a symmetric Groebner basis:
sage: # needs sage.combinat
sage: G = R * I.groebner_basis()
sage: G
Symmetric Ideal (x_1^2 + x_1, x_2 - x_1) of
Infinite polynomial ring in x over Rational Field
sage: Q = R.quotient(G)
sage: p = x[3]*x[1] + x[2]^2 + 3
sage: Q(p)
-2*x_1 + 3
>>> from sage.all import *
>>> # needs sage.combinat
>>> G = R * I.groebner_basis()
>>> G
Symmetric Ideal (x_1^2 + x_1, x_2 - x_1) of
Infinite polynomial ring in x over Rational Field
>>> Q = R.quotient(G)
>>> p = x[Integer(3)]*x[Integer(1)] + x[Integer(2)]**Integer(2) + Integer(3)
>>> Q(p)
-2*x_1 + 3
By the second generator of G
, variable \(x_n\) is equal to \(x_1\) for
any positive integer \(n\). By the first generator of G
, \(x_1^3\) is
equal to \(x_1\) in Q
. Indeed, we have
sage: Q(p)*x[2] == Q(p)*x[1]*x[3]*x[5] # needs sage.combinat
True
>>> from sage.all import *
>>> Q(p)*x[Integer(2)] == Q(p)*x[Integer(1)]*x[Integer(3)]*x[Integer(5)] # needs sage.combinat
True
- class sage.rings.polynomial.symmetric_ideal.SymmetricIdeal(ring, gens, coerce=True)[source]#
Bases:
Ideal_generic
Ideal in an Infinite Polynomial Ring, invariant under permutation of variable indices
THEORY:
An Infinite Polynomial Ring with finitely many generators \(x_\ast, y_\ast, ...\) over a field \(F\) is a free commutative \(F\)-algebra generated by infinitely many ‘variables’ \(x_0, x_1, x_2,..., y_0, y_1, y_2,...\). We refer to the natural number \(n\) as the index of the variable \(x_n\). See more detailed description at
infinite_polynomial_ring
Infinite Polynomial Rings are equipped with a permutation action by permuting positive variable indices, i.e., \(x_n^P = x_{P(n)}, y_n^P=y_{P(n)}, ...\) for any permutation \(P\). Note that the variables \(x_0, y_0, ...\) of index zero are invariant under that action.
A Symmetric Ideal is an ideal in an infinite polynomial ring \(X\) that is invariant under the permutation action. In other words, if \(\mathfrak S_\infty\) denotes the symmetric group of \(1,2,...\), then a Symmetric Ideal is a right \(X[\mathfrak S_\infty]\)-submodule of \(X\).
It is known by work of Aschenbrenner and Hillar [AB2007] that an Infinite Polynomial Ring \(X\) with a single generator \(x_\ast\) is Noetherian, in the sense that any Symmetric Ideal \(I\subset X\) is finitely generated modulo addition, multiplication by elements of \(X\), and permutation of variable indices (hence, it is a finitely generated right \(X[\mathfrak S_\infty]\)-module).
Moreover, if \(X\) is equipped with a lexicographic monomial ordering with \(x_1 < x_2 < x_3 ...\) then there is an algorithm of Buchberger type that computes a Groebner basis \(G\) for \(I\) that allows for computation of a unique normal form, that is zero precisely for the elements of \(I\) – see [AB2008]. See
groebner_basis()
for more details.Our implementation allows more than one generator and also provides degree lexicographic and degree reverse lexicographic monomial orderings – we do, however, not guarantee termination of the Buchberger algorithm in these cases.
EXAMPLES:
sage: X.<x,y> = InfinitePolynomialRing(QQ) sage: I = [x[1]*y[2]*y[1] + 2*x[1]*y[2]] * X sage: I == loads(dumps(I)) True sage: latex(I) \left(x_{1} y_{2} y_{1} + 2 x_{1} y_{2}\right)\Bold{Q}[x_{\ast}, y_{\ast}][\mathfrak{S}_{\infty}]
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x', 'y',)); (x, y,) = X._first_ngens(2) >>> I = [x[Integer(1)]*y[Integer(2)]*y[Integer(1)] + Integer(2)*x[Integer(1)]*y[Integer(2)]] * X >>> I == loads(dumps(I)) True >>> latex(I) \left(x_{1} y_{2} y_{1} + 2 x_{1} y_{2}\right)\Bold{Q}[x_{\ast}, y_{\ast}][\mathfrak{S}_{\infty}]
The default ordering is lexicographic. We now compute a Groebner basis:
sage: J = I.groebner_basis(); J # about 3 seconds # needs sage.combinat [x_1*y_2*y_1 + 2*x_1*y_2, x_2*y_2*y_1 + 2*x_2*y_1, x_2*x_1*y_1^2 + 2*x_2*x_1*y_1, x_2*x_1*y_2 - x_2*x_1*y_1]
>>> from sage.all import * >>> J = I.groebner_basis(); J # about 3 seconds # needs sage.combinat [x_1*y_2*y_1 + 2*x_1*y_2, x_2*y_2*y_1 + 2*x_2*y_1, x_2*x_1*y_1^2 + 2*x_2*x_1*y_1, x_2*x_1*y_2 - x_2*x_1*y_1]
Note that even though the symmetric ideal can be generated by a single polynomial, its reduced symmetric Groebner basis comprises four elements. Ideal membership in
I
can now be tested by commuting symmetric reduction moduloJ
:sage: I.reduce(J) # needs sage.combinat Symmetric Ideal (0) of Infinite polynomial ring in x, y over Rational Field
>>> from sage.all import * >>> I.reduce(J) # needs sage.combinat Symmetric Ideal (0) of Infinite polynomial ring in x, y over Rational Field
The Groebner basis is not point-wise invariant under permutation:
sage: # needs sage.combinat sage: P = Permutation([2, 1]) sage: J[2] x_2*x_1*y_1^2 + 2*x_2*x_1*y_1 sage: J[2]^P x_2*x_1*y_2^2 + 2*x_2*x_1*y_2 sage: J[2]^P in J False
>>> from sage.all import * >>> # needs sage.combinat >>> P = Permutation([Integer(2), Integer(1)]) >>> J[Integer(2)] x_2*x_1*y_1^2 + 2*x_2*x_1*y_1 >>> J[Integer(2)]**P x_2*x_1*y_2^2 + 2*x_2*x_1*y_2 >>> J[Integer(2)]**P in J False
However, any element of
J
has symmetric reduction zero even after applying a permutation. This even holds when the permutations involve higher variable indices than the ones occurring inJ
:sage: [[(p^P).reduce(J) for p in J] for P in Permutations(3)] # needs sage.combinat [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
>>> from sage.all import * >>> [[(p**P).reduce(J) for p in J] for P in Permutations(Integer(3))] # needs sage.combinat [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
Since
I
is not a Groebner basis, it is no surprise that it cannot detect ideal membership:sage: [p.reduce(I) for p in J] # needs sage.combinat [0, x_2*y_2*y_1 + 2*x_2*y_1, x_2*x_1*y_1^2 + 2*x_2*x_1*y_1, x_2*x_1*y_2 - x_2*x_1*y_1]
>>> from sage.all import * >>> [p.reduce(I) for p in J] # needs sage.combinat [0, x_2*y_2*y_1 + 2*x_2*y_1, x_2*x_1*y_1^2 + 2*x_2*x_1*y_1, x_2*x_1*y_2 - x_2*x_1*y_1]
Note that we give no guarantee that the computation of a symmetric Groebner basis will terminate in any order different from lexicographic.
When multiplying Symmetric Ideals or raising them to some integer power, the permutation action is taken into account, so that the product is indeed the product of ideals in the mathematical sense.
sage: I = X * (x[1]) sage: I * I # needs sage.combinat Symmetric Ideal (x_1^2, x_2*x_1) of Infinite polynomial ring in x, y over Rational Field sage: I^3 # needs sage.combinat Symmetric Ideal (x_1^3, x_2*x_1^2, x_2^2*x_1, x_3*x_2*x_1) of Infinite polynomial ring in x, y over Rational Field sage: I * I == X * (x[1]^2) # needs sage.combinat False
>>> from sage.all import * >>> I = X * (x[Integer(1)]) >>> I * I # needs sage.combinat Symmetric Ideal (x_1^2, x_2*x_1) of Infinite polynomial ring in x, y over Rational Field >>> I**Integer(3) # needs sage.combinat Symmetric Ideal (x_1^3, x_2*x_1^2, x_2^2*x_1, x_3*x_2*x_1) of Infinite polynomial ring in x, y over Rational Field >>> I * I == X * (x[Integer(1)]**Integer(2)) # needs sage.combinat False
- groebner_basis(tailreduce=False, reduced=True, algorithm=None, report=None, use_full_group=False)[source]#
Return a symmetric Groebner basis (type
Sequence
) ofself
.INPUT:
tailreduce
– (bool, defaultFalse
) IfTrue
, use tail reduction in intermediate computationsreduced
– (bool, defaultTrue
) IfTrue
, return the reduced normalised symmetric Groebner basis.algorithm
– (string, defaultNone
) Determine the algorithm (see below for available algorithms).report
– (object, defaultNone
) If notNone
, print information on the progress of computation.use_full_group
– (bool, defaultFalse
) IfTrue
then proceed as originally suggested by [AB2008]. Our default method should be faster; seesymmetrisation()
for more details.
The computation of symmetric Groebner bases also involves the computation of classical Groebner bases, i.e., of Groebner bases for ideals in polynomial rings with finitely many variables. For these computations, Sage provides the following ALGORITHMS:
- ‘’
autoselect (default)
- ‘singular:groebner’
Singular’s
groebner
command- ‘singular:std’
Singular’s
std
command- ‘singular:stdhilb’
Singular’s
stdhib
command- ‘singular:stdfglm’
Singular’s
stdfglm
command- ‘singular:slimgb’
Singular’s
slimgb
command- ‘libsingular:std’
libSingular’s
std
command- ‘libsingular:slimgb’
libSingular’s
slimgb
command- ‘toy:buchberger’
Sage’s toy/educational buchberger without strategy
- ‘toy:buchberger2’
Sage’s toy/educational buchberger with strategy
- ‘toy:d_basis’
Sage’s toy/educational d_basis algorithm
- ‘macaulay2:gb’
Macaulay2’s
gb
command (if available)- ‘magma:GroebnerBasis’
Magma’s
Groebnerbasis
command (if available)
If only a system is given - e.g. ‘magma’ - the default algorithm is chosen for that system.
Note
The Singular and libSingular versions of the respective algorithms are identical, but the former calls an external Singular process while the later calls a C function, i.e. the calling overhead is smaller.
EXAMPLES:
sage: X.<x,y> = InfinitePolynomialRing(QQ) sage: I1 = X * (x[1] + x[2], x[1]*x[2]) sage: I1.groebner_basis() # needs sage.combinat [x_1] sage: I2 = X * (y[1]^2*y[3] + y[1]*x[3]) sage: I2.groebner_basis() # needs sage.combinat [x_1*y_2 + y_2^2*y_1, x_2*y_1 + y_2*y_1^2]
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x', 'y',)); (x, y,) = X._first_ngens(2) >>> I1 = X * (x[Integer(1)] + x[Integer(2)], x[Integer(1)]*x[Integer(2)]) >>> I1.groebner_basis() # needs sage.combinat [x_1] >>> I2 = X * (y[Integer(1)]**Integer(2)*y[Integer(3)] + y[Integer(1)]*x[Integer(3)]) >>> I2.groebner_basis() # needs sage.combinat [x_1*y_2 + y_2^2*y_1, x_2*y_1 + y_2*y_1^2]
Note that a symmetric Groebner basis of a principal ideal is not necessarily formed by a single polynomial.
When using the algorithm originally suggested by Aschenbrenner and Hillar, the result is the same, but the computation takes much longer:
sage: I2.groebner_basis(use_full_group=True) # needs sage.combinat [x_1*y_2 + y_2^2*y_1, x_2*y_1 + y_2*y_1^2]
>>> from sage.all import * >>> I2.groebner_basis(use_full_group=True) # needs sage.combinat [x_1*y_2 + y_2^2*y_1, x_2*y_1 + y_2*y_1^2]
Last, we demonstrate how the report on the progress of computations looks like:
sage: I1.groebner_basis(report=True, reduced=True) # needs sage.combinat Symmetric interreduction [1/2] > [2/2] :> [1/2] > [2/2] > Symmetrise 2 polynomials at level 2 Apply permutations > > Symmetric interreduction [1/3] > [2/3] > [3/3] :> -> 0 [1/2] > [2/2] > Symmetrisation done Classical Groebner basis -> 2 generators Symmetric interreduction [1/2] > [2/2] > Symmetrise 2 polynomials at level 3 Apply permutations > > :> ::> :> ::> Symmetric interreduction [1/4] > [2/4] :> -> 0 [3/4] ::> -> 0 [4/4] :> -> 0 [1/1] > Apply permutations :> :> :> Symmetric interreduction [1/1] > Classical Groebner basis -> 1 generators Symmetric interreduction [1/1] > Symmetrise 1 polynomials at level 4 Apply permutations > :> :> > :> :> Symmetric interreduction [1/2] > [2/2] :> -> 0 [1/1] > Symmetric interreduction [1/1] > [x_1]
>>> from sage.all import * >>> I1.groebner_basis(report=True, reduced=True) # needs sage.combinat Symmetric interreduction [1/2] > [2/2] :> [1/2] > [2/2] > Symmetrise 2 polynomials at level 2 Apply permutations > > Symmetric interreduction [1/3] > [2/3] > [3/3] :> -> 0 [1/2] > [2/2] > Symmetrisation done Classical Groebner basis -> 2 generators Symmetric interreduction [1/2] > [2/2] > Symmetrise 2 polynomials at level 3 Apply permutations > > :> ::> :> ::> Symmetric interreduction [1/4] > [2/4] :> -> 0 [3/4] ::> -> 0 [4/4] :> -> 0 [1/1] > Apply permutations :> :> :> Symmetric interreduction [1/1] > Classical Groebner basis -> 1 generators Symmetric interreduction [1/1] > Symmetrise 1 polynomials at level 4 Apply permutations > :> :> > :> :> Symmetric interreduction [1/2] > [2/2] :> -> 0 [1/1] > Symmetric interreduction [1/1] > [x_1]
The Aschenbrenner-Hillar algorithm is only guaranteed to work if the base ring is a field. So, we raise a
TypeError
if this is not the case:sage: R.<x,y> = InfinitePolynomialRing(ZZ) sage: I = R * [x[1] + x[2], y[1]] sage: I.groebner_basis() # needs sage.combinat Traceback (most recent call last): ... TypeError: The base ring (= Integer Ring) must be a field
>>> from sage.all import * >>> R = InfinitePolynomialRing(ZZ, names=('x', 'y',)); (x, y,) = R._first_ngens(2) >>> I = R * [x[Integer(1)] + x[Integer(2)], y[Integer(1)]] >>> I.groebner_basis() # needs sage.combinat Traceback (most recent call last): ... TypeError: The base ring (= Integer Ring) must be a field
- interreduced_basis()[source]#
A fully symmetrically reduced generating set (type
Sequence
) of self.This does essentially the same as
interreduction()
with the option ‘tailreduce’, but it returns aSequence
rather than aSymmetricIdeal
.EXAMPLES:
sage: X.<x> = InfinitePolynomialRing(QQ) sage: I = X * (x[1] + x[2], x[1]*x[2]) sage: I.interreduced_basis() # needs sage.combinat [-x_1^2, x_2 + x_1]
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x',)); (x,) = X._first_ngens(1) >>> I = X * (x[Integer(1)] + x[Integer(2)], x[Integer(1)]*x[Integer(2)]) >>> I.interreduced_basis() # needs sage.combinat [-x_1^2, x_2 + x_1]
- interreduction(tailreduce=True, sorted=False, report=None, RStrat=None)[source]#
Return symmetrically interreduced form of
self
.INPUT:
tailreduce
– (bool, defaultTrue
) IfTrue
, the interreduction is also performed on the non-leading monomials.sorted
– (bool, defaultFalse
) IfTrue
, it is assumed that the generators ofself
are already increasingly sorted.report
– (object, defaultNone
) If notNone
, some information on the progress of computation is printedRStrat
– (SymmetricReductionStrategy
, defaultNone
) A reduction strategy to which the polynomials resulting from the interreduction will be added. IfRStrat
already contains some polynomials, they will be used in the interreduction. The effect is to compute in a quotient ring.
OUTPUT:
A Symmetric Ideal \(J\) (sorted list of generators) coinciding with
self
as an ideal, so that any generator is symmetrically reduced w.r.t. the other generators. Note that the leading coefficients of the result are not necessarily 1.EXAMPLES:
sage: X.<x> = InfinitePolynomialRing(QQ) sage: I = X * (x[1] + x[2], x[1]*x[2]) sage: I.interreduction() # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x',)); (x,) = X._first_ngens(1) >>> I = X * (x[Integer(1)] + x[Integer(2)], x[Integer(1)]*x[Integer(2)]) >>> I.interreduction() # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field
Here, we show the
report
option:sage: I.interreduction(report=True) # needs sage.combinat Symmetric interreduction [1/2] > [2/2] :> [1/2] > [2/2] T[1]> > Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field
>>> from sage.all import * >>> I.interreduction(report=True) # needs sage.combinat Symmetric interreduction [1/2] > [2/2] :> [1/2] > [2/2] T[1]> > Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field
[m/n]
indicates that polynomial numberm
is considered and the total number of polynomials under consideration isn
. ‘-> 0’ is printed if a zero reduction occurred. The rest of the report is as described insage.rings.polynomial.symmetric_reduction.SymmetricReductionStrategy.reduce()
.Last, we demonstrate the use of the optional parameter
RStrat
:sage: from sage.rings.polynomial.symmetric_reduction import SymmetricReductionStrategy sage: R = SymmetricReductionStrategy(X); R Symmetric Reduction Strategy in Infinite polynomial ring in x over Rational Field sage: I.interreduction(RStrat=R) # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field sage: R # needs sage.combinat Symmetric Reduction Strategy in Infinite polynomial ring in x over Rational Field, modulo x_1^2, x_2 + x_1 sage: R = SymmetricReductionStrategy(X, [x[1]^2]) sage: I.interreduction(RStrat=R) # needs sage.combinat Symmetric Ideal (x_2 + x_1) of Infinite polynomial ring in x over Rational Field
>>> from sage.all import * >>> from sage.rings.polynomial.symmetric_reduction import SymmetricReductionStrategy >>> R = SymmetricReductionStrategy(X); R Symmetric Reduction Strategy in Infinite polynomial ring in x over Rational Field >>> I.interreduction(RStrat=R) # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field >>> R # needs sage.combinat Symmetric Reduction Strategy in Infinite polynomial ring in x over Rational Field, modulo x_1^2, x_2 + x_1 >>> R = SymmetricReductionStrategy(X, [x[Integer(1)]**Integer(2)]) >>> I.interreduction(RStrat=R) # needs sage.combinat Symmetric Ideal (x_2 + x_1) of Infinite polynomial ring in x over Rational Field
- is_maximal()[source]#
Answer whether
self
is a maximal ideal.ASSUMPTION:
self
is defined by a symmetric Groebner basis.NOTE:
It is not checked whether
self
is in fact a symmetric Groebner basis. A wrong answer can result if this assumption does not hold. ANotImplementedError
is raised if the base ring is not a field, since symmetric Groebner bases are not implemented in this setting.EXAMPLES:
sage: R.<x,y> = InfinitePolynomialRing(QQ) sage: I = R.ideal([x[1] + y[2], x[2] - y[1]]) sage: I = R * I.groebner_basis(); I # needs sage.combinat Symmetric Ideal (y_1, x_1) of Infinite polynomial ring in x, y over Rational Field sage: I = R.ideal([x[1] + y[2], x[2] - y[1]]) # needs sage.combinat sage: I.is_maximal() # needs sage.combinat False
>>> from sage.all import * >>> R = InfinitePolynomialRing(QQ, names=('x', 'y',)); (x, y,) = R._first_ngens(2) >>> I = R.ideal([x[Integer(1)] + y[Integer(2)], x[Integer(2)] - y[Integer(1)]]) >>> I = R * I.groebner_basis(); I # needs sage.combinat Symmetric Ideal (y_1, x_1) of Infinite polynomial ring in x, y over Rational Field >>> I = R.ideal([x[Integer(1)] + y[Integer(2)], x[Integer(2)] - y[Integer(1)]]) # needs sage.combinat >>> I.is_maximal() # needs sage.combinat False
The preceding answer is wrong, since it is not the case that
I
is given by a symmetric Groebner basis:sage: I = R * I.groebner_basis(); I # needs sage.combinat Symmetric Ideal (y_1, x_1) of Infinite polynomial ring in x, y over Rational Field sage: I.is_maximal() # needs sage.combinat True
>>> from sage.all import * >>> I = R * I.groebner_basis(); I # needs sage.combinat Symmetric Ideal (y_1, x_1) of Infinite polynomial ring in x, y over Rational Field >>> I.is_maximal() # needs sage.combinat True
- normalisation()[source]#
Return an ideal that coincides with
self
, so that all generators have leading coefficient 1.Possibly occurring zeroes are removed from the generator list.
EXAMPLES:
sage: X.<x> = InfinitePolynomialRing(QQ) sage: I = X*(1/2*x[1] + 2/3*x[2], 0, 4/5*x[1]*x[2]) sage: I.normalisation() Symmetric Ideal (x_2 + 3/4*x_1, x_2*x_1) of Infinite polynomial ring in x over Rational Field
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x',)); (x,) = X._first_ngens(1) >>> I = X*(Integer(1)/Integer(2)*x[Integer(1)] + Integer(2)/Integer(3)*x[Integer(2)], Integer(0), Integer(4)/Integer(5)*x[Integer(1)]*x[Integer(2)]) >>> I.normalisation() Symmetric Ideal (x_2 + 3/4*x_1, x_2*x_1) of Infinite polynomial ring in x over Rational Field
- reduce(I, tailreduce=False)[source]#
Symmetric reduction of
self
by another Symmetric Ideal or list of Infinite Polynomials, or symmetric reduction of a given Infinite Polynomial byself
.INPUT:
I
– an Infinite Polynomial, or a Symmetric Ideal or a list of Infinite Polynomials.tailreduce
– (bool, defaultFalse
) IfTrue
, the non-leading terms will be reduced as well.
OUTPUT:
Symmetric reduction of
self
with respect toI
.THEORY:
Reduction of an element \(p\) of an Infinite Polynomial Ring \(X\) by some other element \(q\) means the following:
Let \(M\) and \(N\) be the leading terms of \(p\) and \(q\).
Test whether there is a permutation \(P\) that does not does not diminish the variable indices occurring in \(N\) and preserves their order, so that there is some term \(T\in X\) with \(T N^P = M\). If there is no such permutation, return \(p\)
Replace \(p\) by \(p - T q^P\) and continue with step 1.
EXAMPLES:
sage: X.<x,y> = InfinitePolynomialRing(QQ) sage: I = X * (y[1]^2*y[3] + y[1]*x[3]^2) sage: I.reduce([x[1]^2*y[2]]) Symmetric Ideal (x_3^2*y_1 + y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x', 'y',)); (x, y,) = X._first_ngens(2) >>> I = X * (y[Integer(1)]**Integer(2)*y[Integer(3)] + y[Integer(1)]*x[Integer(3)]**Integer(2)) >>> I.reduce([x[Integer(1)]**Integer(2)*y[Integer(2)]]) Symmetric Ideal (x_3^2*y_1 + y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field
The preceding is correct, since any permutation that turns
x[1]^2*y[2]
into a factor ofx[3]^2*y[2]
interchanges the variable indices 1 and 2 – which is not allowed. However, reduction byx[2]^2*y[1]
works, since one can change variable index 1 into 2 and 2 into 3:sage: I.reduce([x[2]^2*y[1]]) # needs sage.combinat Symmetric Ideal (y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field
>>> from sage.all import * >>> I.reduce([x[Integer(2)]**Integer(2)*y[Integer(1)]]) # needs sage.combinat Symmetric Ideal (y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field
The next example shows that tail reduction is not done, unless it is explicitly advised. The input can also be a symmetric ideal:
sage: J = (y[2]) * X sage: I.reduce(J) Symmetric Ideal (x_3^2*y_1 + y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field sage: I.reduce(J, tailreduce=True) # needs sage.combinat Symmetric Ideal (x_3^2*y_1) of Infinite polynomial ring in x, y over Rational Field
>>> from sage.all import * >>> J = (y[Integer(2)]) * X >>> I.reduce(J) Symmetric Ideal (x_3^2*y_1 + y_3*y_1^2) of Infinite polynomial ring in x, y over Rational Field >>> I.reduce(J, tailreduce=True) # needs sage.combinat Symmetric Ideal (x_3^2*y_1) of Infinite polynomial ring in x, y over Rational Field
- squeezed()[source]#
Reduce the variable indices occurring in
self
.OUTPUT:
A Symmetric Ideal whose generators are the result of applying
squeezed()
to the generators ofself
.NOTE:
The output describes the same Symmetric Ideal as
self
.EXAMPLES:
sage: X.<x,y> = InfinitePolynomialRing(QQ, implementation='sparse') sage: I = X * (x[1000]*y[100], x[50]*y[1000]) sage: I.squeezed() Symmetric Ideal (x_2*y_1, x_1*y_2) of Infinite polynomial ring in x, y over Rational Field
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, implementation='sparse', names=('x', 'y',)); (x, y,) = X._first_ngens(2) >>> I = X * (x[Integer(1000)]*y[Integer(100)], x[Integer(50)]*y[Integer(1000)]) >>> I.squeezed() Symmetric Ideal (x_2*y_1, x_1*y_2) of Infinite polynomial ring in x, y over Rational Field
- symmetric_basis()[source]#
A symmetrised generating set (type
Sequence
) ofself
.This does essentially the same as
symmetrisation()
with the optiontailreduce
, and it returns aSequence
rather than aSymmetricIdeal
.EXAMPLES:
sage: X.<x> = InfinitePolynomialRing(QQ) sage: I = X * (x[1] + x[2], x[1]*x[2]) sage: I.symmetric_basis() # needs sage.combinat [x_1^2, x_2 + x_1]
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x',)); (x,) = X._first_ngens(1) >>> I = X * (x[Integer(1)] + x[Integer(2)], x[Integer(1)]*x[Integer(2)]) >>> I.symmetric_basis() # needs sage.combinat [x_1^2, x_2 + x_1]
- symmetrisation(N=None, tailreduce=False, report=None, use_full_group=False)[source]#
Apply permutations to the generators of
self
and interreduce.INPUT:
N
– (integer, defaultNone
) Apply permutations in \(Sym(N)\). If it is not given then it will be replaced by the maximal variable index occurring in the generators ofself.interreduction().squeezed()
.tailreduce
– (bool, defaultFalse
) IfTrue
, perform tail reductions.report
– (object, defaultNone
) If notNone
, report on the progress of computations.use_full_group
(optional) – IfTrue
, apply all elements of \(Sym(N)\) to the generators ofself
(this is what [AB2008] originally suggests). The default is to apply all elementary transpositions to the generators ofself.squeezed()
, interreduce, and repeat until the result stabilises, which is often much faster than applying all of \(Sym(N)\), and we are convinced that both methods yield the same result.
OUTPUT:
A symmetrically interreduced symmetric ideal with respect to which any \(Sym(N)\)-translate of a generator of
self
is symmetrically reducible, where by defaultN
is the maximal variable index that occurs in the generators ofself.interreduction().squeezed()
.NOTE:
If
I
is a symmetric ideal whose generators are monomials, thenI.symmetrisation()
is its reduced Groebner basis. It should be noted that without symmetrisation, monomial generators, in general, do not form a Groebner basis.EXAMPLES:
sage: X.<x> = InfinitePolynomialRing(QQ) sage: I = X * (x[1] + x[2], x[1]*x[2]) sage: I.symmetrisation() # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field sage: I.symmetrisation(N=3) # needs sage.combinat Symmetric Ideal (-2*x_1) of Infinite polynomial ring in x over Rational Field sage: I.symmetrisation(N=3, use_full_group=True) # needs sage.combinat Symmetric Ideal (-2*x_1) of Infinite polynomial ring in x over Rational Field
>>> from sage.all import * >>> X = InfinitePolynomialRing(QQ, names=('x',)); (x,) = X._first_ngens(1) >>> I = X * (x[Integer(1)] + x[Integer(2)], x[Integer(1)]*x[Integer(2)]) >>> I.symmetrisation() # needs sage.combinat Symmetric Ideal (-x_1^2, x_2 + x_1) of Infinite polynomial ring in x over Rational Field >>> I.symmetrisation(N=Integer(3)) # needs sage.combinat Symmetric Ideal (-2*x_1) of Infinite polynomial ring in x over Rational Field >>> I.symmetrisation(N=Integer(3), use_full_group=True) # needs sage.combinat Symmetric Ideal (-2*x_1) of Infinite polynomial ring in x over Rational Field