The halting reduction, assembled #
Blueprint thm:halting: the computable map from machines to game descriptions whose game has
value 1 when the machine halts and value at most 1/2 when it does not. It is proved here
from gap-preserving compression as a hypothesis (MIPRE.GapCompression, blueprint
thm:compression) through the per-level compressibility criterion
(MIPRE.Cost.compressibility_criterion_levels, blueprint lem:compressible-criterion),
along the dictionary of blueprint rem:compression-abstract.
What a string denotes #
A string is a description, never a game: a pair (Ξ», π) of a compression parameter and a
decider program, serialized by Data.toBitsPost and read back by Data.parse. Every string
names such a pair β descLam normalizes the parameter (Data.natOf), descDecD is the
decider as the datum it is β so no validity condition on strings appears anywhere. The
verifier it denotes is
Vof x = (S^compr_{descLam x}, wrap (descDecD x)) (Verifier.ofSamplerDeciderD),
the compressed sampler at the string's own parameter (which depends on Ξ» alone, blueprint
lem:compress-sampler-indep, the field GapCompression.sampler) together with the string's
decider, run by the universal machine, wrapped in the question-length check of
def:normal-verifier (Decider.wrap). That the decider is a datum and not a decoded program
is deliberate: a datum that is not an encoding still names a verifier, whatever the interpreter
does with it, and the compressor's decider of O4 can copy a datum into a syntax tree where it
could not decode one. The
two classes of the criterion are then
classA n = {x | Vof x is n-bounded, rejects long answers, and π±_n has a value-1 PCC strategy},
classB n = {x | Vof x is n-bounded, rejects long answers, and val*(π±_n) β€ 1/2},
with answers cut at ansBound x n = bound (n + descLam x), the length beyond which a
compressed decider with parameter descLam x rejects (GapCompression.output_rejects_long);
Vof x is not literally an output of Compress, so that field does not apply to it directly
β ansBound is the answer alphabet the classes are read with, and relating it to the
compressor's output is part of Obligations.compr_spec. Tying the boundedness parameter to
the level (n-bounded at level n) is what replaces the paper's choice of Ξ» along the
recursion (blueprint rem:compression-abstract, item 1, and lem:lambda).
Where the assembly is #
halting_reduction, and the structure MIPRE.Halting.Obligations of what it still owes, are
in Halting/Reduction.lean, which sits below this file, Halting/Strings.lean and
Halting/Semidecider.lean in the import order, so that the two distinguished strings (O1) and
the semidecider (O3) are applied there as theorems rather than assumed as fields. What this
file contributes to it, beyond the objects above, is the tabulation:
- O2 β the tabulation of
π±_nas a game description matching it along relabelings of the two alphabets:tab,tab_computable,tab_match,tab_valueandgameValue_tab_eq_one, in the last section of this file, whichhalting_reductionuses directly; the relabelings areVerifier.tagEquivandanswerEquiv, transported across the two sizes. Three features of their shape are deliberate and each is explained where it is stated: the match and the value hold of ann-bounded verifier and could not hold of every string, acceptance beingΞ£ββ whiledimOf_eqandmargOf_eq, budgeted from the compressed sampler's own time bound, hold at every string and every level;tab_matchdelivers the relabelings rather than only the value they equate, becausesynval β€ val*points the wrong way for item 1 ofthm:halting; and the game it matches is the doubled one,(Vof G U x).doubledGame, so that the diagonal aGameDatavetoes carries no weight and no synchronicity is asked of the verifier. That last one is what makes the tabulation usable by O3, and the paragraph below the list says how.
O3 was recorded in planning/h4-assembly.md as "O2 plus a disjunction"; it is not, and the
reason is worth naming, because it shaped the tabulation.
Halting.exists_sem_of_tab needs the tabulation to have the value of π±_n at every
n-bounded string, in both directions, because sem_spec is an equivalence β while a match
against (Vof G U x).game gives that only where the verifier is also synchronous at n,
a GameData describing a synchronous game by construction
(Verifier.isSynchronousAt_of_game_matches), and classB n does not ask for synchronicity.
Three repairs were on the record in blueprint lem:halting-semidecider: tabulate on a doubled
question set so that the distribution avoids the diagonal, make Decider.wrap reject unequal
answers to equal questions so that every string names a synchronous verifier, or put
synchronicity into classB and pay for it in compr_spec. The first is the one made
(Foundations/GameDouble.lean, Verifier.doubledGame): it is the cheapest and the only one
that changes nothing outside the tabulation. So tab_match and tab_value below ask the
verifier's decider for nothing beyond n-boundedness, and exists_sem_of_tab's hval is
tab_value itself.
What a string denotes #
The compression parameter a string denotes: the left component of the data it parses to,
normalized to a canonical binary numeral (Data.natOf), so that every string names one.
Equations
Instances For
The decider a string denotes: the right component of the data it parses to, a datum that
the universal machine runs (Verifier.ofSamplerDeciderD). It need not be the encoding of a
program; every string names one.
Equations
Instances For
The string denoting a parameter and a decider: the postorder serialization of the pair.
Equations
- MIPRE.Halting.descOf lam dec = ((MIPRE.Cost.encode lam).cons (MIPRE.Cost.encode dec)).toBitsPost
Instances For
The verifier a string denotes, and the two classes #
The verifier a string denotes: the compressed sampler at the string's own parameter, and the string's decider β a datum, run by the universal machine β wrapped in the question-length check. Every string denotes one, well formed or not.
Equations
- MIPRE.Halting.Vof G U x = MIPRE.Verifier.ofSamplerDeciderD U (G.sampler (MIPRE.Halting.descLam x)) (MIPRE.Halting.descDecD x)
Instances For
The answer-length budget the classes are read with at level n: the bound a compressed
decider with the string's parameter obeys at index n.
Equations
- MIPRE.Halting.ansBound G x n = Polynomial.eval (n + MIPRE.Halting.descLam x) G.bound
Instances For
The answer budget of a short description #
What obligation O4 needs of ansBound: on a string short enough to have come out of the
compressibility criterion, the budget the classes are read with at level 2n + 1 is below the
budget GapCompression.completeness supplies strategies at. Both bounds are exponential in
n; the point is which exponent, and the string's own parameter is what could have broken it.
A string denotes a parameter exponential in its length at worst. The parameter is the
number the left component of the parsed datum denotes, and parsing a string of length L
yields a datum of size at most L (Data.size_parse_le), which denotes a number below
2 ^ L (Data.natOf_lt).
The form the criterion's length bound is used in: compr_spec's hypothesis
x.length β€ n + 1 caps the denoted parameter at 2 ^ (n + 1).
The answer budget of level 2n + 1 fits under the compression theorem's. For Ξ» and
n above thresholds depending only on G.bound, a string of length at most n + 1 has
ansBound G x (2n+1) β€ (2 ^ n) ^ Ξ» --- the budget at which GapCompression.completeness
takes its hypothesis. With Verifier.hasPerfectPCC_of_le this is what carries a value-1 PCC
strategy from membership in classA G U (2 * n + 1) into that clause, and it is why
Obligations.compr_spec carries the length bound: ansBound grows with the string's own
parameter, so without it no pair of thresholds would do.
The thresholds are Ξ» β₯ 2 Β· deg(bound) + 1 and n β₯ logβ(βboundβ) + 2 Β· deg(bound) + 1,
where βboundβ is the sum of its coefficients; note they are set by the polynomial bound,
not by G.deg, which grades running times in the input size instead.
The class A at level n: the strings whose verifier is n-bounded and whose n-th
game has a value-1 PCC strategy.
Equations
- MIPRE.Halting.classA G U n = {x : MIPRE.Cost.BitStr | (MIPRE.Halting.Vof G U x).InClassA n (MIPRE.Halting.ansBound G x n)}
Instances For
The class B at level n, in the value model Ο: the strings whose verifier is
n-bounded, rejects long answers, and whose n-th game has value at most 1/2 in the model.
At ValueModel.tensor this is the class of the halting reduction of MIP* = RE; at
ValueModel.commuting, the one of MIP^co = coRE.
Equations
- MIPRE.Halting.classB G U Ο n = {x : MIPRE.Cost.BitStr | (MIPRE.Halting.Vof G U x).InClassB Ο n (MIPRE.Halting.ansBound G x n)}
Instances For
The two classes are disjoint at every level: a perfect PCC strategy gives value 1.
The tabulation of the verifier a string denotes #
tab x n is the GameData for (Vof G U x)'s n-th game, and it is computable because it
is Tabulate's tabOf β a function of two encoded programs and five numbers β fed what the
string and the level supply: the two programs, the sampler's dimension, the answer cut
ansBound G x n, and that same ansBound with G.deg as the budget of the sampler runs.
Two of the seven take work:
sampData x, the encoded sampler program, isG.samplerProg (descLam x)encoded. APolyTimeFunis not a Mathlib-computable function of its argument in any direct sense; what makes this go through is that it is run by the ambient machine on an encoded input (Cost.PolyTimeFun.computable_encode_comp).decProgData x, the encoded decider program, is the wrapper around the string's own decider (Decider.wrap, throughVerifier.ofSamplerDecider). Encoding it means buildingCost.Prog.wrapCore's syntax tree directly inData(Cost.Prog.ProgD.dWrapCore), becauseProgis not aPrimcodableand so noPrimrecstatement can mention it. The string's decider is the datumdescDecD xand enters as it is.
The three bridges at the end β accOf_iff, dimOf_eq, margOf_eq β are what the rest of O2
rests on: the tabulated numbers are the verifier's own sampler and decider. dimOf_eq and
margOf_eq say so at every string and every level, their budget being the compressed
sampler's own (sampler_timeBound, from GapCompression.sampler_time); accOf_iff says so
on an n-bounded verifier, whose budget is the only one the string's own decider has.
The encoded sampler program of the verifier a string denotes.
Equations
Instances For
The encoded decider program of the verifier a string denotes: the question-length wrapper
around the string's decider, built in Data rather than in Prog.
Equations
Instances For
The two concrete instantiations of Tabulate's generic Primrec statements. s and B
are paired so that n stays at the depth it has in the tuple today: that is what keeps this
one instantiation cheap, and what lets tabOf's argument list grow without re-running the
expensive primrec_accOf.
The tabulation of (Vof G U x)'s n-th game, doubled and re-budgeted. The sampler
runs under the budget the compressed sampler's own time bound supplies β coefficient
ansBound G x n = G.bound.eval (n + descLam x), degree G.deg β neither of which needs
(Vof G U x).IsBounded n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The tabulation is computable #
The seven arguments of tabOf are assembled one declaration at a time. Inlining them into
a single term is not a stylistic choice: the tuple is nested four deep and elaborating it in
one go does not terminate within any heartbeat budget worth setting.
O2, computability.
The tabulated numbers are the verifier's own #
sampData_eq and decProgData_eq only unfold the two encodings, and hold at every n. The
other three β accOf_iff, dimOf_eq, margOf_eq β are the same shape: rewrite the budgeted
run into CL.Sampler.queryUnder or Verifier.accepts_iff_runForD, which a time bound then
evaluates. Which bound differs, and that is the point of the re-budget. The two sampler runs
take sampler_timeBound β GapCompression.sampler_time at the string's own parameter, a
bound at every index β so dimOf_eq and margOf_eq carry no hypothesis. accOf_iff has
only IsBounded n to draw on, and IsBounded.two_le supplies the 2 β€ n it needs β see the
warning there: at n = 0, 1 the time clauses say nothing and no budget exists.
The tabulated acceptance test is the verifier's acceptance, on an n-bounded
verifier.
The sampler's time bound at the string's own compression parameter, with no hypothesis.
The tabulated dimension is the sampler's, at every string and every level β n = 0
and n = 1 included, which the n ^ n budget could never reach.
The tabulated marginal is the sampler's, at every string and every level. The only remaining hypothesis is the length condition on the point, which is not a boundedness one.
The tabulation matches the verifier, doubled #
What remains is the dictionary between the two namings of each alphabet. A GameData names
its questions Fin (nX + 1) and its answers Fin (nA + 1); the doubled game names them
Bool Γ π½β^{s(n)} and the bit strings of length at most T. Verifier.tagEquiv and
Verifier.answerEquiv are the two bijections, and eXof/eAof are them transported across
the arithmetic of tab's two sizes (tab_nX, tab_nA) β nX + 1 = 2 ^ (s(n) + 1), the
extra bit being the tag.
The two clauses are then separate pieces of work. The ΞΌ clause (mu_clause) is a counting
argument: the tabulated weight of a question pair is the number of points of π½β^{s(n)} whose
two tagged marginals land on it, and the total weight is still 2 ^ s(n), which is exactly
the quotient CL.clDist is β the weight list enumerates π½β^{s(n)} once, not the strings of
length s(n) + 1. The D clause is the acceptance table read back (acc_mem_iff), and the
one place where the two notions of game differ has stopped costing anything: a GameData
rejects unequal answers to equal questions by construction, and the doubled game puts no
weight there and rejects there too, so tab_match is a total match and needs nothing of the
decider beyond n-boundedness.
The question relabeling: a tabulated question index is a tag and a point of π½β^{s(n)}.
Equations
- MIPRE.Halting.eXof G U x n = (finCongr β―).trans (MIPRE.Verifier.tagEquiv ((MIPRE.Halting.Vof G U x).sampler.dim n)).symm
Instances For
The answer relabeling: a tabulated answer index is a bit string of length at most the answer bound. Only the questions are doubled, so this is unchanged by it.
Equations
- MIPRE.Halting.eAof G U x n = (finCongr β―).trans (MIPRE.Verifier.answerEquiv (MIPRE.Halting.ansBound G x n))
Instances For
The dictionary the ΞΌ clause runs on, with the tag: a tagged marginal lands on the index
i exactly when the tag is i's tag and the verifier's own marginal is i's point.
The ΞΌ clause, doubled. The tabulated distribution is the sampler's on the block
(false, Β·) Γ (true, Β·) and zero everywhere else β which is exactly the doubled game's.
The acceptance table read back, doubled. A tuple of indices is in the table exactly when the tags are Alice's and Bob's and the verifier's decider accepts.
O2, the match β doubled, and with no synchronicity hypothesis. On an n-bounded
verifier the doubled tabulation matches the doubled game of π±_n along eXof and eAof.
The forced rejections of a GameData sit on the diagonal, which the doubled distribution
avoids; and the doubled game rejects off the tag block, which is what the table omits.
O2, the value β doubled, in any model: the tabulated game has the value of π±_n in
every value model at every n-bounded string, with no synchronicity hypothesis. This is
Halting.exists_sem_of_tab's hval.
O2, the value β doubled: the tabulated game has the quantum value of π±_n at every
n-bounded string.
The class of value 1 at level n, in the value model Ο, read on the tabulation: the
strings whose tabulated game at level n (tab, below) does not have value below 1. The
larger of the two nested classes of the coRE direction (Cost.compressibility_criterion_nested,
planning/mipco-track.md Β§3): its complement is what an upper semidecider for the value
recognizes, and it contains classA (classA_subset_classOne). It is read on the tabulation
directly so that the non-halting conclusion of the criterion needs no boundedness.
Equations
- MIPRE.Halting.classOne G U Ο n = {x : MIPRE.Cost.BitStr | Β¬Ο.val (MIPRE.Halting.tab G U x n).game < 1}
Instances For
In classOne the tabulated game has value exactly 1.
The perfect-PCC class lies in the class of value 1 of every model: a perfect PCC
strategy gives val* = 1, and every model dominates val*. This is the nesting Bβ β Bβ of
Cost.compressibility_criterion_nested.
The completeness branch, in the value of HaltingGameValue.