File: Mathlib/Computability/Partrec.lean

full_name: _private.Mathlib.Computability.Partrec.0.Nat.lbp
code: private def lbp (m n : ℕ) : Prop 
goal: Prop

full_name: _private.Mathlib.Computability.Partrec.0.Nat.wf_lbp
code: private def wf_lbp (H : ∃ n, true ∈ p n ∧ ∀ k < n, (p k).Dom) : WellFounded (lbp p) 
goal: WellFounded (Nat.lbp p)

full_name: Nat.rfindX
code: def rfindX : { n // true ∈ p n ∧ ∀ m < n, false ∈ p m } 
goal: { n // true ∈ p n ∧ ∀ m < n, false ∈ p m }

full_name: Nat.rfind
code: def rfind (p : ℕ →. Bool) : Part ℕ 
goal: Part ℕ

full_name: Nat.rfind_spec
code: theorem rfind_spec {p : ℕ →. Bool} {n : ℕ} (h : n ∈ rfind p) : true ∈ p n 
goal: true ∈ p n

full_name: Nat.rfind_min
code: theorem rfind_min {p : ℕ →. Bool} {n : ℕ} (h : n ∈ rfind p) : ∀ {m : ℕ}, m < n → false ∈ p m 
goal: m < n → false ∈ p m

full_name: Nat.rfind_dom
code: @[simp]
theorem rfind_dom {p : ℕ →. Bool} :
    (rfind p).Dom ↔ ∃ n, true ∈ p n ∧ ∀ {m : ℕ}, m < n → (p m).Dom 
goal: (Nat.rfind p).Dom ↔ ∃ n, true ∈ p n ∧ ∀ {m : ℕ}, m < n → (p m).Dom

full_name: Nat.rfind_dom'
code: theorem rfind_dom' {p : ℕ →. Bool} :
    (rfind p).Dom ↔ ∃ n, true ∈ p n ∧ ∀ {m : ℕ}, m ≤ n → (p m).Dom 
goal: (Nat.rfind p).Dom ↔ ∃ n, true ∈ p n ∧ ∀ {m : ℕ}, m ≤ n → (p m).Dom

full_name: Nat.mem_rfind
code: @[simp]
theorem mem_rfind {p : ℕ →. Bool} {n : ℕ} :
    n ∈ rfind p ↔ true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m 
goal: n ∈ Nat.rfind p ↔ true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m

full_name: Nat.rfind_min'
code: theorem rfind_min' {p : ℕ → Bool} {m : ℕ} (pm : p m) : ∃ n ∈ rfind p, n ≤ m 
goal: ∃ n ∈ Nat.rfind ↑p, n ≤ m

full_name: Nat.rfind_zero_none
code: theorem rfind_zero_none (p : ℕ →. Bool) (p0 : p 0 = Part.none) : rfind p = Part.none 
goal: Nat.rfind p = Part.none

full_name: Nat.rfindOpt
code: def rfindOpt {α} (f : ℕ → Option α) : Part α 
goal: Part α

full_name: Nat.rfindOpt_spec
code: theorem rfindOpt_spec {α} {f : ℕ → Option α} {a} (h : a ∈ rfindOpt f) : ∃ n, a ∈ f n 
goal: ∃ n, a ∈ f n

full_name: Nat.rfindOpt_dom
code: theorem rfindOpt_dom {α} {f : ℕ → Option α} : (rfindOpt f).Dom ↔ ∃ n a, a ∈ f n 
goal: (Nat.rfindOpt f).Dom ↔ ∃ n a, a ∈ f n

full_name: Nat.rfindOpt_mono
code: theorem rfindOpt_mono {α} {f : ℕ → Option α} (H : ∀ {a m n}, m ≤ n → a ∈ f m → a ∈ f n) {a} :
    a ∈ rfindOpt f ↔ ∃ n, a ∈ f n 
goal: a ∈ Nat.rfindOpt f ↔ ∃ n, a ∈ f n

full_name: Nat.Partrec.comp
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec f → Nat.Partrec g → Nat.Partrec fun n => g n >>= f

full_name: Nat.Partrec.succ
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec ↑Nat.succ

full_name: Nat.Partrec
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: (ℕ →. ℕ) → Prop

full_name: Nat.Partrec.prec
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec f →
  Nat.Partrec g →
    Nat.Partrec
      (Nat.unpaired fun a n =>
        Nat.rec (f a)
          (fun y IH => do
            let i ← IH
            g (Nat.pair a (Nat.pair y i)))
          n)

full_name: Nat.Partrec.right
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec ↑fun n => (Nat.unpair n).2

full_name: Nat.Partrec.left
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec ↑fun n => (Nat.unpair n).1

full_name: Nat.Partrec.pair
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec f → Nat.Partrec g → Nat.Partrec fun n => Seq.seq (Nat.pair <$> f n) fun x => g n

full_name: Nat.Partrec.rfind
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec f → Nat.Partrec fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a n)

full_name: Nat.Partrec.zero
code: /-- `PartRec f` means that the partial function `f : ℕ → ℕ` is partially recursive. -/
inductive Partrec : (ℕ →. ℕ) → Prop
  | zero : Partrec (pure 0)
  | succ : Partrec succ
  | left : Partrec ↑fun n : ℕ => n.unpair.1
  | right : Partrec ↑fun n : ℕ => n.unpair.2
  | pair {f g} : Partrec f → Partrec g → Partrec fun n => pair <$> f n <*> g n
  | comp {f g} : Partrec f → Partrec g → Partrec fun n => g n >>= f
  | prec {f g} : Partrec f → Partrec g → Partrec (unpaired fun a n =>
      n.rec (f a) fun y IH => do let i ← IH; g (pair a (pair y i)))
  | rfind {f} : Partrec f → Partrec fun a => rfind fun n => (fun m => m = 0) <$> f (pair a n)
goal: Nat.Partrec (pure 0)

full_name: Nat.Partrec.of_eq
code: theorem of_eq {f g : ℕ →. ℕ} (hf : Partrec f) (H : ∀ n, f n = g n) : Partrec g 
goal: Nat.Partrec g

full_name: Nat.Partrec.of_eq_tot
code: theorem of_eq_tot {f : ℕ →. ℕ} {g : ℕ → ℕ} (hf : Partrec f) (H : ∀ n, g n ∈ f n) : Partrec g 
goal: Nat.Partrec ↑g

full_name: Nat.Partrec.of_primrec
code: theorem of_primrec {f : ℕ → ℕ} (hf : Nat.Primrec f) : Partrec f 
goal: Nat.Partrec ↑f

full_name: Nat.Partrec.some
code: protected theorem some : Partrec some 
goal: Nat.Partrec Part.some

full_name: Nat.Partrec.none
code: theorem none : Partrec fun _ => none 
goal: Nat.Partrec fun x => Part.none

full_name: Nat.Partrec.prec'
code: theorem prec' {f g h} (hf : Partrec f) (hg : Partrec g) (hh : Partrec h) :
    Partrec fun a => (f a).bind fun n => n.rec (g a)
      fun y IH => do {let i ← IH; h (Nat.pair a (Nat.pair y i))} 
goal: Nat.Partrec fun a =>
  (f a).bind fun n =>
    Nat.rec (g a)
      (fun y IH => do
        let i ← IH
        h (Nat.pair a (Nat.pair y i)))
      n

full_name: Nat.Partrec.ppred
code: theorem ppred : Partrec fun n => ppred n 
goal: Nat.Partrec fun n => ↑n.ppred

full_name: Partrec
code: /-- Partially recursive partial functions `α → σ` between `Primcodable` types -/
def Partrec {α σ} [Primcodable α] [Primcodable σ] (f : α →. σ) 
goal: Prop

full_name: Partrec₂
code: /-- Partially recursive partial functions `α → β → σ` between `Primcodable` types -/
def Partrec₂ {α β σ} [Primcodable α] [Primcodable β] [Primcodable σ] (f : α → β →. σ) 
goal: Prop

full_name: Computable
code: /-- Computable functions `α → σ` between `Primcodable` types:
  a function is computable if and only if it is partially recursive (as a partial function) -/
def Computable {α σ} [Primcodable α] [Primcodable σ] (f : α → σ) 
goal: Prop

full_name: Computable₂
code: /-- Computable functions `α → β → σ` between `Primcodable` types -/
def Computable₂ {α β σ} [Primcodable α] [Primcodable β] [Primcodable σ] (f : α → β → σ) 
goal: Prop

full_name: Primrec.to_comp
code: theorem Primrec.to_comp {α σ} [Primcodable α] [Primcodable σ] {f : α → σ} (hf : Primrec f) :
    Computable f 
goal: Computable f

full_name: Primrec₂.to_comp
code: nonrec theorem Primrec₂.to_comp {α β σ} [Primcodable α] [Primcodable β] [Primcodable σ]
    {f : α → β → σ} (hf : Primrec₂ f) : Computable₂ f 
goal: Computable₂ f

full_name: Computable.partrec
code: protected theorem Computable.partrec {α σ} [Primcodable α] [Primcodable σ] {f : α → σ}
    (hf : Computable f) : Partrec (f : α →. σ) 
goal: Partrec ↑f

full_name: Computable₂.partrec₂
code: protected theorem Computable₂.partrec₂ {α β σ} [Primcodable α] [Primcodable β] [Primcodable σ]
    {f : α → β → σ} (hf : Computable₂ f) : Partrec₂ fun a => (f a : β →. σ) 
goal: Partrec₂ fun a => ↑(f a)

full_name: Computable.of_eq
code: theorem of_eq {f g : α → σ} (hf : Computable f) (H : ∀ n, f n = g n) : Computable g 
goal: Computable g

full_name: Computable.const
code: theorem const (s : σ) : Computable fun _ : α => s 
goal: Computable fun x => s

full_name: Computable.ofOption
code: theorem ofOption {f : α → Option β} (hf : Computable f) : Partrec fun a => (f a : Part β) 
goal: Partrec fun a => ↑(f a)

full_name: Computable.to₂
code: theorem to₂ {f : α × β → σ} (hf : Computable f) : Computable₂ fun a b => f (a, b) 
goal: Computable₂ fun a b => f (a, b)

full_name: Computable.id
code: protected theorem id : Computable (@id α) 
goal: Computable id

full_name: Computable.fst
code: theorem fst : Computable (@Prod.fst α β) 
goal: Computable Prod.fst

full_name: Computable.snd
code: theorem snd : Computable (@Prod.snd α β) 
goal: Computable Prod.snd

full_name: Computable.pair
code: nonrec theorem pair {f : α → β} {g : α → γ} (hf : Computable f) (hg : Computable g) :
    Computable fun a => (f a, g a) 
goal: Computable fun a => (f a, g a)

full_name: Computable.unpair
code: theorem unpair : Computable Nat.unpair 
goal: Computable Nat.unpair

full_name: Computable.succ
code: theorem succ : Computable Nat.succ 
goal: Computable Nat.succ

full_name: Computable.pred
code: theorem pred : Computable Nat.pred 
goal: Computable Nat.pred

full_name: Computable.nat_bodd
code: theorem nat_bodd : Computable Nat.bodd 
goal: Computable Nat.bodd

full_name: Computable.nat_div2
code: theorem nat_div2 : Computable Nat.div2 
goal: Computable Nat.div2

full_name: Computable.sum_inl
code: theorem sum_inl : Computable (@Sum.inl α β) 
goal: Computable Sum.inl

full_name: Computable.sum_inr
code: theorem sum_inr : Computable (@Sum.inr α β) 
goal: Computable Sum.inr

full_name: Computable.list_cons
code: theorem list_cons : Computable₂ (@List.cons α) 
goal: Computable₂ List.cons

full_name: Computable.list_reverse
code: theorem list_reverse : Computable (@List.reverse α) 
goal: Computable List.reverse

full_name: Computable.list_get?
code: theorem list_get? : Computable₂ (@List.get? α) 
goal: Computable₂ List.get?

full_name: Computable.list_append
code: theorem list_append : Computable₂ ((· ++ ·) : List α → List α → List α) 
goal: Computable₂ fun x x_1 => x ++ x_1

full_name: Computable.list_concat
code: theorem list_concat : Computable₂ fun l (a : α) => l ++ [a] 
goal: Computable₂ fun l a => l ++ [a]

full_name: Computable.list_length
code: theorem list_length : Computable (@List.length α) 
goal: Computable List.length

full_name: Computable.vector_cons
code: theorem vector_cons {n} : Computable₂ (@Vector.cons α n) 
goal: Computable₂ Mathlib.Vector.cons

full_name: Computable.vector_toList
code: theorem vector_toList {n} : Computable (@Vector.toList α n) 
goal: Computable Mathlib.Vector.toList

full_name: Computable.vector_length
code: theorem vector_length {n} : Computable (@Vector.length α n) 
goal: Computable Mathlib.Vector.length

full_name: Computable.vector_head
code: theorem vector_head {n} : Computable (@Vector.head α n) 
goal: Computable Mathlib.Vector.head

full_name: Computable.vector_tail
code: theorem vector_tail {n} : Computable (@Vector.tail α n) 
goal: Computable Mathlib.Vector.tail

full_name: Computable.vector_get
code: theorem vector_get {n} : Computable₂ (@Vector.get α n) 
goal: Computable₂ Mathlib.Vector.get

full_name: Computable.vector_ofFn'
code: theorem vector_ofFn' {n} : Computable (@Vector.ofFn α n) 
goal: Computable Mathlib.Vector.ofFn

full_name: Computable.fin_app
code: theorem fin_app {n} : Computable₂ (@id (Fin n → σ)) 
goal: Computable₂ id

full_name: Computable.encode
code: protected theorem encode : Computable (@encode α _) 
goal: Computable Encodable.encode

full_name: Computable.decode
code: protected theorem decode : Computable (decode (α := α)) 
goal: Computable Encodable.decode

full_name: Computable.ofNat
code: protected theorem ofNat (α) [Denumerable α] : Computable (ofNat α) 
goal: Computable (Denumerable.ofNat α)

full_name: Computable.encode_iff
code: theorem encode_iff {f : α → σ} : (Computable fun a => encode (f a)) ↔ Computable f 
goal: (Computable fun a => Encodable.encode (f a)) ↔ Computable f

full_name: Computable.option_some
code: theorem option_some : Computable (@Option.some α) 
goal: Computable some

full_name: Partrec.of_eq
code: theorem of_eq {f g : α →. σ} (hf : Partrec f) (H : ∀ n, f n = g n) : Partrec g 
goal: Partrec g

full_name: Partrec.of_eq_tot
code: theorem of_eq_tot {f : α →. σ} {g : α → σ} (hf : Partrec f) (H : ∀ n, g n ∈ f n) : Computable g 
goal: Computable g

full_name: Partrec.none
code: theorem none : Partrec fun _ : α => @Part.none σ 
goal: Partrec fun x => Part.none

full_name: Partrec.some
code: protected theorem some : Partrec (@Part.some α) 
goal: Partrec Part.some

full_name: Decidable.Partrec.const'
code: theorem _root_.Decidable.Partrec.const' (s : Part σ) [Decidable s.Dom] : Partrec fun _ : α => s 
goal: Partrec fun x => s

full_name: Partrec.const'
code: theorem const' (s : Part σ) : Partrec fun _ : α => s 
goal: Partrec fun x => s

full_name: Partrec.bind
code: protected theorem bind {f : α →. β} {g : α → β →. σ} (hf : Partrec f) (hg : Partrec₂ g) :
    Partrec fun a => (f a).bind (g a) 
goal: Partrec fun a => (f a).bind (g a)

full_name: Partrec.map
code: theorem map {f : α →. β} {g : α → β → σ} (hf : Partrec f) (hg : Computable₂ g) :
    Partrec fun a => (f a).map (g a) 
goal: Partrec fun a => Part.map (g a) (f a)

full_name: Partrec.to₂
code: theorem to₂ {f : α × β →. σ} (hf : Partrec f) : Partrec₂ fun a b => f (a, b) 
goal: Partrec₂ fun a b => f (a, b)

full_name: Partrec.nat_rec
code: theorem nat_rec {f : α → ℕ} {g : α →. σ} {h : α → ℕ × σ →. σ} (hf : Computable f) (hg : Partrec g)
    (hh : Partrec₂ h) : Partrec fun a => (f a).rec (g a) fun y IH => IH.bind fun i => h a (y, i) 
goal: Partrec fun a => Nat.rec (g a) (fun y IH => IH.bind fun i => h a (y, i)) (f a)

full_name: Partrec.comp
code: nonrec theorem comp {f : β →. σ} {g : α → β} (hf : Partrec f) (hg : Computable g) :
    Partrec fun a => f (g a) 
goal: Partrec fun a => f (g a)

full_name: Partrec.nat_iff
code: theorem nat_iff {f : ℕ →. ℕ} : Partrec f ↔ Nat.Partrec f 
goal: Partrec f ↔ Nat.Partrec f

full_name: Partrec.map_encode_iff
code: theorem map_encode_iff {f : α →. σ} : (Partrec fun a => (f a).map encode) ↔ Partrec f 
goal: (Partrec fun a => Part.map Encodable.encode (f a)) ↔ Partrec f

full_name: Partrec₂.unpaired
code: theorem unpaired {f : ℕ → ℕ →. α} : Partrec (Nat.unpaired f) ↔ Partrec₂ f 
goal: Partrec (Nat.unpaired f) ↔ Partrec₂ f

full_name: Partrec₂.unpaired'
code: theorem unpaired' {f : ℕ → ℕ →. ℕ} : Nat.Partrec (Nat.unpaired f) ↔ Partrec₂ f 
goal: Nat.Partrec (Nat.unpaired f) ↔ Partrec₂ f

full_name: Partrec₂.comp
code: nonrec theorem comp {f : β → γ →. σ} {g : α → β} {h : α → γ} (hf : Partrec₂ f) (hg : Computable g)
    (hh : Computable h) : Partrec fun a => f (g a) (h a) 
goal: Partrec fun a => f (g a) (h a)

full_name: Partrec₂.comp₂
code: theorem comp₂ {f : γ → δ →. σ} {g : α → β → γ} {h : α → β → δ} (hf : Partrec₂ f)
    (hg : Computable₂ g) (hh : Computable₂ h) : Partrec₂ fun a b => f (g a b) (h a b) 
goal: Partrec₂ fun a b => f (g a b) (h a b)

full_name: Computable.comp
code: nonrec theorem comp {f : β → σ} {g : α → β} (hf : Computable f) (hg : Computable g) :
    Computable fun a => f (g a) 
goal: Computable fun a => f (g a)

full_name: Computable.comp₂
code: theorem comp₂ {f : γ → σ} {g : α → β → γ} (hf : Computable f) (hg : Computable₂ g) :
    Computable₂ fun a b => f (g a b) 
goal: Computable₂ fun a b => f (g a b)

full_name: Computable₂.mk
code: theorem mk {f : α → β → σ} (hf : Computable fun p : α × β => f p.1 p.2) : Computable₂ f 
goal: Computable₂ f

full_name: Computable₂.comp
code: nonrec theorem comp {f : β → γ → σ} {g : α → β} {h : α → γ} (hf : Computable₂ f)
    (hg : Computable g) (hh : Computable h) : Computable fun a => f (g a) (h a) 
goal: Computable fun a => f (g a) (h a)

full_name: Computable₂.comp₂
code: theorem comp₂ {f : γ → δ → σ} {g : α → β → γ} {h : α → β → δ} (hf : Computable₂ f)
    (hg : Computable₂ g) (hh : Computable₂ h) : Computable₂ fun a b => f (g a b) (h a b) 
goal: Computable₂ fun a b => f (g a b) (h a b)

full_name: Partrec.rfind
code: theorem rfind {p : α → ℕ →. Bool} (hp : Partrec₂ p) : Partrec fun a => Nat.rfind (p a) 
goal: Partrec fun a => Nat.rfind (p a)

full_name: Partrec.rfindOpt
code: theorem rfindOpt {f : α → ℕ → Option σ} (hf : Computable₂ f) :
    Partrec fun a => Nat.rfindOpt (f a) 
goal: Partrec fun a => Nat.rfindOpt (f a)

full_name: Partrec.nat_casesOn_right
code: theorem nat_casesOn_right {f : α → ℕ} {g : α → σ} {h : α → ℕ →. σ} (hf : Computable f)
    (hg : Computable g) (hh : Partrec₂ h) : Partrec fun a => (f a).casesOn (some (g a)) (h a) 
goal: Partrec fun a => Nat.casesOn (f a) (Part.some (g a)) (h a)

full_name: Partrec.bind_decode₂_iff
code: theorem bind_decode₂_iff {f : α →. σ} :
    Partrec f ↔ Nat.Partrec fun n => Part.bind (decode₂ α n) fun a => (f a).map encode 
goal: Partrec f ↔ Nat.Partrec fun n => (↑(Encodable.decode₂ α n)).bind fun a => Part.map Encodable.encode (f a)

full_name: Partrec.vector_mOfFn
code: theorem vector_mOfFn :
    ∀ {n} {f : Fin n → α →. σ},
      (∀ i, Partrec (f i)) → Partrec fun a : α => Vector.mOfFn fun i => f i a
  
goal: (∀ (i : Fin n), Partrec (f i)) → Partrec fun a => Mathlib.Vector.mOfFn fun i => f i a

full_name: Vector.mOfFn_part_some
code: @[simp]
theorem Vector.mOfFn_part_some {α n} :
    ∀ f : Fin n → α, (Vector.mOfFn fun i => Part.some (f i)) = Part.some (Vector.ofFn f) 
goal: (Mathlib.Vector.mOfFn fun i => Part.some (f i)) = Part.some (Mathlib.Vector.ofFn f)

full_name: Computable.option_some_iff
code: theorem option_some_iff {f : α → σ} : (Computable fun a => Option.some (f a)) ↔ Computable f 
goal: (Computable fun a => some (f a)) ↔ Computable f

full_name: Computable.bind_decode_iff
code: theorem bind_decode_iff {f : α → β → Option σ} :
    (Computable₂ fun a n => (decode (α := β) n).bind (f a)) ↔ Computable₂ f 
goal: (Computable₂ fun a n => (Encodable.decode n).bind (f a)) ↔ Computable₂ f

full_name: Computable.map_decode_iff
code: theorem map_decode_iff {f : α → β → σ} :
    (Computable₂ fun a n => (decode (α := β) n).map (f a)) ↔ Computable₂ f 
goal: (Computable₂ fun a n => Option.map (f a) (Encodable.decode n)) ↔ Computable₂ f

full_name: Computable.nat_rec
code: theorem nat_rec {f : α → ℕ} {g : α → σ} {h : α → ℕ × σ → σ} (hf : Computable f) (hg : Computable g)
    (hh : Computable₂ h) :
    Computable fun a => Nat.rec (motive := fun _ => σ) (g a) (fun y IH => h a (y, IH)) (f a) 
goal: Computable fun a => Nat.rec (g a) (fun y IH => h a (y, IH)) (f a)

full_name: Computable.nat_casesOn
code: theorem nat_casesOn {f : α → ℕ} {g : α → σ} {h : α → ℕ → σ} (hf : Computable f) (hg : Computable g)
    (hh : Computable₂ h) :
    Computable fun a => Nat.casesOn (motive := fun _ => σ) (f a) (g a) (h a) 
goal: Computable fun a => Nat.casesOn (f a) (g a) (h a)

full_name: Computable.cond
code: theorem cond {c : α → Bool} {f : α → σ} {g : α → σ} (hc : Computable c) (hf : Computable f)
    (hg : Computable g) : Computable fun a => cond (c a) (f a) (g a) 
goal: Computable fun a => bif c a then f a else g a

full_name: Computable.option_casesOn
code: theorem option_casesOn {o : α → Option β} {f : α → σ} {g : α → β → σ} (ho : Computable o)
    (hf : Computable f) (hg : Computable₂ g) :
    @Computable _ σ _ _ fun a => Option.casesOn (o a) (f a) (g a) 
goal: Computable fun a => Option.casesOn (o a) (f a) (g a)

full_name: Computable.option_bind
code: theorem option_bind {f : α → Option β} {g : α → β → Option σ} (hf : Computable f)
    (hg : Computable₂ g) : Computable fun a => (f a).bind (g a) 
goal: Computable fun a => (f a).bind (g a)

full_name: Computable.option_map
code: theorem option_map {f : α → Option β} {g : α → β → σ} (hf : Computable f) (hg : Computable₂ g) :
    Computable fun a => (f a).map (g a) 
goal: Computable fun a => Option.map (g a) (f a)

full_name: Computable.option_getD
code: theorem option_getD {f : α → Option β} {g : α → β} (hf : Computable f) (hg : Computable g) :
    Computable fun a => (f a).getD (g a) 
goal: Computable fun a => (f a).getD (g a)

full_name: Computable.subtype_mk
code: theorem subtype_mk {f : α → β} {p : β → Prop} [DecidablePred p] {h : ∀ a, p (f a)}
    (hp : PrimrecPred p) (hf : Computable f) :
    @Computable _ _ _ (Primcodable.subtype hp) fun a => (⟨f a, h a⟩ : Subtype p) 
goal: Computable fun a => ⟨f a, ⋯⟩

full_name: Computable.sum_casesOn
code: theorem sum_casesOn {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ → σ} (hf : Computable f)
    (hg : Computable₂ g) (hh : Computable₂ h) :
    @Computable _ σ _ _ fun a => Sum.casesOn (f a) (g a) (h a) 
goal: Computable fun a => Sum.casesOn (f a) (g a) (h a)

full_name: Computable.nat_strong_rec
code: theorem nat_strong_rec (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Computable₂ g)
    (H : ∀ a n, g a ((List.range n).map (f a)) = Option.some (f a n)) : Computable₂ f 
goal: Computable₂ f

full_name: Computable.list_ofFn
code: theorem list_ofFn :
    ∀ {n} {f : Fin n → α → σ},
      (∀ i, Computable (f i)) → Computable fun a => List.ofFn fun i => f i a
  
goal: (∀ (i : Fin n), Computable (f i)) → Computable fun a => List.ofFn fun i => f i a

full_name: Computable.vector_ofFn
code: theorem vector_ofFn {n} {f : Fin n → α → σ} (hf : ∀ i, Computable (f i)) :
    Computable fun a => Vector.ofFn fun i => f i a 
goal: Computable fun a => Mathlib.Vector.ofFn fun i => f i a

full_name: Partrec.option_some_iff
code: theorem option_some_iff {f : α →. σ} : (Partrec fun a => (f a).map Option.some) ↔ Partrec f 
goal: (Partrec fun a => Part.map some (f a)) ↔ Partrec f

full_name: Partrec.option_casesOn_right
code: theorem option_casesOn_right {o : α → Option β} {f : α → σ} {g : α → β →. σ} (ho : Computable o)
    (hf : Computable f) (hg : Partrec₂ g) :
    @Partrec _ σ _ _ fun a => Option.casesOn (o a) (Part.some (f a)) (g a) 
goal: Partrec fun a => Option.casesOn (o a) (Part.some (f a)) (g a)

full_name: Partrec.sum_casesOn_right
code: theorem sum_casesOn_right {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ →. σ} (hf : Computable f)
    (hg : Computable₂ g) (hh : Partrec₂ h) :
    @Partrec _ σ _ _ fun a => Sum.casesOn (f a) (fun b => Part.some (g a b)) (h a) 
goal: Partrec fun a => Sum.casesOn (f a) (fun b => Part.some (g a b)) (h a)

full_name: Partrec.sum_casesOn_left
code: theorem sum_casesOn_left {f : α → β ⊕ γ} {g : α → β →. σ} {h : α → γ → σ} (hf : Computable f)
    (hg : Partrec₂ g) (hh : Computable₂ h) :
    @Partrec _ σ _ _ fun a => Sum.casesOn (f a) (g a) fun c => Part.some (h a c) 
goal: Partrec fun a => Sum.casesOn (f a) (g a) fun c => Part.some (h a c)

full_name: Partrec.fix_aux
code: theorem fix_aux {α σ} (f : α →. σ ⊕ α) (a : α) (b : σ) :
    let F : α → ℕ →. σ ⊕ α := fun a n =>
      n.rec (some (Sum.inr a)) fun _ IH => IH.bind fun s => Sum.casesOn s (fun _ => Part.some s) f
    (∃ n : ℕ,
        ((∃ b' : σ, Sum.inl b' ∈ F a n) ∧ ∀ {m : ℕ}, m < n → ∃ b : α, Sum.inr b ∈ F a m) ∧
          Sum.inl b ∈ F a n) ↔
      b ∈ PFun.fix f a 
goal: let F := fun a n =>
  Nat.rec (Part.some (Sum.inr a)) (fun x IH => IH.bind fun s => Sum.casesOn s (fun x => Part.some s) f) n;
(∃ n, ((∃ b', Sum.inl b' ∈ F a n) ∧ ∀ {m : ℕ}, m < n → ∃ b, Sum.inr b ∈ F a m) ∧ Sum.inl b ∈ F a n) ↔ b ∈ f.fix a

full_name: Partrec.fix
code: theorem fix {f : α →. σ ⊕ α} (hf : Partrec f) : Partrec (PFun.fix f) 
goal: Partrec f.fix