Documentation

MIPRE.Foundations.Introspection.ParserAnswers

Executable introspection answer format and internal-cutoff checks #

The register length Q and original-answer bound R are supplied constants. Introspect and Sample use pairCheck; Read uses tripleCheck Q R false; Hide uses tripleCheck Q Q true. Exact binary tuple re-encoding rejects all malformed delimiters, extra fields, and trailing bits. The bound on the original answer is checked here, independently of any outer tuple cutoff.

theorem MIPRE.Introspection.AnswerParser.tripleBits_injective {y yp a z zp b : Cost.BitStr} (h : tripleBits y yp a = tripleBits z zp b) :
y = z ∧ yp = zp ∧ a = b
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    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
          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
                @[instance_reducible]
                Equations
                • One or more equations did not get rendered due to their size.
                @[instance_reducible]
                Equations
                • One or more equations did not get rendered due to their size.

                Concrete format and internal original-answer-cutoff check for Introspect/Sample.

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

                  Concrete format check for Read (exactLast=false) or Hide (exactLast=true).

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem MIPRE.Introspection.AnswerParser.tripleCheck_apply (Q R : ℕ) (exactLast : Bool) (bs : Cost.BitStr) :
                    (tripleCheck Q R exactLast).toFun bs = decide (tripleValid Q R exactLast bs)
                    theorem MIPRE.Introspection.AnswerParser.tripleCheck_iff (Q R : ℕ) (exactLast : Bool) (bs : Cost.BitStr) :
                    (tripleCheck Q R exactLast).toFun bs = true ↔ ∃ (y : Cost.BitStr) (yp : Cost.BitStr) (a : Cost.BitStr), List.length y = Q ∧ List.length yp = Q ∧ (if exactLast = true then List.length a = R else List.length a ≤ R) ∧ bs = tripleBits y yp a

                    In particular, an encoded pair with a wrong register length or long a is rejected.

                    theorem MIPRE.Introspection.AnswerParser.pairBits_lt_outer (Q R : ℕ) (hQ : 4 ≤ Q) (hR : 3 * R ≤ Q) (y a : Cost.BitStr) (hy : List.length y = Q) (ha : List.length a ≤ R) :

                    The repaired strict 8Q outer cutoff contains every honest pair tuple.

                    theorem MIPRE.Introspection.AnswerParser.readBits_lt_outer (Q R : ℕ) (hQ : 4 ≤ Q) (hR : 3 * R ≤ Q) (y yp a : Cost.BitStr) (hy : List.length y = Q) (hyp : List.length yp = Q) (ha : List.length a ≤ R) :
                    List.length (tripleBits y yp a) < 8 * Q

                    The repaired strict 8Q outer cutoff contains every honest Read tuple.

                    theorem MIPRE.Introspection.AnswerParser.hideBits_lt_outer (Q : ℕ) (hQ : 4 ≤ Q) (y yp x : Cost.BitStr) (hy : List.length y = Q) (hyp : List.length yp = Q) (hx : List.length x = Q) :
                    List.length (tripleBits y yp x) < 8 * Q

                    The repaired strict 8Q outer cutoff contains every honest Hide tuple.