Skip to content
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

sage.{dynamics,schemes}: Modularization fixes, docstring cosmetics, update # needs #36271

Merged
merged 35 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5257002
sage.schemes: Update # needs
mkoeppe Sep 3, 2023
26bda85
Fix # needs for sagemath-pari
mkoeppe Sep 3, 2023
796265f
sage.schemes: Update # needs
mkoeppe Sep 4, 2023
75b8262
src/sage/dynamics/complex_dynamics/mandel_julia.py: Use lazy_import
mkoeppe Sep 4, 2023
0284add
sage.schemes: Doctest cosmetics, update # needs
mkoeppe Sep 5, 2023
d962ea5
src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx: Docstring cosme…
mkoeppe Sep 6, 2023
420ca2b
sage.schemes.projective: Add # needs
mkoeppe Sep 9, 2023
1391f91
sage.dynamics: Doctest cosmetics
mkoeppe May 14, 2023
6e08d6f
Massive modularization fixes
mkoeppe May 17, 2023
230b734
sage.dynamics.arithmetic_dynamics: Modularization fixes for imports
mkoeppe Jul 3, 2023
0d6869a
Update # optional / # needs
mkoeppe Jul 3, 2023
565663e
Fix up imports
mkoeppe Jul 4, 2023
53e8a00
src/sage/dynamics: sage -fixdoctests --only-tags
mkoeppe Aug 8, 2023
d41ca2a
src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx: Add # needs
mkoeppe Aug 18, 2023
a7ad632
sage.dynamics: Add # needs
mkoeppe Sep 9, 2023
a0379b5
sage.schemes: Update # needs
mkoeppe Sep 9, 2023
92489a4
sage.schemes: Update # needs
mkoeppe Sep 10, 2023
c3b7079
sage.schemes: Update # needs
mkoeppe Sep 12, 2023
d8141b2
sage.schemes: Update # needs
mkoeppe Sep 12, 2023
3538ede
projective_morphism.py, projective_ds.py: Test for QQbar using sage.r…
mkoeppe Sep 23, 2023
3e74476
sage.schemes: Modularization fixes
mkoeppe Jun 5, 2023
23fecb1
sage.schemes: Modularization fixes for imports
mkoeppe Mar 27, 2023
67b279f
sage.schemes, sage.dynamics.arithmetic_dynamics: Modularization fixes
mkoeppe Sep 23, 2023
dce871a
sage.{rings,schemes}: Simplify some tests for number fields
mkoeppe May 14, 2023
d78e78a
sage.schemes, sage.dynamics.arithmetic_dynamics: Modularization fixes
mkoeppe Sep 23, 2023
4703d09
Merge tag '10.2.beta4' into needs_for_sage_schemes_sage_dynamics
mkoeppe Sep 24, 2023
b39df39
sage.schemes: Update # needs
mkoeppe Sep 24, 2023
a1195b0
sage.schemes: Update # needs
mkoeppe Sep 24, 2023
e38afeb
src/sage/dynamics/arithmetic_dynamics/berkovich_ds.py: Use file and b…
mkoeppe Oct 1, 2023
8443583
src/sage/dynamics/arithmetic_dynamics/projective_ds.py: Many more blo…
mkoeppe Oct 1, 2023
869d776
src/sage/dynamics/arithmetic_dynamics/wehlerK3.py: update error messa…
mkoeppe Oct 1, 2023
1b873b9
src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py: Docstring…
mkoeppe Oct 1, 2023
ba0a3d7
src/sage/dynamics/arithmetic_dynamics/projective_ds.py: Fixup
mkoeppe Oct 1, 2023
871c390
Merge branch 'develop' into needs_for_sage_schemes_sage_dynamics
mkoeppe Oct 8, 2023
7033d7d
Merge tag '10.2.beta8' into needs_for_sage_schemes_sage_dynamics
mkoeppe Oct 21, 2023
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
68 changes: 42 additions & 26 deletions src/sage/dynamics/arithmetic_dynamics/affine_ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ class DynamicalSystem_affine(SchemeMorphism_polynomial_affine_space,

If you pass in quotient ring elements, they are reduced::

sage: # needs sage.libs.singular
sage: A.<x,y,z> = AffineSpace(QQ, 3)
sage: X = A.subscheme([x-y])
sage: X = A.subscheme([x - y])
sage: u,v,w = X.coordinate_ring().gens()
sage: DynamicalSystem_affine([u, v, u+v], domain=X)
Dynamical System of Closed subscheme of Affine Space of dimension 3
Expand All @@ -174,9 +175,10 @@ class DynamicalSystem_affine(SchemeMorphism_polynomial_affine_space,

::

sage: # needs sage.libs.singular
sage: R.<t> = PolynomialRing(QQ)
sage: A.<x,y,z> = AffineSpace(R, 3)
sage: X = A.subscheme(x^2-y^2)
sage: X = A.subscheme(x^2 - y^2)
sage: H = End(X)
sage: f = H([x^2/(t*y), t*y^2, x*z])
sage: DynamicalSystem_affine(f)
Expand All @@ -188,8 +190,8 @@ class DynamicalSystem_affine(SchemeMorphism_polynomial_affine_space,

::

sage: x = var('x')
sage: DynamicalSystem_affine(x^2+1)
sage: x = var('x') # needs sage.symbolic
sage: DynamicalSystem_affine(x^2 + 1) # needs sage.symbolic
Traceback (most recent call last):
...
TypeError: symbolic ring cannot be the base ring
Expand Down Expand Up @@ -397,10 +399,11 @@ def homogenize(self, n):

::

sage: # needs sage.rings.number_field
sage: R.<a> = PolynomialRing(QQbar)
sage: A.<x,y> = AffineSpace(R, 2)
sage: f = DynamicalSystem_affine([QQbar(sqrt(2))*x*y, a*x^2])
sage: f.homogenize(2)
sage: f = DynamicalSystem_affine([QQbar(sqrt(2))*x*y, a*x^2]) # needs sage.symbolic
sage: f.homogenize(2) # needs sage.symbolic
Dynamical System of Projective Space of dimension 2 over Univariate
Polynomial Ring in a over Algebraic Field
Defn: Defined on coordinates by sending (x0 : x1 : x2) to
Expand Down Expand Up @@ -453,7 +456,7 @@ def dynatomic_polynomial(self, period):

sage: A.<x> = AffineSpace(ZZ, 1)
sage: f = DynamicalSystem_affine([(x^2+1)/x])
sage: f.dynatomic_polynomial(4)
sage: f.dynatomic_polynomial(4) # needs sage.libs.pari
2*x^12 + 18*x^10 + 57*x^8 + 79*x^6 + 48*x^4 + 12*x^2 + 1

::
Expand Down Expand Up @@ -507,8 +510,8 @@ def dynatomic_polynomial(self, period):
::

sage: A.<x> = AffineSpace(CC,1)
sage: F = DynamicalSystem_affine([1/2*x^2 + CC(sqrt(3))])
sage: F.dynatomic_polynomial([1,1])
sage: F = DynamicalSystem_affine([1/2*x^2 + CC(sqrt(3))]) # needs sage.symbolic
sage: F.dynatomic_polynomial([1,1]) # needs sage.symbolic
(0.125000000000000*x^4 + 0.366025403784439*x^2 + 1.50000000000000)/(0.500000000000000*x^2 - x + 1.73205080756888)

TESTS::
Expand Down Expand Up @@ -770,7 +773,7 @@ def multiplier(self, P, n, check=True):

sage: P.<x> = AffineSpace(CC, 1)
sage: f = DynamicalSystem_affine([x^2 + 1/2])
sage: f.multiplier(P([0.5 + 0.5*I]), 1)
sage: f.multiplier(P([0.5 + 0.5*I]), 1) # needs sage.symbolic
[1.00000000000000 + 1.00000000000000*I]

::
Expand All @@ -784,7 +787,7 @@ def multiplier(self, P, n, check=True):
::

sage: P.<x,y> = AffineSpace(QQ, 2)
sage: X = P.subscheme([x^2-y^2])
sage: X = P.subscheme([x^2 - y^2])
sage: f = DynamicalSystem_affine([x^2, y^2], domain=X)
sage: f.multiplier(X([1, 1]), 1)
[2 0]
Expand Down Expand Up @@ -823,7 +826,7 @@ def conjugate(self, M):
EXAMPLES::

sage: A.<t> = AffineSpace(QQ, 1)
sage: f = DynamicalSystem_affine([t^2+1])
sage: f = DynamicalSystem_affine([t^2 + 1])
sage: f.conjugate(matrix([[1,2], [0,1]]))
Dynamical System of Affine Space of dimension 1 over Rational Field
Defn: Defined on coordinates by sending (t) to
Expand All @@ -832,18 +835,20 @@ def conjugate(self, M):
::

sage: A.<x,y> = AffineSpace(ZZ,2)
sage: f = DynamicalSystem_affine([x^3+y^3,y^2])
sage: f = DynamicalSystem_affine([x^3 + y^3, y^2])
sage: f.conjugate(matrix([[1,2,3], [0,1,2], [0,0,1]]))
Dynamical System of Affine Space of dimension 2 over Integer Ring
Defn: Defined on coordinates by sending (x, y) to
(x^3 + 6*x^2*y + 12*x*y^2 + 9*y^3 + 9*x^2 + 36*x*y + 40*y^2 + 27*x + 58*y + 28, y^2 + 4*y + 2)
(x^3 + 6*x^2*y + 12*x*y^2 + 9*y^3
+ 9*x^2 + 36*x*y + 40*y^2 + 27*x + 58*y + 28, y^2 + 4*y + 2)

::

sage: # needs sage.rings.number_field
sage: R.<x> = PolynomialRing(QQ)
sage: K.<i> = NumberField(x^2+1)
sage: K.<i> = NumberField(x^2 + 1)
sage: A.<x> = AffineSpace(ZZ,1)
sage: f = DynamicalSystem_affine([x^3+2*x^2+3])
sage: f = DynamicalSystem_affine([x^3 + 2*x^2 + 3])
sage: f.conjugate(matrix([[i,i], [0,-i]]))
Dynamical System of Affine Space of dimension 1 over Integer Ring
Defn: Defined on coordinates by sending (x) to
Expand All @@ -860,6 +865,7 @@ def degree(self):

EXAMPLES::

sage: # needs sage.rings.number_field
sage: R.<c> = QuadraticField(7)
sage: A.<x,y,z> = AffineSpace(R, 3)
sage: f = DynamicalSystem_affine([x^2 + y^5 + c, x^11, z^19])
Expand Down Expand Up @@ -911,16 +917,18 @@ def weil_restriction(self):

EXAMPLES::

sage: # needs sage.rings.number_field
sage: K.<v> = QuadraticField(5)
sage: A.<x,y> = AffineSpace(K, 2)
sage: f = DynamicalSystem_affine([x^2-y^2, y^2])
sage: f = DynamicalSystem_affine([x^2 - y^2, y^2])
sage: f.weil_restriction()
Dynamical System of Affine Space of dimension 4 over Rational Field
Defn: Defined on coordinates by sending (z0, z1, z2, z3) to
(z0^2 + 5*z1^2 - z2^2 - 5*z3^2, 2*z0*z1 - 2*z2*z3, z2^2 + 5*z3^2, 2*z2*z3)

::

sage: # needs sage.rings.number_field
sage: K.<v> = QuadraticField(5)
sage: PS.<x,y> = AffineSpace(K, 2)
sage: f = DynamicalSystem_affine([x, y])
Expand All @@ -940,13 +948,14 @@ def reduce_base_field(self):
The base field of the map could be strictly larger than
the field where all of the coefficients are defined. This function
reduces the base field to the minimal possible. This can be done when
the base ring is a number field, QQbar, a finite field, or algebraic
the base ring is a number field, ``QQbar``, a finite field, or algebraic
closure of a finite field.

OUTPUT: A dynamical system

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: K.<t> = GF(5^2)
sage: A.<x,y> = AffineSpace(K, 2)
sage: f = DynamicalSystem_affine([x^2 + 3*y^2, 3*y^2])
Expand All @@ -957,15 +966,20 @@ def reduce_base_field(self):

::

sage: # needs sage.rings.number_field sage.symbolic
sage: A.<x,y> = AffineSpace(QQbar, 2)
sage: f = DynamicalSystem_affine([x^2 + QQbar(sqrt(3))*y^2, QQbar(sqrt(-1))*y^2])
sage: f = DynamicalSystem_affine([x^2 + QQbar(sqrt(3))*y^2,
....: QQbar(sqrt(-1))*y^2])
sage: f.reduce_base_field()
Dynamical System of Affine Space of dimension 2 over Number Field in a with defining polynomial y^4 - y^2 + 1 with a = -0.866025403784439? + 0.50000000000000000?*I
Dynamical System of Affine Space of dimension 2 over Number Field in a
with defining polynomial y^4 - y^2 + 1
with a = -0.866025403784439? + 0.50000000000000000?*I
Defn: Defined on coordinates by sending (x, y) to
(x^2 + (a^3 - 2*a)*y^2, (a^3)*y^2)

::

sage: # needs sage.rings.number_field
sage: K.<v> = CyclotomicField(5)
sage: A.<x,y> = AffineSpace(K, 2)
sage: f = DynamicalSystem_affine([(3*x^2 + y) / (5*x), (y^2+1) / (x+y)])
Expand Down Expand Up @@ -1001,6 +1015,7 @@ def orbit_structure(self, P):

::

sage: # needs sage.rings.finite_rings
sage: A.<x,y,z> = AffineSpace(GF(49, 't'), 3)
sage: f = DynamicalSystem_affine([x^2 - z, x - y + z, y^2 - x^2])
sage: f.orbit_structure(A(1, 1, 2))
Expand Down Expand Up @@ -1028,23 +1043,24 @@ def cyclegraph(self):
EXAMPLES::

sage: P.<x,y> = AffineSpace(GF(5), 2)
sage: f = DynamicalSystem_affine([x^2-y, x*y+1])
sage: f.cyclegraph()
sage: f = DynamicalSystem_affine([x^2 - y, x*y + 1])
sage: f.cyclegraph() # needs sage.graphs
Looped digraph on 25 vertices

::

sage: # needs sage.rings.finite_rings
sage: P.<x> = AffineSpace(GF(3^3, 't'), 1)
sage: f = DynamicalSystem_affine([x^2-1])
sage: f.cyclegraph()
sage: f = DynamicalSystem_affine([x^2 - 1])
sage: f.cyclegraph() # needs sage.graphs
Looped digraph on 27 vertices

::

sage: P.<x,y> = AffineSpace(GF(7), 2)
sage: X = P.subscheme(x-y)
sage: X = P.subscheme(x - y)
sage: f = DynamicalSystem_affine([x^2, y^2], domain=X)
sage: f.cyclegraph()
sage: f.cyclegraph() # needs sage.graphs
Looped digraph on 7 vertices
"""
V = []
Expand Down
Loading
Loading