Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
181 views
unlisted
ubuntu2004
1
# -*- coding: utf-8 -*-
2
r"""
3
Test the deprecations from the former tautclass (see https://gitlab.com/modulispaces/admcycles/-/merge_requests/109)::
4
5
sage: from admcycles import *
6
sage: from admcycles.admcycles import *
7
8
sage: gamma = StableGraph([1,2],[[1,2],[3]],[(2,3)])
9
sage: ds1 = decstratum(gamma, kappa=[[1],[]]); ds1
10
Graph : [1, 2] [[1, 2], [3]] [(2, 3)]
11
Polynomial : (kappa_1)_0
12
sage: ds2 = decstratum(gamma, kappa=[[],[1]]); ds2
13
Graph : [1, 2] [[1, 2], [3]] [(2, 3)]
14
Polynomial : (kappa_1)_1
15
sage: t = tautclass([ds1, ds2])
16
sage: (t - gamma.to_tautclass() * kappaclass(1,3,1)).is_zero()
17
doctest:...: DeprecationWarning: to_tautclass is deprecated. Please use to_tautological_class instead.
18
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
19
True
20
21
sage: b = StableGraph([1],[[1,2,3]],[(2,3)]).to_tautclass()
22
sage: b.toTautbasis()
23
doctest:...: DeprecationWarning: toTautbasis is deprecated. Please use basis_vector instead.
24
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
25
(10, -10, -14)
26
sage: b.toTautbasis(moduli='ct',r=1)
27
(0, 0)
28
sage: c = psiclass(1,2,2)**2
29
sage: for mod in ('st', 'tl', 'ct', 'rt', 'sm'):
30
....: print(c.toTautbasis(moduli = mod,r=2))
31
doctest:...: DeprecationWarning: toTautbasis is deprecated. Please use basis_vector instead.
32
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
33
(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
34
(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
35
(5/6, -1/6, 1/3, 0, 0)
36
(1)
37
()
38
39
sage: a = psiclass(1,2,3)
40
sage: t = a + a*a
41
sage: t.gnr_list()
42
doctest:...: DeprecationWarning: gnr_list is deprecated. Please use degree_list instead.
43
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
44
[(2, 3, 1), (2, 3, 2)]
45
46
sage: psiclass(1, 1, 1).toprodtautclass(1, 1)
47
doctest:...: DeprecationWarning: the arguments 'g' and 'n' of TautologicalClass.toprodtautclass are deprecated.
48
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
49
Outer graph : [1] [[1]] []
50
Vertex 0 :
51
Graph : [1] [[1]] []
52
Polynomial : psi_1
53
54
sage: psiclass(1, 1, 1).simplify(1, 1, 1)
55
doctest:...: DeprecationWarning: the arguments 'g, n, r' of TautologicalClass.simplify are deprecated.
56
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
57
Graph : [1] [[1]] []
58
Polynomial : psi_1
59
60
sage: a = (QQ['x'].gen() * psiclass(1, 1, 1))
61
sage: a.coeff_subs(x=1)
62
doctest:...: DeprecationWarning: coeff_subs is deprecated. Please use subs instead.
63
See https://gitlab.com/modulispaces/admcycles/-/merge_requests/109 for details.
64
Graph : [1] [[1]] []
65
Polynomial : psi_1
66
sage: a
67
Graph : [1] [[1]] []
68
Polynomial : psi_1
69
"""
70
71