Documentation

CslibFrontier.Languages.CombinatoryLogic.KleeneFirstModelRelative

Kleene's first model relative to an oracle #

For a total oracle f : ℕ → ℕ, the pca K₁ᶠ on ℕ applies e to n by evaluating the oracle code with index e at n relative to f: e ⬝ n = eval f (ofNat Nat.RecursiveIn.Code e) n. It is built by PartialCombinatoryAlgebra.ofSmn from the oracle-uniform s-m-n theorem (Nat.RecursiveIn.Code.curry) and the universal oracle code (Nat.RecursiveIn.Code.exists_universal).

The combinators do not depend on the oracle (kleeneOneRel_k, kleeneOneRel_s): k and s are indices of oracle codes that run the same program against every oracle, so a realizer built from them in K₁ᶠ is the same number for every f.

Main definitions #

Main results #

Implementation notes #

The oracle is total because the construction uses the universal code for total oracles, Nat.RecursiveIn.Code.exists_universal. The universal code for partial oracles, Nat.RecursiveIn.Code.exists_universal_partial, would allow partial oracles. Mathlib's numbering of Nat.Partrec.Code and the numbering of Nat.RecursiveIn.Code differ (the latter has the extra atomic code oracle), so K₁ = kleeneOne is not literally K₁ᶠ for a computable f.

References #

Kleene's first model relative to the total oracle f: the pca on ℕ in which e ⬝ n is the value at n of the oracle code with index e, evaluated relative to f.

@[simp]

Application in K₁ᶠ is evaluation of oracle codes relative to f.

The combinator k of K₁ᶠ does not depend on the oracle.

The combinator s of K₁ᶠ does not depend on the oracle.