How can I find the elements in a factor ring?
Let K=Q(√2) and a=(3)=3OK an ideal in K. How can I find the elements in OK/a using sage?
Here is a possibility...
sage: K.<a> = QuadraticField(2)
sage: OK = K.OK()
sage: OK.gens()
(1, a) sage: J = OK.ideal(3)
sage: Q = OK.quotient(J, names='abar')
sage: Q
Quotient of Maximal Order in Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095? by the ideal (3)
sage: Q.is_field()
True
sage: Q.is_prime_field()
False
sage: Q.inject_variables()
Defining abar0, abar1
sage: abar0
1
sage: abar1
a
But do not expect too much functionality from this construction. Instead, why not construct "with bare hands" the ring last listed in the following chain of isomorphisms. (We know that OK is generated by 1 and a=(x mod (3)).) OK/(3)=(Z[x]/(x2−2))/3=Z[x]/(x2−2, 3)=(Z[x]/3)/(x2−2)=F3[x]/(x2−2) . Which is:
R.<x> = PolynomialRing(GF(3))
F.<a> = GF(9, modulus=x^2-2)
Of course, knowing the purpose for the needed code snippet may change the situation.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 4 years ago
Seen: 409 times
Last updated: Aug 05 '20