Documentation

MIPRE.Tailored.Repeat.LpProg

The repeated linear-constraints processor #

The linear-constraints processor of the repeated tailored verifier (issue #280, P2b), on (n, x, y, a^R, b^R), with the input sampler S̄, calculator L̄ and processor P̄ and the parameters (λ, τ) stored:

  1. the dimension s and k = k(n) in unary, as the calculator does;
  2. cut x and y into their k blocks, and run L̄ on both kinds of every block of both;
  3. from the lengths, cut a^R and b^R into the coordinates' readable answers, and run P̄ on (n, xᵢ, yᵢ, a^R_i, b^R_i) for every coordinate;
  4. output every coordinate's constraints, padded to all the variables (padWithL, which is TailoredGame.padCons).

The stages #

@[reducible, inline]

The stored data of the processor: (S̄, L̄, P̄, λ, τ).

Equations
Instances For
    @[reducible, inline]

    The input of the core: the stored data and (n, d).

    Equations
    Instances For

      Stage 1: the call to S̄ on the dimension query.

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

        Stage 3: the input of dimProg computing k.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem MIPRE.Tailored.RepProg.lpC_apply (a : LpIn) (us : Cost.Unary) :
          lpC.toFun (a, us) = ((a, us), 1, a.1.2.2.2.1, a.2.1, a.1.2.2.2.2)

          The four components of the datum d = (x, y, a^R, b^R).

          Equations
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[reducible, inline]

                The state after k in unary: ((a, s), k).

                Equations
                Instances For

                  The blocks of x and of y at a state.

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

                        The length queries: every block of x at both kinds, then every block of y.

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

                          The length queries at a list of blocks, in polynomial time.

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

                            Stage 4: the queries to L̄.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[simp]
                              theorem MIPRE.Tailored.RepProg.lpD_apply (st : LpSt) :
                              lpD.toFun st = (st, st.1.1.1.2.1, lpLenQs st)

                              From the lengths to the queries to the processor #

                              The lengths, in unary, of a list of outputs of the calculator.

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

                                  The j-th quarter of the results, k each.

                                  Equations
                                  Instances For

                                    The twelve lengths of every coordinate, from the results of the calls to L̄.

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

                                      The query to P̄ at a coordinate: its blocks and its readable answers.

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

                                        The queries to P̄.

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

                                            The concatenation of the four triples of a coordinate.

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

                                                The query to P̄ at a coordinate, in polynomial time.

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

                                                  The queries to P̄, in polynomial time.

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

                                                    The queries to P̄ at a state and the results of the calls to L̄.

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

                                                      Projections of (st, rs).

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

                                                            Stage 5: the queries to P̄; the context is the twelve lengths of every coordinate.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              @[simp]
                                                              theorem MIPRE.Tailored.RepProg.lpE_apply (p : LpSt × List Cost.Data) :
                                                              lpE.toFun p = (lpPads p.2 (List.length p.1.2), p.1.1.1.1.2.2.1, lpPQs p.1 p.2)

                                                              The output: every coordinate's constraints, padded.

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

                                                                bitsListD, in polynomial time.

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

                                                                  Stage 6: the output.

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

                                                                    The program #

                                                                    The core of the repeated linear-constraints processor, on ((S̄, L̄, P̄, λ, τ), (n, d)).

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

                                                                      The run #

                                                                      @[reducible, inline]
                                                                      abbrev MIPRE.Tailored.RepProg.lpSt (sp lp pp : Cost.Prog) (lam tau n : ℕ) (d : Cost.Data) (s : ℕ) :

                                                                      The state after the first stages: ((a, s), k).

                                                                      Equations
                                                                      Instances For
                                                                        noncomputable def MIPRE.Tailored.RepProg.lpCoreCost (sp lp pp : Cost.Prog) (lam tau n : ℕ) (d : Cost.Data) (s Td T₁ Z₁ T₂ Z₂ : ℕ) (rs₁ rs₂ : List Cost.Data) :

                                                                        The cost of the core, stage by stage, with the dimension query of cost at most Td, the calls to L̄ of cost at most T₁ with bound Z₁ on the second loop, and the calls to P̄ of cost at most T₂ with bound Z₂ on the third.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          theorem MIPRE.Tailored.RepProg.lpCore_runsLe {univ : Cost.Prog} (hU : Cost.Prog.WellScoped 1 univ) (sp lp pp : Cost.Prog) (lam tau n : ℕ) (d : Cost.Data) (s : ℕ) {Td : ℕ} (hdim : Calls.RunsLe univ ((Cost.encode sp).cons (Cost.encode (n, CL.Sampler.Query.dimension))) (Cost.encode s) Td) (f₁ f₂ : Cost.Data → Cost.Data) (T₁ Z₁ T₂ Z₂ : ℕ) (hf₁ : ∀ q ∈ lpLenQs (lpSt sp lp pp lam tau n d s), Calls.RunsLe univ ((Cost.encode lp).cons q) (f₁ q) T₁) (hZ₁ : (Cost.Data.list (lpLenQs (lpSt sp lp pp lam tau n d s))).size + (Cost.Data.list (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s)))).size + 1 ≤ Z₁) (hf₂ : ∀ q ∈ lpPQs (lpSt sp lp pp lam tau n d s) (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))), Calls.RunsLe univ ((Cost.encode pp).cons q) (f₂ q) T₂) (hZ₂ : (Cost.Data.list (lpPQs (lpSt sp lp pp lam tau n d s) (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))))).size + (Cost.Data.list (List.map f₂ (lpPQs (lpSt sp lp pp lam tau n d s) (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s)))))).size + 1 ≤ Z₂) :
                                                                          Calls.RunsLe (lpCore univ) (Cost.encode ((sp, lp, pp, lam, tau), n, d)) (Cost.encode (lpOut (lpPads (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))) (Repetition.reps lam tau n)) (List.map f₂ (lpPQs (lpSt sp lp pp lam tau n d s) (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))))))) (lpCoreCost sp lp pp lam tau n d s Td T₁ Z₁ T₂ Z₂ (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))) (List.map f₂ (lpPQs (lpSt sp lp pp lam tau n d s) (List.map f₁ (lpLenQs (lpSt sp lp pp lam tau n d s))))))

                                                                          The run of the core, from runs of the calls: the dimension query answered by s, the calls to L̄ by f₁ and the calls to P̄ by f₂.

                                                                          theorem MIPRE.Tailored.RepProg.lpCore_inv {univ : Cost.Prog} (hU : Cost.Prog.WellScoped 1 univ) (sp lp pp : Cost.Prog) (lam tau n : ℕ) (d : Cost.Data) (s : ℕ) {td : ℕ} (hdim : univ.Runs ((Cost.encode sp).cons (Cost.encode (n, CL.Sampler.Query.dimension))) (Cost.encode s) td) {r : Cost.Data} {t : ℕ} (h : (lpCore univ).Runs (Cost.encode ((sp, lp, pp, lam, tau), n, d)) r t) :
                                                                          ∃ (rs₁ : List Cost.Data) (rs₂ : List Cost.Data), List.Forall₂ (fun (q r : Cost.Data) => ∃ (t' : ℕ), univ.Runs ((Cost.encode lp).cons q) r t') (lpLenQs (lpSt sp lp pp lam tau n d s)) rs₁ ∧ List.Forall₂ (fun (q r : Cost.Data) => ∃ (t' : ℕ), univ.Runs ((Cost.encode pp).cons q) r t') (lpPQs (lpSt sp lp pp lam tau n d s) rs₁) rs₂ ∧ r = Cost.encode (lpOut (lpPads rs₁ (Repetition.reps lam tau n)) rs₂)

                                                                          Inversion of the core: when the dimension query is answered by s, a halting run ran L̄ on every length query and P̄ on every query its results determine, and output the padded constraints.