Hardcoding into the bit-query program gives a succinct description of the output of a fast program
ProvedMIPRE.Cost.isSuccinctDesc_hardcodeWe work in the ambient cost model: data are binary trees with the number of nodes, programs (Prog) form a first-order language with de Bruijn variables, (Eval ρ p r t) means that evaluated in the environment halts with result at cost , and a program runs on to at cost when (Prog.Runs). A type with a size-aware encoding (SizedEncoding) has an encoding and sizes ; pairs are encoded by , natural numbers in binary, with the bit length of , and bit strings as lists of bits.
Succinct descriptions (blueprint def:succinct, after [MNY, Definition 2.4]). A program with parameter is a succinct description of , written , if
- is closed (
WellScoped 1: it reads only its input, variable ); - ;
- for every , runs on to at some cost at most , where is if and the unary numeral otherwise (
bitQueryAnswer).
The s-m-n map (hardcode). For a program and a datum , is the program that, on an input , runs on the pair .
The bit-query program. Let be a universal machine (UniversalMachine): a closed program with an overhead polynomial such that a run of on at cost yields a run of on with the same result at cost at most , and halts only when the simulated program does. The bit-query program (bitQueryProg u) on the encoding of simulates on through and returns the -th bit of the output (or the marker). Its cost is governed by the polynomial (bitQueryBound U) .
Theorem. Let be a universal machine, a type with a size-aware encoding, and programs, , , and . Assume
- : the program runs on the input to the string at cost ;
- ;
- the budget condition
in which is the size of the datum to be hardcoded.
Then
the bit-query program with hardcoded is a succinct description of with parameter .
This is the step of the recursive compression argument ([MNY, Lemma 5.1], blueprint lem:recursive-compression; likewise for the compressibility criterion lem:compressible-criterion) that manufactures, inside the self-referential decider, a genuine succinct description of the string computed at the next recursion level — the output of the fixed-point program on — so that the guarantees of the compression procedure, which hold only on genuine descriptions, apply to it. There, is the next level (, or a pair of levels), the bound comes from the polynomial time bound of the decider, which is at most above a threshold, and the budget condition is discharged by the threshold lemma exists_threshold: for , with depending on the overhead polynomial, every polynomial in is at most .
Formalization Note IsSuccinctDesc differs from [MNY, Definition 2.4] in its time bound: instead of , since in a model that charges for reading its input a bound independent of is vacuous for (module docstring of MIPRE.Foundations.Compression). The hardcoded parameter is independent of the description's parameter , and may be any encodable type. The description's cost on a query is, by hardcode_time, the cost of on the pair plus , and ; the summand of the budget condition is what absorbs this overhead after multiplication by . The length clause follows from , since a run of cost has a result of size at most .
import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Data.List.Basic import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.Size 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 open MIPRE open MIPRE.Cost open Polynomial
theorem MIPRE.Cost.isSuccinctDesc_hardcode (U : UniversalMachine) {α : Type*} [SizedEncoding α]
(c' e : Prog) (n' : α) (n : ℕ) (y : BitStr)
{t : ℕ} (hrun : c'.Runs (encode (e, n')) (encode y) t) (hlen : t ≤ 2 ^ n)
(hbudget : (bitQueryBound U).eval (esize c' + esize e + esize n' + t) +
(esize c' + esize e + 1 + esize n' + 1) + 4 ≤ n + 1) :
IsSuccinctDesc (hardcode (Prog.bitQueryProg U.univ) (encode ((c', e), n'))) n y := by sorry