Change the degrees in the underlying ring of a simplicial complex.

27 views
Skip to first unread message

Kumar Sannidhya Shukla

unread,
Nov 7, 2025, 10:46:24 AMNov 7
to Macaulay2
Hello Macaulay2 users,

Suppose I have a simplicial complex K over a polynomial ring. I would like to change the degrees of generators of the underlying polynomial ring, such that when I do monomialIdeal K, I should get the ideal in the new ring. I have tried K.ring = newRing(...) but this doesn't work as SimplicialComplex is implemented as an immutable hash table.

Best regards,
Kumar.

Federico Galetto

unread,
Nov 7, 2025, 11:23:02 AMNov 7
to Macaulay2
Hi Kumar,

If you only need the simplicial complex over the polynomial ring with the changed degrees, you could just create it there to begin with. Otherwise, you could use a ring map to create a copy of the ideal in the polynomial ring with the changed degrees and then use this new ideal to create the simplicial complex over that ring. Here is some code.

i1 : R=QQ[x_1..x_3]

o1 = R

o1 : PolynomialRing

i2 : needsPackage "SimplicialComplexes"
 -- warning: symbol "GradedModuleMap" in OldChainComplexes.Dictionary is shadowed by a symbol in Complexes.Dictionary
 --   use the synonym OldChainComplexes$GradedModuleMap
 -- warning: symbol "GradedModule" in OldChainComplexes.Dictionary is shadowed by a symbol in Complexes.Dictionary
 --   use the synonym OldChainComplexes$GradedModule
 -- warning: symbol "res" in OldChainComplexes.Dictionary is shadowed by a symbol in Complexes.Dictionary
 --   use one of the synonyms OldChainComplexes$res, OldChainComplexes$resolution
 -- warning: symbol "resolution" in OldChainComplexes.Dictionary is shadowed by a symbol in Complexes.Dictionary
 --   use one of the synonyms OldChainComplexes$res, OldChainComplexes$resolution

o2 = SimplicialComplexes

o2 : Package

i3 : K=simplicialComplex{x_1*x_2,x_1*x_3,x_2*x_3}

o3 = simplicialComplex | x_2x_3 x_1x_3 x_1x_2 |

o3 : SimplicialComplex

i4 : I=monomialIdeal K

o4 = monomialIdeal(x x x )
                    1 2 3

o4 : MonomialIdeal of R

i5 : S=QQ[y_1..y_3,Degrees=>{{1,0,0},{0,1,0},{0,0,1}}]

o5 = S

o5 : PolynomialRing

i6 : f=map(S,R,vars S)

o6 = map (S, R, {y , y , y })
                  1   2   3

o6 : RingMap S <-- R

i7 : J=f I

o7 = ideal(y y y )
            1 2 3

o7 : Ideal of S

i8 : degrees J

o8 = {{1, 1, 1}}

o8 : List

i9 : L=simplicialComplex monomialIdeal J

o9 = simplicialComplex | y_2y_3 y_1y_3 y_1y_2 |

o9 : SimplicialComplex

i10 : ring L

o10 = S

o10 : PolynomialRing

Kumar Sannidhya Shukla

unread,
Nov 7, 2025, 11:11:56 PMNov 7
to Macaulay2
Hello Federico,

Thank you for your response.

I can't create the simplicial complex in a different ring, since I am writing a method that accepts a simplicial complex. I need to change the ring of a complex that has already been created.
Your idea to create a ring map to the new ring and taking the image of the ideal there will work. But I also found the method substitute in the SimplicialComplex package which does exactly that.

Best regards,
Kumar.
Reply all
Reply to author
Forward
0 new messages