Structure Operations#
Numerical Invariants#
- Characteristic(F): FldFin -> RngIntElt#
- # F: FldFin -> FldFinElt#
- Degree(F): FldFin -> RngIntElt#
The absolute degree of \(F\), that is, the degree over its prime subfield.
- Degree(F, E): FldFin, FldFin -> RngIntElt#
Given a finite field \(F\) that has been constructed as an extension of a field \(E\), return the degree of \(F\) over \(E\).
Defining Polynomial#
- DefiningPolynomial(F): FldFin -> RngUPolElt#
Given a finite field \(F\) that has been constructed as an extension of a field \(E\), return the polynomial with coefficients in \(E\) that was used to define \(F\) as an extension of \(E\). This is the minimum polynomial of
F.1.
- DefiningPolynomial(F, E): FldFin -> RngUPolElt#
Given a finite field \(F\) and a subfield \(E\), return the polynomial with coefficients in \(E\) used to define \(F\) as an extension of \(E\). This is the same as the minimum polynomial of the generator
Generator(F, E)over \(E\).
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.
- IsDefault(F): FldFin -> BoolElt#
Given a finite field \(F\), this function returns
trueiff \(F\) is a default field.
- IsCommutative(F): FldFin -> BoolElt#
- IsUnitary(F): FldFin -> BoolElt#
- IsFinite(F): FldFin -> BoolElt#
- IsOrdered(F): FldFin -> BoolElt#
- IsField(F): FldFin -> BoolElt#
- IsEuclideanDomain(F): FldFin -> BoolElt#
- IsPID(F): FldFin -> BoolElt#
- IsUFD(F): FldFin -> BoolElt#
- IsDivisionRing(F): FldFin -> BoolElt#
- IsEuclideanRing(F): FldFin -> BoolElt#
- IsPrincipalIdealRing(F): FldFin -> BoolElt#
- IsDomain(F): FldFin -> BoolElt#
- F eq G: FldFin, Rng -> BoolElt#
- F ne G: FldFin, Rng -> BoolElt#
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: Functions (ex-f06af7)#
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 ]