The naming theorem #
For every Blum complexity measure Φ there is a measured family of functions that contains a
name for every complexity class of a computable bound. That is the naming theorem
[Odifreddi1999, Theorem VII.3.6], attributed there to Meyer and McCreight
McCreight and Meyer, Classes of computable functions defined by bounds on
computation. A family φ_{h 0}, φ_{h 1}, … is measured
[Odifreddi1999, Definition VII.2.9] when the predicate φ_{h i} x = y is decidable, uniformly
in i, x and y. A bound t' is a name for C_t when C_{t'} = C_t.
naming_theorem gives a computable h : Code → Code such that
- the predicate
φ_{h i} x = yis decidable, uniformly ini,xandy; - if
φ_iis total, so isφ_{h i}; - if
φ_iis total, thenC_{φ_{h i}} = C_{φ_i}.
These are items 1–3 of the source. The function φ_{h i} is Φ.name i, defined directly from
i by a priority construction; naming_theorem packages Φ.name as a computable map on programs.
Construction #
Fix the program i. The stages are s = ⟪x, z⟫. Input x receives its value at the first stage
⟪x, z⟫ at which some index acts, or at which i halts on x within cost z. Index e is
flagged at stage s when some input y ≤ s, on which i halts within cost s, has
φ_i y < Φ_e y (program e does not halt on y within cost φ_i y), and y had not flagged
e already when e last acted. A candidate is a flagged index e ≤ s that does not halt on x
within z, such that every unflagged index of higher priority does. The candidate of highest
priority acts, and x receives the value z. If no index acts and i halts on x within exactly
z, then x receives max z (φ_i x).
Priority is dynamic. An index that has never acted has key 2 e; an index that last acted at stage
a has key 2 a + 1. Smaller keys have higher priority, so an index that acts moves behind every
other index considered so far. The key replaces the source's explicit priority list, and the
flag condition replaces its marks; both are computed from the history of earlier stages.
The value at an action is z. The source takes Φ_{e_x}(x) - 1 instead, where e_x is the
acting index. Both are below Φ_{e_x}(x) when the latter is defined, and both are at least z,
which is what item 1 uses. The value z is defined even when Φ_{e_x}(x) is not.
Verification #
Let i compute a total t, with name t'.
- If program
ehalts withintalmost everywhere, it acts at only finitely many stages (each action uses one of the finitely many inputs whereeexceedst). - If
eacts at infinitely many stages, it exceedst'infinitely often (the private lemmafrequently_not_halts): each action at⟪x, z⟫givesxthe valuez, within whichedoes not halt onx. - If
eacts at only finitely many stages, then almost everywhereehalts withintexactly when it halts withint'(the private lemmahalts_iff). The proof fixes the final keyKofe. For each of the finitely many indicese' ≤ K, being unflagged with key at mostKis eventually constant ("quiet-set stabilization").
Together these give eventually_cost_le_name_iff for every program, total or not, and hence
C_{t'} = C_t. The source verifies its requirements H_e (C_t ⊆ C_{t'}) and L_e
(C_{t'} ⊆ C_t) separately, by cases on whether e eventually keeps a mark. Here both directions
split on whether e acts at finitely many stages, so the L_e direction is proved by a different
argument (quiet-set stabilization).
Main definitions #
Cslib.BlumComplexity.BlumMeasure.name: the nameΦ.name iof the function computed byi.
Main results #
Cslib.BlumComplexity.BlumMeasure.partrec_name: the names are uniformly partial recursive.Cslib.BlumComplexity.BlumMeasure.computablePred_mem_name: the graph ofΦ.name iis decidable, uniformly ini.Cslib.BlumComplexity.BlumMeasure.dom_name:Φ.name i xis defined whereverφ_i xis.Cslib.BlumComplexity.BlumMeasure.eventually_cost_le_name_iff: for a totalφ_i = twith namet', every program halts withintalmost everywhere if and only if it halts withint'almost everywhere.Cslib.BlumComplexity.BlumMeasure.complexityClass_name:C_{t'} = C_t.Cslib.BlumComplexity.BlumMeasure.naming_theorem: the naming theorem, items 1–3 above.
References #
Bounded halting #
The construction #
Fix the code i of the bound. The construction runs through the stages s = ⟪x, z⟫. At each
stage at most one index e acts, which defines the name at x with the value z. The
history of the stages < s is a list of Option ℕ.
Computability #
The history #
The name Φ.name i of the bound computed by program i, from the proof of the naming
theorem [Odifreddi1999, Theorem VII.3.6]: the value at x is assigned at the first stage
⟪x, z⟫ at which input x receives a value in the priority construction.
The names are uniformly partial recursive.
Input argument q.2.1 in a graph-membership triple (code, x, y).
Output candidate q.2.2 in a graph-membership triple (code, x, y).
The graph of each name is decidable, uniformly in the program: the set of names is measured.
A name is defined wherever the program it names halts.
Comparison with the bound #
Fix a program i computing a total t, and the name t' of i.
The name of a program that halts everywhere halts everywhere.
The naming property, pointwise. Let program i compute the total function t, with name
t'. Every program c, total or not, halts within t almost everywhere if and only if it halts
within t' almost everywhere.
The name of a total program defines the same complexity class: C_{t'} = C_t.
The naming theorem [Odifreddi1999, Theorem VII.3.6]. There is a computable map h on
programs such that
- the predicate
φ_{h i} x = yis decidable, uniformly ini,xandy; - if
φ_iis total, so isφ_{h i}; - if
φ_iis total, thenC_{φ_{h i}} = C_{φ_i}.
So the measured set {φ_{h i}} contains a name for every complexity class C_t of a computable
t.