Sage Dynamics Ref Card v3.0
(for Sage 8.1)
Rings and Fields
ZZinteger ringZmod(m)Z/mZ
QQ
rational field QQbar
alg. clos. of QQ
RRreal field
CCcomplex field
Qp(p) p-adic fieldZp(p)p-adic integers
QQ[]
polynomials QQ[[]]
power series
GF(p) prime field
GF(pn ,’v ’) finite field
CyclotomicField(n )Q(ζn )
FractionField(ring )field√ of fractions
QuadraticField(d)Q( d)NumberField(poly,’var ’,[emb ]) number field
K.absolute_field()—K.degree()[K : Q]
K.extension(poly)
fld ext
QQ.range_by_height(bd)iterator
K.elements_of_bounded_height(bd, [params])
number_field_elements_from_algebraics(pts )Spaces and SchemesA.<vars >=AffineSpace(ring,dim )AnP.<vars >=ProjectiveSpace(ring,dim ) Pn
PP.<vars >=ProductProjectiveSpaces(ring,dims )Pn × · · · × Pm
WehlerK3Surface(polys )—S.affine_patch(i,[A])—S.base_ring()base ring S
S.change_ring()change base ringS.coordinate_ring()coor. ring of S
S.defining_ideal()—
S.defining_polynomials()—S.dimension()rel. dim of S
S.gens()vars of coord. ring
S.point_transformation_matrix([pts,pts])
find PGL element
S.projective_embedding([i,P]) —S.projective_closure([i,P])—
S.rational_points([bd,fld])—
S.subscheme(polys )subscheme of S
S.vars()vars of coord. ring
S.variable_names()vars as strings
S.weil_restriction()
restric. of const.

Dynamical System Initialization
DynamicalSystem(polys, [domain])projective if no domain
DynamicalSystem affine(polys, [domain])
DynamicalSystem projective(polys, [domain])f.as dynamical system() End → DS
Periodic Behaviorf.dynatomic_polynomial([m,n]) —Q.is_preperiodic(f )—Q.multiplier(f,n)(f n )0 (Q)Q.orbit_structure(f )[tail,period]
f.periodic_points(n,[params])—
f.rational_periodic_points([params])—
f.rational_periodic_graph([params])—
f.rational_preperiodic_points([params]) —f.rational_preperiodic_graph([params])—
f.possible_periods([params]) via good red.
Heights and Measures
Q.canonical_height(f ,[params]) ĥf (Q)P
f.critical_height()c∈Crit ĥf (c)Q.global_height([prec])h(Q)f.global_height([prec])—Q.green_function(v,[prec])at v
f.height_difference_bound()h(Q) − ĥf (Q)f.local_height_arch(i,[prec])at ∞Critical Points
f.critical_points()
f.critical_subscheme()
f.critical_point_portrait()f.critical_height()
f.is_postcritically_finite()f.wronskian_ideal()———
Pc∈Crit ĥf (c)—crit locus

Cyclic Structures
f.all_rational_preimages(points )f.cyclegraph() Fq
Q.orbit_structure(f ) Fq
Q.rational_preimages(f )Q.rational_connected_component(f)1—digraph[tail,per]——Rational Functions
f.dynamical degree()f.degree sequence()
f.indeterminacy locus()
f.indeterminancy_points()—
deg. of iterates—
if fin. many

Functionsf[i]f.automorphism_group()f.autmorphism_group()f.base_ring()
f.change_ring()
P.chebyshev_polynomial(k,kind )f.codomain()f.conjugate(φ)
f.conjugating_set(g)f.defining_polynomials()f.degree()f.dehomogenize(k)f.domain()f.homogenize(k)f.is_morphism()f.normalize_coordinates()f.nth_iterate(Q,n)
f.nth_iterate_map(n)P.Lattes(E,m)
f.orbit(Q,[m,n])f.primes_of_bad_reduction()f.resultant()
f.scale_by(t)f.specialization()
PointsQ[i]Q.change_ring()
Q.clear_denominator()
Q.codomain()Q.dehomogenize(i)Q.domain()Q.homogenize(i)Q.normalize_coordinates()
Q.nth_iterate(f ,n)Q.orbit(f ,(m,n))Q.scale_by(t)ith coord{φ : f φ = f }Hom(f, f )———φ−1 ◦ f ◦ φHom(f, g)—————remove gcd
f n (Q)fncreate Lattès map{f m (Q), . . . , f n (Q)}——t·fsubs value of param

ith coord——ambient space—base ring—
remove gcd
f n (Q)f m (Q), . . . , f n (Q)t·Q

2Iterationf.nth_iterate(Q,n)
f.nth_iterate_map(n)f.orbit(Q,[m,n])f.rational_preimages(Q,k)

f n (Q)nf m
f (Q), . . . , f n (Q)f −k (Q)

Moduli Spaces
f.is_polynomial()
has tot. ram. fixed pt.
f.is_PGL_minimal()?
f.is_conjugate(g)g = fφnf.normal_form()x + an−2 xn−2 + · · · + a0
f.minimal_model()min resultant f φf.multiplier_spectra(n,[params]){λf (Q) : Q ∈ Pern }f.sigma_invariants(n,[params]){σi (λf (Q)) : Q ∈ Pern }Finite Fields
f.cyclegraph()
Q.orbit_structure(f)iteration digraph[tail,period]

Mandelbrot and Julia Sets
external ray(v)list or single angle
mandelbrot plot([params]) for z 2 + cjulia plot([params])
for z 2 + c
Miscellaneous / Help_%timetimeit(’cmd ’,number=#)s.<tab>s.cmd ?
set_verbose(None)load(‘‘path to file ’’)copy(obj)
latex(obj)
all(list of bool )any(list of bool )sum(list )max(list )isinstance(f, type )preparser(bool )last output
execution time
time multiple iterations
show all cmds on s
info about cmd on s
disable warnings
load code file
—
—
—
—
—
—
check for typeon/off notebk preparsing

Matrices
matrix(K,n,m,list )matrix(K,list of lists )M.charpoly()
M.determinant()
M.height()
M.inverse()
M.LLL([args])
M.minors(k)M.rank()create matrix
create matrix——
global height—LLL reduced latticedets of k × k minors—

Polynomial Rings
R.<a,b>=PolynomialRing(K,2) poly ring over K
R.<a>=PolynomialRing(K)univar poly ring
R.<a>=PolynomialRing(K,1)
multivar poly ring
R.gen(k)kth variable
R.gens()all variables
R.hom(im_gens,S)
Hom(R,S)
R.ideal(polys)—
I.dimension()krull dim of R/I
I.elimination_ideal(vars )—I.gens()—I.groebner_basis()—
I.is_prime()—
I.is_maximal()—I.is_principal()—
I.is_one()—I.primary_decomposition()—I.radical()—I.ring()
R
I.variety()
rat pts of dim 0
I.vector_space_dimension()of R/I
F.monomial_coefficient(mon ) base ring element
F.polynomial(x)make univariate
F.subs(dict )substitution
F(tuple )substitution
F.coefficient(mon ) poly element
F.coefficients()—list(F)
list of (coeff,mon)F[list ]coeff of mon with exp list
F.dict()dict of mon:coef via exp
F.lift(I)coeff of gens of I to get F

Algebraic Geometry
S.Chow_form()
S.coordinate_ring()
S.defining_ideal()
S.defining_polynomials()S.degree()S.dimension()
S.intersection(T)S.intersection_multiplicity(T,Q)
S.irreducible_components()
S.is_smooth()
S.Jacobian()S.projective_closure([P])
S.rational_points([bd])S.subscheme(ideal )S.veronese embedding(d)S.weil_restriction()
S*T
S**nI.radical()——————————
PP.components()
PP.dimension_components()
PP.segre_embedding([codomain ])——————————
C.arithmetic_genus()
C.genus()
C.is_complete_intersection()
C.is_ordinary_singularity(Q)C.is_transverse(D,Q)
C.tangents(Q)associated Chow form———
from lc of hil poly
relative dimension—
Serre’s Tor——
Jacobian ideal
—
—
—
—
—
S×T
S × ··· × S
radical ideal—
list of dims
—
—
—
—
—
—

Copyright c 2017 B. Hutz, J. Silverman v3.0. Permission is granted
for noncommercial distribution provided the copyright notice andthis permission notice are preserved on all copies. Thanks to ICERM
for hosting us while version 1.0 was written.