Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: Sage Days 74
Views: 200
Kernel: SageMath 6.10

Toric Geometry in Sage

Generalization of projective space, for example P2\mathbb{P}^2

P2.<x,y,z> = toric_varieties.P2()
Sigma = P2.fan() Sigma.plot()
Image in a Jupyter notebook

Homogeneous coordinate ring

There is a homogeneous coordinate associated to each ray (1-d cone) of the fan, in this order:

P2.coordinate_ring()
Multivariate Polynomial Ring in x, y, z over Rational Field
Sigma(1)
(1-d cone of Rational polyhedral fan in 2-d lattice N, 1-d cone of Rational polyhedral fan in 2-d lattice N, 1-d cone of Rational polyhedral fan in 2-d lattice N)

Homogeneous rescalings are encoded in the linear relations between the rays

Sigma.rays()
N( 1, 0), N( 0, 1), N(-1, -1) in 2-d lattice N
u0, u1, u2 = Sigma.rays() u0 + u1 + u2

This corresponds to the homogenous rescaling [x:y:z]=[λx:λy:λz][x:y:z] = [\lambda x: \lambda y:\lambda z]

P2(2,2,2)
[2 : 2 : 2]

Points can be iterated over... lots of counting fun over finite fields can be had:

P2points = iter(P2.point_set()) [P2points.next() for i in range(10)]
[[0 : 1 : 1], [1 : 1 : 1], [-1 : 1 : 1], [1/2 : 1 : 1], [-1/2 : 1 : 1], [2 : 1 : 1], [-2 : 1 : 1], [1/3 : 1 : 1], [-1/3 : 1 : 1], [3 : 1 : 1]]
P2.change_ring(GF(5)).count_points()
31
P2.change_ring(GF(5)).point_set().list()
([0 : 0 : 1], [1 : 0 : 0], [0 : 1 : 0], [0 : 1 : 1], [0 : 1 : 2], [0 : 1 : 4], [0 : 1 : 3], [1 : 0 : 1], [1 : 0 : 2], [1 : 0 : 4], [1 : 0 : 3], [1 : 1 : 0], [1 : 2 : 0], [1 : 4 : 0], [1 : 3 : 0], [1 : 1 : 1], [1 : 2 : 1], [1 : 4 : 1], [1 : 3 : 1], [1 : 1 : 2], [1 : 2 : 2], [1 : 4 : 2], [1 : 3 : 2], [1 : 1 : 4], [1 : 2 : 4], [1 : 4 : 4], [1 : 3 : 4], [1 : 1 : 3], [1 : 2 : 3], [1 : 4 : 3], [1 : 3 : 3])
Cone([(1,0), (0,1)])

Coordinate patches

patch = P2.affine_patch(0); patch.fan().rays()
N(1, 0), N(0, 1) in 2-d lattice N
patch.embedding_morphism()
Scheme morphism: From: 2-d affine toric variety To: 2-d CPR-Fano toric variety covered by 3 affine patches Defn: Defined on coordinates by sending [x : y] to [x : y : 1]

Compactification

So far, we only talked about the open Cn\mathbb{C}^n; The higher-dimensional cones determine the compactification: Homogeneous coordinates can vanish simultaneously if and only if they span a cone of the fan. The forbidden set is

P2.Stanley_Reisner_ideal()
Ideal (x*y*z) of Multivariate Polynomial Ring in x, y, z over Rational Field

Singularities

Interesting varieties are usually not smooth:

P2.is_smooth()
True
A2Z2.<x,y> = toric_varieties.A2_Z2()
Sigma = A2Z2.fan() Sigma.plot()
Image in a Jupyter notebook
cone2 = Sigma(2)[0] cone2.is_smooth()
False
A2Z2.is_smooth()
False

I lied a bit in the definition of the homogenous rescalings; Really its rescaling by Hom(A1,C×)Hom(A_1, \mathbb{C}^\times):

AA = A2Z2.Chow_group() AA.degree(1)
C2
AA.gens()
((| 1 mod 2 | 0 ), (| 0 mod 2 | 1 ))
AA.relations()
Free module of degree 4 and rank 3 over Integer Ring Echelon basis matrix: [0 1 1 0] [0 0 2 0] [0 0 0 1]

Singularity comes from the rays of the cone not spanning the lattice

cone2.span().index_in_saturation()
2

Resolution of singularities

Toric geometry is functor from fans & fan morphisms to toric varieties & toric morphisms

Sigma = Fan(cones=[[0, 1]], rays=[(1, 0), (0, 1)]) SigmaPrime = Sigma.subdivide(new_rays=[(1,1)])
graphics_array([SigmaPrime.plot(), Sigma.plot()])
Image in a Jupyter notebook
fm = FanMorphism( identity_matrix(2), domain_fan=SigmaPrime, codomain=Sigma ); fm
Fan morphism defined by the matrix [1 0] [0 1] Domain fan: Rational polyhedral fan in 2-d lattice N Codomain fan: Rational polyhedral fan in 2-d lattice N
X = ToricVariety(Sigma) Xprime = ToricVariety(SigmaPrime) f = Xprime.hom(fm, X)
f
Scheme morphism: From: 2-d toric variety covered by 2 affine patches To: 2-d affine toric variety Defn: Defined by sending Rational polyhedral fan in 2-d lattice N to Rational polyhedral fan in 2-d lattice N.
f.as_polynomial_map()
Scheme morphism: From: 2-d toric variety covered by 2 affine patches To: 2-d affine toric variety Defn: Defined on coordinates by sending [z0 : z1 : z2] to [z0*z2 : z1*z2]

Subdivision is not unique; Different subdivisions are different resolutions

toric_varieties.Conifold( ).fan().subdivide(make_simplicial=True).plot()

Subschemes

Homogeneoeus equations define subschemes

P2.<x,y,z> = toric_varieties.P2() E = P2.subscheme(x^3+y^3+z^3) E
Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: x^3 + y^3 + z^3
E.affine_patch(0)
Closed subscheme of 2-d affine toric variety defined by: x^3 + y^3 + 1
E.is_smooth()
True
E.change_ring(GF(5)).point_set()
Set of rational points of Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: x^3 + y^3 + z^3
list(_)
[[0 : 1 : 4], [1 : 0 : 4], [1 : 4 : 0], [1 : 2 : 1], [1 : 1 : 2], [1 : 3 : 3]]

Relation with polytopes

A lattice polytope containing the origin defines two rational polyhedral fans

triangle = Polyhedron([(-1, 0), (0, -1), (2,3)]) graphics_array([ triangle.plot() + FaceFan(triangle).plot(), triangle.plot() + NormalFan(triangle).plot() ])
Image in a Jupyter notebook
square_pyramid = Polyhedron([(0,0,0), (0,0,1), (1,0,1), (0,1,1), (1,1,1)]) square_pyramid.plot()
pc = PointConfiguration(square_pyramid.vertices()) list(pc.triangulations())
[(<0,1,2,3>, <0,2,3,4>), (<0,1,2,4>, <0,1,3,4>)]

Cohomology Ring

The homogeneous coordinates ziz_i define divisors V(zi)={zi=0}V(z_i) = \{z_i=0\}

P2.<x,y,z> = toric_varieties.P2() P2.divisor(x), P2.divisor(y), P2.divisor(z)
(V(x), V(y), V(z))
D = P2.divisor(x) + P2.divisor(y); D
V(x) + V(y)
D.parent()
Group of toric ZZ-Weil divisors on 2-d CPR-Fano toric variety covered by 3 affine patches
D.is_Cartier()
True

The divisors V(x)V(x) and V(y)V(y) are different but can be moved to each other

P2.rational_class_group()(D), D.cohomology_class(), D.Chow_cycle()
(Divisor class [2], [2*z], ( 0 | 2 | 0 ))
P2.cohomology_basis()
(([1],), ([z],), ([z^2],))
P2.Chern_class(), P2.Todd_class()
([3*z^2 + 3*z + 1], [z^2 + 3/2*z + 1])
P2.integrate(P2.Chern_class()) # Euler number
3
P2.integrate(P2.Chern_character() * P2.Todd_class()) # Index of the tangent bundle
8

Torus equivariant bundles

Defining data for Klyachko bundles

  • Vector space over big torus orbit (C×)n(\mathbb{C}^\times)^n

  • Gluing data at the zi=0z_i=0 divisors: graded filtration for each ray ρi\rho_i

TP2 = P2.sheaves.tangent_bundle()
TP2.fiber() # Vector space over big torus
Vector space of dimension 2 over Rational Field
TP2.get_filtration() # graded filtration for each ray
Filtrations N(-1, -1): QQ^2 >= QQ^1 >= 0 N(0, 1): QQ^2 >= QQ^1 >= 0 N(1, 0): QQ^2 >= QQ^1 >= 0
TP2.get_filtration((0,1)).get_degree(1)
Vector space of degree 2 and dimension 1 over Rational Field Basis matrix: [0 1]
TP2.random_deformation().get_filtration((0,1)).get_degree(1)
Vector space of degree 2 and dimension 1 over Rational Field Basis matrix: [ 1 3/8]

Graded semiring structure for graded multi-filtrations is semiring of torus-quivariant sheaves

D = P2.divisor(x) P2.sheaves.line_bundle(D)
Rank 1 bundle on 2-d CPR-Fano toric variety covered by 3 affine patches.
V = TP2.wedge(2) + P2.sheaves.line_bundle(-D) * TP2; V
Rank 3 bundle on 2-d CPR-Fano toric variety covered by 3 affine patches.
V.cohomology(weight=(0,0), dim=True)
(2, 0, 0)
TP2.cohomology(weight=(0,0), dim=True)
(2, 0, 0)