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
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
@[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
theorem
MIPRE.Introspection.AnswerParser.guardedRoute_apply
(Q R : ℕ)
(x : Cost.Data)
:
(guardedRoute Q R).toFun x = if callReady Q R x then (true, (callArgument Q x).cons Cost.Data.nil) else (false, Cost.encode false)
@[simp]
theorem
MIPRE.Introspection.AnswerParser.guardedRoute_preserves
(Q R n : ℕ)
(d a : Cost.Data)
(h : (guardedRoute Q R).toFun ((Cost.encode n).cons d) = (true, a))
:
Actual program: invalid tuples return false before the source program is evaluated.
Equations
Instances For
theorem
MIPRE.Introspection.AnswerParser.guardedProg_closed
(Q R : ℕ)
{source : Cost.Prog}
(hs : Cost.Prog.WellScoped 1 source)
:
Cost.Prog.WellScoped 1 (guardedProg Q R source)
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)
theorem
MIPRE.Introspection.AnswerParser.guardedProg_haltsWithin
(Q R n B k : ℕ)
{source : Cost.Prog}
(hs : Cost.Prog.WellScoped 1 source)
(bound : ∀ (d : Cost.Data), Cost.HaltsWithin source ((Cost.encode n).cons d) (B * (d.size + 1) ^ k))
(d : Cost.Data)
:
Cost.HaltsWithin (guardedProg Q R source) ((Cost.encode n).cons d)
(Polynomial.eval ((Cost.encode n).cons d).size (Cost.Prog.routeCost (guardedRoute Q R) Cost.PolyTimeFun.snd B k))
Full ambient input-size polynomial transfer for the guarded source call.
theorem
MIPRE.Introspection.AnswerParser.callReady_fields
(Q R n : ℕ)
(a b : Cost.BitStr)
(h : callReady Q R (Cost.encode (n, a, b)))
:
List.length (pairParts Q a).1 = Q ∧ List.length (pairParts Q b).1 = Q ∧ List.length (pairParts Q a).2 ≤ R ∧ List.length (pairParts Q b).2 ≤ R
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)
:
On total sources, guarded acceptance is exactly valid parsing followed by source acceptance.