Documentation

Mathlib.Computability.RecursiveIn

Oracle computability #

This file defines oracle computability using partial recursive functions.

Main definitions #

Main results #

Implementation notes #

The type of partial functions recursive in a set of oracles O is the smallest type containing the constant zero, the successor, left and right projections, each oracle g ∈ O, and is closed under pairing, composition, primitive recursion, and μ-recursion.

References #

Tags #

Computability, Oracle, Turing Degrees, Reducibility, Equivalence Relation

inductive Nat.RecursiveIn (O : Set ( →. )) :

The type of partial functions recursive in a set of oracles O is the smallest type containing the constant zero, the successor, left and right projections, each oracle g ∈ O, and is closed under pairing, composition, primitive recursion, and μ-recursion.

Instances For
    def RecursiveIn {α : Type u_5} {σ : Type u_6} [Primcodable α] [Primcodable σ] (O : Set ( →. )) (f : α →. σ) :

    A partial function f : α →. σ between Primcodable types is recursive in a set of oracles O if its encoding as a function ℕ →. ℕ is Nat.RecursiveIn O.

    Equations
    Instances For
      def RecursiveIn₂ {α : Type u_5} {β : Type u_6} {σ : Type u_7} [Primcodable α] [Primcodable β] [Primcodable σ] (O : Set ( →. )) (f : αβ →. σ) :

      A binary partial function is recursive in O if the curried form is.

      Equations
      Instances For
        def ComputableIn {α : Type u_5} {σ : Type u_6} [Primcodable α] [Primcodable σ] (O : Set ( →. )) (f : ασ) :

        A total function is computable in O if its constant lift is recursive in O.

        Equations
        Instances For
          def ComputableIn₂ {α : Type u_5} {β : Type u_6} {σ : Type u_7} [Primcodable α] [Primcodable β] [Primcodable σ] (O : Set ( →. )) (f : αβσ) :

          A binary total function is computable in O.

          Equations
          Instances For
            theorem Nat.RecursiveIn.of_eq {f g : →. } {O : Set ( →. )} (hf : Nat.RecursiveIn O f) (H : ∀ (n : ), f n = g n) :
            theorem Nat.RecursiveIn.of_eq_tot {f : →. } {g : } {O : Set ( →. )} (hf : Nat.RecursiveIn O f) (H : ∀ (n : ), g n f n) :
            theorem Nat.RecursiveIn.subst {O O' : Set ( →. )} {f : →. } (hf : Nat.RecursiveIn O f) (hO : gO, Nat.RecursiveIn O' g) :

            If every element of O is Nat.RecursiveIn O', then any function which is Nat.RecursiveIn O is also Nat.RecursiveIn O'.

            theorem Nat.RecursiveIn.partrec_of_oracle {f : →. } {O : Set ( →. )} (hO : gO, Nat.Partrec g) (hf : Nat.RecursiveIn O f) :

            If every function in O is partial recursive, then a function which is Nat.RecursiveIn O is also partial recursive.

            If a function is partial recursive, then it is recursive in every partial function.

            theorem Partrec.recursiveIn {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} {O : Set ( →. )} (hf : Partrec f) :

            If a partial function is partial recursive, then it is RecursiveIn any oracle set.

            theorem Nat.Primrec.recursiveIn {O : Set ( →. )} {f : } (hf : Nat.Primrec f) :
            Nat.RecursiveIn O fun (n : ) => (some (f n))
            theorem Computable.computableIn {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : αβ} {O : Set ( →. )} (hf : Computable f) :
            theorem Primrec.computableIn {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : ασ} {O : Set ( →. )} (hf : Primrec f) :
            theorem Primrec₂.computableIn₂ {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : αβσ} {O : Set ( →. )} (hf : Primrec₂ f) :
            theorem ComputableIn.recursiveIn {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : ασ} {O : Set ( →. )} (hf : ComputableIn O f) :
            RecursiveIn O fun (a : α) => Part.some (f a)
            theorem ComputableIn₂.recursiveIn₂ {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : αβσ} {O : Set ( →. )} (hf : ComputableIn₂ O f) :
            RecursiveIn₂ O fun (a : α) => (f a)
            theorem RecursiveIn.of_eq {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {O : Set ( →. )} {f g : α →. σ} (hf : RecursiveIn O f) (H : ∀ (x : α), f x = g x) :
            theorem RecursiveIn.of_eq_tot {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {O : Set ( →. )} {f : α →. σ} {g : ασ} (hf : RecursiveIn O f) (H : ∀ (n : α), g n f n) :
            theorem RecursiveIn.oracle {O : Set ( →. )} (g : →. ) :
            g ORecursiveIn O g
            theorem RecursiveIn.none {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {O : Set ( →. )} :
            RecursiveIn O fun (x : α) => Part.none
            theorem RecursiveIn.subst {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {O O' : Set ( →. )} {f : α →. σ} (hf : RecursiveIn O f) (hO : gO, RecursiveIn O' g) :

            If every element of O is RecursiveIn O', then any function which is RecursiveIn O is also RecursiveIn O'.

            theorem RecursiveIn.mono {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} {O₁ O₂ : Set ( →. )} (hsub : O₁ O₂) (hf : RecursiveIn O₁ f) :

            Monotonicity of RecursiveIn with respect to oracle sets.

            theorem RecursiveIn.partrec_of_oracle {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} {O : Set ( →. )} (hO : gO, Partrec g) (hf : RecursiveIn O f) :

            If every function in O is partial recursive, then a function which is RecursiveIn O is also partial recursive.

            theorem RecursiveIn.partrec_of_const {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} {s : Part } (hf : RecursiveIn {fun (x : ) => s} f) :

            If a function is recursive in a constant partial function, then it is partial recursive.

            @[simp]
            theorem recursiveIn_empty_iff {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} :
            theorem partrec_iff_forall_recursiveIn_singleton {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {f : α →. σ} :
            Partrec f ∀ (g : →. ), RecursiveIn {g} f

            A partial function f is partial recursive if and only if it is recursive in every partial function g.

            theorem ComputableIn.const {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] {O : Set ( →. )} (s : σ) :
            ComputableIn O fun (x : α) => s
            theorem ComputableIn.id {α : Type u_1} [Primcodable α] {O : Set ( →. )} :
            theorem ComputableIn.fst {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {O : Set ( →. )} :
            theorem ComputableIn.snd {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {O : Set ( →. )} :
            theorem ComputableIn.sumInl {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {O : Set ( →. )} :
            theorem ComputableIn.sumInr {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {O : Set ( →. )} :