Documentation

HexMvPolyMathlib.Aeval

noncomputable def HexMvPolyMathlib.aevalMathlib {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] [Algebra R S] (x : Fin nS) :
Hex.MvPoly n R cmp →ₐ[R] S

Auxiliary Mathlib-transported algebra evaluation used to prove the laws of the public executable evaluator.

Equations
Instances For
    theorem HexMvPolyMathlib.aevalMathlib_apply {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) :

    Applying the auxiliary transported evaluator uses Mathlib evaluation after conversion.

    theorem HexMvPolyMathlib.monoProd_eq_prod {n : } {S : Type v} [CommSemiring S] (x : Fin nS) (m : Hex.Mono n) :
    Hex.Mono.prod x m = i : Fin n, x i ^ (monoEquiv m) i

    Executable monomial evaluation is the corresponding finite product.

    noncomputable def HexMvPolyMathlib.eval₂MathlibHom {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] (f : R →+* S) (x : Fin nS) :
    Hex.MvPoly n R cmp →+* S

    Evaluation transported through the Mathlib equivalence.

    This auxiliary homomorphism supplies the laws for the public direct evaluator.

    Equations
    Instances For
      theorem HexMvPolyMathlib.eval₂MathlibHom_apply {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] (f : R →+* S) (x : Fin nS) (p : Hex.MvPoly n R cmp) :

      The Mathlib-transported evaluation homomorphism applies as direct eval₂.

      theorem HexMvPolyMathlib.aevalMathlib_eq_eval₂ {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) :

      The auxiliary transported algebra evaluator is exactly the Mathlib-free direct evaluator with the coefficient algebra map.

      def HexMvPolyMathlib.eval₂Hom {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : Fin nS) :
      Hex.MvPoly n R cmp →+* S

      Evaluation along an arbitrary coefficient ring homomorphism, packaged as a ring homomorphism on executable polynomials. Its function field is definitionally the direct Mathlib-free evaluator; lawful boolean equality is converted to proposition-level equality only inside the erased law proofs.

      Equations
      Instances For
        @[simp]
        theorem HexMvPolyMathlib.eval₂Hom_apply {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] (f : R →+* S) (x : Fin nS) (p : Hex.MvPoly n R cmp) :
        (eval₂Hom f x) p = Hex.MvPoly.eval₂ (⇑f) x p

        The packaged ring homomorphism is the Mathlib-free direct evaluator.

        def HexMvPolyMathlib.aeval {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) :
        Hex.MvPoly n R cmp →ₐ[R] S

        Executable algebra evaluation. The function field is definitionally the direct Mathlib-free evaluator.

        Equations
        Instances For
          theorem HexMvPolyMathlib.aeval_apply {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [DecidableEq R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) :

          Applying executable algebra evaluation agrees with Mathlib evaluation after conversion.

          theorem HexMvPolyMathlib.aeval_eq_eval₂ {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) :
          (aeval x) p = Hex.MvPoly.eval₂ (⇑(algebraMap R S)) x p

          Algebra-hom evaluation is exactly the Mathlib-free direct evaluator with the coefficient algebra map.

          theorem HexMvPolyMathlib.aeval_eq_eval {n : } {R : Type u} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] (x : Fin nR) (p : Hex.MvPoly n R cmp) :

          Evaluation into the coefficient ring agrees with the Mathlib-free specialization.

          @[simp]
          theorem HexMvPolyMathlib.aeval_zero {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) :
          (aeval x) 0 = 0

          Algebra evaluation sends zero to zero.

          @[simp]
          theorem HexMvPolyMathlib.aeval_one {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) :
          (aeval x) 1 = 1

          Algebra evaluation sends one to one.

          @[simp]
          theorem HexMvPolyMathlib.aeval_add {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p q : Hex.MvPoly n R cmp) :
          (aeval x) (p + q) = (aeval x) p + (aeval x) q

          Algebra evaluation preserves addition.

          @[simp]
          theorem HexMvPolyMathlib.aeval_mul {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p q : Hex.MvPoly n R cmp) :
          (aeval x) (p * q) = (aeval x) p * (aeval x) q

          Algebra evaluation preserves multiplication.

          @[simp]
          theorem HexMvPolyMathlib.aeval_pow {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) (k : ) :
          (aeval x) (p ^ k) = (aeval x) p ^ k

          Algebra evaluation preserves natural powers.

          @[simp]
          theorem HexMvPolyMathlib.aeval_C {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (r : R) :
          (aeval x) (Hex.MvPoly.C r) = (algebraMap R S) r

          Algebra evaluation sends a constant polynomial through the algebra map.

          @[simp]
          theorem HexMvPolyMathlib.aeval_X {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommSemiring R] [CommSemiring S] [Algebra R S] (x : Fin nS) (i : Fin n) :
          (aeval x) (Hex.MvPoly.X i) = x i

          Algebra evaluation sends a variable polynomial to its assigned value.

          @[simp]
          theorem HexMvPolyMathlib.aeval_neg {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] [CommRing S] [Algebra R S] (x : Fin nS) (p : Hex.MvPoly n R cmp) :
          (aeval x) (-p) = -(aeval x) p

          Algebra evaluation preserves negation.

          @[simp]
          theorem HexMvPolyMathlib.aeval_sub {n : } {R : Type u} {S : Type v} {cmp : Hex.Mono nHex.Mono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [CommRing R] [CommRing S] [Algebra R S] (x : Fin nS) (p q : Hex.MvPoly n R cmp) :
          (aeval x) (p - q) = (aeval x) p - (aeval x) q

          Algebra evaluation preserves subtraction.