Polynomial with finite prime field coefficients. In addition to the basic polynomial operations and division operators, it has factorization methods.
This class inherits FieldPolynomial and PrimeCharacteristicFunctionsProvider.
Initialize the polynomial.
Return polynom ** index % self.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
Return a polynomial obtained by sending X**p to X, where p is
the characteristic. If the polynomial does not consist of
p-th powered terms only, result is nonsense.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
Return the square free decomposition of the polynomial. The return value is a dict whose keys are integers and values are corresponding powered factors. For example, if
A = A1 * A2**2,
the result is
{1: A1, 2: A2}.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
Return the distinct degree factorization of the polynomial. The return value is a dict whose keys are integers and values are corresponding product of factors of the degree. For example, if A = A1 * A2, and all irreducible factors of A1 having degree 1 and all irreducible factors of A2 having degree 2, then the result is:
{1: A1, 2: A2}.
The given polynomial must be square free, and its coefficient ring must be a finite field.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
Return the irreducible factors of the polynomial. The
polynomial must be a product of irreducible factors of the
given degree.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
Factor the polynomial.
The returned value is a list of tuples whose first component
is a factor and second component is its multiplicity.
(This method is inherited from PrimeCharacteristicFunctionsProvider)
f.isirreducible() -> bool
If f is irreducible return True, otherwise False.
(This method is inherited from PrimeCharacteristicFunctionsProvider)