Documentation

HexMvPolyMathlib.Equiv

noncomputable def HexMvPolyMathlib.monoEquiv {n : } :

A fixed-arity exponent vector is equivalent to a finitely supported function on the finite variable type.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem HexMvPolyMathlib.monoEquiv_apply {n : } (m : Hex.Mono n) (i : Fin n) :
    (monoEquiv m) i = m[i]

    The finitely supported image of a monomial has the same exponent at every variable.

    @[simp]

    Converting a finitely supported exponent function back to a monomial preserves every exponent.

    @[simp]

    The zero monomial corresponds to the zero finitely supported function.

    @[simp]

    A monomial maps to zero exactly when it is the zero monomial.

    @[simp]

    Zero equals a mapped monomial exactly when that monomial is zero.

    @[simp]

    Monomial multiplication corresponds to addition of finitely supported exponent functions.

    @[simp]

    A unit monomial corresponds to Mathlib's single-variable exponent.

    The componentwise exponent equivalence on pairs of monomials.

    Equations
    Instances For
      @[simp]

      The pair equivalence maps both monomials componentwise.

      @[simp]

      The pair embedding applies the monomial equivalence to each component.

      noncomputable def HexMvPolyMathlib.toMvPolynomial {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [CommSemiring R] [DecidableEq R] (p : Hex.MvPoly n R cmp) :

      Interpret an executable sparse polynomial as a Mathlib multivariate polynomial by summing its canonical support.

      Equations
      Instances For

        The canonical-support sum used by the forward conversion.

        @[simp]

        Forward conversion preserves every coefficient.

        @[simp]

        Forward conversion preserves a single executable monomial.

        @[simp]

        Adding one executable term is addition by the corresponding Mathlib monomial, including coefficient cancellation.

        theorem HexMvPolyMathlib.toMvPolynomial_ofTerms {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (terms : List (Hex.Mono n × R)) :
        toMvPolynomial (Hex.MvPoly.ofTerms terms) = List.foldl (fun (p : MvPolynomial (Fin n) R) (term : Hex.Mono n × R) => p + (MvPolynomial.monomial (monoEquiv term.1)) term.2) 0 terms

        Constructing from a term stream agrees with folding the corresponding Mathlib monomials. Duplicate monomials sum and cancellations disappear on both sides.

        noncomputable def HexMvPolyMathlib.ofMvPolynomial {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (p : MvPolynomial (Fin n) R) :
        Hex.MvPoly n R cmp

        Rebuild an executable sparse polynomial from a Mathlib multivariate polynomial's finite support.

        Equations
        Instances For
          @[simp]

          Backward conversion preserves every coefficient.

          @[simp]

          Converting a Mathlib polynomial to the executable representation and back recovers the original polynomial.

          @[simp]

          Converting an executable polynomial to Mathlib and back recovers the canonical executable polynomial.

          @[simp]

          Forward conversion sends the executable zero to Mathlib zero.

          @[simp]

          Forward conversion preserves addition.

          @[simp]

          Forward conversion sends executable constants to Mathlib constants.

          @[simp]

          Forward conversion sends executable variables to Mathlib variables.

          @[simp]

          Forward conversion preserves the multiplicative identity.

          @[simp]

          Forward conversion preserves multiplication.

          Forward conversion is injective.

          Forward conversion is surjective.

          noncomputable def HexMvPolyMathlib.equiv {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] :

          The executable sparse representation is ring-equivalent to Mathlib's multivariate polynomials.

          Equations
          Instances For
            @[simp]
            theorem HexMvPolyMathlib.equiv_apply {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (p : Hex.MvPoly n R cmp) :

            The ring equivalence applies as toMvPolynomial.

            @[simp]

            The inverse ring equivalence applies as ofMvPolynomial.

            @[implicit_reducible]
            instance HexMvPolyMathlib.instNatCastMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] :

            Natural casts are executable constant polynomials.

            Equations
            @[implicit_reducible]
            instance HexMvPolyMathlib.instSMulNatMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] :
            SMul (Hex.MvPoly n R cmp)

            Natural scalar multiplication uses one executable constant product.

            Equations
            theorem HexMvPolyMathlib.toMvPolynomial_nsmul {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (k : ) (p : Hex.MvPoly n R cmp) :

            Conversion to Mathlib preserves natural scalar multiplication.

            @[simp]
            theorem HexMvPolyMathlib.toMvPolynomial_pow {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (p : Hex.MvPoly n R cmp) (k : ) :

            Conversion to Mathlib preserves natural powers.

            @[simp]
            theorem HexMvPolyMathlib.toMvPolynomial_natCast {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (k : ) :
            toMvPolynomial k = k

            Conversion to Mathlib preserves natural-number casts.

            @[instance_reducible]

            Mathlib's commutative-semiring structure, transported along the exact representation equivalence while retaining every executable operation.

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

            Forward conversion preserves coefficientwise negation.

            @[simp]

            Forward conversion preserves subtraction.

            @[implicit_reducible]
            instance HexMvPolyMathlib.instIntCastMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] :

            Integer casts are executable constant polynomials.

            Equations
            @[implicit_reducible]
            instance HexMvPolyMathlib.instSMulIntMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] :
            SMul (Hex.MvPoly n R cmp)

            Integer scalar multiplication uses one executable constant product.

            Equations
            theorem HexMvPolyMathlib.toMvPolynomial_zsmul {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] [DecidableEq R] (z : ) (p : Hex.MvPoly n R cmp) :

            Conversion to Mathlib preserves integer scalar multiplication.

            @[simp]
            theorem HexMvPolyMathlib.toMvPolynomial_intCast {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] [DecidableEq R] (z : ) :
            toMvPolynomial z = z

            Conversion to Mathlib preserves integer casts.

            @[instance_reducible]
            instance HexMvPolyMathlib.instCommRingMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] :

            Mathlib's commutative-ring structure, transported along the exact representation equivalence while retaining every executable operation.

            Equations
            • One or more equations did not get rendered due to their size.
            def HexMvPolyMathlib.constantHom {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] :
            R →+* Hex.MvPoly n R cmp

            Executable constant polynomials packaged as a ring homomorphism.

            Equations
            Instances For
              @[simp]

              The constant homomorphism builds the executable constant polynomial.

              @[implicit_reducible]
              instance HexMvPolyMathlib.instAlgebraMvPoly {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] :
              Algebra R (Hex.MvPoly n R cmp)

              The coefficient ring acts through executable constant polynomials.

              Equations
              @[simp]
              theorem HexMvPolyMathlib.algebraMap_apply {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] (r : R) :

              The transported algebra map is executable constant-polynomial construction.

              @[simp]
              theorem HexMvPolyMathlib.toMvPolynomial_smul {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] (r : R) (p : Hex.MvPoly n R cmp) :

              Conversion to Mathlib preserves algebra scalar multiplication.

              noncomputable def HexMvPolyMathlib.algEquiv {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] :

              The exact representation equivalence as an equivalence of R-algebras.

              Equations
              Instances For
                @[simp]

                The algebra equivalence applies as toMvPolynomial.

                @[simp]

                The inverse algebra equivalence applies as ofMvPolynomial.