I'm using MAGMA221 and would like to create a ring over $GF(2)$ with respect to a list of relations. Here's what I have so far:
$\mathtt{Z:=GF(2);} \\\mathtt{P<x,y,z>:=PolynomialRing(Z,3);}$
But what I'd like is the structure to be such that, for example, $x^2 + y = 0$ and $yz + 1 = 0$ so that when I do calculations, whenever MAGMA "sees" $x^2 + y$ it just replaces it with $0$. Is there a way to do this?
Thanks for the help and apologies in advance if any of my formatting or asking etiquette is wrong; this is my first time asking on here.
You can use the
quo-function, like this:This gives you a new ring $Q$, which is isomorphic to $P$ modulo the ideal generated by $x^2+y$ and $yz+1$.
This is documented in the subsection "Affine Algebras" of the section "Commutative Algebra" in the MAGMA handbook.
Changing the normal form: I think (but have not verified) that MAGMA always prints the element in normal form with respect to a Gröbner basis of the given ideal of relation. By changing the monomial order used to compute this basis, using
ChangeOrder, you can change the normal form. This may allow you to specify a presentation of the elements that is preferable to you. (From your comment I infer that you may want to minimize total degree.) Witness the following Magma session:Here lexicographical order with $x>y$ is used, so the $x$-term is reduced to a $y$-term, even though the latter has larger degree.
Now we use a different order, specifying that monomials are first ordered by total degree, then by lexicographical order, so that $x^2 < y^3$.
See the section on Gröbner bases in the MAGMA handbook for more details and a list of possible orders.