Documentation

MIPRE.Tailored.Intro.AuxProg

The auxiliary comparisons of the introspection processor, in polynomial time #

The clauses of the auxiliary checks between two answers of the padded layout (AuxCons.lean: sampleCons, readCons, hideReadCons, hideNextCons, sameCons, sourceCons) are lists of constraints determined by a few readable data: the register length Q and the original cutoff R, the readable conditions (as Booleans), the input's split of its answer at the register, the coordinate sets of the hiding stages (as bit masks), the generators of a kernel, and the input's own constraints. This file builds each clause as a Cost.PolyTimeFun of those data, computed elsewhere, with Q, R and the split in unary:

Each _spec lemma states that on the encodings of the semantic data the program outputs the semantic list.

The forms on a generic input #

eqCons la lb oa ob m.

Equations
Instances For
    @[simp]
    theorem MIPRE.Tailored.Intro.eqOf_apply {ι : Type} [Cost.SizedEncoding ι] (la lb oa ob m : Cost.PolyTimeFun ι Cost.Unary) (a : ι) :
    (eqOf la lb oa ob m).toFun a = eqCons (List.length (la.toFun a)) (List.length (lb.toFun a)) (List.length (oa.toFun a)) (List.length (ob.toFun a)) (List.length (m.toFun a))

    projEqCons la lb oa ob S, the set given by its mask.

    Equations
    Instances For

      dualCons la lb oa ob S gens, the set given by its mask, the generators by their bits.

      Equations
      Instances For
        @[simp]

        The input-answer equality srcEqCons: the guard g on la + lb bits, and the equality of the linear windows at oLa, oLb, of length s.

        Equations
        Instances For
          @[simp]
          theorem MIPRE.Tailored.Intro.srcEqOf_apply {ι : Type} [Cost.SizedEncoding ι] (la lb oLa oLb : Cost.PolyTimeFun ι Cost.Unary) (g : Cost.PolyTimeFun ι Bool) (s : Cost.PolyTimeFun ι Cost.Unary) (a : ι) :
          (srcEqOf la lb oLa oLb g s).toFun a = guardCons (g.toFun a) (List.length (la.toFun a) + List.length (lb.toFun a)) ++ eqCons (List.length (la.toFun a)) (List.length (lb.toFun a)) (List.length (oLa.toFun a)) (List.length (oLb.toFun a)) (List.length (s.toFun a))

          The sum of three unary numbers.

          Equations
          Instances For

            The register and the cutoff #

            The register length and the cutoff of an input ((Q, R), _).

            Equations
            Instances For

              Sampling and reading #

              @[reducible, inline]

              The input of the sampling and reading comparisons: ((Q, R), (guard, source guard), sL).

              Equations
              Instances For

                The sampling comparison sampleCons.

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

                  The reading comparison readCons.

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

                    Hiding #

                    The comparison of the last Hide with Read hideReadCons, on ((Q, R), guard).

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      theorem MIPRE.Tailored.Intro.hideReadConsF_spec (Q R : ℕ) (L : Bool → CL.CLFun CL.𝔽₂ (Fin Q) 7) (w : Bool) (aR bR : Cost.BitStr) :
                      hideReadConsF.toFun ((Cost.unary Q, Cost.unary R), decide ((L w).outputPrefix 6 (CL.ofBits Q (win aR 0 Q)) = (L w).outputPrefix 6 (CL.ofBits Q (win bR 0 Q)))) = hideReadCons Q R L w aR bR

                      The comparison of the last Hide with Read, on the encoded data.

                      @[reducible, inline]

                      The input of the comparison of consecutive Hide levels: Q, the guard, the masks of the prefix register of the next level, of that of the level after it (complemented by the program) and of the factor of the dual, and the bits of the kernel generators.

                      Equations
                      Instances For

                        The comparison of consecutive Hide levels hideNextCons.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem MIPRE.Tailored.Intro.hideNextConsF_spec (Q : ℕ) (L : Bool → CL.CLFun CL.𝔽₂ (Fin Q) 7) (kg : (S : Finset (Fin Q)) → CL.RegLinear CL.𝔽₂ S → List (Fin Q → CL.𝔽₂)) (w : Bool) (k : ℕ) (aR bR : Cost.BitStr) :
                          hideNextConsF.toFun (Cost.unary Q, decide ((L w).outputPrefix k (CL.ofBits Q (win aR 0 Q)) = (L w).outputPrefix k (CL.ofBits Q (win bR 0 Q))), (maskOf (Introspection.CLChecks.prefixRegister (L w) (k + 1) (CL.ofBits Q (win bR 0 Q))), maskOf (Introspection.CLChecks.prefixRegister (L w) (k + 2) (CL.ofBits Q (win bR 0 Q))), maskOf ((L w).factorOfPrefix (k + 1) (CL.ofBits Q (win bR 0 Q)))), List.map CL.toBits (kg ((L w).factorOfPrefix (k + 1) (CL.ofBits Q (win bR 0 Q))) (Introspection.CLChecks.stageLinear (L w) (k + 1) (CL.ofBits Q (win bR 0 Q))))) = hideNextCons Q L kg w k aR bR

                          The comparison of consecutive Hide levels, on the encoded data.

                          Consistency at one label #

                          @[reducible, inline]

                          The input of the consistency comparison: ((Q, R), (hide?, read?), (guard, source guard), sL).

                          Equations
                          Instances For

                            Consistency at one label sameCons, the kind of the label given by two Booleans.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              theorem MIPRE.Tailored.Intro.sameConsF_spec (Q R : ℕ) (sR sL : Introspection.AuxType 7 × Bool → Cost.BitStr → ℕ) (t : Introspection.AuxType 7 × Bool) (aR bR : Cost.BitStr) :
                              sameConsF.toFun ((Cost.unary Q, Cost.unary R), (isHideT t.1, isReadT t.1), (decide (win aR 0 Q = win bR 0 Q), decide (sR t (win aR 0 Q) = sR t (win bR 0 Q) ∧ sL t (win aR 0 Q) = sL t (win bR 0 Q) ∧ win aR Q (sR t (win aR 0 Q)) = win bR Q (sR t (win bR 0 Q)))), Cost.unary (sL t (win aR 0 Q))) = sameCons Q R sR sL t aR bR

                              Consistency at one label, on the encoded data.

                              The source game #

                              @[reducible, inline]

                              The input of the source comparison: ((Q, R), ((sRa, sLa), (sRb, sLb)), constraints).

                              Equations
                              Instances For

                                The source game's constraints sourceCons: the input's constraints, re-indexed.

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

                                  The source game's constraints, on the encoded data: the last input is the input's constraint list at the two registers and readable input answers.

                                  The length of a label's answers #

                                  The length of a label's answers auxLen, on ((Q, R), (hide?, read?)).

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

                                    A pair of auxiliary answers #

                                    @[reducible, inline]

                                    The input of the assembly at a pair of labels: ((guard, labels equal?), (la, lb), (same, directed, reverse directed)), the three lists already computed.

                                    Equations
                                    Instances For

                                      The constraints at a pair of auxiliary labels auxPair, from the consistency list and the two directed lists: when the guard holds, the consistency list when the labels agree, the directed list, and the reverse one swapped; otherwise the rejecting constraint.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        @[simp]
                                        theorem MIPRE.Tailored.Intro.auxPairF_apply (g e : Bool) (la lb : Cost.Unary) (same dir rev : List Cost.BitStr) :
                                        theorem MIPRE.Tailored.Intro.auxPairF_spec (Q R : ℕ) (sR sL : Introspection.AuxType 7 × Bool → Cost.BitStr → ℕ) (L : Bool → CL.CLFun CL.𝔽₂ (Fin Q) 7) (G : Introspection.AuxType 7 × Bool → Cost.BitStr → Prop) (kg : (S : Finset (Fin Q)) → CL.RegLinear CL.𝔽₂ S → List (Fin Q → CL.𝔽₂)) (srcCons : Cost.BitStr → Cost.BitStr → Cost.BitStr → Cost.BitStr → List Cost.BitStr) (t u : Introspection.AuxType 7 × Bool) (aR bR : Cost.BitStr) :
                                        auxPairF.toFun ((decide (G t (win aR 0 Q) ∧ G u (win bR 0 Q)), decide (t = u)), (Cost.unary (auxLen Q R t.1), Cost.unary (auxLen Q R u.1)), sameCons Q R sR sL t aR bR, dirAux Q R sR sL L kg srcCons t u aR bR, dirAux Q R sR sL L kg srcCons u t bR aR) = auxPair Q R sR sL L G kg srcCons t u aR bR

                                        The constraints at a pair of auxiliary labels, on the encoded data.