// This is how you declare a finite field of 2 elements // = F_2 = Z (mod 2) = 0, 1 // ring r = 2, x, lp; // This is how you declare a finite field of 2^K elements ring r = (2, A), x, lp; //You have to specify the irreducible polynomial // also called the minimal polynomial minpoly = A^4 + A^3 + 1; // The above is a minpoly of degree K = 4 // So GF(2^4) = GF(2^4) = GF(16)