OAI/Combinatorics/ContingencyTables/Machines/LiteralProgram.lean
18 declarations, 0 contain sorry, 0 declared as axioms
Public binary input and output for typed finite programs
Literal packing is independent of the counting algorithm. Its cost includes every packing, execution, and printing step.
- def
OAI.ContingencyTables.LiteralProgram.packline 16 - def
OAI.ContingencyTables.LiteralProgram.eraseline 17 - def
OAI.ContingencyTables.LiteralProgram.unpackline 18 - def
OAI.ContingencyTables.LiteralProgram.postline 19 - def
OAI.ContingencyTables.LiteralProgram.packTimeline 20 - def
OAI.ContingencyTables.LiteralProgram.postTimeline 22 - lemma
OAI.ContingencyTables.LiteralProgram.packTime_monoline 26 - lemma
OAI.ContingencyTables.LiteralProgram.postTime_monoline 30 - lemma
OAI.ContingencyTables.LiteralProgram.pack_realizesline 34 - lemma
OAI.ContingencyTables.LiteralProgram.post_realizesline 38 - def
OAI.ContingencyTables.LiteralProgram.wrapline 52 - def
OAI.ContingencyTables.LiteralProgram.wrapTimeline 55 - lemma
OAI.ContingencyTables.LiteralProgram.experiment_all_andline 59 - lemma
OAI.ContingencyTables.LiteralProgram.wrap_realizesline 66 - def
OAI.ContingencyTables.LiteralProgram.budgetPolynomialline 82Source documentation
A polynomial representing the exact elementary block-map cost.
noncomputable def budgetPolynomial (w H : ℕ) (p q : Polynomial ℕ) : Polynomial ℕ := …
- lemma
OAI.ContingencyTables.LiteralProgram.eval_budgetPolynomialline 85 - theorem
OAI.ContingencyTables.LiteralProgram.polynomial_wrapline 91Source documentation
Any polynomial bound on the typed experiment gives a polynomial bound on the complete public binary execution.
theorem polynomial_wrap {f : List Symbol → Experiment (List Symbol)} (F : OnlineTree.Realizer f) (p : Polynomial ℕ) (hp : ∀ as,F.cost as+(f as).worst weight ≤ p.eval (weight as)) : ∃ q : Polynomial ℕ,∀ as,wrapTime F as ≤ q.eval as.length := by … - theorem
OAI.ContingencyTables.LiteralProgram.deterministic_compilesline 127Source documentation
Deterministic typed programs therefore execute on the public binary tape with one fixed finite transition table and a polynomial time bound.
theorem deterministic_compiles {f : List Symbol → List Symbol} (F : TreeTyped.Realizer f) (hF : PolynomialTime F) (hout : ∀ as,∀ b∈f as,b≠6 ∧ b≠7) : ∃ (A : RandomMachine) (q : Polynomial ℕ),∀ as,(∀ a∈as,a≠0) → ∀ t,q.eval as.length ≤ t → ∀ bits : Fin t → Bool, (run A as bits).state=none ∧ (run A as bits).tape.right₀=ListBlank.mk (f as) := by …