Polynomial-time folds over concatenated self-delimiting fields
ProvedBinaryTM2.fold_self_delimiting_fieldsbin-packingcomputational-complexityfixed-parameter-tractabilityinteger-programming
Given a polynomial finite bit-stack field reader that preserves any suffix, a polynomial accumulator update, nonempty field encodings, and a polynomial bound on the sizes of all prefix accumulators, there is a polynomial finite bit-stack program computing the fold of a variable-length concatenated list of fields. It requires neither an input length header nor a bound on the numeric magnitude of a field.
Preamble
import Mathlib import Definitions.Def_OAILP_QF_BitStackFold import Definitions.Def_OAILP_QF_BitStackWords open Function OAI.ExactQuantumFactoring.BitStackProgram
Formal statement
namespace BinaryTM2
theorem fold_self_delimiting_fields {A S : Type} (ea : A → List Bool) (es : S → List Bool) (a₀ : A)
(hne : ∀ a, 0 < (ea a).length)
(read : Procedure (fun p : A × List Bool => ea p.1 ++ p.2)
(prodCode ea (id : List Bool → List Bool)) id)
(g : S → A → S) (step : Procedure (prodCode es ea) es (fun x => g x.1 x.2))
(q : Polynomial ℕ)
(hg : ∀ (xs : List A) (s : S) (i : ℕ),
(es ((xs.take i).foldl g s)).length ≤ q.eval ((xs.flatMap ea).length + (es s).length)) :
Nonempty (Procedure (prodCode (fun xs : List A => xs.flatMap ea) es) es
(fun x : List A × S => x.1.foldl g x.2)) := by sorry
end BinaryTM2Source
Uniform bit-machine input processing for high-multiplicity Bin Packing, including Lemma 8.