Structure Operations
Numerical Invariants
Defining Polynomial
Ring Predicates and Booleans
- IsConway(F): FldFin -> BoolElt
Given a finite field \(F\), this function returns
trueiff \(F\) is defined over its prime field using a Conway polynomial.
Roots
- Roots(f): RngUPolElt -> [ < FldFinElt, RngIntElt> ]
Given a polynomial \(f\) over a finite field \(F\), this function finds all roots of \(f\) in \(F\), and returns a sorted sequence of tuples (pairs), each consisting of a root of \(f\) in \(F\) and its multiplicity.
- RootsInSplittingField(f): RngUPolElt[FldFin] -> [<RngUPolElt, RngIntElt>], FldFin
Given a univariate polynomial \(f\) over a finite field \(K\), compute the minimal splitting field \(S\) of \(f\) as an extension field of \(K\), and return the roots of \(f\) in \(S\), together with \(S\). Using this function will be faster than computing the roots of \(f\) anew over the splitting field.
- FactorizationOverSplittingField(f): RngUPolElt[FldFin] -> [<RngUPolElt, RngIntElt>], FldFin
- FactorisationOverSplittingField(f): RngUPolElt[FldFin] -> [<RngUPolElt, RngIntElt>], FldFin
Given a univariate polynomial \(f\) over a finite field \(K\), compute the minimal splitting field \(S\) of \(f\) as an extension field of \(K\), and return the factorization (into linears) of \(f\) over \(S\), together with \(S\). Using this function will be faster than factorizing \(f\) anew over the splitting field.
- RootOfUnity(n, K): RngIntElt, FldFin -> FldFinElt
Return a primitive \(n\)-th root of unity in the smallest possible extension field of \(K\).
- Example: Roots in a Splitting Field (ex-f06af7)
Run in calculator (opens in a new tab)
We compute the roots of a certain degree-20 polynomial \(f\) in its minimal splitting field.
> K := GF(2); > P<x> := PolynomialRing(GF(2)); > f := x^20 + x^11 + 1; > Factorization(f); [ <x^3 + x^2 + 1, 1>, <x^8 + x^7 + x^3 + x^2 + 1, 1>, <x^9 + x^7 + x^6 + x^4 + 1, 1> ] > time r, S<w> := RootsInSplittingField(f); Time: 0.040
We note that the splitting field \(S\) has degree 72 and there are 20 roots of \(f\) in \(S\) of course. We check that the evaluation of \(f\) at each root is zero.
> S; Finite field of size 2^72 > DefiningPolynomial(S); x^72 + x^48 + x^47 + x^44 + x^38 + x^35 + x^32 + x^31 + x^30 + x^29 + x^27 + x^25 + x^23 + x^22 + x^21 + x^18 + x^15 + x^12 + x^8 + x^4 + 1 > #r; 20 > r[1]; <w^68 + w^67 + w^64 + w^62 + w^60 + w^59 + w^56 + w^50 + w^49 + w^48 + w^47 + w^44 + w^43 + w^39 + w^37 + w^35 + w^33 + w^32 + w^30 + w^29 + w^28 + w^25 + w^21 + w^19 + w^18 + w^16 + w^15 + w^14 + w^12 + w^10 + w^6 + w, 1> > [IsZero(Evaluate(f, t[1])): t in r]; [ true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true ]