Recursive compression: a compressor for succinct descriptions yields a reduction from the halting problem
ProvedMIPRE.Cost.recursive_compressionThroughout, computation is in the ambient cost model of the formalization: programs (Prog) form a small first-order language on binary-tree data (Data), counts the nodes of a value, a bit string , a natural number (in binary) or a pair is a value through a size-faithful encoding , and a program is its own tree encoding, of size . The timed semantics charges one unit per evaluation rule plus the size of every value read, so a run of cost has output of size at most . A polynomial-time computable function (PolyTimeFun α β) is a function together with a closed program computing it on encodings and an explicit polynomial bounding the cost in the size of the encoded input. " halts on the empty input" means that the program , run on the value nil, halts (Halts e nil). The pair of a program and a parameter is a succinct description of (IsSuccinctDesc c m x) when is closed, , and for every the program on the binary input answers the bit query, returning the -th bit of if and the marker otherwise, within cost , where denotes the binary length of .
Let be any function and a language, with:
- a distinguished element ;
- for every ;
- a polynomial-time computable compression procedure , taking a claimed succinct description and a target parameter to a string , such that whenever is a genuine succinct description of some : (a) , and (b) if then .
Then there is a polynomial-time computable reducing the halting problem to :
Nothing is assumed about the computability of , nor about the output of on inputs that are not genuine succinct descriptions, but must be total and polynomial-time everywhere ([MNY, §7] shows this is essential). This is the entire self-referential part of the proof of , isolated as a statement with no quantum content: in the entanglement-form route, is the set of normal-form verifiers with a perfect strategy and finite entanglement requirement, the entanglement requirement , and the compression theorem for games. Its halting-problem form against Mathlib's Nat.Partrec.Code is recursive_compression_halting; the value-form pipeline of the formalization uses Lin's compressibility criterion instead.
Formalization Note. The statement is MIPRE.Cost.recursive_compression, with of type BitStr → ℕ∞, Compr : PolyTimeFun ((Prog × ℕ) × ℕ) BitStr, IsSuccinctDesc c m x as above, and the conclusion ∃ g : PolyTimeFun Prog BitStr, ∀ e, (Halts e .nil → g e ∈ A) ∧ (¬ Halts e .nil → f (g e) = ⊤); the halting problem is that of the ambient model's programs on the input nil. The finiteness hypothesis on is part of the statement of [MNY] (it makes the two conclusions exclusive) but is not used by the proof, which is why it is named _hA. Three departures from the paper's statement and proof are recorded in the module docstring of MIPRE/Foundations/Compression.lean. (i) Succinctness time bound: [MNY, Definition 2.4] requires the runtime of the description on every query to be at most ; in a model that charges for reading its input this is vacuous for , so the formalization requires instead, the quadratic factor in being what the bit-indexing program bitAtProg achieves (each zero test and decrement of the binary index copies it); any fixed polynomial in and would do, provided the compression theorem for games uses the same one. (ii) The next level is , not : incrementing a binary numeral needs a carry propagation, prepending a one bit is a single node (PolyTimeFun.next); the levels still grow without bound and keeps every overhead polynomial in . (iii) The threshold is explicit: for a constant obtained from the overhead polynomial by the threshold lemma exists_threshold (above it, a polynomial in is at most ), and it is computed in polynomial time by PolyTimeFun.threshold K.
import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Algebra.Polynomial.Eval.Degree import Mathlib.Computability.Halting import Mathlib.Computability.Partrec import Mathlib.Computability.PartrecCode import Mathlib.Computability.Primrec.List import Mathlib.Computability.TuringMachine.Config import Mathlib.Data.ENat.Lattice import Mathlib.Data.List.Basic import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.Size import Mathlib.Logic.Denumerable import Mathlib.Logic.Function.Iterate import Mathlib.Tactic.Linarith import Mathlib.Tactic.Ring import Definitions.Def_MIPRE_Foundations_Cost_Basic import Definitions.Def_MIPRE_Foundations_Cost_Encoding import Definitions.Def_MIPRE_Foundations_Cost_PolyTime import Definitions.Def_MIPRE_Foundations_Cost_Closure import Definitions.Def_MIPRE_Foundations_Cost_Loops import Definitions.Def_MIPRE_Foundations_Cost_Unary import Definitions.Def_MIPRE_Foundations_Cost_Numeric import Definitions.Def_MIPRE_Foundations_Cost_BitQuery import Definitions.Def_MIPRE_Foundations_Cost_Toolkit import Definitions.Def_MIPRE_Foundations_Cost_Succinct import Definitions.Def_MIPRE_Foundations_Cost_Clocked import Definitions.Def_MIPRE_Foundations_Cost_Threshold import Definitions.Def_MIPRE_Foundations_Cost_Machine import Definitions.Def_MIPRE_Foundations_Cost_Codable import Definitions.Def_MIPRE_Foundations_Cost_MachineData import Definitions.Def_MIPRE_Foundations_Cost_Interpreter import Definitions.Def_MIPRE_Foundations_Cost_MachineBound import Definitions.Def_MIPRE_Foundations_Cost_Universal import Definitions.Def_MIPRE_Foundations_Cost_Kleene import Definitions.Def_MIPRE_Foundations_Cost_Partrec import Definitions.Def_MIPRE_Foundations_Cost_FromPartrec import Definitions.Def_MIPRE_Foundations_Compression open MIPRE open MIPRE.Cost open Polynomial
theorem MIPRE.Cost.recursive_compression
(f : BitStr → ℕ∞) (A : Set BitStr)
(y₀ : BitStr) (hy₀ : y₀ ∈ A)
(_hA : ∀ x ∈ A, f x < ⊤)
(Compr : PolyTimeFun ((Prog × ℕ) × ℕ) BitStr)
(hCompr : ∀ (c : Prog) (m : ℕ) (x : BitStr) (n : ℕ),
IsSuccinctDesc c m x →
(max (f x) (n : ℕ∞) ≤ f (Compr ((c, m), n))) ∧
(x ∈ A → Compr ((c, m), n) ∈ A)) :
∃ g : PolyTimeFun Prog BitStr,
∀ e : Prog,
(Halts e .nil → g e ∈ A) ∧
(¬ Halts e .nil → f (g e) = ⊤) := by sorryConfirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.