TransWikia.com

Fields in Mathematica

Mathematica Asked by dmtri on March 14, 2021

Suppose $F={0,1,w,w^2}$ is a field of $4$ elements, where $w$ is a root of $x^2+x+1$. (This means: $w^2=w+1,w=w^2+1, 1=w+w^2,w^3=1,2w=2w^2=1+1=0$). In order to find out the remainder $$frac{(1+w x+x^2) (1+w^2 x+w x^2)}{x^3-1}$$, I write in Mathematica:

$$text{PolynomialRemainder}left[left(w x+x^2+1right) left(w^2 x+w x^2+1right),x^3-1,xright]$$

and I get $$left(w^3+w+1right) x^2+left(w^2+2 wright) x+2 w^2+1$$. Of course, then I have to do by hand some simplifications (last step) using the equalities mentioned at the beggining of this question. And so finally, I get:$$w x^2+ w^2 x+1$$. What I am asking is : Is there a way to put a command in Mathematica to make for me this last step? or even better to make Mathematica understand that $F={0,1,w,w^2}$ is the mentioned field? Thanks.

             EDIT

I made some corrections on the first line

One Answer

Note that your filed F is a Galois extension field (in MMA written: GF[{2,2}]). You can look it up in the help if you know a bit about the theory.

But to keep things simple and not using the Galois package of MMA, we may simply put your restrictions into replacement rules:

t = PolynomialRemainder[(1 + w x + x^2) (1 + w^2 x + w x^2), (x^3 - 
     1), x] // Expand;
t //. {w^3 -> 1, w^4 -> w, w + w^2 -> 1, a_ i_Integer -> a Mod[i, 2] }

(*1 + w^2 x + w x^2*)

Correct answer by Daniel Huber on March 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP