The costs of the introspection processor #
Issue #281. The linear-constraints processor lpIntroC c U V λ of LpIntro.lean:
lpIntroC_size,lpIntroC_size_le: its description has size at mostC (λ + 1)^C, whatever the input programsV(the clamped description has size at most19 (λ + 1));core_runs_poly: the core runs within a fixed polynomial of any boundvof the input, the clock2^{(λn + 1)^5}andQ,R(the decision kernel'sprog_runs_poly, the unary conversion, and the core'sPolyTimeFunon the prepared input);lpIntroC_budget: one constantCwith the processor within2^{(λn + 1)^C}at degreeCon every input, malformed included, and for everyV— the shape ofIntrospection.budget.
The size of the description #
The run of the core #
A polynomial for the conversion of (Q, R) to unary.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MIPRE.Tailored.Intro.LpIntro.bothCost_le
{Q R v : ℕ}
(hQ : Q ≤ v)
(hR : R ≤ v)
:
Introspection.ClockArithmetic.unaryCost Q + Introspection.ClockArithmetic.unaryCost R + Cost.esize Q + Cost.esize R + 2 * Q + 2 * R + 20 ≤ Polynomial.eval v bothPoly
noncomputable def
MIPRE.Tailored.Intro.LpIntro.corePoly
(c : ℕ)
(U : Cost.ClockedUniversalMachine)
:
The polynomial of the core.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MIPRE.Tailored.Intro.LpIntro.core_runs_poly
{c v : ℕ}
(hc : 1 ≤ c)
(U : Cost.ClockedUniversalMachine)
(M : InputRuns.Metadata)
(x : Cost.Data)
(hl : 1 ≤ M.2)
(hn : 1 ≤ Introspection.ClockSimulation.indexReader.toFun x)
(hz : Cost.esize M + x.size + 1 ≤ v)
(hB : Introspection.ansBound 5 M.2 (Introspection.ClockSimulation.indexReader.toFun x) ≤ v)
(hQ : Introspection.SourceCompiler.registerBits c M.2 (Introspection.ClockSimulation.indexReader.toFun x) ≤ v)
(hR : Introspection.SourceCompiler.originalBound M.2 (Introspection.ClockSimulation.indexReader.toFun x) ≤ v)
:
∃ t ≤ Polynomial.eval v (corePoly c U),
(core c U).Runs ((Cost.encode M).cons x)
(Cost.encode
((kernel U).toFun
(kernelInput c M x, Cost.unary
(Introspection.SourceCompiler.registerBits c M.2 (Introspection.ClockSimulation.indexReader.toFun x)), Cost.unary
(Introspection.SourceCompiler.originalBound M.2 (Introspection.ClockSimulation.indexReader.toFun x)))))
t
The core runs within a fixed polynomial of any bound v of the input, the clock, Q and
R, at positive λ and index.
The budget #
theorem
MIPRE.Tailored.Intro.LpIntro.lpIntroC_runs_poly
{c v : ℕ}
(hc : 1 ≤ c)
(U : Cost.ClockedUniversalMachine)
(V : Cost.Prog × Cost.Prog × Cost.Prog)
{lam n : ℕ}
(hl : 1 ≤ lam)
(hn : 1 ≤ n)
(d : Cost.Data)
(hz : 19 * (lam + 1) + 4 * n + d.size + 3 ≤ v)
(hB : Introspection.ansBound 5 lam n ≤ v)
(hQ : Introspection.SourceCompiler.registerBits c lam n ≤ v)
(hR : Introspection.SourceCompiler.originalBound lam n ≤ v)
:
The run of the processor at positive λ and n, on every input, with its cost.
theorem
MIPRE.Tailored.Intro.LpIntro.lpIntroC_budget
{c : ℕ}
(hc : 1 ≤ c)
(U : Cost.ClockedUniversalMachine)
:
∃ (C : ℕ),
∀ (V : Cost.Prog × Cost.Prog × Cost.Prog) (lam n : ℕ),
(lpIntroC c U V lam).TimeBoundAt n (Introspection.ansBound C lam n) C
The costs of the processor, in the shape of Introspection.budget: one constant C with
the processor within 2^{(λn + 1)^C} at degree C on every input, for every input description.
At the constant of Introspection.seven #
theorem
MIPRE.Tailored.Intro.LpIntro.lpIntro_budget :
∃ (C : ℕ),
∀ (V : Cost.Prog × Cost.Prog × Cost.Prog) (lam n : ℕ),
(lpIntro V lam).TimeBoundAt n (Introspection.budget C lam n).D (Introspection.budget C lam n).k
The costs of lpIntro, in the shape of Introspection.budget.