Documentation

MIPRE.Background.QLD.Padded

The padded space, and the sublines of a padded line #

Blueprint lem:qld-sublines. The combining stage compares a measurement of pairs of m-variable polynomials with a low-degree test, and a low-degree test wants a single polynomial in a number of variables dividing q. The paper's device is to pad: work over F_q^{4m}, whose coordinates split as u = (x, z, alpha, beta, w) with x, z in F_q^m, alpha, beta in F_q and w in F_q^{2m-2} the dummy coordinates, and to combine the pair (f_X, f_Z) into the single polynomial alpha f_X(x) + beta f_Z(z). Admissibility makes m a power of two, so 2m + 2 never divides q = 2^k, while 4m does as soon as 4m <= q; that is the whole reason the dummy block is there.

This file is the geometry of that padding, and it is deliberately free of operators.

The two pieces #

Why 4m and not 2m + 2 #

aIdx and bIdx sit at positions 2m and 2m + 1, so the dummy block is positions 2m + 2, ..., 4m - 1, of size 2m - 2. Every index bound below needs only 1 <= m.

In a bipartite model #

Stated in a bipartite model (Phase 5 of planning/mipco-track.md), which changes nothing here: no statement of this file mentions a state, a strategy or an operator, so the geometry is the matrix route's verbatim, compiled against the model form of MIPRE/Background/QLD/Lines.lean.

The seed's block and offset #

theorem MIPRE.QLD.mul_card_div {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) :
noncomputable def MIPRE.QLD.seedEquiv {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) :

A seed's block and offset: the bijection F ~ Fin m x Fin (q/m) whose first component is chi, available because m divides q.

Equations
Instances For
    @[simp]
    theorem MIPRE.QLD.seedEquiv_fst {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (s : F) :
    ((seedEquiv hm) s).1 = LIDT.CL.chi hm s

    The first component of seedEquiv is chi: both are "divide the index by the block size".

    noncomputable def MIPRE.QLD.seedIn {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (s : F) :
    F

    The seed in block i with the same offset as s. For a fixed i this turns a uniform seed into a uniform seed of axis index i, which is the paper's "s_X uniformly at random subject to chi(s_X) = i".

    Equations
    Instances For
      @[simp]
      theorem MIPRE.QLD.chi_seedIn {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (s : F) :
      LIDT.CL.chi hm (seedIn hm i s) = i
      @[simp]
      theorem MIPRE.QLD.seedIn_self {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (s : F) :
      seedIn hm (LIDT.CL.chi hm s) s = s

      Retargeting a seed to its own block does nothing.

      theorem MIPRE.QLD.sum_seedIn {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] {M : Type u_2} [AddCommMonoid M] (hm : m ∣ Fintype.card F) (i : Fin m) (g : F → M) :
      ∑ s : F, g (seedIn hm i s) = m • ∑ o : Fin (Fintype.card F / m), g ((seedEquiv hm).symm (i, o))

      A uniform seed retargeted to a fixed block is uniform on that block. Summing over all seeds counts each seed of block i exactly m times, once per block the offset could have come from. This is the only property of seedIn the mixture-of-products statement of lem:qld-sublines uses.

      The blocks of the padded space #

      def MIPRE.QLD.xIdx (m : ℕ) [NeZero m] (i : Fin m) :
      Fin (4 * m)

      The position of the i-th X coordinate of the padded space.

      Equations
      Instances For
        def MIPRE.QLD.zIdx (m : ℕ) [NeZero m] (i : Fin m) :
        Fin (4 * m)

        The position of the i-th Z coordinate of the padded space.

        Equations
        Instances For
          def MIPRE.QLD.aIdx (m : ℕ) [NeZero m] :
          Fin (4 * m)

          The position of the alpha coordinate.

          Equations
          Instances For
            def MIPRE.QLD.bIdx (m : ℕ) [NeZero m] :
            Fin (4 * m)

            The position of the beta coordinate.

            Equations
            Instances For
              @[simp]
              theorem MIPRE.QLD.xIdx_val {m : ℕ} [NeZero m] (i : Fin m) :
              ↑(xIdx m i) = ↑i
              @[simp]
              theorem MIPRE.QLD.zIdx_val {m : ℕ} [NeZero m] (i : Fin m) :
              ↑(zIdx m i) = m + ↑i
              @[simp]
              theorem MIPRE.QLD.aIdx_val {m : ℕ} [NeZero m] :
              ↑(aIdx m) = 2 * m
              @[simp]
              theorem MIPRE.QLD.bIdx_val {m : ℕ} [NeZero m] :
              ↑(bIdx m) = 2 * m + 1
              theorem MIPRE.QLD.xIdx_ne_zIdx {m : ℕ} [NeZero m] (i j : Fin m) :
              xIdx m i ≠ zIdx m j
              theorem MIPRE.QLD.xIdx_ne_aIdx {m : ℕ} [NeZero m] (i : Fin m) :
              xIdx m i ≠ aIdx m
              theorem MIPRE.QLD.xIdx_ne_bIdx {m : ℕ} [NeZero m] (i : Fin m) :
              xIdx m i ≠ bIdx m
              theorem MIPRE.QLD.zIdx_ne_aIdx {m : ℕ} [NeZero m] (i : Fin m) :
              zIdx m i ≠ aIdx m
              theorem MIPRE.QLD.zIdx_ne_bIdx {m : ℕ} [NeZero m] (i : Fin m) :
              zIdx m i ≠ bIdx m
              def MIPRE.QLD.xBlk {F : Type u_1} {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) :

              The X block of a padded point.

              Equations
              Instances For
                def MIPRE.QLD.zBlk {F : Type u_1} {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) :

                The Z block of a padded point.

                Equations
                Instances For
                  def MIPRE.QLD.alph {F : Type u_1} {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) :
                  F

                  The alpha coordinate of a padded point.

                  Equations
                  Instances For
                    def MIPRE.QLD.bet {F : Type u_1} {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) :
                    F

                    The beta coordinate of a padded point.

                    Equations
                    Instances For
                      @[simp]
                      theorem MIPRE.QLD.xBlk_apply {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) (i : Fin m) :
                      xBlk u i = u (xIdx m i)
                      @[simp]
                      theorem MIPRE.QLD.zBlk_apply {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) (i : Fin m) :
                      zBlk u i = u (zIdx m i)
                      @[simp]
                      theorem MIPRE.QLD.xBlk_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] :
                      xBlk 0 = 0
                      @[simp]
                      theorem MIPRE.QLD.zBlk_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] :
                      zBlk 0 = 0
                      @[simp]
                      theorem MIPRE.QLD.xBlk_add {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) :
                      xBlk (u + v) = xBlk u + xBlk v
                      @[simp]
                      theorem MIPRE.QLD.zBlk_add {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) :
                      zBlk (u + v) = zBlk u + zBlk v
                      @[simp]
                      theorem MIPRE.QLD.xBlk_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (t : F) (u : LIDT.Point F (4 * m)) :
                      xBlk (t • u) = t • xBlk u
                      @[simp]
                      theorem MIPRE.QLD.zBlk_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (t : F) (u : LIDT.Point F (4 * m)) :
                      zBlk (t • u) = t • zBlk u
                      @[simp]
                      theorem MIPRE.QLD.alph_add {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) :
                      alph (u + v) = alph u + alph v
                      @[simp]
                      theorem MIPRE.QLD.bet_add {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) :
                      bet (u + v) = bet u + bet v
                      @[simp]
                      theorem MIPRE.QLD.alph_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (t : F) (u : LIDT.Point F (4 * m)) :
                      alph (t • u) = t * alph u
                      @[simp]
                      theorem MIPRE.QLD.bet_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (t : F) (u : LIDT.Point F (4 * m)) :
                      bet (t • u) = t * bet u
                      theorem MIPRE.QLD.xBlk_add_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) (t : F) :
                      xBlk (u + t • v) = xBlk u + t • xBlk v

                      Moving along the padded line moves the X block along the X block of the direction. This is the identity that makes the combining map of lem:qld-padded-lines well defined.

                      theorem MIPRE.QLD.zBlk_add_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u v : LIDT.Point F (4 * m)) (t : F) :
                      zBlk (u + t • v) = zBlk u + t • zBlk v

                      Which block a coordinate position lies in #

                      inductive MIPRE.QLD.PadCase (m : ℕ) [NeZero m] :

                      Where a coordinate position of the padded space lies: in the X block, in the Z block, at alpha or beta, or among the dummy coordinates. The construction of lem:qld-sublines branches on this.

                      Instances For
                        def MIPRE.QLD.padCase {m : ℕ} [NeZero m] (j : Fin (4 * m)) :

                        The block a coordinate position lies in.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem MIPRE.QLD.padCase_eq_xc {m : ℕ} [NeZero m] {j : Fin (4 * m)} {i : Fin m} (h : padCase j = PadCase.xc i) :
                          j = xIdx m i
                          theorem MIPRE.QLD.padCase_eq_zc {m : ℕ} [NeZero m] {j : Fin (4 * m)} {i : Fin m} (h : padCase j = PadCase.zc i) :
                          j = zIdx m i
                          theorem MIPRE.QLD.padCase_xIdx {m : ℕ} [NeZero m] (i : Fin m) :
                          theorem MIPRE.QLD.padCase_zIdx {m : ℕ} [NeZero m] (i : Fin m) :
                          theorem MIPRE.QLD.le_of_padCase_zc {m : ℕ} [NeZero m] {j : Fin (4 * m)} {i : Fin m} (h : padCase j = PadCase.zc i) :
                          m ≤ ↑j
                          theorem MIPRE.QLD.le_of_padCase_ab {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : padCase j = PadCase.ab) :
                          2 * m ≤ ↑j
                          theorem MIPRE.QLD.le_of_padCase_dum {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : padCase j = PadCase.dum) :
                          2 * m ≤ ↑j

                          The blocks of a single coordinate and of a truncated direction #

                          These are the only geometric facts the subline construction needs: they say which block of the padded direction is nonzero, and what it is.

                          theorem MIPRE.QLD.xBlk_single_xIdx {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (i : Fin m) (c : F) :
                          xBlk (Pi.single (xIdx m i) c) = Pi.single i c
                          theorem MIPRE.QLD.xBlk_single_of_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : m ≤ ↑j) (c : F) :
                          xBlk (Pi.single j c) = 0
                          theorem MIPRE.QLD.zBlk_single_zIdx {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (i : Fin m) (c : F) :
                          zBlk (Pi.single (zIdx m i) c) = Pi.single i c
                          theorem MIPRE.QLD.zBlk_single_of_lt {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : ↑j < m) (c : F) :
                          zBlk (Pi.single j c) = 0
                          theorem MIPRE.QLD.zBlk_single_of_ge {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : 2 * m ≤ ↑j) (c : F) :
                          zBlk (Pi.single j c) = 0
                          theorem MIPRE.QLD.xBlk_zeroBelow_of_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : m ≤ ↑j) (v : LIDT.Point F (4 * m)) :
                          theorem MIPRE.QLD.xBlk_zeroBelow_xIdx {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (i : Fin m) (v : LIDT.Point F (4 * m)) :
                          theorem MIPRE.QLD.zBlk_zeroBelow_of_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : ↑j ≤ m) (v : LIDT.Point F (4 * m)) :
                          theorem MIPRE.QLD.zBlk_zeroBelow_zIdx {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (i : Fin m) (v : LIDT.Point F (4 * m)) :
                          theorem MIPRE.QLD.zBlk_zeroBelow_of_ge {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {j : Fin (4 * m)} (h : 2 * m ≤ ↑j) (v : LIDT.Point F (4 * m)) :

                          The sublines of a padded line #

                          Blueprint lem:qld-sublines. The paper's D is a sampling procedure, and this is that procedure: subX and subZ read the two m-dimensional line-point pairs off a padded one together with a pair of fresh seeds and raw directions.

                          The shape of the construction is forced by what Property 2 demands. Moving along the padded line moves the X block along the X block of the padded direction, so if that block is nonzero the X subline has no choice: its direction must be exactly that block, and the only freedom left is which seed presents it, which is where seedIn comes in. If the block vanishes the X block is constant along the padded line, the containment is free, and the subline is sampled fresh.

                          The four cases of padCase say which blocks vanish, and they do not say the same thing for the two line types. For an axis-parallel padded line the direction is a single coordinate, so at most one of the two blocks is nonzero. For a diagonal padded line the direction is v truncated below the axis index, so an index in the X block leaves the whole Z block untouched: both blocks are then nonzero, and the Z subline is forced too --- at axis index 0, since nothing of its direction is truncated. That asymmetry is the only place subZ looks at the line type.

                          structure MIPRE.QLD.LPData (F : Type u_2) (m : ℕ) :
                          Type u_2

                          The data a line-point pair of the seeded test is generated from: the point, the seed, and the raw diagonal direction. This is the part of MIPRE.LIDT.CL.Sample that the line questions read, and it has the same shape in the padded dimension 4m and the unpadded dimension m.

                          • pt : LIDT.Point F m

                            The sampled point.

                          • s : F

                            The seed, which selects the axis index through chi.

                          • raw : LIDT.Point F m

                            The raw diagonal direction, truncated by zeroBelow before use.

                          Instances For
                            def MIPRE.QLD.instDecidableEqLPData.decEq {F✝ : Type u_2} {m✝ : ℕ} [DecidableEq F✝] (x✝ x✝¹ : LPData F✝ m✝) :
                            Decidable (x✝ = x✝¹)
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[instance_reducible]
                              instance MIPRE.QLD.instFintypeLPData {F✝ : Type u_2} {m✝ : ℕ} [Fintype F✝] :
                              Fintype (LPData F✝ m✝)
                              Equations
                              @[simp]
                              theorem MIPRE.QLD.zeroBelow_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (v : LIDT.Point F m) :

                              Truncating below the first coordinate truncates nothing.

                              def MIPRE.QLD.LPData.toSample {F : Type u_1} {m : ℕ} (t : LIDT.CL.Ty) (c : LPData F m) :

                              The sample whose questions this data generates. Both players are given the same type, which is all that the line questions read.

                              Equations
                              Instances For
                                noncomputable def MIPRE.QLD.LPData.question {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (c : LPData F m) :

                                The question of type t this data presents, as the seeded test computes it.

                                Equations
                                Instances For
                                  noncomputable def MIPRE.QLD.LPData.dir {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (c : LPData F m) :

                                  The direction of the line this data presents.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem MIPRE.QLD.LPData.dir_point {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (c : LPData F m) :
                                    @[simp]
                                    theorem MIPRE.QLD.LPData.dir_aline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (c : LPData F m) :
                                    @[simp]
                                    theorem MIPRE.QLD.LPData.dir_dline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (c : LPData F m) :

                                    On a line type the base point of the question is the canonical representative of the point in the direction, which is what puts the point on its own line.

                                    noncomputable def MIPRE.QLD.subXof {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (k : PadCase m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                    LPData F m

                                    The X-side subline data, as a function of the block the padded axis index lies in. Splitting the case distinction out of subX is what lets a proof rewrite the block and then reduce.

                                    Equations
                                    Instances For
                                      noncomputable def MIPRE.QLD.subX {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                      LPData F m

                                      The X-side subline data of a padded line-point pair. The point is the X block of the padded point; the direction is forced to the X block of the padded direction when that block is nonzero, with the fresh seed e.1 supplying only the offset inside the forced block, and is sampled from e when it vanishes. No case distinction on the line type is needed here: an axis index in the X block forces the X block of the direction for both types at once.

                                      Equations
                                      Instances For
                                        noncomputable def MIPRE.QLD.subZof {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (k : PadCase m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                        LPData F m

                                        The Z-side subline data, as a function of the line type and of the block the padded axis index lies in.

                                        Equations
                                        Instances For
                                          noncomputable def MIPRE.QLD.subZ {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                          LPData F m

                                          The Z-side subline data. A diagonal padded line whose axis index lies in the X block leaves the whole Z block of its direction intact, so the Z subline is forced, at axis index 0 since nothing of its direction is truncated; an axis-parallel one leaves that block zero, so the Z subline is free. That is the one asymmetry between the two sides.

                                          Equations
                                          Instances For
                                            @[simp]
                                            theorem MIPRE.QLD.subXof_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subXof hm (PadCase.xc i) P e = { pt := xBlk P.pt, s := seedIn hm i e.1, raw := xBlk P.raw }
                                            @[simp]
                                            theorem MIPRE.QLD.subXof_zc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subXof hm (PadCase.zc i) P e = { pt := xBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subXof_ab {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subXof hm PadCase.ab P e = { pt := xBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subXof_dum {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subXof hm PadCase.dum P e = { pt := xBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_dline_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm LIDT.CL.Ty.dline (PadCase.xc i) P e = { pt := zBlk P.pt, s := seedIn hm 0 e.1, raw := zBlk P.raw }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_point_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm LIDT.CL.Ty.point (PadCase.xc i) P e = { pt := zBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_aline_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm LIDT.CL.Ty.aline (PadCase.xc i) P e = { pt := zBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_zc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (i : Fin m) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm t (PadCase.zc i) P e = { pt := zBlk P.pt, s := seedIn hm i e.1, raw := zBlk P.raw }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_ab {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm t PadCase.ab P e = { pt := zBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subZof_dum {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            subZof hm t PadCase.dum P e = { pt := zBlk P.pt, s := e.1, raw := e.2 }
                                            @[simp]
                                            theorem MIPRE.QLD.subX_pt {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            (subX hm4 hm P e).pt = xBlk P.pt
                                            @[simp]
                                            theorem MIPRE.QLD.subZ_pt {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            (subZ hm4 hm t P e).pt = zBlk P.pt

                                            Property 2 of lem:qld-sublines: the blocks of the padded direction #

                                            theorem MIPRE.QLD.xBlk_dir_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            xBlk (LPData.dir hm4 t P) = LPData.dir hm t (subX hm4 hm P e) ∨ xBlk (LPData.dir hm4 t P) = 0

                                            The X block of the padded direction is the X subline's direction, or it vanishes. This is the whole geometric content of the construction: in the first case the X block of a point moves along the subline as the point moves along the padded line, in the second it does not move at all, and either way it stays on the subline.

                                            theorem MIPRE.QLD.zBlk_dir_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            zBlk (LPData.dir hm4 t P) = LPData.dir hm t (subZ hm4 hm t P e) ∨ zBlk (LPData.dir hm4 t P) = 0

                                            The Z block of the padded direction is the Z subline's direction, or it vanishes.

                                            Property 2 of lem:qld-sublines, the containment #

                                            theorem MIPRE.QLD.on_line_of_eq_or_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] {W w : LIDT.Point F m} (h : w = W ∨ w = 0) (x : LIDT.Point F m) (tau : F) :
                                            ∃ (tau' : F), x + tau • w = LIDT.CL.rep W x + tau' • W

                                            Whether the shift direction is the candidate direction or zero, the shifted point lies on the line the candidate direction presents through the unshifted point. This is the one-line calculation behind the containment, and it is where the point's own parameter enters.

                                            theorem MIPRE.QLD.xBlk_on_subX {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :
                                            ∃ (tau' : F), xBlk (P.pt + tau • LPData.dir hm4 t P) = LIDT.CL.rep (LPData.dir hm t (subX hm4 hm P e)) (xBlk P.pt) + tau' • LPData.dir hm t (subX hm4 hm P e)

                                            Property 2 of lem:qld-sublines, the X side: the X block of every point of the padded line lies on the X subline.

                                            theorem MIPRE.QLD.zBlk_on_subZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :
                                            ∃ (tau' : F), zBlk (P.pt + tau • LPData.dir hm4 t P) = LIDT.CL.rep (LPData.dir hm t (subZ hm4 hm t P e)) (zBlk P.pt) + tau' • LPData.dir hm t (subZ hm4 hm t P e)

                                            Property 2 of lem:qld-sublines, the Z side.

                                            theorem MIPRE.QLD.xBlk_on_subX_aline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :
                                            ∃ (tau' : F), xBlk (P.pt + tau • LPData.dir hm4 LIDT.CL.Ty.aline P) = (LPData.question hm LIDT.CL.Ty.aline (subX hm4 hm P e)).base + tau' • LPData.dir hm LIDT.CL.Ty.aline (subX hm4 hm P e)

                                            The containment in the paper's own terms for an axis-parallel padded line: the X block of a point of the padded line is a point of the X subline as the seeded test presents it, base point and direction.

                                            theorem MIPRE.QLD.xBlk_on_subX_dline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :
                                            ∃ (tau' : F), xBlk (P.pt + tau • LPData.dir hm4 LIDT.CL.Ty.dline P) = (LPData.question hm LIDT.CL.Ty.dline (subX hm4 hm P e)).base + tau' • LPData.dir hm LIDT.CL.Ty.dline (subX hm4 hm P e)
                                            theorem MIPRE.QLD.zBlk_on_subZ_aline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :
                                            theorem MIPRE.QLD.zBlk_on_subZ_dline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) (tau : F) :

                                            Property 3 of lem:qld-sublines #

                                            The paper's Property 3 --- an axis-parallel padded line has axis-parallel sublines --- is definitional here, because the line type is a parameter handed to both sides rather than something the construction chooses. What is not definitional, and is the reason the paper needs the property, is that the two directions then agree in the way xBlk_dir_sub and zBlk_dir_sub state; those are the lemmas a consumer should cite.

                                            theorem MIPRE.QLD.subX_question_aline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            ∃ (u₀ : LIDT.Point F m) (s' : F), LPData.question hm LIDT.CL.Ty.aline (subX hm4 hm P e) = LIDT.CL.Question.aline u₀ s'
                                            theorem MIPRE.QLD.subZ_question_aline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] [Algebra (ZMod 2) F] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (P : LPData F (4 * m)) (e : F × LIDT.Point F m) :
                                            ∃ (u₀ : LIDT.Point F m) (s' : F), LPData.question hm LIDT.CL.Ty.aline (subZ hm4 hm LIDT.CL.Ty.aline P e) = LIDT.CL.Question.aline u₀ s'

                                            The padded space as a product of its blocks #

                                            lem:qld-sublines' second property is distributional: under a uniform point of a padded line the two sublines are drawn from a mixture of products of restricted laws, with each side's point conditionally uniform on its line. What makes that true is that the X and Z blocks of a uniform padded point are uniform and independent, and that is a statement about the index type: Fin (4m) is the disjoint union of the X block, the Z block, and the 2m positions above them. padEquiv names that decomposition and sum_point_pad is the resulting product identity.

                                            @[reducible, inline]
                                            abbrev MIPRE.QLD.PadSum (m : ℕ) :

                                            The padded index type as a disjoint union of blocks: the X block, the Z block, and the 2m positions holding alpha, beta and the dummy coordinates.

                                            Equations
                                            Instances For
                                              def MIPRE.QLD.padEquiv (m : ℕ) :
                                              PadSum m ≃ Fin (4 * m)

                                              The block decomposition of the padded index type. The X block lands on positions 0, ..., m-1 and the Z block on m, ..., 2m-1, which is exactly xIdx and zIdx.

                                              Equations
                                              Instances For
                                                @[simp]
                                                theorem MIPRE.QLD.padEquiv_inl_inl {m : ℕ} [NeZero m] (i : Fin m) :
                                                (padEquiv m) (Sum.inl (Sum.inl i)) = xIdx m i
                                                @[simp]
                                                theorem MIPRE.QLD.padEquiv_inl_inr {m : ℕ} [NeZero m] (i : Fin m) :
                                                (padEquiv m) (Sum.inl (Sum.inr i)) = zIdx m i
                                                theorem MIPRE.QLD.sum_point_pad {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {M : Type u_2} [AddCommMonoid M] (g : LIDT.Point F m → LIDT.Point F m → M) :
                                                ∑ u : LIDT.Point F (4 * m), g (xBlk u) (zBlk u) = Fintype.card (Fin (2 * m) → F) • ∑ pX : LIDT.Point F m, ∑ pZ : LIDT.Point F m, g pX pZ

                                                The X and Z blocks of a uniform padded point are uniform and independent. The remaining 2m coordinates -- alpha, beta and the dummy block -- contribute the multiplicity.

                                                theorem MIPRE.QLD.sum_point_pad_x {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {M : Type u_2} [AddCommMonoid M] (g : LIDT.Point F m → M) :
                                                ∑ u : LIDT.Point F (4 * m), g (xBlk u) = (Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m)) • ∑ pX : LIDT.Point F m, g pX

                                                Only the X block of the padded point is read.

                                                theorem MIPRE.QLD.sum_point_pad_z {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {M : Type u_2} [AddCommMonoid M] (g : LIDT.Point F m → M) :
                                                ∑ u : LIDT.Point F (4 * m), g (zBlk u) = (Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m)) • ∑ pZ : LIDT.Point F m, g pZ

                                                Only the Z block of the padded point is read.

                                                The law of the sublines #

                                                lem:qld-sublines' second property is that under a uniform point of a padded line the pair of sublines is drawn from a mixture of products of restricted line-point laws, each side's point conditionally uniform on its own line. sumRestr and sumAll are the two laws, unnormalized, and sumSub is the sum over the sampling space; the four branch identities below say which product each branch of the construction gives, and with what multiplicity.

                                                noncomputable def MIPRE.QLD.sumRestr {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) {M : Type u_2} [AddCommMonoid M] (h : LPData F m → M) :
                                                M

                                                The sum of h over the data of a line-point pair whose axis index is i: the restricted law D_{ty,i} of def:ith-restricted-line, unnormalized. The seed ranges over the fibre of chi above i, written through seedEquiv as an offset.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def MIPRE.QLD.sumAll {F : Type u_1} [Fintype F] {m : ℕ} {M : Type u_2} [AddCommMonoid M] (h : LPData F m → M) :
                                                  M

                                                  The sum of h over all the data of a line-point pair: the unrestricted seeded law, unnormalized.

                                                  Equations
                                                  Instances For
                                                    theorem MIPRE.QLD.sumAll_eq_sum_sumRestr {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) {M : Type u_2} [AddCommMonoid M] (h : LPData F m → M) :
                                                    sumAll h = ∑ i : Fin m, sumRestr hm i h

                                                    The unrestricted law is the sum of the m restricted ones. This is the "mixture" of lem:qld-sublines' second property: a branch that leaves a side free gives that side the unrestricted law, which is the uniform mixture of the D_{ty,i}.

                                                    noncomputable def MIPRE.QLD.sumSub {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) {M : Type u_2} [AddCommMonoid M] (g : LPData F m → LPData F m → M) :
                                                    M

                                                    The sum over the subline sampling space at a fixed padded seed: the padded point and the padded raw direction, and a fresh seed and raw direction for each side.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      theorem MIPRE.QLD.sumSub_free {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) {s : F} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.ab ∨ padCase (LIDT.CL.chi hm4 s) = PadCase.dum) {M : Type u_2} [AddCommMonoid M] (g : LPData F m → LPData F m → M) :
                                                      sumSub hm4 hm t s g = (Fintype.card (LIDT.Point F (4 * m)) * Fintype.card (Fin (2 * m) → F)) • sumAll fun (cX : LPData F m) => sumAll fun (cZ : LPData F m) => g cX cZ

                                                      Neither side is forced: the axis index of the padded line lies in the alpha/beta block or among the dummy coordinates, so the padded direction moves neither the X nor the Z block and both sublines are sampled fresh. Both sides get the unrestricted law.

                                                      theorem MIPRE.QLD.sumSub_zc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.zc i) {M : Type u_2} [AddCommMonoid M] (g : LPData F m → LPData F m → M) :
                                                      sumSub hm4 hm t s g = (Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m) * Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m) * m) • sumAll fun (cX : LPData F m) => sumRestr hm i fun (cZ : LPData F m) => g cX cZ

                                                      The Z side is forced: the padded axis index lies in the Z block, so the Z subline's direction is the Z block of the padded direction and its axis index is i, while the X block of the padded direction vanishes and the X subline is sampled fresh. The Z side gets the restricted law D_{ty,i}, the X side the unrestricted one.

                                                      theorem MIPRE.QLD.sumSub_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) {t : LIDT.CL.Ty} {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.xc i) (ht : t ≠ LIDT.CL.Ty.dline) {M : Type u_2} [AddCommMonoid M] (g : LPData F m → LPData F m → M) :
                                                      sumSub hm4 hm t s g = (Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m) * Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m) * m) • sumRestr hm i fun (cX : LPData F m) => sumAll fun (cZ : LPData F m) => g cX cZ

                                                      The X side is forced and the Z side is not: the padded axis index lies in the X block and the padded line is axis-parallel (or the question is a point), so the Z block of its direction vanishes. The X side gets the restricted law D_{ty,i}, the Z side the unrestricted one.

                                                      theorem MIPRE.QLD.sumSub_xc_dline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.xc i) {M : Type u_2} [AddCommMonoid M] (g : LPData F m → LPData F m → M) :
                                                      sumSub hm4 hm LIDT.CL.Ty.dline s g = (Fintype.card (Fin (2 * m) → F) * Fintype.card (Fin (2 * m) → F) * Fintype.card (LIDT.Point F m) * m * Fintype.card (LIDT.Point F m) * m) • sumRestr hm i fun (cX : LPData F m) => sumRestr hm 0 fun (cZ : LPData F m) => g cX cZ

                                                      Both sides are forced: the padded axis index lies in the X block and the padded line is diagonal, so its direction truncates nothing of the Z block and the Z subline is forced as well, at axis index 0. Both sides get restricted laws. This is the branch whose repair the paper's round-12 note on lem:qld-sublines records.

                                                      From sums to averages #

                                                      The four branch identities are sum identities with an explicit multiplicity: the assignments to the coordinates and to the fresh randomness that the construction does not read. Dividing by the number of terms turns them into the statement lem:qld-sublines makes --- an identity of laws, with no constant left over. The average over the subline sampling space is exactly the average over a product of two line-point laws, restricted on a side exactly when the padded direction forces that side's subline.

                                                      noncomputable def MIPRE.QLD.avgAll {F : Type u_1} [Fintype F] {m : ℕ} (h : LPData F m → ℝ) :

                                                      The average of h over all the data of a line-point pair: q^m points, q seeds, q^m raw directions.

                                                      Equations
                                                      Instances For
                                                        noncomputable def MIPRE.QLD.avgRestr {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (h : LPData F m → ℝ) :

                                                        The average of h over the data of a line-point pair with axis index i: the restricted law D_{ty,i}, whose seed ranges over one block of q/m elements.

                                                        Equations
                                                        Instances For
                                                          noncomputable def MIPRE.QLD.avgSub {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g : LPData F m → LPData F m → ℝ) :

                                                          The average of g over the subline sampling space at a fixed padded seed: two padded points and two fresh seed-and-direction pairs.

                                                          Equations
                                                          Instances For
                                                            theorem MIPRE.QLD.sumAll_const_mul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c : ℝ) (h : LPData F m → ℝ) :
                                                            (sumAll fun (cX : LPData F m) => c * h cX) = c * sumAll h
                                                            theorem MIPRE.QLD.sumRestr_const_mul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) (c : ℝ) (h : LPData F m → ℝ) :
                                                            (sumRestr hm i fun (cZ : LPData F m) => c * h cZ) = c * sumRestr hm i h
                                                            theorem MIPRE.QLD.cast_card_div {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) :
                                                            ↑(Fintype.card F / m) = ↑(Fintype.card F) / ↑m

                                                            The block size as a real division, which is what clearing the denominators needs.

                                                            theorem MIPRE.QLD.avgSub_free {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) {s : F} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.ab ∨ padCase (LIDT.CL.chi hm4 s) = PadCase.dum) (g : LPData F m → LPData F m → ℝ) :
                                                            avgSub hm4 hm t s g = avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                            Neither side forced: the padded average is the product of the two unrestricted averages.

                                                            theorem MIPRE.QLD.avgSub_zc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.zc i) (g : LPData F m → LPData F m → ℝ) :
                                                            avgSub hm4 hm t s g = avgAll fun (cX : LPData F m) => avgRestr hm i fun (cZ : LPData F m) => g cX cZ

                                                            The Z side forced: the padded average is the product of the unrestricted X average and the restricted Z average at index i.

                                                            theorem MIPRE.QLD.avgSub_xc {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) {t : LIDT.CL.Ty} {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.xc i) (ht : t ≠ LIDT.CL.Ty.dline) (g : LPData F m → LPData F m → ℝ) :
                                                            avgSub hm4 hm t s g = avgRestr hm i fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                            The X side forced, the Z side free.

                                                            theorem MIPRE.QLD.avgSub_xc_dline {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) {s : F} {i : Fin m} (h : padCase (LIDT.CL.chi hm4 s) = PadCase.xc i) (g : LPData F m → LPData F m → ℝ) :
                                                            avgSub hm4 hm LIDT.CL.Ty.dline s g = avgRestr hm i fun (cX : LPData F m) => avgRestr hm 0 fun (cZ : LPData F m) => g cX cZ

                                                            Both sides forced, the Z side at index 0.

                                                            The restricted law is the unrestricted one up to a factor of m #

                                                            The paper's def:ith-restricted-line splits the line-point distribution by axis index and observes that an approximation holding at error delta on average holds on each restricted law at 2m * delta --- the 2 being the mixture over the two line types, which here is a parameter rather than something mixed over, so the factor is m. This is where every factor of m in delta_combine = m * poly(eps, md/q) comes from, and it is one line on top of sumAll_eq_sum_sumRestr: the m restricted laws are nonnegative and average to the unrestricted one, so each of them is at most m times it.

                                                            theorem MIPRE.QLD.sumAll_nonneg {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {h : LPData F m → ℝ} (hpos : ∀ (c : LPData F m), 0 ≤ h c) :
                                                            theorem MIPRE.QLD.sumAll_mono {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {h h' : LPData F m → ℝ} (hle : ∀ (c : LPData F m), h c ≤ h' c) :
                                                            theorem MIPRE.QLD.sumRestr_nonneg {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) {h : LPData F m → ℝ} (hpos : ∀ (c : LPData F m), 0 ≤ h c) :
                                                            0 ≤ sumRestr hm i h
                                                            theorem MIPRE.QLD.avgAll_nonneg {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {h : LPData F m → ℝ} (hpos : ∀ (c : LPData F m), 0 ≤ h c) :
                                                            theorem MIPRE.QLD.avgAll_mono {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {h h' : LPData F m → ℝ} (hle : ∀ (c : LPData F m), h c ≤ h' c) :
                                                            theorem MIPRE.QLD.avgRestr_nonneg {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) {h : LPData F m → ℝ} (hpos : ∀ (c : LPData F m), 0 ≤ h c) :
                                                            0 ≤ avgRestr hm i h
                                                            theorem MIPRE.QLD.avgAll_const_mul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (k : ℝ) (h : LPData F m → ℝ) :
                                                            (avgAll fun (c : LPData F m) => k * h c) = k * avgAll h
                                                            theorem MIPRE.QLD.sum_avgRestr {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (h : LPData F m → ℝ) :
                                                            ∑ i : Fin m, avgRestr hm i h = ↑m * avgAll h

                                                            The restricted laws average to the unrestricted one.

                                                            theorem MIPRE.QLD.avgRestr_le_mul_avgAll {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (i : Fin m) {h : LPData F m → ℝ} (hpos : ∀ (c : LPData F m), 0 ≤ h c) :
                                                            avgRestr hm i h ≤ ↑m * avgAll h

                                                            A bound on the unrestricted law bounds each restricted one, at m times the error.

                                                            theorem MIPRE.QLD.avgRestr_prod_le_mul_avgAll {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) {g : LPData F m → LPData F m → ℝ} (hpos : ∀ (cX cZ : LPData F m), 0 ≤ g cX cZ) (i j : Fin m) :
                                                            (avgRestr hm i fun (cX : LPData F m) => avgRestr hm j fun (cZ : LPData F m) => g cX cZ) ≤ ↑m * ↑m * avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                            The product form, at m^2 times the error: the shape the pasting lemma's hypotheses are in, each side's line drawn from its own restricted law.

                                                            The unrestricted law is the uniform average over the data #

                                                            pairs_of_lines_prod is stated as a uniform average over LPData F m x LPData F m; avgAll is the same average written as nested sums. One equiv identifies them.

                                                            instance MIPRE.QLD.instNonemptyLPData {F : Type u_1} [Field F] {m : ℕ} :
                                                            def MIPRE.QLD.lpEquiv (F : Type u_2) (m : ℕ) :

                                                            The data of a line-point pair, as a triple.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              theorem MIPRE.QLD.sumAll_eq_sum {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (h : LPData F m → ℝ) :
                                                              sumAll h = ∑ c : LPData F m, h c
                                                              theorem MIPRE.QLD.card_lpData {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] :
                                                              theorem MIPRE.QLD.avgAll_eq_uniform {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (h : LPData F m → ℝ) :
                                                              avgAll h = ∑ c : LPData F m, (↑(Fintype.card (LPData F m)))⁻¹ * h c

                                                              avgAll is the uniform average over the data, which is the form pairs_of_lines_prod is stated in.

                                                              theorem MIPRE.QLD.avgAll_prod_eq_uniform {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (g : LPData F m → LPData F m → ℝ) :
                                                              (avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ) = ∑ p : LPData F m × LPData F m, (↑(Fintype.card (LPData F m × LPData F m)))⁻¹ * g p.1 p.2

                                                              The product form.

                                                              theorem MIPRE.QLD.avgAll_one {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] :
                                                              (avgAll fun (x : LPData F m) => 1) = 1

                                                              The constant 1 averages to 1.

                                                              theorem MIPRE.QLD.avgAll_prod_one {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] :
                                                              (avgAll fun (x : LPData F m) => avgAll fun (x : LPData F m) => 1) = 1

                                                              Linearity and monotonicity of the averages #

                                                              theorem MIPRE.QLD.avgAll_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (f g : LPData F m → ℝ) :
                                                              (avgAll fun (c : LPData F m) => f c - g c) = avgAll f - avgAll g
                                                              theorem MIPRE.QLD.sumSub_mono {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) {g g' : LPData F m → LPData F m → ℝ} (hle : ∀ (cX cZ : LPData F m), g cX cZ ≤ g' cX cZ) :
                                                              sumSub hm4 hm t s g ≤ sumSub hm4 hm t s g'
                                                              theorem MIPRE.QLD.avgSub_mono {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) {g g' : LPData F m → LPData F m → ℝ} (hle : ∀ (cX cZ : LPData F m), g cX cZ ≤ g' cX cZ) :
                                                              avgSub hm4 hm t s g ≤ avgSub hm4 hm t s g'
                                                              theorem MIPRE.QLD.sumSub_one {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) :
                                                              (sumSub hm4 hm t s fun (x x_1 : LPData F m) => 1) = ↑(Fintype.card F) ^ (10 * m + 2)
                                                              theorem MIPRE.QLD.avgSub_one {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) :
                                                              (avgSub hm4 hm t s fun (x x_1 : LPData F m) => 1) = 1

                                                              The padded law is dominated by the product law #

                                                              This is the distributional content of the paper's Claims 17-1 to 17-3, and it is stronger than what those claims extract. The paper's \cnote on the conclusion of lem:qld-4-13 says the joint law of the two sublines-with-points is not a product, because "for diagonal lines both coordinates share the line parameter", and the three claims are written to use only the marginals. That is right about conditioning on the padded line: given it, the two blocks of a uniform point on it move with one parameter. But the quantity to be bounded conditions only on the two sublines, which know each block's coset in its own space and not the relative offset --- and avgSub_free and its three companions say that at a fixed padded seed the joint law is exactly a product of the two marginals, each of them restricted or not according to padCase. Combining that with the restricted-law transfer bounds the padded law by m^2 times the product of the two unrestricted laws, uniformly in the padded seed and the line type.

                                                              theorem MIPRE.QLD.avgAll_prod_nonneg {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] {g : LPData F m → LPData F m → ℝ} (hpos : ∀ (cX cZ : LPData F m), 0 ≤ g cX cZ) :
                                                              0 ≤ avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ
                                                              theorem MIPRE.QLD.avgAll_avgRestr_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) {g : LPData F m → LPData F m → ℝ} (hpos : ∀ (cX cZ : LPData F m), 0 ≤ g cX cZ) (j : Fin m) :
                                                              (avgAll fun (cX : LPData F m) => avgRestr hm j fun (cZ : LPData F m) => g cX cZ) ≤ ↑m * avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                              The Z side restricted, the X side free.

                                                              theorem MIPRE.QLD.avgRestr_avgAll_le {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) {g : LPData F m → LPData F m → ℝ} (hpos : ∀ (cX cZ : LPData F m), 0 ≤ g cX cZ) (i : Fin m) :
                                                              (avgRestr hm i fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ) ≤ ↑m * avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                              The X side restricted, the Z side free.

                                                              theorem MIPRE.QLD.avgSub_le_mul_avgAll {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) {g : LPData F m → LPData F m → ℝ} (hpos : ∀ (cX cZ : LPData F m), 0 ≤ g cX cZ) :
                                                              avgSub hm4 hm t s g ≤ ↑m * ↑m * avgAll fun (cX : LPData F m) => avgAll fun (cZ : LPData F m) => g cX cZ

                                                              The padded line-point law is at most m^2 times the product of the two unrestricted subline laws, whatever the padded seed and the line type.

                                                              The alpha and beta coordinates of the padded point #

                                                              The measurement of lem:qld-padded-lines reads alpha and beta at the sampled padded point, which avgSub does not carry. They are coordinates of the padded point outside the X and Z blocks, so translating the point in those two coordinates alone leaves both sublines untouched --- which makes the (alpha, beta) average uniform and independent of everything else, and a bound that holds for every fixed (alpha, beta) therefore holds for the joint law. No refinement of the block decomposition is needed.

                                                              def MIPRE.QLD.shiftAB {F : Type u_1} [Field F] {m : ℕ} [NeZero m] (c d : F) (u : LIDT.Point F (4 * m)) :
                                                              LIDT.Point F (4 * m)

                                                              Translating the padded point in its alpha and beta coordinates only.

                                                              Equations
                                                              Instances For
                                                                @[simp]
                                                                theorem MIPRE.QLD.xBlk_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d : F) (u : LIDT.Point F (4 * m)) :
                                                                xBlk (shiftAB c d u) = xBlk u
                                                                @[simp]
                                                                theorem MIPRE.QLD.zBlk_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d : F) (u : LIDT.Point F (4 * m)) :
                                                                zBlk (shiftAB c d u) = zBlk u
                                                                @[simp]
                                                                theorem MIPRE.QLD.alph_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d : F) (u : LIDT.Point F (4 * m)) :
                                                                alph (shiftAB c d u) = alph u + c
                                                                @[simp]
                                                                theorem MIPRE.QLD.bet_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d : F) (u : LIDT.Point F (4 * m)) :
                                                                bet (shiftAB c d u) = bet u + d
                                                                theorem MIPRE.QLD.shiftAB_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d c' d' : F) (u : LIDT.Point F (4 * m)) :
                                                                shiftAB c' d' (shiftAB c d u) = shiftAB (c + c') (d + d') u
                                                                @[simp]
                                                                theorem MIPRE.QLD.shiftAB_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (u : LIDT.Point F (4 * m)) :
                                                                shiftAB 0 0 u = u
                                                                theorem MIPRE.QLD.bijective_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (c d : F) :
                                                                theorem MIPRE.QLD.subX_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (c d s : F) (pt raw : LIDT.Point F (4 * m)) (e : F × LIDT.Point F m) :
                                                                subX hm4 hm { pt := shiftAB c d pt, s := s, raw := raw } e = subX hm4 hm { pt := pt, s := s, raw := raw } e
                                                                theorem MIPRE.QLD.subZ_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (c d s : F) (pt raw : LIDT.Point F (4 * m)) (e : F × LIDT.Point F m) :
                                                                subZ hm4 hm t { pt := shiftAB c d pt, s := s, raw := raw } e = subZ hm4 hm t { pt := pt, s := s, raw := raw } e
                                                                noncomputable def MIPRE.QLD.sumSubAt {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (pt : LIDT.Point F (4 * m)) (h : LPData F m → LPData F m → ℝ) :

                                                                The inner average of the subline sampling space, at a fixed padded point.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  theorem MIPRE.QLD.sumSub_eq_sum_sumSubAt {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (h : LPData F m → LPData F m → ℝ) :
                                                                  sumSub hm4 hm t s h = ∑ pt : LIDT.Point F (4 * m), sumSubAt hm4 hm t s pt h
                                                                  theorem MIPRE.QLD.sumSubAt_shiftAB {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s c d : F) (pt : LIDT.Point F (4 * m)) (h : LPData F m → LPData F m → ℝ) :
                                                                  sumSubAt hm4 hm t s (shiftAB c d pt) h = sumSubAt hm4 hm t s pt h
                                                                  noncomputable def MIPRE.QLD.sumSubAB {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g : F → F → LPData F m → LPData F m → ℝ) :

                                                                  The padded average with alpha and beta carried.

                                                                  Equations
                                                                  Instances For
                                                                    noncomputable def MIPRE.QLD.avgSubAB {F : Type u_1} [Field F] [Fintype F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g : F → F → LPData F m → LPData F m → ℝ) :

                                                                    The normalized version.

                                                                    Equations
                                                                    Instances For
                                                                      theorem MIPRE.QLD.sumSubAB_eq {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g : F → F → LPData F m → LPData F m → ℝ) :
                                                                      ↑(Fintype.card (F × F)) * sumSubAB hm4 hm t s g = ∑ p : F × F, sumSub hm4 hm t s (g p.1 p.2)

                                                                      (alpha, beta) is uniform and independent of the two sublines, because translating the padded point in those two coordinates alone is a bijection that leaves both sublines fixed.

                                                                      theorem MIPRE.QLD.sumSubAt_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (pt : LIDT.Point F (4 * m)) (h h' : LPData F m → LPData F m → ℝ) :
                                                                      (sumSubAt hm4 hm t s pt fun (cX cZ : LPData F m) => h cX cZ - h' cX cZ) = sumSubAt hm4 hm t s pt h - sumSubAt hm4 hm t s pt h'
                                                                      theorem MIPRE.QLD.sumSubAB_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g g' : F → F → LPData F m → LPData F m → ℝ) :
                                                                      (sumSubAB hm4 hm t s fun (a b : F) (cX cZ : LPData F m) => g a b cX cZ - g' a b cX cZ) = sumSubAB hm4 hm t s g - sumSubAB hm4 hm t s g'
                                                                      theorem MIPRE.QLD.avgSubAB_sub {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) (g g' : F → F → LPData F m → LPData F m → ℝ) :
                                                                      (avgSubAB hm4 hm t s fun (a b : F) (cX cZ : LPData F m) => g a b cX cZ - g' a b cX cZ) = avgSubAB hm4 hm t s g - avgSubAB hm4 hm t s g'
                                                                      theorem MIPRE.QLD.avgSubAB_one {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) :
                                                                      (avgSubAB hm4 hm t s fun (x x_1 : F) (x_2 x_3 : LPData F m) => 1) = 1
                                                                      theorem MIPRE.QLD.avgSubAB_le_of_forall {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm4 : 4 * m ∣ Fintype.card F) (hm : m ∣ Fintype.card F) (t : LIDT.CL.Ty) (s : F) {g : F → F → LPData F m → LPData F m → ℝ} {delta : ℝ} (h : ∀ (a b : F), avgSub hm4 hm t s (g a b) ≤ delta) :
                                                                      avgSubAB hm4 hm t s g ≤ delta

                                                                      A bound that holds for every fixed (alpha, beta) holds for the padded law.