Documentation

MIPRE.Background.LIDT.Adapter.Strategy

The seeded-CL adapter, part 4: the question and answer maps #

The reduction plays a strategy for the seeded CL test as a strategy for the canonical-line test, through MIPRE.TensorProductStrategy.adapt. That needs two maps, and this file defines them and the bookkeeping that identifies them.

qmap hm σ sends a question of the canonical-line test to the seeded question it is played through:

amap sends a seeded answer to a canonical-line answer, and depends on the question — the shift does. Its unreachable branches are unreachable because clGame rejects an answer whose format does not match its question's type; before that was repaired the branches would have been live.

shiftOf ℓ is the shift, read off rep_eq: the two base points differ by shiftOf ℓ times the direction (rep_rev_eq), so the two parameters of a point of the line differ by shiftOf ℓ.

Reading the direction off a line #

theorem MIPRE.LIDT.Adapter.single_inj {F : Type u_1} [Field F] {m : ℕ} {i j : Fin m} (h : Pi.single i 1 = Pi.single j 1) :
i = j

A default index, for the branches of the maps below that the support never reaches.

Equations
Instances For
    noncomputable def MIPRE.LIDT.Adapter.axisIdx {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} [NeZero m] (ℓ : Line F m) :
    Fin m

    The direction index of an axis-parallel line.

    Equations
    Instances For
      @[simp]
      theorem MIPRE.LIDT.Adapter.axisIdx_eq {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} [NeZero m] (b : Point F m) (i : Fin m) :
      noncomputable def MIPRE.LIDT.Adapter.diagIdx {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} [NeZero m] (ℓ : Line F m) :
      Fin m

      The χ-index the adapter uses for a diagonal line: the first nonzero coordinate of the reversed direction, which is the pivot of its span and so the coordinate rep zeroes.

      The fallback for a singleton line (direction zero) is rev idx0 = m - 1, not idx0, and the choice is forced by the weight bookkeeping rather than free. The seeded test's DLine samples with zeroBelow (χ s) V = 0 number q^{χ s}, so its mass on (u₀, s, 0) grows with χ s; the canonical-line test puts mass ≈ 1/(6 m q^m q) on a singleton line, which only the largest χ can dominate. Sending singleton lines to χ = 0 costs a factor q^{m-1}, which the error term of thm:lidt-cl-soundness does not allow. See planning/lidt-cl-adapter.md.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem MIPRE.LIDT.Adapter.diagIdx_of_dir_eq_zero {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} [NeZero m] {ℓ : Line F m} (h : revPoint ℓ.2 = 0) :

        The fallback, named.

        theorem MIPRE.LIDT.Adapter.diagIdx_eq_find {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} [NeZero m] {ℓ : Line F m} (h : ∃ (j : Fin m), revPoint ℓ.2 j ≠ 0) :
        diagIdx ℓ = Fin.find (fun (j : Fin m) => revPoint ℓ.2 j ≠ 0) h

        On a nondegenerate line diagIdx is the pivot.

        noncomputable def MIPRE.LIDT.Adapter.shiftOf {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} (ℓ : Line F m) :
        F

        The shift between the two presentations of a line.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The seeded test's base point, in terms of the shift #

          theorem MIPRE.LIDT.Adapter.canonLin_bot {F : Type u_1} [Field F] {m : ℕ} (x : Fin m → F) :

          canonLin of the zero subspace is the identity: there are no pivots.

          theorem MIPRE.LIDT.Adapter.rep_rev_eq {F : Type u_1} [Field F] [DecidableEq F] {m : ℕ} (ℓ : Line F m) :
          (CL.canonLin (F ∙ revPoint ℓ.2)) (revPoint ℓ.1) = revPoint ℓ.1 - shiftOf ℓ • revPoint ℓ.2

          The two base points differ by the shift times the direction.

          The two maps #

          noncomputable def MIPRE.LIDT.Adapter.qmap {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) (c : F) :
          Question F m → CL.Question F m

          The seeded question a canonical-line question is played through, for the seed choice σ and the direction scale c.

          The scale is averaged over along with the seed, and it has to be: the seeded test's DLine questions carry the raw direction, so one geometric line has q - 1 of them, and an adapter using only one would concentrate its push-forward on a 1/(q-1) fraction of them and need a q-dependent constant. See the second correction in planning/lidt-cl-adapter.md.

          Scaling the direction does not move the base point, rep depending only on the span.

          Equations
          Instances For
            noncomputable def MIPRE.LIDT.Adapter.amap {F : Type u_1} [Field F] [DecidableEq F] {m d : ℕ} (c : F) :
            Question F m → CL.Answer F m d 1 → Answer F m d

            The canonical-line answer a seeded answer becomes. It depends on the question because the shift does, and on the scale c; the branches not listed are the ones clGame rejects on format.

            A point of the line at the target's parameter t sits at the source's parameter (t + shiftOf ℓ) / c, so the substitution to undo is t ↦ c⁻¹ t + c⁻¹ · shiftOf ℓ.

            Equations
            Instances For

              The support of the canonical-line test's distribution #

              theorem MIPRE.LIDT.Adapter.exists_sample_of_μ_ne_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] {x y : Question F m} (h : (lidtGame F m d).μ x y ≠ 0) :
              ∃ (s : Sample F m), s.questions = (x, y)

              A question pair of positive weight comes from a sample.

              Transporting membership through the reversal #

              theorem MIPRE.LIDT.Adapter.eq_add_smul_of_rev {F : Type u_1} [Field F] {m : ℕ} {u₀ w x : Point F m} {t : F} (h : revPoint x = revPoint u₀ + t • revPoint w) :
              x = u₀ + t • w

              A point on the reversed line is on the line, with the same parameter.

              Reading the answer format off the acceptance #

              theorem MIPRE.LIDT.Adapter.fmtOk_of_accepts_left {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] {hm : m ∣ Fintype.card F} {x y : CL.Question F m} {a b : CL.Answer F m d 1} (h : CL.accepts hm x y a b = true) :
              theorem MIPRE.LIDT.Adapter.fmtOk_of_accepts_right {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] {hm : m ∣ Fintype.card F} {x y : CL.Question F m} {a b : CL.Answer F m d 1} (h : CL.accepts hm x y a b = true) :
              theorem MIPRE.LIDT.Adapter.eq_values_of_fmtOk {F : Type u_1} {m d : ℕ} {u : Point F m} {a : CL.Answer F m d 1} (h : (CL.Question.point u).fmtOk a = true) :
              ∃ (α : Fin 1 → F), a = CL.Answer.values α
              theorem MIPRE.LIDT.Adapter.eq_apolys_of_fmtOk {F : Type u_1} {m d : ℕ} {u₀ : Point F m} {s : F} {a : CL.Answer F m d 1} (h : (CL.Question.aline u₀ s).fmtOk a = true) :
              ∃ (f : Fin 1 → LinePoly F d), a = CL.Answer.apolys f
              theorem MIPRE.LIDT.Adapter.eq_dpolys_of_fmtOk {F : Type u_1} {m d : ℕ} {u₀ : Point F m} {s : F} {v : Point F m} {a : CL.Answer F m d 1} (h : (CL.Question.dline u₀ s v).fmtOk a = true) :
              ∃ (f : Fin 1 → LinePoly F (m * d)), a = CL.Answer.dpolys f

              hD: acceptance survives the two maps #

              One lemma per case of Sample, since the source's acceptance says something different in each.

              theorem MIPRE.LIDT.Adapter.hD_selfCons {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (u : Point F m) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c (Question.point u)) (qmap hm σ c (Question.point u)) a b = true) :

              The self-consistency case: both players are asked the same point, and both tests check that the two answers agree.

              theorem MIPRE.LIDT.Adapter.hD_axis {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (u : Point F m) (i : Fin m) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c (Question.axisLine (Line.through u (Pi.single i 1)))) (qmap hm σ c (Question.point u)) a b = true) :

              The axis-parallel case: the source checks the point is on the seeded line and the answer evaluates correctly there, and after reversal that is the same equation the target checks.

              theorem MIPRE.LIDT.Adapter.hD_diag {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (hc : c ≠ 0) (u : Point F m) (j : Fin m) (v : Fin (↑j + 1) → F) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c (Question.diagLine (Line.through u (Sample.extend v)))) (qmap hm σ c (Question.point u)) a b = true) :

              The diagonal case, and the one the affine rebasing exists for. The two tests' base points differ by shiftOf ℓ times the direction and the directions by the scale c, so the point at the target's parameter t sits at the source's (t + shiftOf ℓ) / c; reparam c⁻¹ (c⁻¹ · shiftOf ℓ) undoes exactly that, through the general two-parameter reparam.

              The swapped cases #

              Each test hands the line to either player, so the two mirrored cases have to be done too. The proofs are the previous two with the roles exchanged; both games' predicates carry the mirrored clause explicitly.

              theorem MIPRE.LIDT.Adapter.hD_axis' {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (u : Point F m) (i : Fin m) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c (Question.point u)) (qmap hm σ c (Question.axisLine (Line.through u (Pi.single i 1)))) a b = true) :

              hD_axis with the players exchanged.

              theorem MIPRE.LIDT.Adapter.hD_diag' {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (hc : c ≠ 0) (u : Point F m) (j : Fin m) (v : Fin (↑j + 1) → F) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c (Question.point u)) (qmap hm σ c (Question.diagLine (Line.through u (Sample.extend v)))) a b = true) :

              hD_diag with the players exchanged.

              hD, assembled #

              The five cases above are exactly the five shapes a question pair of positive weight can have, so this is the hypothesis MIPRE.TensorProductStrategy.one_sub_value_adapt_le asks for. Note it is asked only on the support: off it the claim is false, since a pair of two line questions is a real question pair of the seeded test and the canonical-line test has no subtest for it.

              theorem MIPRE.LIDT.Adapter.hD_qmap {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {m d : ℕ} [NeZero m] (hm : m ∣ Fintype.card F) (σ : Fin m → Fin (Fintype.card F / m)) {c : F} (hc : c ≠ 0) (x' y' : Question F m) (hμ : (lidtGame F m d).μ x' y' ≠ 0) (a b : CL.Answer F m d 1) (hacc : (CL.clGame hm).D (qmap hm σ c x') (qmap hm σ c y') a b = true) :
              (lidtGame F m d).D x' y' (amap c x' a) (amap c y' b) = true