Invariants and transformations¶
Invariant class that associates a value with every dimension vector
An invariant can be constructed from a TMPolynomial, a dictionary, a function or another invariant. Every invariant can be transformed to a TMPolynomial or a dictionary. We cache the values of an invariant so that they don’t have to be computed repeatedly.
EXAMPLES:
sage: from msinvar import *
sage: R=TMPoly(prec=[3]); R
Multivariate Polynomial Ring in x over Rational Field truncated at degree [3]
sage: x=R.gen(); x.Exp()
1 + x + x^2 + x^3
sage: I=Invariant(x.Exp()); I
Invariant
sage: I.dict()
{(0,): 1, (1,): 1, (2,): 1, (3,): 1}
sage: I.Log().dict()
{(1,): 1}
sage: I.Log().poly()
x
-
class
msinvar.invariants.
Invariant
(f, R=None)[source]¶ Bases:
object
Invariant class that associates an invariants I(d) with every dimension vector d.
An argument can be a TMPolynomial, a dictionary, a function or another invariant. Objects have methods that return associated TMPolynomials and dictionaries. If possible, we save the ring (TMPoly) in order to transform our invariant to a polynomial.
f
– function, TMPolynomial, dictionary, Invariant.R
– a ring TMPolynomialRing.
-
value
()¶
-
dict
(prec=None, stab=None, slope=0)[source]¶ Convert invariant to a dictionary, with keys bounded by self.prec().
-
to_series
(R=None, stab=None, slope=None)¶ Convert invariant to a TMPolynomial.
-
series
(R=None, stab=None, slope=None)¶ Convert invariant to a TMPolynomial.
-
msinvar.invariants.
recursive_inversion
(T)[source]¶ Invert the transformation (map on invariants) T, assuming that T(I)(d) is a sum of I(d) and some expression that depends just on I(e) with e<d.
Note that exp and log are not of this form for d=0.
-
class
msinvar.invariants.
Transform
(F, twist=None)[source]¶ Bases:
object
A class to transform invariants. Based on arXiv:2101.07636.
It is encoded by a map from the set of lists of vectors to rational numbers.
We define actions of transforms on 1-collections (Invariant class), plethysm between transforms, inverse transfroms.
INPUT:
F
– transformation map from lists of vectors to Q (or base ring).twist
– product twist, map from sequences of vectors to the base ring.
-
value
()¶
-
inverse
()¶
-
msinvar.invariants.
reineke_sign
(l, z, tot=None)[source]¶ Used in
reineke_transform()
.
-
msinvar.invariants.
reineke_transform
(z)[source]¶ Based on arXiv:math/0204059 and arXiv:2101.07636.
-
msinvar.invariants.
joyce_sign
(l, z, z1, tot=None)[source]¶ Used in
joyce_transform()
.
-
msinvar.invariants.
joyce_transform
(z, z1)[source]¶ Based on arXiv:math/0410268 and arXiv:2101.07636.
-
msinvar.invariants.
HN_transform
(z)[source]¶ See arXiv:2101.07636.
-
msinvar.invariants.
plog_fast
(I)[source]¶ Return the logarithm taken separately along each ray.
We construct a dictionary of such logarithms with keys parametrized by indivisible vectors. The logarithm is taken in the ring of truncated polynomials. Therefore I.R and its precision vector are required.
-
msinvar.invariants.
pexp_fast
(I)[source]¶ See
plog_fast()
.