Documentation

HexPolyFpMathlib.Basic

Interpret an executable FpPoly p as a Mathlib polynomial over ZMod p.

Equations
Instances For

    Rebuild an executable FpPoly p from a Mathlib polynomial over ZMod p.

    Equations
    Instances For

      Coefficient view of the direct finite-field transport fpPolyToPolynomial, the standalone form of coeff_toMathlibPolynomial available before the ring equivalence is assembled.

      The executable finite-field polynomial representation is ring-equivalent to Mathlib polynomials over ZMod p.

      Equations
      Instances For

        Interpret an executable FpPoly p as a Mathlib polynomial over ZMod p.

        Equations
        Instances For
          @[simp]

          Applying the ring equivalence is the forward transport. The named forward map is the normal form: statements about an executable polynomial's Mathlib image read better without a RingEquiv coercion in the way.

          @[simp]

          Applying the inverse of the ring equivalence is polynomialToFpPoly, the partner of HexPolyFpMathlib.fpPolyEquiv_apply for the backward direction.

          @[simp]

          Coefficients are preserved by the equivalence with Mathlib polynomials.

          @[simp]

          Rebuilding a Mathlib polynomial preserves coefficients, transported back through the ZMod64 equivalence.

          Monicity of executable finite-field polynomials transfers to Mathlib.

          No nontriviality hypothesis is required: when ZMod p is trivial every polynomial is monic, and otherwise the executable leading coefficient 1 transports to the Mathlib leading coefficient 1.

          @[simp]

          The executable degree transports to Mathlib's natDegree, with the zero polynomial mapping to degree 0. No nontriviality hypothesis is needed: in the trivial ring every transported polynomial is zero and every executable coefficient is zero as well.

          @[simp]

          The executable leading coefficient transports through toZMod to Mathlib's leading coefficient.

          Formal derivatives commute with the finite-field polynomial transport.

          Multiplication commutes with the finite-field polynomial transport.

          Addition commutes with the finite-field polynomial transport.

          Subtraction commutes with the finite-field polynomial transport.

          @[simp]

          Negation commutes with the finite-field polynomial transport.

          The constant executable polynomial transports to the Mathlib constant.

          @[simp]

          An executable monomial transports to the corresponding Mathlib monomial.

          @[simp]

          The monic monomial X^m transports to X^m over ZMod p.

          The executable indeterminate transports to Mathlib's X.

          Divisibility transports along the finite-field polynomial map.

          Executable finite-field polynomials divide one another exactly when their Mathlib images do.

          Evaluation of a transported polynomial is its degree-indexed coefficient sum after transporting each executable coefficient through toZMod.

          The Mathlib primality fact yields the executable prime-modulus witness, so executable field-dependent lemmas (gcd/Bezout, modular division) become available in the Mathlib transport layer.

          @[instance_reducible]

          The executable prime-field polynomials are a Mathlib commutative ring, with the executable operations. Built from the laws HexPolyFp.Ring proves rather than transported along HexPolyFpMathlib.fpPolyEquiv, which would attach the right laws to Mathlib's operations instead of these.

          sub and neg are pinned to the executable ones rather than left at the minimal-axioms defaults (a - b = a + -b). HexPolyFp already defines Sub and Neg, so leaving the defaults would put two different subtractions on the type and Mathlib's lemmas would not fire on the spelling callers write.

          Equations
          • One or more equations did not get rendered due to their size.
          @[simp]

          The executable zero polynomial transports to Mathlib's zero polynomial.

          @[simp]

          The executable unit polynomial transports to Mathlib's unit polynomial.

          @[simp]

          Powers commute with the finite-field polynomial transport.

          @[simp]

          The inverse transport sends Mathlib's zero polynomial to executable zero.

          @[simp]

          The inverse transport sends Mathlib's one polynomial to executable one.

          @[simp]

          The inverse transport sends a Mathlib constant to the corresponding executable constant.

          @[simp]

          The inverse transport commutes with polynomial negation.

          @[simp]

          The inverse transport commutes with polynomial subtraction.

          @[simp]

          The inverse transport commutes with polynomial addition.

          @[simp]

          The inverse transport commutes with polynomial multiplication.

          @[simp]

          The inverse transport sends a Mathlib monomial to the corresponding executable monomial.

          @[simp]

          The finite-field transport intertwines executable Horner composition with Mathlib polynomial composition.

          The executable linear power is Mathlib's monoid power. HexPolyFp defines linearPow by structural recursion for kernel reduction; the CommRing above supplies npowRec. They agree, and saying so once lets map_pow be used on executable powers.