2018-12-20 08:02:02 -0600 received badge ● Notable Question (source) 2018-12-20 08:02:02 -0600 received badge ● Popular Question (source) 2016-11-29 09:42:42 -0600 received badge ● Nice Question (source) 2016-08-10 02:09:36 -0600 commented answer Symbolic calculations in finite field extension Should I have asked another question for this? 2016-08-07 05:41:55 -0600 commented answer Symbolic calculations in finite field extension I accepted this answer because, well, it fully answers my question. But now I must ask for what would truly be the cherry on top of the cake: is there any way to group the result by 'x'? I.e. to make the result of your example look like x*(a0*a1+a2) + a0*a1 + a2? I tried these methods, but they don't work. The closest I can get is sorted(r.monomials()), where r is the produced result. Again, thank you in advance. 2016-08-07 03:26:06 -0600 received badge ● Scholar (source) 2016-08-06 05:39:12 -0600 commented answer Symbolic calculations in finite field extension This is most helpful, but there is a detail still missing: what I wanted is a way for a0, a1 and a2 to be treated as generic elements of GF(2). Meaning for example, that $a_i^n=a_i$ and $a_i+a_i = 0$. Without this, the resulting expression is needlessly complicated. Can it be achieved? 2016-08-06 05:36:13 -0600 received badge ● Supporter (source) 2016-08-04 22:21:57 -0600 received badge ● Student (source) 2016-08-04 14:40:00 -0600 asked a question Symbolic calculations in finite field extension Hello, Please consider the following code snippet:  P_GF2. = PolynomialRing(GF(2)) GF23. = P_GF2.quotient_ring(X^3+X+1) def f(val): return val**3  This works as expected, when val is something like $1+x+x^2$. What I wanted to do is to calculate the value of $f$, but using a generic element of $GF(2^3)$, e.g. $a_2x^2+a_1x+a_0$. The idea is to have the result expressed in terms of the $a_i$. Is this possible in Sagemath? I have tried to do it using symbolic variables, but they always belong to the Symbolic Ring, which (as far as I can tell) does not mix with other rings. Because this example is small, I was able to do the computations by hand; the value of having SAGE doing it is of course, to apply it to cases that are infeasible to do without a computer. Thank you very much in advance.