Oracle-uniform codes #
Nat.RecursiveIn.Code.exists_code gives, for each oracle g, some code computing a function
relative to g; the code may depend on g. Simulations of oracle machines and oracle programs
produce one code that works for every oracle. Code.HasUniformCode o F states this for a family
of oracles o : ι → ℕ →. ℕ: a single code computes F i relative to o i for every index i.
The family is arbitrary, so both partial oracles (o := id) and Boolean membership oracles are
instances.
The predicate is closed under the constructors of Nat.RecursiveIn, and contains every partial
recursive function. HasUniformCode.ite adds a guarded call: it runs a partial computation only
where a computable test asks for it, and otherwise returns its input.
Main definitions #
Nat.RecursiveIn.Code.HasUniformCode: one code computes a family relative to a family of oracles.
Main results #
Nat.RecursiveIn.Code.HasUniformCode.of_partrec,.of_computable,.oracle,.pair,.comp,.prec,.rfind: closure under the constructors ofNat.RecursiveIn.Nat.RecursiveIn.Code.HasUniformCode.ite: a guarded call.Nat.RecursiveIn.Code.HasUniformCode.recursiveIn: each member is recursive in its oracle.
A total computable function, used by the same code for every oracle.
A guarded call: where the computable test b is 0 the input is returned and F is not
run, so its divergence there does not matter.