The threshold lemma: a polynomial in is at most once
ProvedMIPRE.Cost.exists_thresholdLet be a polynomial with natural-number coefficients. For write for the binary length of , that is, the number of binary digits of ( and for ; in Lean, Nat.size n). Then there is a constant such that for all ,
The constant depends on only. The lemma is the quantitative input of the recursive compression argument (blueprint lem:recursive-compression, [MNY, Lemma 5.1]): the compression map has polynomial overhead in the size of the description and the binary length of the index , and the threshold is chosen so that above it this overhead is at most , which is what lets the compressed description be shorter than the string it describes.
Formalization Note: is a Polynomial ℕ evaluated with Polynomial.eval, so it is monotone; the logarithm is Nat.size. The proof produces the explicit constant where is the degree of and the sum of its coefficients, and in fact bounds by ; the statement keeps the slack . The hypothesis is , with the exponent as written.
import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Algebra.Polynomial.Eval.Degree import Mathlib.Data.List.Basic import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.Size import Definitions.Def_MIPRE_Foundations_Cost_Basic import Definitions.Def_MIPRE_Foundations_Cost_Encoding import Definitions.Def_MIPRE_Foundations_Cost_PolyTime open MIPRE open MIPRE.Cost open Polynomial
theorem MIPRE.Cost.exists_threshold (Q : Polynomial ℕ) :
∃ K : ℕ, ∀ x n : ℕ, 2 ^ (K + 1 + x) ≤ n → Q.eval (x + Nat.size n) ≤ n + 1 := by sorry