Documentation

MIPRE.Background.LIDT.MIPStarRE.LDT.Basic.ParametersBase

Basic parameters and scalar infrastructure for the low individual degree test #

Core parameter data, finite-field models, and coordinate arithmetic.

Note: this module contributes declarations to the comparator statement closure of mainFormal, which must elaborate in the same environment as the Mathlib-only Challenge.lean. Keep the full import Mathlib; do not narrow it. See docs/comparator.md, "Environment alignment".

@[reducible, inline]
Equations
Instances For
    Instances For
      @[instance_reducible]
      Equations

      Parameters for the (m,q,d) low individual degree test.

      Besides the usual positivity assumptions, we bundle the paper-faithful witness that q = p^n is a prime power.

      • m :
      • q :
      • d :
      • hm : 0 < self.m
      • hq : 0 < self.q

        Kept as a compatibility field so existing positivity proofs can continue to use params.hq; it is derivable from hqPrimePower.

      • hqPrimePower : ∃ (p : ) (n : ), Nat.Prime p 0 < n self.q = p ^ n

        Paper-faithful witness that q is a prime power.

      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem MIPStarRE.LDT.Parameters.q_pos_of_primePower {q : } (hqPrimePower : ∃ (p : ) (n : ), Nat.Prime p 0 < n q = p ^ n) :
          0 < q

          Any number presented as a prime power is automatically positive.

          theorem MIPStarRE.LDT.Parameters.prime_primePower {q : } (hqPrime : Nat.Prime q) :
          ∃ (p : ) (n : ), Nat.Prime p 0 < n q = p ^ n

          Prime numbers are prime powers of exponent 1.

          def MIPStarRE.LDT.Parameters.ofPrimePower (m q d p n : ) (hm : 0 < m) (hp : Nat.Prime p) (hn : 0 < n) (hq : q = p ^ n) :

          Build parameters from explicit prime-power data q = p^n.

          Equations
          Instances For
            def MIPStarRE.LDT.Parameters.ofPrime (m q d : ) (hm : 0 < m) (hqPrime : Nat.Prime q) :

            Build parameters when q itself is prime.

            Equations
            Instances For

              Convenience constructor for the ubiquitous binary field.

              Equations
              Instances For
                theorem MIPStarRE.LDT.Parameters.two_le_q (params : Parameters) :
                2 params.q

                Paper finite fields have at least two elements: q = p^n with p prime and 0 < n (see preliminaries.tex, lines 17--19 and 89--93).

                theorem MIPStarRE.LDT.Parameters.one_lt_q (params : Parameters) :
                1 < params.q

                The field-size parameter is strictly larger than 1.

                theorem MIPStarRE.LDT.Parameters.q_cast_pos (params : Parameters) :
                0 < params.q

                Positivity of the field-size parameter after casting to the repository's real-valued error scalar type.

                The successor test obtained by appending one coordinate.

                Equations
                • params.next = { m := params.m + 1, q := params.q, d := params.d, hm := , hq := , hqPrimePower := }
                Instances For

                  The predecessor parameters obtained by removing the last coordinate from a non-base ambient dimension.

                  This is the inverse construction to Parameters.next on the data fields. The proof fields are inherited from the original parameter bundle, so the inverse is propositional rather than definitional.

                  Equations
                  • params.previous hm = { m := params.m - 1, q := params.q, d := params.d, hm := , hq := , hqPrimePower := }
                  Instances For
                    theorem MIPStarRE.LDT.Parameters.previous_next_eq (params : Parameters) (hm : 1 < params.m) :
                    (params.previous hm).next = params

                    Removing the last coordinate and then applying Parameters.next recovers the original non-base parameters.

                    A bundled predecessor for a parameter set known to be a successor dimension.

                    • pred : Parameters

                      The predecessor parameter bundle.

                    • next_eq : self.pred.next = params

                      The predecessor's successor is the original parameter bundle.

                    Instances For

                      Every parameter bundle of dimension strictly larger than one has a bundled predecessor whose successor is propositionally equal to the original bundle.

                      Equations
                      Instances For
                        theorem MIPStarRE.LDT.Parameters.one_lt_m_of_ne_one (params : Parameters) (hm_ne_one : params.m 1) :
                        1 < params.m

                        A positive dimension that is not the base dimension is strictly larger than one.

                        Non-base parameters have a bundled predecessor decomposition.

                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev MIPStarRE.LDT.Fq (params : Parameters) :
                          Equations
                          Instances For
                            @[reducible, inline]
                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev MIPStarRE.LDT.PointTuple (params : Parameters) (k : ) :
                              Equations
                              Instances For
                                @[instance_reducible]
                                Equations
                                @[instance_reducible]
                                Equations

                                Prime-power metadata extracted from params.hqPrimePower, exposing the honest finite-field carrier GaloisField p n underlying the paper's notation F_q.

                                Instances For

                                  Recover the prime-power specification bundled inside Parameters.

                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    noncomputable abbrev MIPStarRE.LDT.HonestFq (params : Parameters) (spec : PrimePowerFieldSpec params) :

                                    An honest finite field of order q, obtained from the prime-power witness bundled in Parameters.

                                    Equations
                                    Instances For
                                      class MIPStarRE.LDT.FieldModel (q : ) :
                                      Type (u_1 + 1)

                                      A bundled field model for the paper's F_q, together with a coding equivalence to the repository's finite carrier Fin q.

                                      Instances
                                        @[simp]

                                        The carrier bundled in a FieldModel q has exactly q elements, matching the paper's finite-field convention |F_q| = q (preliminaries.tex, lines 17--19).

                                        A bundled field model has a nonempty finite carrier.

                                        The finite cardinality of a bundled field model is nonzero.

                                        @[reducible]

                                        Build the honest field model from prime-power data.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[instance_reducible, instance 100]
                                          noncomputable instance MIPStarRE.LDT.instFieldModelQ (params : Parameters) :
                                          FieldModel params.q

                                          The canonical field model associated to the paper-faithful prime-power data stored in params. Lean prefers larger numeric priorities, so this fallback uses 100 while the params.next transport below uses 200; that lets instance search reuse an already chosen model when one is available. This instance is noncomputable because the coding equivalence to Fin q is obtained from finite cardinality data, so declarations that discover it through typeclass search may also need to be marked noncomputable when they reduce the model.

                                          Equations
                                          @[instance_reducible, instance 200]
                                          instance MIPStarRE.LDT.instFieldModelQNext {params : Parameters} [inst : FieldModel params.q] :

                                          Reuse an already chosen field model for successor parameters. Since Lean prefers larger numeric priorities, this transport uses 200 so it is tried before the canonical fallback above.

                                          Equations
                                          @[reducible, inline]
                                          abbrev MIPStarRE.LDT.Scalar (params : Parameters) [FieldModel params.q] :
                                          Type u_1
                                          Equations
                                          Instances For
                                            @[reducible, inline]
                                            abbrev MIPStarRE.LDT.PolynomialModel (params : Parameters) [FieldModel params.q] :
                                            Type u_1
                                            Equations
                                            Instances For
                                              @[reducible, inline]
                                              Equations
                                              Instances For
                                                @[simp]
                                                theorem MIPStarRE.LDT.scalar_card (params : Parameters) [FieldModel params.q] :
                                                Fintype.card (Scalar params) = params.q

                                                The chosen scalar model for the paper's F_q has exactly q elements (preliminaries.tex, lines 17--19 and 89--93).

                                                def MIPStarRE.LDT.decodeScalar {params : Parameters} [FieldModel params.q] (x : Fq params) :
                                                Scalar params

                                                Interpret a coded coordinate in Fin q as a scalar in the chosen field model.

                                                Equations
                                                Instances For
                                                  def MIPStarRE.LDT.encodeScalar {params : Parameters} [FieldModel params.q] (x : Scalar params) :
                                                  Fq params

                                                  Re-encode a field-model scalar as its canonical representative in Fin q.

                                                  Equations
                                                  Instances For
                                                    @[simp]
                                                    theorem MIPStarRE.LDT.encode_decodeScalar {params : Parameters} [FieldModel params.q] (x : Fq params) :
                                                    @[simp]
                                                    def MIPStarRE.LDT.zeroCoord {params : Parameters} [FieldModel params.q] :
                                                    Fq params

                                                    The zero coordinate.

                                                    Equations
                                                    Instances For
                                                      def MIPStarRE.LDT.addCoord {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                      Fq params

                                                      Coordinate addition transported through the Fin q coding.

                                                      Equations
                                                      Instances For
                                                        def MIPStarRE.LDT.subCoord {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                        Fq params

                                                        Coordinate subtraction transported through the Fin q coding.

                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem MIPStarRE.LDT.addCoord_subCoord_right {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                          addCoord y (subCoord x y) = x
                                                          @[simp]
                                                          theorem MIPStarRE.LDT.addCoord_subCoord_left {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                          addCoord (subCoord x y) y = x
                                                          @[simp]
                                                          theorem MIPStarRE.LDT.subCoord_addCoord_right {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                          subCoord (addCoord x y) y = x
                                                          def MIPStarRE.LDT.mulCoord {params : Parameters} [FieldModel params.q] (x y : Fq params) :
                                                          Fq params

                                                          Coordinate multiplication transported through the Fin q coding.

                                                          Equations
                                                          Instances For
                                                            def MIPStarRE.LDT.invCoord {params : Parameters} [FieldModel params.q] (x : Fq params) :
                                                            Fq params

                                                            Coordinate inversion transported through the Fin q coding.

                                                            Equations
                                                            Instances For
                                                              def MIPStarRE.LDT.addPoint {params : Parameters} [FieldModel params.q] (u v : Point params) :
                                                              Point params

                                                              Pointwise addition in the coded ambient space.

                                                              Equations
                                                              Instances For
                                                                def MIPStarRE.LDT.smulPoint {params : Parameters} [FieldModel params.q] (t : Fq params) (u : Point params) :
                                                                Point params

                                                                Scalar multiplication in the coded ambient space.

                                                                Equations
                                                                Instances For
                                                                  def MIPStarRE.LDT.zeroPoint {params : Parameters} [FieldModel params.q] :
                                                                  Point params

                                                                  The zero point in F_q^m.

                                                                  Equations
                                                                  Instances For
                                                                    def MIPStarRE.LDT.embedCoord (params : Parameters) :
                                                                    Fin params.mFin params.next.m

                                                                    The inclusion of the first m coordinates into m + 1 coordinates.

                                                                    Equations
                                                                    Instances For

                                                                      The old-coordinate inclusion into the appended coordinate space is injective.

                                                                      The last coordinate of F_q^(m+1).

                                                                      Equations
                                                                      Instances For
                                                                        theorem MIPStarRE.LDT.embedCoord_ne_lastCoord (params : Parameters) (i : Fin params.m) :
                                                                        embedCoord params i lastCoord params

                                                                        No old coordinate is the appended last coordinate.

                                                                        def MIPStarRE.LDT.appendPoint (params : Parameters) (u : Point params) (x : Fq params) :
                                                                        Point params.next

                                                                        Append a final coordinate to a point in F_q^m.

                                                                        Equations
                                                                        Instances For
                                                                          def MIPStarRE.LDT.truncatePoint (params : Parameters) (u : Point params.next) :
                                                                          Point params

                                                                          Truncate the last coordinate of a point in F_q^{m+1}.

                                                                          Equations
                                                                          Instances For
                                                                            def MIPStarRE.LDT.pointHeight (params : Parameters) (u : Point params.next) :
                                                                            Fq params

                                                                            Extract the final coordinate of a point in F_q^{m+1}.

                                                                            Equations
                                                                            Instances For
                                                                              @[simp]
                                                                              theorem MIPStarRE.LDT.truncatePoint_appendPoint (params : Parameters) (u : Point params) (x : Fq params) :
                                                                              truncatePoint params (appendPoint params u x) = u
                                                                              @[simp]
                                                                              theorem MIPStarRE.LDT.pointHeight_appendPoint (params : Parameters) (u : Point params) (x : Fq params) :
                                                                              pointHeight params (appendPoint params u x) = x
                                                                              def MIPStarRE.LDT.decodePoint {params : Parameters} [FieldModel params.q] (u : Point params) :
                                                                              Fin params.mScalar params

                                                                              Decode a coded point as a tuple of scalars in the chosen field model.

                                                                              Equations
                                                                              Instances For
                                                                                noncomputable def MIPStarRE.LDT.evalPolynomialModel (params : Parameters) [FieldModel params.q] (p : PolynomialModel params) (u : Point params) :
                                                                                Fq params

                                                                                Evaluate a multivariate polynomial over the chosen field model on a coded point.

                                                                                Equations
                                                                                Instances For
                                                                                  noncomputable def MIPStarRE.LDT.evalLinePolynomialModel (params : Parameters) [FieldModel params.q] (p : LinePolynomialModel params) (t : Fq params) :
                                                                                  Fq params

                                                                                  Evaluate a univariate polynomial over the chosen field model on a coded point.

                                                                                  Equations
                                                                                  Instances For