Exception in Kquo.<w1,w2>=Kyx.quotient([x^2+x+1]): Can only reduce polynomials over fields.

40 views
Skip to first unread message

Georgi Guninski

unread,
Jun 17, 2024, 10:05:14 AMJun 17
to sage-...@googlegroups.com
This hurts me, so workaround is welcome.

n=13*random_prime(2**20);Kyx.<x,y>=Integers(n)[];f=x^2+x+1;Kquo.<w1,w2>=Kyx.quotient(f);Kquo
#pass

n=13*random_prime(2**50);Kyx.<x,y>=Integers(n)[];f=x^2+x+1;Kquo.<w1,w2>=Kyx.quotient(f);Kquo
TypeError: Can only reduce polynomials over fields.

David Roe

unread,
Jun 17, 2024, 11:46:34 AMJun 17
to sage-...@googlegroups.com
This seems to work, though I don't know exactly what you want to do with it.

sage: K.<x,y> = ZZ[]
sage: n=13*random_prime(2**50)
sage: f=x^2+x+1
sage: Kquo = K.quo(K.ideal(n,f))
sage: Kquo
Quotient of Multivariate Polynomial Ring in x, y over Integer Ring by the ideal (10233078999195559, x^2 + x + 1)
sage: Kquo(x^2)
-xbar - 1

David

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAGUWgD-HdE_MPezw%3DfReOmcBgo3K_E-oSccqvBVyeZRxddCSMQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages