The arithmetic a certificate for CODEHALT has to speak #
Everything the ∃SO[new] certificate of DescriptiveComplexity.CODEHALT needs
to know about Nat.Partrec.Code, stated over ℕ alone – no logic, no
structures. Three groups:
- codes are numbers.
DescriptiveComplexity.CodeHalt.decdecodes a number into a code, and the fourdec_pair/dec_comp/dec_prec/dec_rfindlemmas read the shape of a code off the arithmetic of its number: apairis a4 * ⟨e₁, e₂⟩ + 4, apreca+ 5, acompa+ 6, anrfind'a4 * e + 7. This is what lets the certificate carry codes as numerals rather than as nodes of the instance, and it is what makes decoding unambiguous without asking the instance to be well-formed. Nat.pairhas a successor rule.DescriptiveComplexity.CodeHalt.NextPnames the four ways the pair enumerated next after⟨a, b⟩arises, andDescriptiveComplexity.CodeHalt.pair_next/DescriptiveComplexity.CodeHalt.exists_nextmake it a recurrence. A guessed pairing relation checked against that recurrence isNat.pair, which is much cheaper than guessing addition and multiplication and building the closed form out of them.- bounded evaluation unfolds. One
mem_evaln_*_iffper constructor, plusDescriptiveComplexity.CodeHalt.evaln_rfind'_spec, which turns the step-by-step search ofevalnon anrfind'into the bounded universal statement a first-order kernel can make: the answer is a place where the argument returns0and every earlier place returns something nonzero. FinallyDescriptiveComplexity.CodeHalt.valBoundbounds every value a bounded evaluation can produce, which is what makes the numeral segment of a certificate finite.
Codes as numbers #
The code a number denotes.
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
(a, b) is the pair enumerated just after (a', b'). The four cases
are: move up inside a shell, close a shell, move along a shell, and open the
next one.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Unfolding bounded evaluation #
The search an rfind' performs, read as a bounded universal statement.
A bounded evaluation of rfind' cf on ⟨a, m⟩ returns some v ≥ m such that
cf returns 0 at ⟨a, v⟩ and something nonzero at every ⟨a, w⟩ with
m ≤ w < v – and all of that within the same budget, which is what lets a
first-order kernel state the search without a chain.
Dependency graph
Introduction rules for evaluation #
One per constructor: what has to hold of the arguments for a value to be in the evaluation of a code. They are what the soundness of a certificate discharges its case analysis with.