Doing computation over the integers

18 views
Skip to first unread message

miky...@libero.it

unread,
Sep 17, 2026, 12:30:10 PM (5 days ago) Sep 17
to Macaulay2
Hi,
if I want for example to use square roots over the rationals I can do something like this:

S=QQ[a]/(a^2-2)
S=toField S
R=S[x,y,z,w]

And now Macaulay 2 uses "a" as a constant and not as a variable. Without the second line of command we will get a ring with multi-degree....
Do you know how to do something similar if the base is not QQ but ZZ?
For example I would like to use 

S=ZZ[a]/(a^2-2)
S=????
R=S[x,y,z,w]

To make sure that "a" is again used as a constant not as a variable. Do you have any ideas/suggestions?
Thank you in advance.
Michele

Trevor Karn

unread,
Sep 18, 2026, 9:52:15 AM (4 days ago) Sep 18
to Macaulay2
Hi,
It might not be quite what you want, but you could set the degree of `a` to be `0`, so then it is technically a multidegree but should behave like a constant.

i21 : S=ZZ[a,Degrees=>{0}]/(a^2-2);
i22 : R=S[x,y,z,w];
i23
: degree(a*x) o23 =

Michele Torielli

unread,
Sep 18, 2026, 12:58:45 PM (4 days ago) Sep 18
to maca...@googlegroups.com
Hi Trevor,
thank you for the suggestion, I think that that might work. At the end of the day I want to compute groebner basis for ideals...
Best
Michele

--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/macaulay2/cb3913bd-05c2-44d3-9186-f8fdfa09eff6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages