Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Strictly speaking, the Stanley-Reisner ideal or ring is not defined for all polytopes, but simplicial ones, where one then looks at the boundary complex of the polytope.

You can get the Stanley-Reisner ideal like so:

sage: P = Polyhedron(vertices=[[1,0,0,0],[-1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[0,-1,-1,-1]]) sage: BC = P.boundary_complex() sage: SRR = BC.stanley_reisner_ring() sage: I = SRR.defining_ideal() sage: I Ideal (x1*x2*x3*x4, x0*x5) of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Integer Ring

Strictly speaking, the Stanley-Reisner ideal or ring is not defined for all polytopes, but simplicial ones, where one then looks at the boundary complex of the polytope.

You can get the Stanley-Reisner ideal like so:

sage: P = Polyhedron(vertices=[[1,0,0,0],[-1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[0,-1,-1,-1]])
sage: BC = P.boundary_complex()
sage: SRR = BC.stanley_reisner_ring()
sage: I = SRR.defining_ideal()
sage: I
Ideal (x1*x2*x3*x4, x0*x5) of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Integer RingRing

Strictly speaking, the Stanley-Reisner ideal or ring is not defined for all polytopes, but simplicial ones, where one then looks at the boundary complex of the polytope.

You can get the Stanley-Reisner ideal like so:

sage: P = Polyhedron(vertices=[[1,0,0,0],[-1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1],[0,-1,-1,-1]])
sage: BC = P.boundary_complex()
sage: SRR = BC.stanley_reisner_ring()
sage: I = SRR.defining_ideal()
sage: SRR.defining_ideal(); I
Ideal (x1*x2*x3*x4, x0*x5) of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Integer Ring