Documentation

CslibFrontier.Computability.BlumComplexity.Honesty

The honesty theorem #

A function is g-honest [Odifreddi1999, Definition VII.2.13] when some program computes it with cost at most g n (f n) for almost all n: its cost is bounded by a fixed function of its own values. Every complexity class of a computable bound has a g-honest name, with one computable g for all bounds. This file derives that from the naming theorem (CslibFrontier.Computability.BlumComplexity.Naming) and the fact that the members of a measured family are honest for one computable g [Odifreddi1999, Exercise VII.2.14a].

Conventions and scope #

IsHonest g f is stated for total f. The source defines g-honesty for partial recursive φ too, with the bound required only where φ is defined. exists_isHonest_of_measured accordingly concludes honesty only for the total members φ_{h i} of the measured family.

exists_isHonest_of_measured takes g x z = ∑_{e ≤ x} Φ_{h e}(x), summed over the e with φ_{h e}(x) = z (a term is 0 otherwise). The source's hint takes the maximum of the same terms. The sum is at least the maximum, so it gives the same conclusion.

Main definitions #

Main results #

References #

A total function f is g-honest [Odifreddi1999, Definition VII.2.13] when some program computing f has cost at most g n (f n) for almost all n. The source also defines this for partial functions, and requires g to be computable; here g is arbitrary and the theorems assume Computable₂ g where needed.

theorem Cslib.BlumComplexity.BlumMeasure.isHonest_iff {Φ : BlumMeasure} {g : ℕ → ℕ → ℕ} {f : ℕ → ℕ} :
Φ.IsHonest g f ↔ ∃ (c : Nat.Partrec.Code), (∀ (n : ℕ), f n ∈ c.eval n) ∧ ∀ᶠ (n : ℕ) in Filter.atTop, ∀ m ∈ Φ.cost c n, m ≤ g n (f n)
theorem Cslib.BlumComplexity.BlumMeasure.exists_isHonest_of_measured (Φ : BlumMeasure) {h : Nat.Partrec.Code → Nat.Partrec.Code} (hh : Computable h) (hgr : ComputablePred fun (q : Nat.Partrec.Code × ℕ × ℕ) => q.2.2 ∈ (h q.1).eval q.2.1) :
∃ (g : ℕ → ℕ → ℕ), Computable₂ g ∧ ∀ (i : Nat.Partrec.Code) (f : ℕ → ℕ), (∀ (n : ℕ), f n ∈ (h i).eval n) → Φ.IsHonest g f

The total members of a measured family are honest [Odifreddi1999, Exercise VII.2.14a] (attributed there to [Blu67]). If h is a computable map on programs and the predicate φ_{h e} x = z is decidable, uniformly in e, x and z, then one computable g makes every total φ_{h e} g-honest. The source states this for every member, partial or not; IsHonest covers total functions only.

theorem Cslib.BlumComplexity.BlumMeasure.honesty_theorem (Φ : BlumMeasure) :
∃ (g : ℕ → ℕ → ℕ), Computable₂ g ∧ ∀ (t : ℕ → ℕ), Computable t → ∃ (t' : ℕ → ℕ), Computable t' ∧ Φ.IsHonest g t' ∧ Φ.complexityClass t' = Φ.complexityClass t

The honesty theorem. There is one computable g such that every complexity class C_t of a computable bound t has a g-honest name t': C_{t'} = C_t. This combines the naming theorem [Odifreddi1999, Theorem VII.3.6] with [Odifreddi1999, Exercise VII.2.14a].