Documentation

CslibFrontier.Computability.BlumComplexity.Union

The union theorem #

For every Blum complexity measure Φ and every uniformly computable family of bounds T 0, T 1, … that increases pointwise in the index, there is a single computable bound t with C_t = ⋃ i, C_{T i}. This is the union theorem [Odifreddi1999, Theorem VII.3.7], attributed there to McCreight and Meyer McCreight and Meyer, Classes of computable functions defined by bounds on computation.

Construction #

The proof does not use the recursion theorem. It was written independently using the library's cancellation run (Cslib.BlumComplexity.Cancellation.canc) and has not been compared with the source's construction. Requirement p = ⟪j, i⟫ with j ≤ i is eligible at stage y when the program numbered j does not halt on y within cost T i y. By Blum's second axiom (Cslib.BlumComplexity.BlumMeasure.computablePred_cost_le), eligibility is decidable. At each stage the least eligible requirement not cancelled earlier is cancelled, and the bound is t y = T i y for the cancelled requirement ⟪j, i⟫, or t y = T y y if nothing is cancelled.

Conventions and strength #

complexityClass t uses Borodin's almost-everywhere convention (see CslibFrontier.Computability.BlumComplexity.Basic). exists_union_bound states the pointwise content for every program, including programs that diverge somewhere: a program that halts within t almost everywhere halts within some T i almost everywhere. The bound t is diagonal: at each n it equals T i n for some i ≤ n.

union_theorem assumes T i n ≤ T (i + 1) n for all i and n. union_theorem_of_eventuallyLE only assumes T i ≤ T (i + 1) almost everywhere, and union_theorem_of_directed only assumes that the family is directed under almost-everywhere domination (Directed (· ≤ᶠ[atTop] ·) T). Both are derived here from union_theorem, applied to the partial suprema partialSups (T · n) of the family. union_theorem has the hypotheses of [Odifreddi1999, Theorem VII.3.7]; those of the original paper have not been checked.

Main results #

References #

theorem Cslib.BlumComplexity.BlumMeasure.exists_union_bound (Φ : BlumMeasure) {T : ℕ → ℕ → ℕ} (hT : Computable₂ T) (hmono : ∀ (i n : ℕ), T i n ≤ T (i + 1) n) :
∃ (t : ℕ → ℕ), Computable t ∧ (∀ (n : ℕ), ∃ i ≤ n, t n = T i n) ∧ (∀ (i : ℕ), T i ≤ᶠ[Filter.atTop] t) ∧ ∀ (c : Nat.Partrec.Code), (∀ᶠ (n : ℕ) in Filter.atTop, ∃ m ∈ Φ.cost c n, m ≤ t n) → ∃ (i : ℕ), ∀ᶠ (n : ℕ) in Filter.atTop, ∃ m ∈ Φ.cost c n, m ≤ T i n

The union bound, pointwise. For a uniformly computable family T that increases pointwise in the index, there is a computable t such that

  • t is diagonal: t n = T i n for some i ≤ n;
  • every T i is at most t almost everywhere;
  • every program c that halts within t n for almost all n halts within T i n for almost all n, for some fixed i. The program need not be total.
theorem Cslib.BlumComplexity.BlumMeasure.union_theorem (Φ : BlumMeasure) {T : ℕ → ℕ → ℕ} (hT : Computable₂ T) (hmono : ∀ (i n : ℕ), T i n ≤ T (i + 1) n) :
∃ (t : ℕ → ℕ), Computable t ∧ (∀ (n : ℕ), ∃ i ≤ n, t n = T i n) ∧ Φ.complexityClass t = ⋃ (i : ℕ), Φ.complexityClass (T i)

The union theorem [Odifreddi1999, Theorem VII.3.7] [McCM69]. For a uniformly computable family of bounds T that increases pointwise in the index, some computable t has C_t = ⋃ i, C_{T i}. The bound is diagonal: t n = T i n for some i ≤ n.

theorem Cslib.BlumComplexity.BlumMeasure.union_theorem_of_directed (Φ : BlumMeasure) {T : ℕ → ℕ → ℕ} (hT : Computable₂ T) (hdir : Directed (fun (x1 x2 : ℕ → ℕ) => x1 ≤ᶠ[Filter.atTop] x2) T) :
∃ (t : ℕ → ℕ), Computable t ∧ Φ.complexityClass t = ⋃ (i : ℕ), Φ.complexityClass (T i)

The union theorem for a directed family. If any two bounds of a uniformly computable family T are dominated almost everywhere by a third, some computable t has C_t = ⋃ i, C_{T i}. This variant is derived here from union_theorem, applied to the partial suprema of the family.

theorem Cslib.BlumComplexity.BlumMeasure.union_theorem_of_eventuallyLE (Φ : BlumMeasure) {T : ℕ → ℕ → ℕ} (hT : Computable₂ T) (hmono : ∀ (i : ℕ), T i ≤ᶠ[Filter.atTop] T (i + 1)) :
∃ (t : ℕ → ℕ), Computable t ∧ Φ.complexityClass t = ⋃ (i : ℕ), Φ.complexityClass (T i)

The union theorem for a family that increases almost everywhere. If T i ≤ T (i + 1) almost everywhere for every i, some computable t has C_t = ⋃ i, C_{T i}. This variant is derived here from union_theorem_of_directed.