ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.not_mem_nil
@[simp] theorem not_mem_nil (a : α) : ¬ a ∈ [] 
Arguments: {α : Type u_1} (a : α)
Goal: ¬a ∈ []
-- List.mem_cons
@[simp] theorem mem_cons : a ∈ (b :: l) ↔ a = b ∨ a ∈ l 
Goal: ∀ {α : Type u_1} {a b : α} {l : List α}, a ∈ b :: l ↔ a = b ∨ a ∈ l
-- List.mem_cons_self
theorem mem_cons_self (a : α) (l : List α) : a ∈ a :: l 
Arguments: {α : Type u_1} (a : α) (l : List α)
Goal: a ∈ a :: l
-- List.mem_cons_of_mem
theorem mem_cons_of_mem (y : α) {a : α} {l : List α} : a ∈ l → a ∈ y :: l 
Arguments: {α : Type u_1} (y : α) {a : α} {l : List α}
Goal: a ∈ l → a ∈ y :: l
-- List.exists_mem_of_ne_nil
theorem exists_mem_of_ne_nil (l : List α) (h : l ≠ []) : ∃ x, x ∈ l 
Arguments: {α : Type u_1} (l : List α) (h : l ≠ [])
Goal: ∃ x, x ∈ l
-- List.eq_nil_iff_forall_not_mem
theorem eq_nil_iff_forall_not_mem {l : List α} : l = [] ↔ ∀ a, a ∉ l 
Arguments: {α : Type u_1} {l : List α}
Goal: l = [] ↔ ∀ (a : α), ¬a ∈ l
-- List.eq_of_mem_singleton
theorem eq_of_mem_singleton : a ∈ [b] → a = b
  
Goal: ∀ {α : Type u_1} {a b : α}, a ∈ [b] → a = b
-- List.mem_singleton
@[simp 1100] theorem mem_singleton {a b : α} : a ∈ [b] ↔ a = b 
Arguments: {α : Type u_1} {a b : α}
Goal: a ∈ [b] ↔ a = b
-- List.forall_mem_cons
theorem forall_mem_cons {p : α → Prop} {a : α} {l : List α} :
    (∀ x, x ∈ a :: l → p x) ↔ p a ∧ ∀ x, x ∈ l → p x 
Arguments: {α : Type u_1} {p : α → Prop} {a : α} {l : List α}
Goal: (∀ (x : α), x ∈ a :: l → p x) ↔ p a ∧ ∀ (x : α), x ∈ l → p x
-- List.exists_mem_nil
theorem exists_mem_nil (p : α → Prop) : ¬ (∃ x, ∃ _ : x ∈ @nil α, p x) 
Arguments: {α : Type u_1} (p : α → Prop)
Goal: ¬∃ x x_1, p x
-- List.forall_mem_nil
theorem forall_mem_nil (p : α → Prop) : ∀ (x) (_ : x ∈ @nil α), p x 
Arguments: {α : Type u_1} (p : α → Prop) (x : α)
Goal: x ∈ [] → p x
-- List.exists_mem_cons
theorem exists_mem_cons {p : α → Prop} {a : α} {l : List α} :
    (∃ x, ∃ _ : x ∈ a :: l, p x) ↔ p a ∨ ∃ x, ∃ _ : x ∈ l, p x 
Arguments: {α : Type u_1} {p : α → Prop} {a : α} {l : List α}
Goal: (∃ x x_1, p x) ↔ p a ∨ ∃ x x_1, p x
-- List.forall_mem_singleton
theorem forall_mem_singleton {p : α → Prop} {a : α} : (∀ (x) (_ : x ∈ [a]), p x) ↔ p a 
Arguments: {α : Type u_1} {p : α → Prop} {a : α}
Goal: (∀ (x : α), x ∈ [a] → p x) ↔ p a
-- List.mem_nil_iff
theorem mem_nil_iff (a : α) : a ∈ ([] : List α) ↔ False 
Arguments: {α : Type u_1} (a : α)
Goal: a ∈ [] ↔ False
-- List.mem_singleton_self
theorem mem_singleton_self (a : α) : a ∈ [a] 
Arguments: {α : Type u_1} (a : α)
Goal: a ∈ [a]
-- List.mem_of_mem_cons_of_mem
theorem mem_of_mem_cons_of_mem : ∀ {a b : α} {l : List α}, a ∈ b :: l → b ∈ l → a ∈ l
  
Arguments: {α : Type u_1} {a b : α} {l : List α}
Goal: a ∈ b :: l → b ∈ l → a ∈ l
-- List.eq_or_ne_mem_of_mem
theorem eq_or_ne_mem_of_mem {a b : α} {l : List α} (h' : a ∈ b :: l) : a = b ∨ (a ≠ b ∧ a ∈ l) 
Arguments: {α : Type u_1} {a b : α} {l : List α} (h' : a ∈ b :: l)
Goal: a = b ∨ a ≠ b ∧ a ∈ l
-- List.ne_nil_of_mem
theorem ne_nil_of_mem {a : α} {l : List α} (h : a ∈ l) : l ≠ [] 
Arguments: {α : Type u_1} {a : α} {l : List α} (h : a ∈ l)
Goal: l ≠ []
-- List.elem_iff
theorem elem_iff [BEq α] [LawfulBEq α] {a : α} {as : List α} :
    elem a as = true ↔ a ∈ as 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] {a : α} {as : List α}
Goal: List.elem a as = true ↔ a ∈ as
-- List.elem_eq_mem
@[simp] theorem elem_eq_mem [BEq α] [LawfulBEq α] (a : α) (as : List α) :
    elem a as = decide (a ∈ as) 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] (a : α) (as : List α)
Goal: List.elem a as = decide (a ∈ as)
-- List.mem_of_ne_of_mem
theorem mem_of_ne_of_mem {a y : α} {l : List α} (h₁ : a ≠ y) (h₂ : a ∈ y :: l) : a ∈ l 
Arguments: {α : Type u_1} {a y : α} {l : List α} (h₁ : a ≠ y) (h₂ : a ∈ y :: l)
Goal: a ∈ l
-- List.ne_of_not_mem_cons
theorem ne_of_not_mem_cons {a b : α} {l : List α} : a ∉ b::l → a ≠ b 
Arguments: {α : Type u_1} {a b : α} {l : List α}
Goal: ¬a ∈ b :: l → a ≠ b
-- List.not_mem_of_not_mem_cons
theorem not_mem_of_not_mem_cons {a b : α} {l : List α} : a ∉ b::l → a ∉ l 
Arguments: {α : Type u_1} {a b : α} {l : List α}
Goal: ¬a ∈ b :: l → ¬a ∈ l
-- List.not_mem_cons_of_ne_of_not_mem
theorem not_mem_cons_of_ne_of_not_mem {a y : α} {l : List α} : a ≠ y → a ∉ l → a ∉ y::l 
Arguments: {α : Type u_1} {a y : α} {l : List α}
Goal: a ≠ y → ¬a ∈ l → ¬a ∈ y :: l
-- List.ne_and_not_mem_of_not_mem_cons
theorem ne_and_not_mem_of_not_mem_cons {a y : α} {l : List α} : a ∉ y::l → a ≠ y ∧ a ∉ l 
Arguments: {α : Type u_1} {a y : α} {l : List α}
Goal: ¬a ∈ y :: l → a ≠ y ∧ ¬a ∈ l
-- List.getElem_of_mem
theorem getElem_of_mem : ∀ {a} {l : List α}, a ∈ l → ∃ (n : Nat) (h : n < l.length), l[n]'h = a
  
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: a ∈ l → ∃ n h, l[n] = a
-- List.get_of_mem
theorem get_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n, get l n = a 
Arguments: {α : Type u_1} {a : α} {l : List α} (h : a ∈ l)
Goal: ∃ n, l.get n = a
-- List.getElem_mem
theorem getElem_mem : ∀ (l : List α) n (h : n < l.length), l[n]'h ∈ l
  
Arguments: {α : Type u_1} (l : List α) (n : Nat) (h : n < l.length)
Goal: l[n] ∈ l
-- List.get_mem
theorem get_mem : ∀ (l : List α) n h, get l ⟨n, h⟩ ∈ l
  
Arguments: {α : Type u_1} (l : List α) (n : Nat) (h : n < l.length)
Goal: l.get ⟨n, h⟩ ∈ l
-- List.mem_iff_getElem
theorem mem_iff_getElem {a} {l : List α} : a ∈ l ↔ ∃ (n : Nat) (h : n < l.length), l[n]'h = a 
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: a ∈ l ↔ ∃ n h, l[n] = a
-- List.mem_iff_get
theorem mem_iff_get {a} {l : List α} : a ∈ l ↔ ∃ n, get l n = a 
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: a ∈ l ↔ ∃ n, l.get n = a
-- List.getElem?_of_mem
theorem getElem?_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n : Nat, l[n]? = some a 
Arguments: {α : Type u_1} {a : α} {l : List α} (h : a ∈ l)
Goal: ∃ n, l[n]? = some a
-- List.get?_of_mem
theorem get?_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n, l.get? n = some a 
Arguments: {α : Type u_1} {a : α} {l : List α} (h : a ∈ l)
Goal: ∃ n, l.get? n = some a
-- List.getElem?_mem
theorem getElem?_mem {l : List α} {n : Nat} {a : α} (e : l[n]? = some a) : a ∈ l 
Arguments: {α : Type u_1} {l : List α} {n : Nat} {a : α} (e : l[n]? = some a)
Goal: a ∈ l
-- List.get?_mem
theorem get?_mem {l : List α} {n a} (e : l.get? n = some a) : a ∈ l 
Arguments: {α : Type u_1} {l : List α} {n : Nat} {a : α} (e : l.get? n = some a)
Goal: a ∈ l
-- List.mem_iff_getElem?
theorem mem_iff_getElem? {a} {l : List α} : a ∈ l ↔ ∃ n : Nat, l[n]? = some a 
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: a ∈ l ↔ ∃ n, l[n]? = some a
-- List.mem_iff_get?
theorem mem_iff_get? {a} {l : List α} : a ∈ l ↔ ∃ n, l.get? n = some a 
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: a ∈ l ↔ ∃ n, l.get? n = some a
-- List.decide_mem_cons
@[simp] theorem decide_mem_cons [BEq α] [LawfulBEq α] {l : List α} :
    decide (y ∈ a :: l) = (y == a || decide (y ∈ l)) 
Arguments: {α : Type u_1} {y a : α} [BEq α] [LawfulBEq α] {l : List α}
Goal: decide (y ∈ a :: l) = (y == a || decide (y ∈ l))
-- List.any_eq
theorem any_eq {l : List α} : l.any p = decide (∃ x, x ∈ l ∧ p x) 
Arguments: {α : Type u_1} {p : α → Bool} {l : List α}
Goal: l.any p = decide (∃ x, x ∈ l ∧ p x = true)
-- List.all_eq
theorem all_eq {l : List α} : l.all p = decide (∀ x, x ∈ l →  p x) 
Arguments: {α : Type u_1} {p : α → Bool} {l : List α}
Goal: l.all p = decide (∀ (x : α), x ∈ l → p x = true)
-- List.any_eq_true
@[simp] theorem any_eq_true {l : List α} : l.any p ↔ ∃ x, x ∈ l ∧ p x 
Arguments: {α : Type u_1} {p : α → Bool} {l : List α}
Goal: l.any p = true ↔ ∃ x, x ∈ l ∧ p x = true
-- List.all_eq_true
@[simp] theorem all_eq_true {l : List α} : l.all p ↔ ∀ x, x ∈ l →  p x 
Arguments: {α : Type u_1} {p : α → Bool} {l : List α}
Goal: l.all p = true ↔ ∀ (x : α), x ∈ l → p x = true
-- List.set_nil
@[simp] theorem set_nil (n : Nat) (a : α) : [].set n a = [] 
Arguments: {α : Type u_1} (n : Nat) (a : α)
Goal: [].set n a = []
-- List.set_cons_zero
@[simp] theorem set_cons_zero (x : α) (xs : List α) (a : α) :
  (x :: xs).set 0 a = a :: xs 
Arguments: {α : Type u_1} (x : α) (xs : List α) (a : α)
Goal: (x :: xs).set 0 a = a :: xs
-- List.set_cons_succ
@[simp] theorem set_cons_succ (x : α) (xs : List α) (n : Nat) (a : α) :
  (x :: xs).set (n + 1) a = x :: xs.set n a 
Arguments: {α : Type u_1} (x : α) (xs : List α) (n : Nat) (a : α)
Goal: (x :: xs).set (n + 1) a = x :: xs.set n a
-- List.getElem_set_eq
@[simp] theorem getElem_set_eq {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length) :
    (l.set i a)[i] = a 
Arguments: {α : Type u_1} {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length)
Goal: (l.set i a)[i] = a
-- List.get_set_eq
@[deprecated getElem_set_eq (since := "2024-06-12")]
theorem get_set_eq {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length) :
    (l.set i a).get ⟨i, h⟩ = a 
Arguments: {α : Type u_1} {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length)
Goal: (l.set i a).get ⟨i, h⟩ = a
-- List.getElem?_set_eq
@[simp] theorem getElem?_set_eq {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length) :
    (l.set i a)[i]? = some a 
Arguments: {α : Type u_1} {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length)
Goal: (l.set i a)[i]? = some a
-- List.getElem_set_ne
@[simp] theorem getElem_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}
    (hj : j < (l.set i a).length) :
    (l.set i a)[j] = l[j]'(by simp at hj; exact hj) 
Arguments: {α : Type u_1} {l : List α} {i j : Nat} (h : i ≠ j) {a : α} (hj : j < (l.set i a).length)
Goal: (l.set i a)[j] = l[j]
-- List.get_set_ne
@[deprecated getElem_set_ne (since := "2024-06-12")]
theorem get_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}
    (hj : j < (l.set i a).length) :
    (l.set i a).get ⟨j, hj⟩ = l.get ⟨j, by simp at hj; exact hj⟩ 
Arguments: {α : Type u_1} {l : List α} {i j : Nat} (h : i ≠ j) {a : α} (hj : j < (l.set i a).length)
Goal: (l.set i a).get ⟨j, hj⟩ = l.get ⟨j, ⋯⟩
-- List.getElem?_set_ne
@[simp] theorem getElem?_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}  :
    (l.set i a)[j]? = l[j]? 
Arguments: {α : Type u_1} {l : List α} {i j : Nat} (h : i ≠ j) {a : α}
Goal: (l.set i a)[j]? = l[j]?
-- List.getElem_set
theorem getElem_set {l : List α} {m n} {a} (h) :
    (set l m a)[n]'h = if m = n then a else l[n]'(length_set .. ▸ h) 
Arguments: {α : Type u_1} {l : List α} {m n : Nat} {a : α} (h : n < (l.set m a).length)
Goal: (l.set m a)[n] = if m = n then a else l[n]
-- List.get_set
@[deprecated getElem_set (since := "2024-06-12")]
theorem get_set {l : List α} {m n} {a : α} (h) :
    (set l m a).get ⟨n, h⟩ = if m = n then a else l.get ⟨n, length_set .. ▸ h⟩ 
Arguments: {α : Type u_1} {l : List α} {m n : Nat} {a : α} (h : n < (l.set m a).length)
Goal: (l.set m a).get ⟨n, h⟩ = if m = n then a else l.get ⟨n, ⋯⟩
-- List.getElem?_set
theorem getElem?_set {l : List α} {i j : Nat} {a : α} :
    (l.set i a)[j]? = if i = j then if i < l.length then some a else none else l[j]? 
Arguments: {α : Type u_1} {l : List α} {i j : Nat} {a : α}
Goal: (l.set i a)[j]? = if i = j then if i < l.length then some a else none else l[j]?
-- List.set_eq_of_length_le
theorem set_eq_of_length_le {l : List α} {n : Nat} (h : l.length ≤ n) {a : α} :
    l.set n a = l 
Arguments: {α : Type u_1} {l : List α} {n : Nat} (h : l.length ≤ n) {a : α}
Goal: l.set n a = l
-- List.set_eq_nil
@[simp] theorem set_eq_nil (l : List α) (n : Nat) (a : α) : l.set n a = [] ↔ l = [] 
Arguments: {α : Type u_1} (l : List α) (n : Nat) (a : α)
Goal: l.set n a = [] ↔ l = []
-- List.set_comm
theorem set_comm (a b : α) : ∀ {n m : Nat} (l : List α), n ≠ m →
    (l.set n a).set m b = (l.set m b).set n a
  
Arguments: {α : Type u_1} (a b : α) {n m : Nat} (l : List α)
Goal: n ≠ m → (l.set n a).set m b = (l.set m b).set n a
-- List.set_set
@[simp]
theorem set_set (a b : α) : ∀ (l : List α) (n : Nat), (l.set n a).set n b = l.set n b
  
Arguments: {α : Type u_1} (a b : α) (l : List α) (n : Nat)
Goal: (l.set n a).set n b = l.set n b
-- List.mem_set
theorem mem_set (l : List α) (n : Nat) (h : n < l.length) (a : α) :
    a ∈ l.set n a 
Arguments: {α : Type u_1} (l : List α) (n : Nat) (h : n < l.length) (a : α)
Goal: a ∈ l.set n a
-- List.mem_or_eq_of_mem_set
theorem mem_or_eq_of_mem_set : ∀ {l : List α} {n : Nat} {a b : α}, a ∈ l.set n b → a ∈ l ∨ a = b
  
Arguments: {α : Type u_1} {l : List α} {n : Nat} {a b : α}
Goal: a ∈ l.set n b → a ∈ l ∨ a = b
-- List.lt_irrefl'
theorem lt_irrefl' [LT α] (lt_irrefl : ∀ x : α, ¬x < x) (l : List α) : ¬l < l 
Arguments: {α : Type u_1} [LT α] (lt_irrefl : ∀ (x : α), ¬x < x) (l : List α)
Goal: ¬l < l
-- List.lt_trans'
theorem lt_trans' [LT α] [DecidableRel (@LT.lt α _)]
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (le_trans : ∀ {x y z : α}, ¬x < y → ¬y < z → ¬x < z)
    {l₁ l₂ l₃ : List α} (h₁ : l₁ < l₂) (h₂ : l₂ < l₃) : l₁ < l₃ 
Arguments: {α : Type u_1} [LT α] [DecidableRel LT.lt] (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z) (le_trans : ∀ {x y z : α}, ¬x < y → ¬y < z → ¬x < z) {l₁ l₂ l₃ : List α} (h₁ : l₁ < l₂) (h₂ : l₂ < l₃)
Goal: l₁ < l₃
-- List.lt_antisymm'
theorem lt_antisymm' [LT α]
    (lt_antisymm : ∀ {x y : α}, ¬x < y → ¬y < x → x = y)
    {l₁ l₂ : List α} (h₁ : ¬l₁ < l₂) (h₂ : ¬l₂ < l₁) : l₁ = l₂ 
Arguments: {α : Type u_1} [LT α] (lt_antisymm : ∀ {x y : α}, ¬x < y → ¬y < x → x = y) {l₁ l₂ : List α} (h₁ : ¬l₁ < l₂) (h₂ : ¬l₂ < l₁)
Goal: l₁ = l₂
-- List.foldlM_reverse
@[simp] theorem foldlM_reverse [Monad m] (l : List α) (f : β → α → m β) (b) :
    l.reverse.foldlM f b = l.foldrM (fun x y => f y x) b 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] (l : List α) (f : β → α → m β) (b : β)
Goal: List.foldlM f b l.reverse = List.foldrM (fun x y => f y x) b l
-- List.foldlM_append
@[simp] theorem foldlM_append [Monad m] [LawfulMonad m] (f : β → α → m β) (b) (l l' : List α) :
    (l ++ l').foldlM f b = l.foldlM f b >>= l'.foldlM f 
Arguments: {m : Type u_1 → Type u_2} {β : Type u_1} {α : Type u_3} [Monad m] [LawfulMonad m] (f : β → α → m β) (b : β) (l l' : List α)
Goal: List.foldlM f b (l ++ l') = do
  let init ← List.foldlM f b l
  List.foldlM f init l'
-- List.foldrM_cons
@[simp] theorem foldrM_cons [Monad m] [LawfulMonad m] (a : α) (l) (f : α → β → m β) (b) :
    (a :: l).foldrM f b = l.foldrM f b >>= f a 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (a : α) (l : List α) (f : α → β → m β) (b : β)
Goal: List.foldrM f b (a :: l) = List.foldrM f b l >>= f a
-- List.foldl_eq_foldlM
theorem foldl_eq_foldlM (f : β → α → β) (b) (l : List α) :
    l.foldl f b = l.foldlM (m := Id) f b 
Arguments: {β : Type u_1} {α : Type u_2} (f : β → α → β) (b : β) (l : List α)
Goal: List.foldl f b l = List.foldlM f b l
-- List.foldr_eq_foldrM
theorem foldr_eq_foldrM (f : α → β → β) (b) (l : List α) :
    l.foldr f b = l.foldrM (m := Id) f b 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β → β) (b : β) (l : List α)
Goal: List.foldr f b l = List.foldrM f b l
-- List.foldrM_append
@[simp] theorem foldrM_append [Monad m] [LawfulMonad m] (f : α → β → m β) (b) (l l' : List α) :
    (l ++ l').foldrM f b = l'.foldrM f b >>= l.foldrM f 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (f : α → β → m β) (b : β) (l l' : List α)
Goal: List.foldrM f b (l ++ l') = do
  let init ← List.foldrM f b l'
  List.foldrM f init l
-- List.foldl_append
@[simp] theorem foldl_append {β : Type _} (f : β → α → β) (b) (l l' : List α) :
    (l ++ l').foldl f b = l'.foldl f (l.foldl f b) 
Arguments: {α : Type u_1} {β : Type u_2} (f : β → α → β) (b : β) (l l' : List α)
Goal: List.foldl f b (l ++ l') = List.foldl f (List.foldl f b l) l'
-- List.foldr_append
@[simp] theorem foldr_append (f : α → β → β) (b) (l l' : List α) :
    (l ++ l').foldr f b = l.foldr f (l'.foldr f b) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β → β) (b : β) (l l' : List α)
Goal: List.foldr f b (l ++ l') = List.foldr f (List.foldr f b l') l
-- List.foldr_self_append
@[simp] theorem foldr_self_append (l : List α) : l.foldr cons l' = l ++ l' 
Arguments: {α : Type u_1} {l' : List α} (l : List α)
Goal: List.foldr List.cons l' l = l ++ l'
-- List.foldr_self
theorem foldr_self (l : List α) : l.foldr cons [] = l 
Arguments: {α : Type u_1} (l : List α)
Goal: List.foldr List.cons [] l = l
-- List.foldl_map
theorem foldl_map (f : β₁ → β₂) (g : α → β₂ → α) (l : List β₁) (init : α) :
    (l.map f).foldl g init = l.foldl (fun x y => g x (f y)) init 
Arguments: {β₁ : Type u_1} {β₂ : Type u_2} {α : Type u_3} (f : β₁ → β₂) (g : α → β₂ → α) (l : List β₁) (init : α)
Goal: List.foldl g init (List.map f l) = List.foldl (fun x y => g x (f y)) init l
-- List.foldr_map
theorem foldr_map (f : α₁ → α₂) (g : α₂ → β → β) (l : List α₁) (init : β) :
    (l.map f).foldr g init = l.foldr (fun x y => g (f x) y) init 
Arguments: {α₁ : Type u_1} {α₂ : Type u_2} {β : Type u_3} (f : α₁ → α₂) (g : α₂ → β → β) (l : List α₁) (init : β)
Goal: List.foldr g init (List.map f l) = List.foldr (fun x y => g (f x) y) init l
-- List.foldl_map'
theorem foldl_map' {α β : Type u} (g : α → β) (f : α → α → α) (f' : β → β → β) (a : α) (l : List α)
    (h : ∀ x y, f' (g x) (g y) = g (f x y)) :
    (l.map g).foldl f' (g a) = g (l.foldl f a) 
Arguments: {α β : Type u} (g : α → β) (f : α → α → α) (f' : β → β → β) (a : α) (l : List α) (h : ∀ (x y : α), f' (g x) (g y) = g (f x y))
Goal: List.foldl f' (g a) (List.map g l) = g (List.foldl f a l)
-- List.foldr_map'
theorem foldr_map' {α β : Type u} (g : α → β) (f : α → α → α) (f' : β → β → β) (a : α) (l : List α)
    (h : ∀ x y, f' (g x) (g y) = g (f x y)) :
    (l.map g).foldr f' (g a) = g (l.foldr f a) 
Arguments: {α β : Type u} (g : α → β) (f : α → α → α) (f' : β → β → β) (a : α) (l : List α) (h : ∀ (x y : α), f' (g x) (g y) = g (f x y))
Goal: List.foldr f' (g a) (List.map g l) = g (List.foldr f a l)
-- List.getD_eq_getElem?
@[simp] theorem getD_eq_getElem? (l) (n) (a : α) : getD l n a = (l[n]?).getD a 
Arguments: {α : Type u_1} (l : List α) (n : Nat) (a : α)
Goal: l.getD n a = l[n]?.getD a
-- List.getD_eq_get?
@[deprecated getD_eq_getElem? (since := "2024-06-12")]
theorem getD_eq_get? : ∀ l n (a : α), getD l n a = (get? l n).getD a 
Arguments: {α : Type u_1} (l : List α) (n : Nat) (a : α)
Goal: l.getD n a = (l.get? n).getD a
-- List.getLast_eq_get
theorem getLast_eq_get : ∀ (l : List α) (h : l ≠ []),
    getLast l h = l.get ⟨l.length - 1, by
      match l with
      | [] => contradiction
      | a :: l => exact Nat.le_refl _⟩
  
Arguments: {α : Type u_1} (l : List α) (h : l ≠ [])
Goal: l.getLast h = l.get ⟨l.length - 1, ⋯⟩
-- List.getLast_cons'
theorem getLast_cons' {a : α} {l : List α} : ∀ (h₁ : a :: l ≠ nil) (h₂ : l ≠ nil),
  getLast (a :: l) h₁ = getLast l h₂ 
Arguments: {α : Type u_1} {a : α} {l : List α} (h₁ : a :: l ≠ []) (h₂ : l ≠ [])
Goal: (a :: l).getLast h₁ = l.getLast h₂
-- List.getLast_eq_getLastD
theorem getLast_eq_getLastD (a l h) : @getLast α (a::l) h = getLastD l a 
Arguments: {α : Type u_1} (a : α) (l : List α) (h : a :: l ≠ [])
Goal: (a :: l).getLast h = l.getLastD a
-- List.getLastD_eq_getLast?
theorem getLastD_eq_getLast? (a l) : @getLastD α l a = (getLast? l).getD a 
Arguments: {α : Type u_1} (a : α) (l : List α)
Goal: l.getLastD a = l.getLast?.getD a
-- List.getLast_singleton
@[simp] theorem getLast_singleton (a h) : @getLast α [a] h = a 
Arguments: {α : Type u_1} (a : α) (h : [a] ≠ [])
Goal: [a].getLast h = a
-- List.getLast!_cons
theorem getLast!_cons [Inhabited α] : @getLast! α _ (a::l) = getLastD l a 
Arguments: {α : Type u_1} {a : α} {l : List α} [Inhabited α]
Goal: (a :: l).getLast! = l.getLastD a
-- List.getLast_mem
theorem getLast_mem : ∀ {l : List α} (h : l ≠ []), getLast l h ∈ l
  
Arguments: {α : Type u_1} {l : List α} (h : l ≠ [])
Goal: l.getLast h ∈ l
-- List.getLastD_mem_cons
theorem getLastD_mem_cons : ∀ (l : List α) (a : α), getLastD l a ∈ a::l
  
Arguments: {α : Type u_1} (l : List α) (a : α)
Goal: l.getLastD a ∈ a :: l
-- List.getElem_cons_length
theorem getElem_cons_length (x : α) (xs : List α) (n : Nat) (h : n = xs.length) :
    (x :: xs)[n]'(by simp [h]) = (x :: xs).getLast (cons_ne_nil x xs) 
Arguments: {α : Type u_1} (x : α) (xs : List α) (n : Nat) (h : n = xs.length)
Goal: (x :: xs)[n] = (x :: xs).getLast ⋯
-- List.get_cons_length
@[deprecated getElem_cons_length (since := "2024-06-12")]
theorem get_cons_length (x : α) (xs : List α) (n : Nat) (h : n = xs.length) :
    (x :: xs).get ⟨n, by simp [h]⟩ = (x :: xs).getLast (cons_ne_nil x xs) 
Arguments: {α : Type u_1} (x : α) (xs : List α) (n : Nat) (h : n = xs.length)
Goal: (x :: xs).get ⟨n, ⋯⟩ = (x :: xs).getLast ⋯
-- List.getLast?_cons
theorem getLast?_cons : @getLast? α (a::l) = getLastD l a 
Arguments: {α : Type u_1} {a : α} {l : List α}
Goal: (a :: l).getLast? = some (l.getLastD a)
-- List.getLast?_singleton
@[simp] theorem getLast?_singleton (a : α) : getLast? [a] = a 
Arguments: {α : Type u_1} (a : α)
Goal: [a].getLast? = some a
-- List.getLast?_eq_getLast
theorem getLast?_eq_getLast : ∀ l h, @getLast? α l = some (getLast l h)
  
Arguments: {α : Type u_1} (l : List α) (h : l ≠ [])
Goal: l.getLast? = some (l.getLast h)
-- List.getLast?_eq_get?
theorem getLast?_eq_get? : ∀ (l : List α), getLast? l = l.get? (l.length - 1)
  
Arguments: {α : Type u_1} (l : List α)
Goal: l.getLast? = l.get? (l.length - 1)
-- List.getLast?_concat
@[simp] theorem getLast?_concat (l : List α) : getLast? (l ++ [a]) = some a 
Arguments: {α : Type u_1} {a : α} (l : List α)
Goal: (l ++ [a]).getLast? = some a
-- List.getLastD_concat
@[simp] theorem getLastD_concat (a b l) : @getLastD α (l ++ [b]) a = b 
Arguments: {α : Type u_1} (a b : α) (l : List α)
Goal: (l ++ [b]).getLastD a = b
-- List.head!_of_head?
theorem head!_of_head? [Inhabited α] : ∀ {l : List α}, head? l = some a → head! l = a
  
Arguments: {α : Type u_1} {a : α} [Inhabited α] {l : List α}
Goal: l.head? = some a → l.head! = a
-- List.head?_eq_head
theorem head?_eq_head : ∀ l h, @head? α l = some (head l h)
  
Arguments: {α : Type u_1} (l : List α) (h : l ≠ [])
Goal: l.head? = some (l.head h)
-- List.tailD_eq_tail?
@[simp] theorem tailD_eq_tail? (l l' : List α) : tailD l l' = (tail? l).getD l' 
Arguments: {α : Type u_1} (l l' : List α)
Goal: l.tailD l' = l.tail?.getD l'
-- List.map_id
@[simp] theorem map_id (l : List α) : map id l = l 
Arguments: {α : Type u_1} (l : List α)
Goal: List.map id l = l
-- List.map_id'
@[simp] theorem map_id' (l : List α) : map (fun a => a) l = l 
Arguments: {α : Type u_1} (l : List α)
Goal: List.map (fun a => a) l = l
-- List.map_id''
theorem map_id'' {f : α → α} (h : ∀ x, f x = x) (l : List α) : map f l = l 
Arguments: {α : Type u_1} {f : α → α} (h : ∀ (x : α), f x = x) (l : List α)
Goal: List.map f l = l
-- List.map_singleton
theorem map_singleton (f : α → β) (a : α) : map f [a] = [f a] 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (a : α)
Goal: List.map f [a] = [f a]
-- List.length_map
@[simp] theorem length_map (as : List α) (f : α → β) : (as.map f).length = as.length 
Arguments: {α : Type u_1} {β : Type u_2} (as : List α) (f : α → β)
Goal: (List.map f as).length = as.length
-- List.getElem?_map
@[simp] theorem getElem?_map (f : α → β) : ∀ (l : List α) (n : Nat), (map f l)[n]? = Option.map f l[n]?
  
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (l : List α) (n : Nat)
Goal: (List.map f l)[n]? = Option.map f l[n]?
-- List.get?_map
@[deprecated getElem?_map (since := "2024-06-12")]
theorem get?_map (f : α → β) : ∀ l n, (map f l).get? n = (l.get? n).map f
  
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (l : List α) (n : Nat)
Goal: (List.map f l).get? n = Option.map f (l.get? n)
-- List.getElem_map
@[simp] theorem getElem_map (f : α → β) {l} {n : Nat} {h : n < (map f l).length} :
    (map f l)[n] = f (l[n]'(length_map l f ▸ h)) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) {l : List α} {n : Nat} {h : n < (List.map f l).length}
Goal: (List.map f l)[n] = f l[n]
-- List.get_map
@[deprecated getElem_map (since := "2024-06-12")]
theorem get_map (f : α → β) {l n} :
    get (map f l) n = f (get l ⟨n, length_map l f ▸ n.2⟩) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) {l : List α} {n : Fin (List.map f l).length}
Goal: (List.map f l).get n = f (l.get ⟨↑n, ⋯⟩)
-- List.mem_map
@[simp] theorem mem_map {f : α → β} : ∀ {l : List α}, b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b
  
Arguments: {α : Type u_1} {β : Type u_2} {b : β} {f : α → β} {l : List α}
Goal: b ∈ List.map f l ↔ ∃ a, a ∈ l ∧ f a = b