Compressibility criterion, per level: a class-preserving compressor yields a reduction from the halting problem
ProvedMIPRE.Cost.compressibility_criterion_levelsThroughout, 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 . We write for the binary length of and for the size of a program.
Let be two families of languages indexed by the level of the recursion, and . Suppose:
- there are strings with and for every ;
- there is a closed program semideciding the complement of uniformly in the level: halts on if and only if ;
- there is a polynomial-time computable such that for all , and with , a succinct description of and : if then , and if then .
Then there are a polynomial-time computable and a constant such that, with ,
This is the value-form abstract compression lemma in the form an instantiation by gap-preserving compression can meet, and the lemma the formalization's main theorem uses: is the set of descriptions of -bounded normal-form verifiers whose -th game has a value- PCC strategy, those of value at most at index , and the enumeration of strategies of value above on the tabulated -th game. Compared with the recursive compression lemma, the growth hypothesis on a measure is replaced by the semidecidability of the complement of , and nothing about entanglement is required of the compressor. The level bookkeeping is what an instantiation by gap-preserving compression needs: the compressor runs in time polynomial in the size of its input , i.e. polylogarithmic in , while a single bit query to costs up to , so it cannot read the string it compresses and can only embed into its output for a later reader whose budget is polynomial in (the decider of a game at index ); the slack keeps that output short, and the hypothesis relates the class of at level to the class of the output at level , which is exactly what the proof uses, the self-referential decider at level compressing the string it itself computes at level . The condition is not an extra demand on but a weakening of what it must cover: the described string is the output of a run whose cost the threshold bounds by .
Formalization Note. The statement is MIPRE.Cost.compressibility_criterion_levels; it is the case of compressibility_criterion_nested, where the proof is. Compr : PolyTimeFun (Prog × ℕ) BitStr receives the level as the succinctness parameter; hS is the equivalence Halts S (encode (x, n)) ↔ x ∉ B n; the halting problem is that of ambient programs on nil, and the conclusion includes the clause . 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.compressibility_criterion_levels
(A B : ℕ → Set BitStr) (n₀ : ℕ)
(yYes : BitStr) (hyes : ∀ n, n₀ ≤ n → yYes ∈ A n)
(yNo : BitStr) (hno : ∀ n, n₀ ≤ n → yNo ∈ B n)
(S : Prog) (hSws : S.WellScoped 1)
(hS : ∀ (x : BitStr) (n : ℕ), Halts S (encode (x, n)) ↔ x ∉ B n)
(Compr : PolyTimeFun (Prog × ℕ) BitStr)
(hCompr : ∀ (c : Prog) (x : BitStr) (n : ℕ), n₀ ≤ n → 2 * esize c ≤ n →
IsSuccinctDesc c n x → x.length ≤ n + 1 →
(x ∈ A (2 * n + 1) → Compr (c, n) ∈ A n) ∧ (x ∈ B (2 * n + 1) → Compr (c, n) ∈ B n)) :
∃ (g : PolyTimeFun Prog BitStr) (K : ℕ),
∀ e : Prog, n₀ ≤ 2 ^ (K + 1 + esize e) ∧
(Halts e .nil → g e ∈ A (2 ^ (K + 1 + esize e))) ∧
(¬ Halts e .nil → g e ∈ B (2 ^ (K + 1 + esize e))) := by sorry