ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Primrec.nat_casesOn'
theorem nat_casesOn' {f : α → β} {g : α → ℕ → β} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a (n : ℕ) => (n.casesOn (f a) (g a) : β) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : α → β} {g : α → ℕ → β} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec₂ fun a n => Nat.casesOn n (f a) (g a)
-- Primrec.nat_casesOn
theorem nat_casesOn {f : α → ℕ} {g : α → β} {h : α → ℕ → β} (hf : Primrec f) (hg : Primrec g)
    (hh : Primrec₂ h) : Primrec fun a => ((f a).casesOn (g a) (h a) : β) 
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.casesOn (f a) (g a) (h a)
-- Primrec.nat_casesOn₁
theorem nat_casesOn₁ {f : ℕ → α} (a : α) (hf : Primrec f) :
    Primrec (fun (n : ℕ) => (n.casesOn a f : α)) 
Arguments: {α : Type u_1} [Primcodable α] {f : ℕ → α} (a : α) (hf : Primrec f)
Goal: Primrec fun n => Nat.casesOn n a f
-- Primrec.nat_iterate
theorem nat_iterate {f : α → ℕ} {g : α → β} {h : α → β → β} (hf : Primrec f) (hg : Primrec g)
    (hh : Primrec₂ h) : Primrec fun a => (h a)^[f a] (g a) 
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 => (h a)^[f a] (g a)
-- Primrec.option_casesOn
theorem option_casesOn {o : α → Option β} {f : α → σ} {g : α → β → σ} (ho : Primrec o)
    (hf : Primrec f) (hg : Primrec₂ g) :
    @Primrec _ σ _ _ fun a => Option.casesOn (o a) (f a) (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {o : α → Option β} {f : α → σ} {g : α → β → σ} (ho : Primrec o) (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => Option.casesOn (o a) (f a) (g a)
-- Primrec.option_bind
theorem option_bind {f : α → Option β} {g : α → β → Option σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec fun a => (f a).bind (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → Option β} {g : α → β → Option σ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => (f a).bind (g a)
-- Primrec.option_bind₁
theorem option_bind₁ {f : α → Option σ} (hf : Primrec f) : Primrec fun o => Option.bind o f 
Arguments: {α : Type u_1} {σ : Type u_5} [Primcodable α] [Primcodable σ] {f : α → Option σ} (hf : Primrec f)
Goal: Primrec fun o => o.bind f
-- Primrec.option_map
theorem option_map {f : α → Option β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec fun a => (f a).map (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → Option β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => Option.map (g a) (f a)
-- Primrec.option_map₁
theorem option_map₁ {f : α → σ} (hf : Primrec f) : Primrec (Option.map f) 
Arguments: {α : Type u_1} {σ : Type u_5} [Primcodable α] [Primcodable σ] {f : α → σ} (hf : Primrec f)
Goal: Primrec (Option.map f)
-- Primrec.option_iget
theorem option_iget [Inhabited α] : Primrec (@Option.iget α _) 
Arguments: {α : Type u_1} [Primcodable α] [Inhabited α]
Goal: Primrec Option.iget
-- Primrec.option_isSome
theorem option_isSome : Primrec (@Option.isSome α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec Option.isSome
-- Primrec.option_getD
theorem option_getD : Primrec₂ (@Option.getD α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ Option.getD
-- Primrec.bind_decode_iff
theorem bind_decode_iff {f : α → β → Option σ} :
    (Primrec₂ fun a n => (@decode β _ n).bind (f a)) ↔ Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → Option σ}
Goal: (Primrec₂ fun a n => (Encodable.decode n).bind (f a)) ↔ Primrec₂ f
-- Primrec.map_decode_iff
theorem map_decode_iff {f : α → β → σ} :
    (Primrec₂ fun a n => (@decode β _ n).map (f a)) ↔ Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_5} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → β → σ}
Goal: (Primrec₂ fun a n => Option.map (f a) (Encodable.decode n)) ↔ Primrec₂ f
-- Primrec.nat_add
theorem nat_add : Primrec₂ ((· + ·) : ℕ → ℕ → ℕ) 
Goal: Primrec₂ fun x x_1 => x + x_1
-- Primrec.nat_sub
theorem nat_sub : Primrec₂ ((· - ·) : ℕ → ℕ → ℕ) 
Goal: Primrec₂ fun x x_1 => x - x_1
-- Primrec.nat_mul
theorem nat_mul : Primrec₂ ((· * ·) : ℕ → ℕ → ℕ) 
Goal: Primrec₂ fun x x_1 => x * x_1
-- Primrec.cond
theorem cond {c : α → Bool} {f : α → σ} {g : α → σ} (hc : Primrec c) (hf : Primrec f)
    (hg : Primrec g) : Primrec fun a => bif (c a) then (f a) else (g a) 
Arguments: {α : Type u_1} {σ : Type u_5} [Primcodable α] [Primcodable σ] {c : α → Bool} {f g : α → σ} (hc : Primrec c) (hf : Primrec f) (hg : Primrec g)
Goal: Primrec fun a => bif c a then f a else g a
-- Primrec.ite
theorem ite {c : α → Prop} [DecidablePred c] {f : α → σ} {g : α → σ} (hc : PrimrecPred c)
    (hf : Primrec f) (hg : Primrec g) : Primrec fun a => if c a then f a else g a 
Arguments: {α : Type u_1} {σ : Type u_5} [Primcodable α] [Primcodable σ] {c : α → Prop} [DecidablePred c] {f g : α → σ} (hc : PrimrecPred c) (hf : Primrec f) (hg : Primrec g)
Goal: Primrec fun a => if c a then f a else g a
-- Primrec.nat_le
theorem nat_le : PrimrecRel ((· ≤ ·) : ℕ → ℕ → Prop) 
Goal: PrimrecRel fun x x_1 => x ≤ x_1
-- Primrec.nat_min
theorem nat_min : Primrec₂ (@min ℕ _) 
Goal: Primrec₂ min
-- Primrec.nat_max
theorem nat_max : Primrec₂ (@max ℕ _) 
Goal: Primrec₂ max
-- Primrec.dom_bool
theorem dom_bool (f : Bool → α) : Primrec f 
Arguments: {α : Type u_1} [Primcodable α] (f : Bool → α)
Goal: Primrec f
-- Primrec.dom_bool₂
theorem dom_bool₂ (f : Bool → Bool → α) : Primrec₂ f 
Arguments: {α : Type u_1} [Primcodable α] (f : Bool → Bool → α)
Goal: Primrec₂ f
-- Primrec.not
protected theorem not : Primrec not 
Goal: Primrec not
-- Primrec.and
protected theorem and : Primrec₂ and 
Goal: Primrec₂ and
-- Primrec.or
protected theorem or : Primrec₂ or 
Goal: Primrec₂ or
-- PrimrecPred.not
theorem _root_.PrimrecPred.not {p : α → Prop} [DecidablePred p] (hp : PrimrecPred p) :
    PrimrecPred fun a => ¬p a 
Arguments: {α : Type u_1} [Primcodable α] {p : α → Prop} [DecidablePred p] (hp : PrimrecPred p)
Goal: PrimrecPred fun a => ¬p a
-- PrimrecPred.and
theorem _root_.PrimrecPred.and {p q : α → Prop} [DecidablePred p] [DecidablePred q]
    (hp : PrimrecPred p) (hq : PrimrecPred q) : PrimrecPred fun a => p a ∧ q a 
Arguments: {α : Type u_1} [Primcodable α] {p q : α → Prop} [DecidablePred p] [DecidablePred q] (hp : PrimrecPred p) (hq : PrimrecPred q)
Goal: PrimrecPred fun a => p a ∧ q a
-- PrimrecPred.or
theorem _root_.PrimrecPred.or {p q : α → Prop} [DecidablePred p] [DecidablePred q]
    (hp : PrimrecPred p) (hq : PrimrecPred q) : PrimrecPred fun a => p a ∨ q a 
Arguments: {α : Type u_1} [Primcodable α] {p q : α → Prop} [DecidablePred p] [DecidablePred q] (hp : PrimrecPred p) (hq : PrimrecPred q)
Goal: PrimrecPred fun a => p a ∨ q a
-- Primrec.beq
protected theorem beq [DecidableEq α] : Primrec₂ (@BEq.beq α _) 
Arguments: {α : Type u_1} [Primcodable α] [DecidableEq α]
Goal: Primrec₂ BEq.beq
-- Primrec.eq
protected theorem eq [DecidableEq α] : PrimrecRel (@Eq α) 
Arguments: {α : Type u_1} [Primcodable α] [DecidableEq α]
Goal: PrimrecRel Eq
-- Primrec.nat_lt
theorem nat_lt : PrimrecRel ((· < ·) : ℕ → ℕ → Prop) 
Goal: PrimrecRel fun x x_1 => x < x_1
-- Primrec.option_guard
theorem option_guard {p : α → β → Prop} [∀ a b, Decidable (p a b)] (hp : PrimrecRel p) {f : α → β}
    (hf : Primrec f) : Primrec fun a => Option.guard (p a) (f a) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {p : α → β → Prop} [(a : α) → (b : β) → Decidable (p a b)] (hp : PrimrecRel p) {f : α → β} (hf : Primrec f)
Goal: Primrec fun a => Option.guard (p a) (f a)
-- Primrec.option_orElse
theorem option_orElse : Primrec₂ ((· <|> ·) : Option α → Option α → Option α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ fun x x_1 => HOrElse.hOrElse x fun x => x_1
-- Primrec.decode₂
protected theorem decode₂ : Primrec (decode₂ α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec (Encodable.decode₂ α)
-- Primrec.list_findIdx₁
theorem list_findIdx₁ {p : α → β → Bool} (hp : Primrec₂ p) :
    ∀ l : List β, Primrec fun a => l.findIdx (p a)

Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {p : α → β → Bool} (hp : Primrec₂ p) (l : List β)
Goal: Primrec fun a => List.findIdx (p a) l
-- Primrec.list_indexOf₁
theorem list_indexOf₁ [DecidableEq α] (l : List α) : Primrec fun a => l.indexOf a 
Arguments: {α : Type u_1} [Primcodable α] [DecidableEq α] (l : List α)
Goal: Primrec fun a => List.indexOf a l
-- Primrec.dom_fintype
theorem dom_fintype [Finite α] (f : α → σ) : Primrec f 
Arguments: {α : Type u_1} {σ : Type u_5} [Primcodable α] [Primcodable σ] [Finite α] (f : α → σ)
Goal: Primrec f
-- Primrec.nat_findGreatest
theorem nat_findGreatest {f : α → ℕ} {p : α → ℕ → Prop} [∀ x n, Decidable (p x n)]
    (hf : Primrec f) (hp : PrimrecRel p) : Primrec fun x => (f x).findGreatest (p x) 
Arguments: {α : Type u_1} [Primcodable α] {f : α → ℕ} {p : α → ℕ → Prop} [(x : α) → (n : ℕ) → Decidable (p x n)] (hf : Primrec f) (hp : PrimrecRel p)
Goal: Primrec fun x => Nat.findGreatest (p x) (f x)
-- Primrec.of_graph
theorem of_graph {f : α → ℕ} (h₁ : PrimrecBounded f)
    (h₂ : PrimrecRel fun a b => f a = b) : Primrec f 
Arguments: {α : Type u_1} [Primcodable α] {f : α → ℕ} (h₁ : Primrec.PrimrecBounded f) (h₂ : PrimrecRel fun a b => f a = b)
Goal: Primrec f
-- Primrec.nat_div
theorem nat_div : Primrec₂ ((· / ·) : ℕ → ℕ → ℕ) 
Goal: Primrec₂ fun x x_1 => x / x_1
-- Primrec.nat_mod
theorem nat_mod : Primrec₂ ((· % ·) : ℕ → ℕ → ℕ) 
Goal: Primrec₂ fun x x_1 => x % x_1
-- Primrec.nat_bodd
theorem nat_bodd : Primrec Nat.bodd 
Goal: Primrec Nat.bodd
-- Primrec.nat_div2
theorem nat_div2 : Primrec Nat.div2 
Goal: Primrec Nat.div2
-- Primrec.nat_double
theorem nat_double : Primrec (fun n : ℕ => 2 * n) 
Goal: Primrec fun n => 2 * n
-- Primrec.nat_double_succ
theorem nat_double_succ : Primrec (fun n : ℕ => 2 * n + 1) 
Goal: Primrec fun n => 2 * n + 1
-- _private.Mathlib.Computability.Primrec.0.list_casesOn'
private theorem list_casesOn' {f : α → List β} {g : α → σ} {h : α → β × List β → σ}
    (hf : haveI := prim H; Primrec f) (hg : Primrec g) (hh : haveI := prim H; Primrec₂ h) :
    @Primrec _ σ _ _ fun a => List.casesOn (f a) (g a) fun b l => h a (b, l) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] (H : Nat.Primrec fun n => Encodable.encode (Encodable.decode n)) {f : α → List β} {g : α → σ} {h : α → β × List β → σ} (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h)
Goal: Primrec fun a => List.casesOn (f a) (g a) fun b l => h a (b, l)
-- _private.Mathlib.Computability.Primrec.0.list_foldl'
private theorem list_foldl' {f : α → List β} {g : α → σ} {h : α → σ × β → σ}
    (hf : haveI := prim H; Primrec f) (hg : Primrec g) (hh : haveI := prim H; Primrec₂ h) :
    Primrec fun a => (f a).foldl (fun s b => h a (s, b)) (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_3} [Primcodable α] [Primcodable β] [Primcodable σ] (H : Nat.Primrec fun n => Encodable.encode (Encodable.decode n)) {f : α → List β} {g : α → σ} {h : α → σ × β → σ} (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h)
Goal: Primrec fun a => List.foldl (fun s b => h a (s, b)) (g a) (f a)
-- _private.Mathlib.Computability.Primrec.0.list_cons'
private theorem list_cons' : (haveI := prim H; Primrec₂ (@List.cons β)) 
Arguments: {β : Type u_2} [Primcodable β] (H : Nat.Primrec fun n => Encodable.encode (Encodable.decode n))
Goal: Primrec₂ List.cons
-- _private.Mathlib.Computability.Primrec.0.list_reverse'
private theorem list_reverse' :
    haveI := prim H
    Primrec (@List.reverse β) 
Arguments: {β : Type u_2} [Primcodable β] (H : Nat.Primrec fun n => Encodable.encode (Encodable.decode n))
Goal: Primrec List.reverse
-- Primrec.sum_inl
theorem sum_inl : Primrec (@Sum.inl α β) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β]
Goal: Primrec Sum.inl
-- Primrec.sum_inr
theorem sum_inr : Primrec (@Sum.inr α β) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β]
Goal: Primrec Sum.inr
-- Primrec.sum_casesOn
theorem sum_casesOn {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ → σ} (hf : Primrec f)
    (hg : Primrec₂ g) (hh : Primrec₂ h) : @Primrec _ σ _ _ fun a => Sum.casesOn (f a) (g a) (h a) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable γ] [Primcodable σ] {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ → σ} (hf : Primrec f) (hg : Primrec₂ g) (hh : Primrec₂ h)
Goal: Primrec fun a => Sum.casesOn (f a) (g a) (h a)
-- Primrec.list_cons
theorem list_cons : Primrec₂ (@List.cons α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ List.cons
-- Primrec.list_casesOn
theorem list_casesOn {f : α → List β} {g : α → σ} {h : α → β × List β → σ} :
    Primrec f →
      Primrec g →
        Primrec₂ h → @Primrec _ σ _ _ fun a => List.casesOn (f a) (g a) fun b l => h a (b, l) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → σ} {h : α → β × List β → σ}
Goal: Primrec f → Primrec g → Primrec₂ h → Primrec fun a => List.casesOn (f a) (g a) fun b l => h a (b, l)
-- Primrec.list_foldl
theorem list_foldl {f : α → List β} {g : α → σ} {h : α → σ × β → σ} :
    Primrec f →
      Primrec g → Primrec₂ h → Primrec fun a => (f a).foldl (fun s b => h a (s, b)) (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → σ} {h : α → σ × β → σ}
Goal: Primrec f → Primrec g → Primrec₂ h → Primrec fun a => List.foldl (fun s b => h a (s, b)) (g a) (f a)
-- Primrec.list_reverse
theorem list_reverse : Primrec (@List.reverse α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec List.reverse
-- Primrec.list_foldr
theorem list_foldr {f : α → List β} {g : α → σ} {h : α → β × σ → σ} (hf : Primrec f)
    (hg : Primrec g) (hh : Primrec₂ h) :
    Primrec fun a => (f a).foldr (fun b s => h a (b, s)) (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → σ} {h : α → β × σ → σ} (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h)
Goal: Primrec fun a => List.foldr (fun b s => h a (b, s)) (g a) (f a)
-- Primrec.list_head?
theorem list_head? : Primrec (@List.head? α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec List.head?
-- Primrec.list_headI
theorem list_headI [Inhabited α] : Primrec (@List.headI α _) 
Arguments: {α : Type u_1} [Primcodable α] [Inhabited α]
Goal: Primrec List.headI
-- Primrec.list_tail
theorem list_tail : Primrec (@List.tail α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec List.tail
-- Primrec.list_rec
theorem list_rec {f : α → List β} {g : α → σ} {h : α → β × List β × σ → σ} (hf : Primrec f)
    (hg : Primrec g) (hh : Primrec₂ h) :
    @Primrec _ σ _ _ fun a => List.recOn (f a) (g a) fun b l IH => h a (b, l, IH) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → σ} {h : α → β × List β × σ → σ} (hf : Primrec f) (hg : Primrec g) (hh : Primrec₂ h)
Goal: Primrec fun a => List.recOn (f a) (g a) fun b l IH => h a (b, l, IH)
-- Primrec.list_get?
theorem list_get? : Primrec₂ (@List.get? α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ List.get?
-- Primrec.list_getD
theorem list_getD (d : α) : Primrec₂ fun l n => List.getD l n d 
Arguments: {α : Type u_1} [Primcodable α] (d : α)
Goal: Primrec₂ fun l n => l.getD n d
-- Primrec.list_getI
theorem list_getI [Inhabited α] : Primrec₂ (@List.getI α _) 
Arguments: {α : Type u_1} [Primcodable α] [Inhabited α]
Goal: Primrec₂ List.getI
-- Primrec.list_append
theorem list_append : Primrec₂ ((· ++ ·) : List α → List α → List α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ fun x x_1 => x ++ x_1
-- Primrec.list_concat
theorem list_concat : Primrec₂ fun l (a : α) => l ++ [a] 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec₂ fun l a => l ++ [a]
-- Primrec.list_map
theorem list_map {f : α → List β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec fun a => (f a).map (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => List.map (g a) (f a)
-- Primrec.list_range
theorem list_range : Primrec List.range 
Goal: Primrec List.range
-- Primrec.list_join
theorem list_join : Primrec (@List.join α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec List.join
-- Primrec.list_bind
theorem list_bind {f : α → List β} {g : α → β → List σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec (fun a => (f a).bind (g a)) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → β → List σ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => (f a).bind (g a)
-- Primrec.optionToList
theorem optionToList : Primrec (Option.toList : Option α → List α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec Option.toList
-- Primrec.listFilterMap
theorem listFilterMap {f : α → List β} {g : α → β → Option σ}
    (hf : Primrec f) (hg : Primrec₂ g) : Primrec fun a => (f a).filterMap (g a) 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] {f : α → List β} {g : α → β → Option σ} (hf : Primrec f) (hg : Primrec₂ g)
Goal: Primrec fun a => List.filterMap (g a) (f a)
-- Primrec.list_length
theorem list_length : Primrec (@List.length α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec List.length
-- Primrec.list_findIdx
theorem list_findIdx {f : α → List β} {p : α → β → Bool}
    (hf : Primrec f) (hp : Primrec₂ p) : Primrec fun a => (f a).findIdx (p a) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : α → List β} {p : α → β → Bool} (hf : Primrec f) (hp : Primrec₂ p)
Goal: Primrec fun a => List.findIdx (p a) (f a)
-- Primrec.list_indexOf
theorem list_indexOf [DecidableEq α] : Primrec₂ (@List.indexOf α _) 
Arguments: {α : Type u_1} [Primcodable α] [DecidableEq α]
Goal: Primrec₂ List.indexOf
-- Primrec.nat_strong_rec
theorem nat_strong_rec (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Primrec₂ g)
    (H : ∀ a n, g a ((List.range n).map (f a)) = some (f a n)) : Primrec₂ f 
Arguments: {α : Type u_1} {σ : Type u_4} [Primcodable α] [Primcodable σ] (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Primrec₂ g) (H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n))
Goal: Primrec₂ f
-- Primrec.listLookup
theorem listLookup [DecidableEq α] : Primrec₂ (List.lookup : α → List (α × β) → Option β) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] [DecidableEq α]
Goal: Primrec₂ List.lookup
-- Primrec.nat_omega_rec'
theorem nat_omega_rec' (f : β → σ) {m : β → ℕ} {l : β → List β} {g : β → List σ → Option σ}
    (hm : Primrec m) (hl : Primrec l) (hg : Primrec₂ g)
    (Ord : ∀ b, ∀ b' ∈ l b, m b' < m b)
    (H : ∀ b, g b ((l b).map f) = some (f b)) : Primrec f 
Arguments: {β : Type u_2} {σ : Type u_4} [Primcodable β] [Primcodable σ] (f : β → σ) {m : β → ℕ} {l : β → List β} {g : β → List σ → Option σ} (hm : Primrec m) (hl : Primrec l) (hg : Primrec₂ g) (Ord : ∀ (b b' : β), b' ∈ l b → m b' < m b) (H : ∀ (b : β), g b (List.map f (l b)) = some (f b))
Goal: Primrec f
-- Primrec.nat_omega_rec
theorem nat_omega_rec (f : α → β → σ) {m : α → β → ℕ}
    {l : α → β → List β} {g : α → β × List σ → Option σ}
    (hm : Primrec₂ m) (hl : Primrec₂ l) (hg : Primrec₂ g)
    (Ord : ∀ a b, ∀ b' ∈ l a b, m a b' < m a b)
    (H : ∀ a b, g a (b, (l a b).map (f a)) = some (f a b)) : Primrec₂ f 
Arguments: {α : Type u_1} {β : Type u_2} {σ : Type u_4} [Primcodable α] [Primcodable β] [Primcodable σ] (f : α → β → σ) {m : α → β → ℕ} {l : α → β → List β} {g : α → β × List σ → Option σ} (hm : Primrec₂ m) (hl : Primrec₂ l) (hg : Primrec₂ g) (Ord : ∀ (a : α) (b b' : β), b' ∈ l a b → m a b' < m a b) (H : ∀ (a : α) (b : β), g a (b, List.map (f a) (l a b)) = some (f a b))
Goal: Primrec₂ f
-- Primcodable.mem_range_encode
theorem mem_range_encode : PrimrecPred (fun n => n ∈ Set.range (encode : α → ℕ)) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: PrimrecPred fun n => n ∈ Set.range Encodable.encode
-- Primrec.subtype_val
theorem subtype_val {p : α → Prop} [DecidablePred p] {hp : PrimrecPred p} :
    haveI := Primcodable.subtype hp
    Primrec (@Subtype.val α p) 
Arguments: {α : Type u_1} [Primcodable α] {p : α → Prop} [DecidablePred p] {hp : PrimrecPred p}
Goal: Primrec Subtype.val
-- Primrec.subtype_val_iff
theorem subtype_val_iff {p : β → Prop} [DecidablePred p] {hp : PrimrecPred p} {f : α → Subtype p} :
    haveI := Primcodable.subtype hp
    (Primrec fun a => (f a).1) ↔ Primrec f 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {p : β → Prop} [DecidablePred p] {hp : PrimrecPred p} {f : α → Subtype p}
Goal: (Primrec fun a => ↑(f a)) ↔ Primrec f
-- Primrec.subtype_mk
theorem subtype_mk {p : β → Prop} [DecidablePred p] {hp : PrimrecPred p} {f : α → β}
    {h : ∀ a, p (f a)} (hf : Primrec f) :
    haveI := Primcodable.subtype hp
    Primrec fun a => @Subtype.mk β p (f a) (h a) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {p : β → Prop} [DecidablePred p] {hp : PrimrecPred p} {f : α → β} {h : ∀ (a : α), p (f a)} (hf : Primrec f)
Goal: Primrec fun a => ⟨f a, ⋯⟩
-- Primrec.option_get
theorem option_get {f : α → Option β} {h : ∀ a, (f a).isSome} :
    Primrec f → Primrec fun a => (f a).get (h a) 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {f : α → Option β} {h : ∀ (a : α), (f a).isSome = true}
Goal: Primrec f → Primrec fun a => (f a).get ⋯
-- Primrec.ulower_down
theorem ulower_down : Primrec (ULower.down : α → ULower α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec ULower.down
-- Primrec.ulower_up
theorem ulower_up : Primrec (ULower.up : ULower α → α) 
Arguments: {α : Type u_1} [Primcodable α]
Goal: Primrec ULower.up
-- Primrec.fin_val_iff
theorem fin_val_iff {n} {f : α → Fin n} : (Primrec fun a => (f a).1) ↔ Primrec f 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ} {f : α → Fin n}
Goal: (Primrec fun a => ↑(f a)) ↔ Primrec f
-- Primrec.fin_val
theorem fin_val {n} : Primrec (fun (i : Fin n) => (i : ℕ)) 
Arguments: {n : ℕ}
Goal: Primrec fun i => ↑i
-- Primrec.fin_succ
theorem fin_succ {n} : Primrec (@Fin.succ n) 
Arguments: {n : ℕ}
Goal: Primrec Fin.succ
-- Primrec.vector_toList
theorem vector_toList {n} : Primrec (@Vector.toList α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec Mathlib.Vector.toList
-- Primrec.vector_toList_iff
theorem vector_toList_iff {n} {f : α → Vector β n} : (Primrec fun a => (f a).toList) ↔ Primrec f 
Arguments: {α : Type u_1} {β : Type u_2} [Primcodable α] [Primcodable β] {n : ℕ} {f : α → Mathlib.Vector β n}
Goal: (Primrec fun a => (f a).toList) ↔ Primrec f
-- Primrec.vector_cons
theorem vector_cons {n} : Primrec₂ (@Vector.cons α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec₂ Mathlib.Vector.cons
-- Primrec.vector_length
theorem vector_length {n} : Primrec (@Vector.length α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec Mathlib.Vector.length
-- Primrec.vector_head
theorem vector_head {n} : Primrec (@Vector.head α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec Mathlib.Vector.head
-- Primrec.vector_tail
theorem vector_tail {n} : Primrec (@Vector.tail α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec Mathlib.Vector.tail
-- Primrec.vector_get
theorem vector_get {n} : Primrec₂ (@Vector.get α n) 
Arguments: {α : Type u_1} [Primcodable α] {n : ℕ}
Goal: Primrec₂ Mathlib.Vector.get