Bounded evaluation of oracle programs is primitive recursive #
Bounded evaluation TauCeti.Oracle.Single.Code.evaln σ k c n runs the program c on the input
n with fuel k against the oracle answers σ. This file proves that the run, its output and its
use, is primitive recursive in the program, the fuel and the input, uniformly in a parameter on
which the oracle answers depend primitive recursively. The finite oracle data of a stage
construction are the main instances: a finite oracle string l, answering l[z]?, and a finite
set D, given by its binary code and answering 1 on D and 0 outside it.
This is what makes stage computations effective: for instance, whether Φ_{e,s}^{A_s}(x)
converges, with which output and with which use, is primitive recursive in e, s, x and the
binary code of the finite stage A_s.
Main definitions #
TauCeti.Oracle.Single.Code.Halt.equivProd: a successful run is its output and its use. This equivalence gives thePrimcodableinstance ofTauCeti.Oracle.Single.Code.Halt.
Main results #
TauCeti.Oracle.Single.Code.Halt.primrec_output,TauCeti.Oracle.Single.Code.Halt.primrec_use,TauCeti.Oracle.Single.Code.Halt.primrec₂_mk: the output, the use and the constructor of successful runs are primitive recursive.TauCeti.Oracle.Single.Code.primrec_evaln: bounded evaluation is primitive recursive, uniformly in a parameter on which the oracle answers depend primitive recursively.TauCeti.Oracle.Single.Code.primrec_stageUse: the stage use is primitive recursive, uniformly in the same way.TauCeti.Oracle.Single.Code.primrec_evaln_list: bounded evaluation against a finite oracle string is primitive recursive in the string.TauCeti.Oracle.Single.Code.primrec_evaln_equivBitIndices: bounded evaluation against a finite set, answering1on the set and0outside it, is primitive recursive in the binary code of the set.TauCeti.Oracle.Single.Code.primrec₂_setAnswers_equivBitIndices: the answers of a finite set are primitive recursive in its binary code.
References #
- R. I. Soare, Recursively Enumerable Sets and Degrees, Springer, 1987, Chapter III.1.
- The proof follows Mathlib's
Nat.Partrec.Code.primrec_evaln: a course-of-values recursion onNat.pair k (encode c)whose table lists the runs at fuelkof the programc, extended by the oracle instruction, the use and the parameter.
Encoding successful runs #
Successful runs are encoded as pairs of their output and their use.
The output of a successful run is primitive recursive.
The use of a successful run is primitive recursive.
Forming a successful run from its output and its use is primitive recursive.
One step of bounded evaluation #
The course-of-values table #
Primitive recursiveness #
Bounded evaluation is primitive recursive, uniformly in a parameter a on which the
oracle answers σ a depend primitive recursively: the output and the use of the run of the program
c on the input n with fuel k against σ a, or its failure, are primitive recursive in
a, k, c and n.
The stage use is primitive recursive, uniformly in a parameter a on which the answers σ a
depend primitive recursively, and in the fuel, the program and the argument.
Bounded evaluation against a finite oracle string l, which answers l[z]? at z, is
primitive recursive in the string, the fuel, the program and the input.
Bounded evaluation against a finite set, given by its binary code m and answering 1 on the
set Finset.equivBitIndices m and 0 outside it, is primitive recursive in the code, the fuel,
the program and the input.
The answers of a finite set given by its binary code m, 1 on Finset.equivBitIndices m
and 0 outside it, are primitive recursive in the code and the address.
Bounded evaluation against computable finite stages is computable uniformly in the stage and the input. The stages are supplied by their binary finite-set codes.