ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Encodable.decode₂_inj
theorem decode₂_inj [Encodable α] {n : ℕ} {a₁ a₂ : α} (h₁ : a₁ ∈ decode₂ α n)
    (h₂ : a₂ ∈ decode₂ α n) : a₁ = a₂ 
Arguments: {α : Type u_1} [Encodable α] {n : ℕ} {a₁ a₂ : α} (h₁ : a₁ ∈ Encodable.decode₂ α n) (h₂ : a₂ ∈ Encodable.decode₂ α n)
Goal: a₁ = a₂
-- Encodable.encodek₂
theorem encodek₂ [Encodable α] (a : α) : decode₂ α (encode a) = some a 
Arguments: {α : Type u_1} [Encodable α] (a : α)
Goal: Encodable.decode₂ α (Encodable.encode a) = some a
-- Encodable.encode_inl
@[simp]
theorem encode_inl (a : α) : @encode (α ⊕ β) _ (Sum.inl a) = 2 * (encode a) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Encodable β] (a : α)
Goal: Encodable.encode (Sum.inl a) = 2 * Encodable.encode a
-- Encodable.encode_inr
@[simp]
theorem encode_inr (b : β) : @encode (α ⊕ β) _ (Sum.inr b) = 2 * (encode b) + 1 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Encodable β] (b : β)
Goal: Encodable.encode (Sum.inr b) = 2 * Encodable.encode b + 1
-- Encodable.decode_sum_val
@[simp]
theorem decode_sum_val (n : ℕ) : (decode n : Option (α ⊕ β)) = decodeSum n 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Encodable β] (n : ℕ)
Goal: Encodable.decode n = Encodable.decodeSum n
-- Encodable.encode_true
@[simp]
theorem encode_true : encode true = 1 
Goal: Encodable.encode true = 1
-- Encodable.encode_false
@[simp]
theorem encode_false : encode false = 0 
Goal: Encodable.encode false = 0
-- Encodable.decode_zero
@[simp]
theorem decode_zero : (decode 0 : Option Bool) = some false 
Goal: Encodable.decode 0 = some false
-- Encodable.decode_one
@[simp]
theorem decode_one : (decode 1 : Option Bool) = some true 
Goal: Encodable.decode 1 = some true
-- Encodable.decode_ge_two
theorem decode_ge_two (n) (h : 2 ≤ n) : (decode n : Option Bool) = none 
Arguments: (n : ℕ) (h : 2 ≤ n)
Goal: Encodable.decode n = none
-- Encodable.decode_sigma_val
@[simp]
theorem decode_sigma_val (n : ℕ) :
    (decode n : Option (Sigma γ)) =
      (decode n.unpair.1).bind fun a => (decode n.unpair.2).map <| Sigma.mk a 
Arguments: {α : Type u_1} {γ : α → Type u_3} [Encodable α] [(a : α) → Encodable (γ a)] (n : ℕ)
Goal: Encodable.decode n =
  (Encodable.decode (Nat.unpair n).1).bind fun a => Option.map (Sigma.mk a) (Encodable.decode (Nat.unpair n).2)
-- Encodable.encode_sigma_val
@[simp]
theorem encode_sigma_val (a b) : @encode (Sigma γ) _ ⟨a, b⟩ = pair (encode a) (encode b) 
Arguments: {α : Type u_1} {γ : α → Type u_3} [Encodable α] [(a : α) → Encodable (γ a)] (a : α) (b : γ a)
Goal: Encodable.encode ⟨a, b⟩ = Nat.pair (Encodable.encode a) (Encodable.encode b)
-- Encodable.decode_prod_val
@[simp]
theorem decode_prod_val (n : ℕ) :
    (@decode (α × β) _ n : Option (α × β))
      = (decode n.unpair.1).bind fun a => (decode n.unpair.2).map <| Prod.mk a 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Encodable β] (n : ℕ)
Goal: Encodable.decode n =
  (Encodable.decode (Nat.unpair n).1).bind fun a => Option.map (Prod.mk a) (Encodable.decode (Nat.unpair n).2)
-- Encodable.encode_prod_val
@[simp]
theorem encode_prod_val (a b) : @encode (α × β) _ (a, b) = pair (encode a) (encode b) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Encodable β] (a : α) (b : β)
Goal: Encodable.encode (a, b) = Nat.pair (Encodable.encode a) (Encodable.encode b)
-- Encodable.Subtype.encode_eq
theorem Subtype.encode_eq (a : Subtype P) : encode a = encode a.val 
Arguments: {α : Type u_1} {P : α → Prop} [encA : Encodable α] [decP : DecidablePred P] (a : Subtype P)
Goal: Encodable.encode a = Encodable.encode ↑a
-- Encodable.nonempty_encodable
@[simp]
theorem nonempty_encodable : Nonempty (Encodable α) ↔ Countable α 
Arguments: {α : Type u_1}
Goal: Nonempty (Encodable α) ↔ Countable α
-- nonempty_encodable
theorem nonempty_encodable (α : Type*) [Countable α] : Nonempty (Encodable α) 
Arguments: (α : Type u_1) [Countable α]
Goal: Nonempty (Encodable α)
-- ULower.down_up
@[simp]
theorem down_up {a : ULower α} : down a.up = a 
Arguments: {α : Type u_1} [Encodable α] {a : ULower α}
Goal: ULower.down a.up = a
-- ULower.up_down
@[simp]
theorem up_down {a : α} : (down a).up = a 
Arguments: {α : Type u_1} [Encodable α] {a : α}
Goal: (ULower.down a).up = a
-- ULower.up_eq_up
@[simp]
theorem up_eq_up {a b : ULower α} : a.up = b.up ↔ a = b 
Arguments: {α : Type u_1} [Encodable α] {a b : ULower α}
Goal: a.up = b.up ↔ a = b
-- ULower.down_eq_down
@[simp]
theorem down_eq_down {a b : α} : down a = down b ↔ a = b 
Arguments: {α : Type u_1} [Encodable α] {a b : α}
Goal: ULower.down a = ULower.down b ↔ a = b
-- ULower.ext
@[ext]
protected theorem ext {a b : ULower α} : a.up = b.up → a = b 
Arguments: {α : Type u_1} [Encodable α] {a b : ULower α}
Goal: a.up = b.up → a = b
-- Encodable.choose_spec
theorem choose_spec (h : ∃ x, p x) : p (choose h) 
Arguments: {α : Type u_1} {p : α → Prop} [Encodable α] [DecidablePred p] (h : ∃ x, p x)
Goal: p (Encodable.choose h)
-- Encodable.axiom_of_choice
theorem axiom_of_choice {α : Type*} {β : α → Type*} {R : ∀ x, β x → Prop} [∀ a, Encodable (β a)]
    [∀ x y, Decidable (R x y)] (H : ∀ x, ∃ y, R x y) : ∃ f : ∀ a, β a, ∀ x, R x (f x) 
Arguments: {α : Type u_1} {β : α → Type u_2} {R : (x : α) → β x → Prop} [(a : α) → Encodable (β a)] [(x : α) → (y : β x) → Decidable (R x y)] (H : ∀ (x : α), ∃ y, R x y)
Goal: ∃ f, ∀ (x : α), R x (f x)
-- Encodable.skolem
theorem skolem {α : Type*} {β : α → Type*} {P : ∀ x, β x → Prop} [∀ a, Encodable (β a)]
    [∀ x y, Decidable (P x y)] : (∀ x, ∃ y, P x y) ↔ ∃ f : ∀ a, β a, ∀ x, P x (f x) 
Arguments: {α : Type u_1} {β : α → Type u_2} {P : (x : α) → β x → Prop} [(a : α) → Encodable (β a)] [(x : α) → (y : β x) → Decidable (P x y)]
Goal: (∀ (x : α), ∃ y, P x y) ↔ ∃ f, ∀ (x : α), P x (f x)
-- Directed.sequence_mono_nat
theorem sequence_mono_nat {r : β → β → Prop} {f : α → β} (hf : Directed r f) (n : ℕ) :
    r (f (hf.sequence f n)) (f (hf.sequence f (n + 1))) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] {r : β → β → Prop} {f : α → β} (hf : Directed r f) (n : ℕ)
Goal: r (f (Directed.sequence f hf n)) (f (Directed.sequence f hf (n + 1)))
-- Directed.rel_sequence
theorem rel_sequence {r : β → β → Prop} {f : α → β} (hf : Directed r f) (a : α) :
    r (f a) (f (hf.sequence f (encode a + 1))) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] {r : β → β → Prop} {f : α → β} (hf : Directed r f) (a : α)
Goal: r (f a) (f (Directed.sequence f hf (Encodable.encode a + 1)))
-- Directed.sequence_mono
theorem sequence_mono : Monotone (f ∘ hf.sequence f) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] [Preorder β] {f : α → β} (hf : Directed (fun x x_1 => x ≤ x_1) f)
Goal: Monotone (f ∘ Directed.sequence f hf)
-- Directed.le_sequence
theorem le_sequence (a : α) : f a ≤ f (hf.sequence f (encode a + 1)) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] [Preorder β] {f : α → β} (hf : Directed (fun x x_1 => x ≤ x_1) f) (a : α)
Goal: f a ≤ f (Directed.sequence f hf (Encodable.encode a + 1))
-- Directed.sequence_anti
theorem sequence_anti : Antitone (f ∘ hf.sequence f) 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] [Preorder β] {f : α → β} (hf : Directed (fun x x_1 => x ≥ x_1) f)
Goal: Antitone (f ∘ Directed.sequence f hf)
-- Directed.sequence_le
theorem sequence_le (a : α) : f (hf.sequence f (Encodable.encode a + 1)) ≤ f a 
Arguments: {α : Type u_1} {β : Type u_2} [Encodable α] [Inhabited α] [Preorder β] {f : α → β} (hf : Directed (fun x x_1 => x ≥ x_1) f) (a : α)
Goal: f (Directed.sequence f hf (Encodable.encode a + 1)) ≤ f a
-- Quotient.rep_spec
theorem Quotient.rep_spec (q : Quotient s) : ⟦q.rep⟧ = q 
Arguments: {α : Type u_1} {s : Setoid α} [DecidableRel fun x x_1 => x ≈ x_1] [Encodable α] (q : Quotient s)
Goal: ⟦q.rep⟧ = q
-- Nat.Primrec.of_eq
theorem of_eq {f g : ℕ → ℕ} (hf : Nat.Primrec f) (H : ∀ n, f n = g n) : Nat.Primrec g 
Arguments: {f g : ℕ → ℕ} (hf : Nat.Primrec f) (H : ∀ (n : ℕ), f n = g n)
Goal: Nat.Primrec g
-- Nat.Primrec.const
theorem const : ∀ n : ℕ, Nat.Primrec fun _ => n
  
Arguments: (n : ℕ)
Goal: Nat.Primrec fun x => n
-- Nat.Primrec.id
protected theorem id : Nat.Primrec id 
Goal: Nat.Primrec id
-- Nat.Primrec.prec1
theorem prec1 {f} (m : ℕ) (hf : Nat.Primrec f) :
    Nat.Primrec fun n => n.rec m fun y IH => f <| Nat.pair y IH 
Arguments: {f : ℕ → ℕ} (m : ℕ) (hf : Nat.Primrec f)
Goal: Nat.Primrec fun n => Nat.rec m (fun y IH => f (Nat.pair y IH)) n
-- Nat.Primrec.casesOn1
theorem casesOn1 {f} (m : ℕ) (hf : Nat.Primrec f) : Nat.Primrec (Nat.casesOn · m f) 
Arguments: {f : ℕ → ℕ} (m : ℕ) (hf : Nat.Primrec f)
Goal: Nat.Primrec fun x => Nat.casesOn x m f
-- Nat.Primrec.casesOn'
theorem casesOn' {f g} (hf : Nat.Primrec f) (hg : Nat.Primrec g) :
    Nat.Primrec (unpaired fun z n => n.casesOn (f z) fun y => g <| Nat.pair z y) 
Arguments: {f g : ℕ → ℕ} (hf : Nat.Primrec f) (hg : Nat.Primrec g)
Goal: Nat.Primrec (Nat.unpaired fun z n => Nat.casesOn n (f z) fun y => g (Nat.pair z y))
-- Nat.Primrec.swap
protected theorem swap : Nat.Primrec (unpaired (swap Nat.pair)) 
Goal: Nat.Primrec (Nat.unpaired (Function.swap Nat.pair))
-- Nat.Primrec.swap'
theorem swap' {f} (hf : Nat.Primrec (unpaired f)) : Nat.Primrec (unpaired (swap f)) 
Arguments: {f : ℕ → ℕ → ℕ} (hf : Nat.Primrec (Nat.unpaired f))
Goal: Nat.Primrec (Nat.unpaired (Function.swap f))
-- Nat.Primrec.pred
theorem pred : Nat.Primrec pred 
Goal: Nat.Primrec Nat.pred
-- Nat.Primrec.add
theorem add : Nat.Primrec (unpaired (· + ·)) 
Goal: Nat.Primrec (Nat.unpaired fun x x_1 => x + x_1)
-- Nat.Primrec.sub
theorem sub : Nat.Primrec (unpaired (· - ·)) 
Goal: Nat.Primrec (Nat.unpaired fun x x_1 => x - x_1)
-- Nat.Primrec.mul
theorem mul : Nat.Primrec (unpaired (· * ·)) 
Goal: Nat.Primrec (Nat.unpaired fun x x_1 => x * x_1)
-- Nat.Primrec.pow
theorem pow : Nat.Primrec (unpaired (· ^ ·)) 
Goal: Nat.Primrec (Nat.unpaired fun x x_1 => x ^ x_1)
-- Primcodable.prim
class Primcodable (α : Type*) extends Encodable α where
  -- Porting note: was `prim [] `.
  -- This means that `prim` does not take the type explicitly in Lean 4
  prim : Nat.Primrec fun n => Encodable.encode (decode n)
Arguments: {α : Type u_1} [self : Primcodable α]
Goal: Nat.Primrec fun n => Encodable.encode (Encodable.decode n)
-- Primrec.encode
protected theorem encode : Primrec (@encode α _) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec Encodable.encode
-- Primrec.decode
protected theorem decode : Primrec (@decode α _) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec Encodable.decode
-- Primrec.dom_denumerable
theorem dom_denumerable {α β} [Denumerable α] [Primcodable β] {f : α → β} :
    Primrec f ↔ Nat.Primrec fun n => encode (f (ofNat α n)) 
Arguments: {α : Type u_4} {β : Type u_5} [Denumerable α] [Primcodable β] {f : α → β}
Goal: Primrec f ↔ Nat.Primrec fun n => Encodable.encode (f (Denumerable.ofNat α n))
-- Primrec.nat_iff
theorem nat_iff {f : ℕ → ℕ} : Primrec f ↔ Nat.Primrec f 
Arguments: {f : ℕ → ℕ}
Goal: Primrec f ↔ Nat.Primrec f
-- Primrec.encdec
theorem encdec : Primrec fun n => encode (@decode α _ n) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec fun n => Encodable.encode (Encodable.decode n)
-- Primrec.option_some
theorem option_some : Primrec (@some α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec some
-- Primrec.of_eq
theorem of_eq {f g : α → σ} (hf : Primrec f) (H : ∀ n, f n = g n) : Primrec g 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] {f g : α → σ} (hf : Primrec f) (H : ∀ (n : α), f n = g n)
Goal: Primrec g
-- Primrec.const
theorem const (x : σ) : Primrec fun _ : α => x 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] (x : σ)
Goal: Primrec fun x_1 => x
-- Primrec.id
protected theorem id : Primrec (@id α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec id
-- Primrec.comp
theorem comp {f : β → σ} {g : α → β} (hf : Primrec f) (hg : Primrec g) : Primrec fun a => f (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : β → σ} {g : α → β} (hf : Primrec f) (hg : Primrec g)
Goal: Primrec fun a => f (g a)
-- Primrec.succ
theorem succ : Primrec Nat.succ 
Goal: Primrec Nat.succ
-- Primrec.pred
theorem pred : Primrec Nat.pred 
Goal: Primrec Nat.pred
-- Primrec.encode_iff
theorem encode_iff {f : α → σ} : (Primrec fun a => encode (f a)) ↔ Primrec f 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] {f : α → σ}
Goal: (Primrec fun a => Encodable.encode (f a)) ↔ Primrec f
-- Primrec.ofNat_iff
theorem ofNat_iff {α β} [Denumerable α] [Primcodable β] {f : α → β} :
    Primrec f ↔ Primrec fun n => f (ofNat α n) 
Arguments: {α : Type u_4} {β : Type u_5} [Denumerable α] [Primcodable β] {f : α → β}
Goal: Primrec f ↔ Primrec fun n => f (Denumerable.ofNat α n)
-- Primrec.ofNat
protected theorem ofNat (α) [Denumerable α] : Primrec (ofNat α) 
Arguments: (α : Type u_4) [Denumerable α]
Goal: Primrec (Denumerable.ofNat α)
-- Primrec.option_some_iff
theorem option_some_iff {f : α → σ} : (Primrec fun a => some (f a)) ↔ Primrec f 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] {f : α → σ}
Goal: (Primrec fun a => some (f a)) ↔ Primrec f
-- Primrec.of_equiv
theorem of_equiv {β} {e : β ≃ α} :
    haveI := Primcodable.ofEquiv α e
    Primrec e 
Arguments: {α : Type u_1} [Primcodable α] {β : Type u_4} {e : β ≃ α}
Goal: Primrec ⇑e
-- Primrec.of_equiv_symm
theorem of_equiv_symm {β} {e : β ≃ α} :
    haveI := Primcodable.ofEquiv α e
    Primrec e.symm 
Arguments: {α : Type u_1} [Primcodable α] {β : Type u_4} {e : β ≃ α}
Goal: Primrec ⇑e.symm
-- Primrec.of_equiv_iff
theorem of_equiv_iff {β} (e : β ≃ α) {f : σ → β} :
    haveI := Primcodable.ofEquiv α e
    (Primrec fun a => e (f a)) ↔ Primrec f 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] {β : Type u_4} (e : β ≃ α) {f : σ → β}
Goal: (Primrec fun a => e (f a)) ↔ Primrec f
-- Primrec.of_equiv_symm_iff
theorem of_equiv_symm_iff {β} (e : β ≃ α) {f : σ → α} :
    haveI := Primcodable.ofEquiv α e
    (Primrec fun a => e.symm (f a)) ↔ Primrec f 
Arguments: {α : Type u_1} {σ : Type u_3} [Primcodable α] [Primcodable σ] {β : Type u_4} (e : β ≃ α) {f : σ → α}
Goal: (Primrec fun a => e.symm (f a)) ↔ Primrec f
-- Primrec.fst
theorem fst {α β} [Primcodable α] [Primcodable β] : Primrec (@Prod.fst α β) 
Arguments: {α : Type u_3} {β : Type u_4} [Primcodable α] [Primcodable β]
Goal: Primrec Prod.fst
-- Primrec.snd
theorem snd {α β} [Primcodable α] [Primcodable β] : Primrec (@Prod.snd α β) 
Arguments: {α : Type u_3} {β : Type u_4} [Primcodable α] [Primcodable β]
Goal: Primrec Prod.snd
-- Primrec.pair
theorem pair {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {f : α → β} {g : α → γ}
    (hf : Primrec f) (hg : Primrec g) : Primrec fun a => (f a, g a) 
Arguments: {α : Type u_3} {β : Type u_4} {γ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable γ] {f : α → β} {g : α → γ} (hf : Primrec f) (hg : Primrec g)
Goal: Primrec fun a => (f a, g a)
-- Primrec.unpair
theorem unpair : Primrec Nat.unpair 
Goal: Primrec Nat.unpair
-- Primrec.list_get?₁
theorem list_get?₁ : ∀ l : List α, Primrec l.get?
  
Arguments: {α : Type u_1} [Primcodable α] (l : List α)
Goal: Primrec l.get?
-- Primrec₂.mk
theorem mk {f : α → β → σ} (hf : Primrec fun p : α × β => f p.1 p.2) : Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ} (hf : Primrec fun p => f p.1 p.2)
Goal: Primrec₂ f
-- Primrec₂.of_eq
theorem of_eq {f g : α → β → σ} (hg : Primrec₂ f) (H : ∀ a b, f a b = g a b) : Primrec₂ g 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f g : α → β → σ} (hg : Primrec₂ f) (H : ∀ (a : α) (b : β), f a b = g a b)
Goal: Primrec₂ g
-- Primrec₂.const
theorem const (x : σ) : Primrec₂ fun (_ : α) (_ : β) => x 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] (x : σ)
Goal: Primrec₂ fun x_1 x_2 => x
-- Primrec₂.pair
protected theorem pair : Primrec₂ (@Prod.mk α β) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β]
Goal: Primrec₂ Prod.mk
-- Primrec₂.left
theorem left : Primrec₂ fun (a : α) (_ : β) => a 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β]
Goal: Primrec₂ fun a x => a
-- Primrec₂.right
theorem right : Primrec₂ fun (_ : α) (b : β) => b 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β]
Goal: Primrec₂ fun x b => b
-- Primrec₂.natPair
theorem natPair : Primrec₂ Nat.pair 
Goal: Primrec₂ Nat.pair
-- Primrec₂.unpaired
theorem unpaired {f : ℕ → ℕ → α} : Primrec (Nat.unpaired f) ↔ Primrec₂ f 
Arguments: {α : Type u_1} [Primcodable α] {f : ℕ → ℕ → α}
Goal: Primrec (Nat.unpaired f) ↔ Primrec₂ f
-- Primrec₂.unpaired'
theorem unpaired' {f : ℕ → ℕ → ℕ} : Nat.Primrec (Nat.unpaired f) ↔ Primrec₂ f 
Arguments: {f : ℕ → ℕ → ℕ}
Goal: Nat.Primrec (Nat.unpaired f) ↔ Primrec₂ f
-- Primrec₂.encode_iff
theorem encode_iff {f : α → β → σ} : (Primrec₂ fun a b => encode (f a b)) ↔ Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: (Primrec₂ fun a b => Encodable.encode (f a b)) ↔ Primrec₂ f
-- Primrec₂.option_some_iff
theorem option_some_iff {f : α → β → σ} : (Primrec₂ fun a b => some (f a b)) ↔ Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: (Primrec₂ fun a b => some (f a b)) ↔ Primrec₂ f
-- Primrec₂.ofNat_iff
theorem ofNat_iff {α β σ} [Denumerable α] [Denumerable β] [Primcodable σ] {f : α → β → σ} :
    Primrec₂ f ↔ Primrec₂ fun m n : ℕ => f (ofNat α m) (ofNat β n) 
Arguments: {α : Type u_4} {β : Type u_5} {σ : Type u_6} [Denumerable α] [Denumerable β] [Primcodable σ] {f : α → β → σ}
Goal: Primrec₂ f ↔ Primrec₂ fun m n => f (Denumerable.ofNat α m) (Denumerable.ofNat β n)
-- Primrec₂.uncurry
theorem uncurry {f : α → β → σ} : Primrec (Function.uncurry f) ↔ Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: Primrec (Function.uncurry f) ↔ Primrec₂ f
-- Primrec₂.curry
theorem curry {f : α × β → σ} : Primrec₂ (Function.curry f) ↔ Primrec f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α × β → σ}
Goal: Primrec₂ (Function.curry f) ↔ Primrec f
-- Primrec.comp₂
theorem Primrec.comp₂ {f : γ → σ} {g : α → β → γ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a b => f (g a b) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable γ] [Primcodable σ] {f : γ → σ} {g : α → β → γ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec₂ fun a b => f (g a b)
-- Primrec₂.comp
theorem Primrec₂.comp {f : β → γ → σ} {g : α → β} {h : α → γ} (hf : Primrec₂ f) (hg : Primrec g)
    (hh : Primrec h) : Primrec fun a => f (g a) (h a) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable γ] [Primcodable σ] {f : β → γ → σ} {g : α → β} {h : α → γ} (hf : Primrec₂ f) (hg : Primrec g) (hh : Primrec h)
Goal: Primrec fun a => f (g a) (h a)
-- Primrec₂.comp₂
theorem Primrec₂.comp₂ {f : γ → δ → σ} {g : α → β → γ} {h : α → β → δ} (hf : Primrec₂ f)
    (hg : Primrec₂ g) (hh : Primrec₂ h) : Primrec₂ fun a b => f (g a b) (h a b) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable γ] [Primcodable δ] [Primcodable σ] {f : γ → δ → σ} {g : α → β → γ} {h : α → β → δ} (hf : Primrec₂ f) (hg : Primrec₂ g) (hh : Primrec₂ h)
Goal: Primrec₂ fun a b => f (g a b) (h a b)
-- PrimrecPred.comp
theorem PrimrecPred.comp {p : β → Prop} [DecidablePred p] {f : α → β} :
    PrimrecPred p → Primrec f → PrimrecPred fun a => p (f a) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {p : β → Prop} [DecidablePred p] {f : α → β}
Goal: PrimrecPred p → Primrec f → PrimrecPred fun a => p (f a)
-- PrimrecRel.comp
theorem PrimrecRel.comp {R : β → γ → Prop} [∀ a b, Decidable (R a b)] {f : α → β} {g : α → γ} :
    PrimrecRel R → Primrec f → Primrec g → PrimrecPred fun a => R (f a) (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable γ] {R : β → γ → Prop} [(a : β) → (b : γ) → Decidable (R a b)] {f : α → β} {g : α → γ}
Goal: PrimrecRel R → Primrec f → Primrec g → PrimrecPred fun a => R (f a) (g a)
-- PrimrecRel.comp₂
theorem PrimrecRel.comp₂ {R : γ → δ → Prop} [∀ a b, Decidable (R a b)] {f : α → β → γ}
    {g : α → β → δ} :
    PrimrecRel R → Primrec₂ f → Primrec₂ g → PrimrecRel fun a b => R (f a b) (g a b) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable γ] [Primcodable δ] {R : γ → δ → Prop} [(a : γ) → (b : δ) → Decidable (R a b)] {f : α → β → γ} {g : α → β → δ}
Goal: PrimrecRel R → Primrec₂ f → Primrec₂ g → PrimrecRel fun a b => R (f a b) (g a b)
-- PrimrecPred.of_eq
theorem PrimrecPred.of_eq {α} [Primcodable α] {p q : α → Prop} [DecidablePred p] [DecidablePred q]
    (hp : PrimrecPred p) (H : ∀ a, p a ↔ q a) : PrimrecPred q 
Arguments: {α : Type u_1} [Primcodable α] {p q : α → Prop} [DecidablePred p] [DecidablePred q] (hp : PrimrecPred p) (H : ∀ (a : α), p a ↔ q a)
Goal: PrimrecPred q
-- PrimrecRel.of_eq
theorem PrimrecRel.of_eq {α β} [Primcodable α] [Primcodable β] {r s : α → β → Prop}
    [∀ a b, Decidable (r a b)] [∀ a b, Decidable (s a b)] (hr : PrimrecRel r)
    (H : ∀ a b, r a b ↔ s a b) : PrimrecRel s 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {r s : α → β → Prop} [(a : α) → (b : β) → Decidable (r a b)] [(a : α) → (b : β) → Decidable (s a b)] (hr : PrimrecRel r) (H : ∀ (a : α) (b : β), r a b ↔ s a b)
Goal: PrimrecRel s
-- Primrec₂.swap
theorem swap {f : α → β → σ} (h : Primrec₂ f) : Primrec₂ (swap f) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ} (h : Primrec₂ f)
Goal: Primrec₂ (Function.swap f)
-- Primrec₂.nat_iff
theorem nat_iff {f : α → β → σ} : Primrec₂ f ↔ Nat.Primrec
    (.unpaired fun m n => encode <| (@decode α _ m).bind fun a => (@decode β _ n).map (f a)) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: Primrec₂ f ↔
  Nat.Primrec
    (Nat.unpaired fun m n =>
      Encodable.encode ((Encodable.decode m).bind fun a => Option.map (f a) (Encodable.decode n)))
-- Primrec₂.nat_iff'
theorem nat_iff' {f : α → β → σ} :
    Primrec₂ f ↔
      Primrec₂ fun m n : ℕ => (@decode α _ m).bind fun a => Option.map (f a) (@decode β _ n) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: Primrec₂ f ↔ Primrec₂ fun m n => (Encodable.decode m).bind fun a => Option.map (f a) (Encodable.decode n)
-- Primrec.to₂
theorem to₂ {f : α × β → σ} (hf : Primrec f) : Primrec₂ fun a b => f (a, b) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α × β → σ} (hf : Primrec f)
Goal: Primrec₂ fun a b => f (a, b)
-- Primrec.nat_rec
theorem nat_rec {f : α → β} {g : α → ℕ × β → β} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a (n : ℕ) => n.rec (motive := fun _ => β) (f a) fun n IH => g a (n, IH) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : α → β} {g : α → ℕ × β → β} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec₂ fun a n => Nat.rec (f a) (fun n IH => g a (n, IH)) n
-- Primrec.nat_rec'
theorem nat_rec' {f : α → ℕ} {g : α → β} {h : α → ℕ × β → β}
    (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h) :
    Primrec fun a => (f a).rec (motive := fun _ => β) (g a) fun n IH => h a (n, IH) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : α → ℕ} {g : α → β} {h : α → ℕ × β → β} (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h)
Goal: Primrec fun a => Nat.rec (g a) (fun n IH => h a (n, IH)) (f a)
-- Primrec.nat_rec₁
theorem nat_rec₁ {f : ℕ → α → α} (a : α) (hf : Primrec₂ f) : Primrec (Nat.rec a f) 
Arguments: {α : Type u_1} [Primcodable α] {f : ℕ → α → α} (a : α) (hf : Primrec₂ f)
Goal: Primrec fun t => Nat.rec a f t