Ask Your Question
1

Stanley-Reisner ideal from polytope

asked 2024-06-12 03:36:01 +0100

gggkkkk gravatar image

Hi!

I'm just discovering how sage works and i need to get Stanley-Reisner ideal from polytope, knowing coordinates of verticies. Is there a way to do it? Stanley-Reisner ideal is generated by two relations:

  • sum of \lambda_i*v_i
  • multiplication of v_i1,...,v_ik if intersection F_i1,...,F_ik is empty

Danilov–Jurkiewicz theorem. See for example [https://www.mathnet.ru/php/getFT.phtml?jrnid=rm&paperid=9883&what=fullteng&option_lang=rus (https://www.mathnet.ru/php/getFT.phtm...), 8.6]

I got that data:

dim=4, vert=6
1 -1 0 0 0 0
0 0 1 0 0 -1
0 0 0 1 0 -1
0 0 0 0 1 -1

I know that first relation i get will look like this: v0-v1 v1-v3 v2-v5 v3-v5 v4-v5

But for second one i need more calculations, because i can't tell what faces are intersecting knowing only verticies (i need to calculate it hundreds of times, so thats why i need computer).

I did some calculations in polymake:

$p2= new Polytope(POINTS=>[[1, 1,0,0,0],[1, -1,0,0,0],[1, 0,1,0,0],[1, 0,0,1,0],[1, 0,0,0,1],[1, 0,-1,-1,-1]]); $HD2 = $p2->HASSE_DIAGRAM; print $HD2->FACES;

Then i figure out what sets are missing and find minimal of them. But at some point i got mistake, thats why i need some other way to calucalte that ideal.

I tried something like that:

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]])
I = P.stanley_reisner_ideal()

But it is not working. As i can understand it's can be done in some more complicated way, that i cant discover. How can i do this?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2024-06-12 15:23:51 +0100

Sébastien gravatar image

updated 2024-06-12 15:32:34 +0100

The Stanley_Reisner_ideal function exists in SageMath for a rational polyhedral fan :

sage: fan = Fan([[0,1,3], [3,4], [2,0], [1,2,4]],
....:          [(-3, -2, 1), (0, 0, 1), (3, -2, 1), (-1, -1, 1), (1, -1, 1)])
sage: fan.Stanley_Reisner_ideal(PolynomialRing(QQ, 5, 'A, B, C, D, E'))
Ideal (A*E, C*D, A*B*C, B*D*E) of
 Multivariate Polynomial Ring in A, B, C, D, E over Rational Field

or for the toric variety associated to a rational polyhedral fan:

sage: fan = Fan([[0,1,3], [3,4], [2,0], [1,2,4]],
....:           [(-3, -2, 1), (0, 0, 1), (3, -2, 1), (-1, -1, 1), (1, -1, 1)])
sage: X = ToricVariety(fan, coordinate_names='A B C D E', base_field=GF(5))
sage: SR = X.Stanley_Reisner_ideal(); SR
Ideal (A*E, C*D, A*B*C, B*D*E) of
 Multivariate Polynomial Ring in A, B, C, D, E over Rational Field

Note that you may also compute the Stanley-Reisner ring of a simplicial complex. Here the method is not using capital letters:

sage: X = SimplicialComplex([[0,1,2], [0,2,3]])
sage: X.stanley_reisner_ring()
Quotient of Multivariate Polynomial Ring in x0, x1, x2, x3 over Integer Ring
 by the ideal (x1*x3)

Hope this helps.

edit flag offensive delete link more

Comments

Thanks a lot! Now i see where to look for documentation. I found some functions like primitive_collections() that do exactly what i need. But i am still a little confused about making fan. Documentation says, that i need to provide cones in addition to rays if fan dimension is higher that 2, but all i respond is normal rays of polytope. Is there a way to construct fan of it without cones? I have idea that i can make polytope out of verticies, then somehow get its dual, and then get normal fan of it. And i work with reflexive polytopes, if it provides some better solutions for that problem

gggkkkk gravatar imagegggkkkk ( 2024-06-12 17:43:22 +0100 )edit

I think i found a solution

points = [
    [1, 0, 0, 0],
    [-1, 0, 0, 0],
    [0, 1, 0, 0],
    [0, 0, 1, 0],
    [0, 0, 0, 1],
    [0, -1, -1, -1]]
p = LatticePolytope(points)
fp = FaceFan(p)
fp.rays()
fp.primitive_collections()

I need some time to check it, but in general it does what i want

gggkkkk gravatar imagegggkkkk ( 2024-06-12 19:06:42 +0100 )edit

There is a normal_fan method for polytopes. Also, you may read this quick tutorial or this longer introduction on polytopes in sagemath.

Sébastien gravatar imageSébastien ( 2024-06-12 19:13:41 +0100 )edit

Yeah, i saw normal_fan method, but it is good, if u have polytope coordinates and want to get it normal fan. In my situation i already got rays that are normal to facets of my polytope. So i want to construct fan from that rays, but in 4 dimensions, so i need cones. As i can understand, if i got rays vectors, i can construsct convex polytope of their ends, and then ask sage to make fan of its polytope by FaceFan(p) option. Then i can use rays of its fan that will be exactly what i started with, and then i can use fp.primitive_collections(), which provides all needed data (see primitive_collections() documentation note). Am i correct or missing something?

gggkkkk gravatar imagegggkkkk ( 2024-06-12 21:25:49 +0100 )edit

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. I added a second answer with this in mind.

jipilab gravatar imagejipilab ( 2024-06-13 17:50:22 +0100 )edit
1

answered 2024-06-13 17:55:09 +0100

jipilab gravatar image

updated 2024-06-13 17:59:53 +0100

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(); I
Ideal (x1*x2*x3*x4, x0*x5) of Multivariate Polynomial Ring in x0, x1, x2, x3, x4, x5 over Integer Ring
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-06-12 03:00:10 +0100

Seen: 230 times

Last updated: Jun 13