Documentation

MIPRE.Foundations.Introspection.ParserGuard

Reject malformed introspection answers before a source call #

The input is encode (n, answerA, answerB). On two valid Introspect answers the source receives encode (n, yA, yB, aA, aB). The supplied index is retained, so this wrapper can precede the exponential-index clock adapter. This module does not implement the register projection from Q coordinates to a source question space, or the other auxiliary edge tests.

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.
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem MIPRE.Introspection.AnswerParser.nestedIf {α : Type u_1} (p q : Prop) [Decidable p] [Decidable q] (a b : α) :
          (if p then if q then a else b else b) = if p ∧ q then a else b

          Actual program: invalid tuples return false before the source program is evaluated.

          Equations
          Instances For
            theorem MIPRE.Introspection.AnswerParser.guardedProg_reject (Q R : ℕ) (source : Cost.Prog) (x : Cost.Data) (h : ¬callReady Q R x) :
            ∃ (t : ℕ), (guardedProg Q R source).Runs x (Cost.encode false) t

            Rejection needs no halting assumption about the source.

            theorem MIPRE.Introspection.AnswerParser.guardedProg_call (Q R : ℕ) {source : Cost.Prog} (hs : Cost.Prog.WellScoped 1 source) (x r : Cost.Data) (t : ℕ) (h : callReady Q R x) (hr : source.Runs (callArgument Q x) r t) :
            ∃ (time : ℕ), (guardedProg Q R source).Runs x r time
            theorem MIPRE.Introspection.AnswerParser.guardedProg_halts (Q R n : ℕ) {source : Cost.Prog} (hs : Cost.Prog.WellScoped 1 source) (halts : ∀ (d : Cost.Data), Cost.Halts source ((Cost.encode n).cons d)) (d : Cost.Data) :
            Cost.Halts (guardedProg Q R source) ((Cost.encode n).cons d)

            Full ambient input-size polynomial transfer for the guarded source call.

            Every call has both full register lengths and the separate original-answer cutoffs.

            theorem MIPRE.Introspection.AnswerParser.guardedProg_accepts_iff (Q R n : ℕ) (source : Decider) (halts : ∀ (d : Cost.Data), Cost.Halts source.prog ((Cost.encode n).cons d)) (a b : Cost.BitStr) :
            (∃ (t : ℕ), (guardedProg Q R source.prog).Runs (Cost.encode (n, a, b)) (Cost.encode true) t) ↔ pairValid Q R a ∧ pairValid Q R b ∧ source.Accepts n (pairParts Q a).1 (pairParts Q b).1 (pairParts Q a).2 (pairParts Q b).2

            On total sources, guarded acceptance is exactly valid parsing followed by source acceptance.