ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.append_right_injective
theorem append_right_injective (s : List α) : Injective fun t ↦ s ++ t 
Arguments: {α : Type u} (s : List α)
Goal: Function.Injective fun t => s ++ t
-- List.append_left_injective
theorem append_left_injective (t : List α) : Injective fun s ↦ s ++ t 
Arguments: {α : Type u} (t : List α)
Goal: Function.Injective fun s => s ++ t
-- List.eq_replicate_length
theorem eq_replicate_length {a : α} : ∀ {l : List α}, l = replicate l.length a ↔ ∀ b ∈ l, b = a
  
Arguments: {α : Type u} {a : α} {l : List α}
Goal: l = List.replicate l.length a ↔ ∀ (b : α), b ∈ l → b = a
-- List.replicate_add
theorem replicate_add (m n) (a : α) : replicate (m + n) a = replicate m a ++ replicate n a 
Arguments: {α : Type u} (m n : ℕ) (a : α)
Goal: List.replicate (m + n) a = List.replicate m a ++ List.replicate n a
-- List.replicate_succ'
theorem replicate_succ' (n) (a : α) : replicate (n + 1) a = replicate n a ++ [a] 
Arguments: {α : Type u} (n : ℕ) (a : α)
Goal: List.replicate (n + 1) a = List.replicate n a ++ [a]
-- List.replicate_subset_singleton
theorem replicate_subset_singleton (n) (a : α) : replicate n a ⊆ [a] 
Arguments: {α : Type u} (n : ℕ) (a : α)
Goal: List.replicate n a ⊆ [a]
-- List.subset_singleton_iff
theorem subset_singleton_iff {a : α} {L : List α} : L ⊆ [a] ↔ ∃ n, L = replicate n a 
Arguments: {α : Type u} {a : α} {L : List α}
Goal: L ⊆ [a] ↔ ∃ n, L = List.replicate n a
-- List.tail_replicate
@[simp] theorem tail_replicate (a : α) (n) :
    tail (replicate n a) = replicate (n - 1) a 
Arguments: {α : Type u} (a : α) (n : ℕ)
Goal: (List.replicate n a).tail = List.replicate (n - 1) a
-- List.replicate_right_injective
theorem replicate_right_injective {n : ℕ} (hn : n ≠ 0) : Injective (@replicate α n) 
Arguments: {α : Type u} {n : ℕ} (hn : n ≠ 0)
Goal: Function.Injective (List.replicate n)
-- List.replicate_right_inj
theorem replicate_right_inj {a b : α} {n : ℕ} (hn : n ≠ 0) :
    replicate n a = replicate n b ↔ a = b 
Arguments: {α : Type u} {a b : α} {n : ℕ} (hn : n ≠ 0)
Goal: List.replicate n a = List.replicate n b ↔ a = b
-- List.replicate_right_inj'
theorem replicate_right_inj' {a b : α} : ∀ {n},
    replicate n a = replicate n b ↔ n = 0 ∨ a = b
  
Arguments: {α : Type u} {a b : α} {n : ℕ}
Goal: List.replicate n a = List.replicate n b ↔ n = 0 ∨ a = b
-- List.replicate_left_injective
theorem replicate_left_injective (a : α) : Injective (replicate · a) 
Arguments: {α : Type u} (a : α)
Goal: Function.Injective fun x => List.replicate x a
-- List.replicate_left_inj
theorem replicate_left_inj {a : α} {n m : ℕ} : replicate n a = replicate m a ↔ n = m 
Arguments: {α : Type u} {a : α} {n m : ℕ}
Goal: List.replicate n a = List.replicate m a ↔ n = m
-- List.head_replicate
@[simp] theorem head_replicate (n : ℕ) (a : α) (h) : head (replicate n a) h = a 
Arguments: {α : Type u} (n : ℕ) (a : α) (h : List.replicate n a ≠ [])
Goal: (List.replicate n a).head h = a
-- List.mem_pure
theorem mem_pure (x y : α) : x ∈ (pure y : List α) ↔ x = y 
Arguments: {α : Type u} (x y : α)
Goal: x ∈ pure y ↔ x = y
-- List.bind_eq_bind
@[simp]
theorem bind_eq_bind {α β} (f : α → List β) (l : List α) : l >>= f = l.bind f 
Arguments: {α β : Type u_2} (f : α → List β) (l : List α)
Goal: l >>= f = l.bind f
-- List.reverse_cons'
theorem reverse_cons' (a : α) (l : List α) : reverse (a :: l) = concat (reverse l) a 
Arguments: {α : Type u} (a : α) (l : List α)
Goal: (a :: l).reverse = l.reverse.concat a
-- List.reverse_concat'
theorem reverse_concat' (l : List α) (a : α) : (l ++ [a]).reverse = a :: l.reverse 
Arguments: {α : Type u} (l : List α) (a : α)
Goal: (l ++ [a]).reverse = a :: l.reverse
-- List.reverse_singleton
theorem reverse_singleton (a : α) : reverse [a] = [a] 
Arguments: {α : Type u} (a : α)
Goal: [a].reverse = [a]
-- List.reverse_involutive
@[simp]
theorem reverse_involutive : Involutive (@reverse α) 
Arguments: {α : Type u}
Goal: Function.Involutive List.reverse
-- List.reverse_injective
@[simp]
theorem reverse_injective : Injective (@reverse α) 
Arguments: {α : Type u}
Goal: Function.Injective List.reverse
-- List.reverse_surjective
theorem reverse_surjective : Surjective (@reverse α) 
Arguments: {α : Type u}
Goal: Function.Surjective List.reverse
-- List.reverse_bijective
theorem reverse_bijective : Bijective (@reverse α) 
Arguments: {α : Type u}
Goal: Function.Bijective List.reverse
-- List.reverse_inj
@[simp]
theorem reverse_inj {l₁ l₂ : List α} : reverse l₁ = reverse l₂ ↔ l₁ = l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α}
Goal: l₁.reverse = l₂.reverse ↔ l₁ = l₂
-- List.reverse_eq_iff
theorem reverse_eq_iff {l l' : List α} : l.reverse = l' ↔ l = l'.reverse 
Arguments: {α : Type u} {l l' : List α}
Goal: l.reverse = l' ↔ l = l'.reverse
-- List.concat_eq_reverse_cons
theorem concat_eq_reverse_cons (a : α) (l : List α) : concat l a = reverse (a :: reverse l) 
Arguments: {α : Type u} (a : α) (l : List α)
Goal: l.concat a = (a :: l.reverse).reverse
-- List.map_reverseAux
theorem map_reverseAux (f : α → β) (l₁ l₂ : List α) :
    map f (reverseAux l₁ l₂) = reverseAux (map f l₁) (map f l₂) 
Arguments: {α : Type u} {β : Type v} (f : α → β) (l₁ l₂ : List α)
Goal: List.map f (l₁.reverseAux l₂) = (List.map f l₁).reverseAux (List.map f l₂)
-- List.isEmpty_iff_eq_nil
theorem isEmpty_iff_eq_nil {l : List α} : l.isEmpty ↔ l = [] 
Arguments: {α : Type u} {l : List α}
Goal: l.isEmpty = true ↔ l = []
-- List.getLast_cons
@[simp]
theorem getLast_cons {a : α} {l : List α} :
    ∀ h : l ≠ nil, getLast (a :: l) (cons_ne_nil a l) = getLast l h 
Arguments: {α : Type u} {a : α} {l : List α} (h : l ≠ [])
Goal: (a :: l).getLast ⋯ = l.getLast h
-- List.getLast_append_singleton
theorem getLast_append_singleton {a : α} (l : List α) :
    getLast (l ++ [a]) (append_ne_nil_of_ne_nil_right l _ (cons_ne_nil a _)) = a 
Arguments: {α : Type u} {a : α} (l : List α)
Goal: (l ++ [a]).getLast ⋯ = a
-- List.getLast_append'
theorem getLast_append' (l₁ l₂ : List α) (h : l₂ ≠ []) :
    getLast (l₁ ++ l₂) (append_ne_nil_of_ne_nil_right l₁ l₂ h) = getLast l₂ h 
Arguments: {α : Type u} (l₁ l₂ : List α) (h : l₂ ≠ [])
Goal: (l₁ ++ l₂).getLast ⋯ = l₂.getLast h
-- List.getLast_concat'
theorem getLast_concat' {a : α} (l : List α) : getLast (concat l a) (concat_ne_nil a l) = a 
Arguments: {α : Type u} {a : α} (l : List α)
Goal: (l.concat a).getLast ⋯ = a
-- List.getLast_singleton'
@[simp]
theorem getLast_singleton' (a : α) : getLast [a] (cons_ne_nil a []) = a 
Arguments: {α : Type u} (a : α)
Goal: [a].getLast ⋯ = a
-- List.getLast_cons_cons
theorem getLast_cons_cons (a₁ a₂ : α) (l : List α) :
    getLast (a₁ :: a₂ :: l) (cons_ne_nil _ _) = getLast (a₂ :: l) (cons_ne_nil a₂ l) 
Arguments: {α : Type u} (a₁ a₂ : α) (l : List α)
Goal: (a₁ :: a₂ :: l).getLast ⋯ = (a₂ :: l).getLast ⋯
-- List.dropLast_append_getLast
theorem dropLast_append_getLast : ∀ {l : List α} (h : l ≠ []), dropLast l ++ [getLast l h] = l
  
Arguments: {α : Type u} {l : List α} (h : l ≠ [])
Goal: l.dropLast ++ [l.getLast h] = l
-- List.getLast_congr
theorem getLast_congr {l₁ l₂ : List α} (h₁ : l₁ ≠ []) (h₂ : l₂ ≠ []) (h₃ : l₁ = l₂) :
    getLast l₁ h₁ = getLast l₂ h₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} (h₁ : l₁ ≠ []) (h₂ : l₂ ≠ []) (h₃ : l₁ = l₂)
Goal: l₁.getLast h₁ = l₂.getLast h₂
-- List.getLast_replicate_succ
theorem getLast_replicate_succ (m : ℕ) (a : α) :
    (replicate (m + 1) a).getLast (ne_nil_of_length_eq_add_one (length_replicate _ _)) = a 
Arguments: {α : Type u} (m : ℕ) (a : α)
Goal: (List.replicate (m + 1) a).getLast ⋯ = a
-- List.getLast_filter
lemma getLast_filter {p : α → Bool} :
    ∀ (l : List α) (hlp : l.filter p ≠ []), p (l.getLast (hlp <| ·.symm ▸ rfl)) = true →
      (l.filter p).getLast hlp = l.getLast (hlp <| ·.symm ▸ rfl)
  
Arguments: {α : Type u} {p : α → Bool} (l : List α) (hlp : List.filter p l ≠ [])
Goal: p (l.getLast ⋯) = true → (List.filter p l).getLast hlp = l.getLast ⋯
-- List.getLast?_cons_cons
@[simp]
theorem getLast?_cons_cons (a b : α) (l : List α) :
    getLast? (a :: b :: l) = getLast? (b :: l) 
Arguments: {α : Type u} (a b : α) (l : List α)
Goal: (a :: b :: l).getLast? = (b :: l).getLast?
-- List.getLast?_eq_none
@[simp]
theorem getLast?_eq_none : ∀ {l : List α}, getLast? l = none ↔ l = []
  
Arguments: {α : Type u} {l : List α}
Goal: l.getLast? = none ↔ l = []
-- List.getLast?_isSome
@[simp]
theorem getLast?_isSome : ∀ {l : List α}, l.getLast?.isSome ↔ l ≠ []
  
Arguments: {α : Type u} {l : List α}
Goal: l.getLast?.isSome = true ↔ l ≠ []
-- List.mem_getLast?_eq_getLast
theorem mem_getLast?_eq_getLast : ∀ {l : List α} {x : α}, x ∈ l.getLast? → ∃ h, x = getLast l h
  
Arguments: {α : Type u} {l : List α} {x : α}
Goal: x ∈ l.getLast? → ∃ h, x = l.getLast h
-- List.getLast?_eq_getLast_of_ne_nil
theorem getLast?_eq_getLast_of_ne_nil : ∀ {l : List α} (h : l ≠ []), l.getLast? = some (l.getLast h)
  
Arguments: {α : Type u} {l : List α} (h : l ≠ [])
Goal: l.getLast? = some (l.getLast h)
-- List.mem_getLast?_cons
theorem mem_getLast?_cons {x y : α} : ∀ {l : List α}, x ∈ l.getLast? → x ∈ (y :: l).getLast?
  
Arguments: {α : Type u} {x y : α} {l : List α}
Goal: x ∈ l.getLast? → x ∈ (y :: l).getLast?
-- List.mem_of_mem_getLast?
theorem mem_of_mem_getLast? {l : List α} {a : α} (ha : a ∈ l.getLast?) : a ∈ l 
Arguments: {α : Type u} {l : List α} {a : α} (ha : a ∈ l.getLast?)
Goal: a ∈ l
-- List.dropLast_append_getLast?
theorem dropLast_append_getLast? : ∀ {l : List α}, ∀ a ∈ l.getLast?, dropLast l ++ [a] = l
  
Arguments: {α : Type u} {l : List α} (a : α)
Goal: a ∈ l.getLast? → l.dropLast ++ [a] = l
-- List.getLastI_eq_getLast?
theorem getLastI_eq_getLast? [Inhabited α] : ∀ l : List α, l.getLastI = l.getLast?.iget
  
Arguments: {α : Type u} [Inhabited α] (l : List α)
Goal: l.getLastI = l.getLast?.iget
-- List.getLast?_append_cons
@[simp]
theorem getLast?_append_cons :
    ∀ (l₁ : List α) (a : α) (l₂ : List α), getLast? (l₁ ++ a :: l₂) = getLast? (a :: l₂)
  
Arguments: {α : Type u} (l₁ : List α) (a : α) (l₂ : List α)
Goal: (l₁ ++ a :: l₂).getLast? = (a :: l₂).getLast?
-- List.getLast?_append_of_ne_nil
theorem getLast?_append_of_ne_nil (l₁ : List α) :
    ∀ {l₂ : List α} (_ : l₂ ≠ []), getLast? (l₁ ++ l₂) = getLast? l₂
  
Arguments: {α : Type u} (l₁ : List α) {l₂ : List α}
Goal: l₂ ≠ [] → (l₁ ++ l₂).getLast? = l₂.getLast?
-- List.getLast?_append
theorem getLast?_append {l₁ l₂ : List α} {x : α} (h : x ∈ l₂.getLast?) :
    x ∈ (l₁ ++ l₂).getLast? 
Arguments: {α : Type u} {l₁ l₂ : List α} {x : α} (h : x ∈ l₂.getLast?)
Goal: x ∈ (l₁ ++ l₂).getLast?
-- List.head!_nil
@[simp]
theorem head!_nil [Inhabited α] : ([] : List α).head! = default 
Arguments: {α : Type u} [Inhabited α]
Goal: [].head! = default
-- List.head_cons_tail
@[simp] theorem head_cons_tail (x : List α) (h : x ≠ []) : x.head h :: x.tail = x 
Arguments: {α : Type u} (x : List α) (h : x ≠ [])
Goal: x.head h :: x.tail = x
-- List.head!_eq_head?
theorem head!_eq_head? [Inhabited α] (l : List α) : head! l = (head? l).iget 
Arguments: {α : Type u} [Inhabited α] (l : List α)
Goal: l.head! = l.head?.iget
-- List.surjective_head!
theorem surjective_head! [Inhabited α] : Surjective (@head! α _) 
Arguments: {α : Type u} [Inhabited α]
Goal: Function.Surjective List.head!
-- List.surjective_head?
theorem surjective_head? : Surjective (@head? α) 
Arguments: {α : Type u}
Goal: Function.Surjective List.head?
-- List.surjective_tail
theorem surjective_tail : Surjective (@tail α)
  
Arguments: {α : Type u}
Goal: Function.Surjective List.tail
-- List.eq_cons_of_mem_head?
theorem eq_cons_of_mem_head? {x : α} : ∀ {l : List α}, x ∈ l.head? → l = x :: tail l
  
Arguments: {α : Type u} {x : α} {l : List α}
Goal: x ∈ l.head? → l = x :: l.tail
-- List.mem_of_mem_head?
theorem mem_of_mem_head? {x : α} {l : List α} (h : x ∈ l.head?) : x ∈ l 
Arguments: {α : Type u} {x : α} {l : List α} (h : x ∈ l.head?)
Goal: x ∈ l
-- List.head!_cons
@[simp] theorem head!_cons [Inhabited α] (a : α) (l : List α) : head! (a :: l) = a 
Arguments: {α : Type u} [Inhabited α] (a : α) (l : List α)
Goal: (a :: l).head! = a
-- List.head!_append
@[simp]
theorem head!_append [Inhabited α] (t : List α) {s : List α} (h : s ≠ []) :
    head! (s ++ t) = head! s 
Arguments: {α : Type u} [Inhabited α] (t : List α) {s : List α} (h : s ≠ [])
Goal: (s ++ t).head! = s.head!
-- List.head?_append
theorem head?_append {s t : List α} {x : α} (h : x ∈ s.head?) : x ∈ (s ++ t).head? 
Arguments: {α : Type u} {s t : List α} {x : α} (h : x ∈ s.head?)
Goal: x ∈ (s ++ t).head?
-- List.head?_append_of_ne_nil
theorem head?_append_of_ne_nil :
    ∀ (l₁ : List α) {l₂ : List α} (_ : l₁ ≠ []), head? (l₁ ++ l₂) = head? l₁
  
Arguments: {α : Type u} (l₁ : List α) {l₂ : List α}
Goal: l₁ ≠ [] → (l₁ ++ l₂).head? = l₁.head?
-- List.tail_append_singleton_of_ne_nil
theorem tail_append_singleton_of_ne_nil {a : α} {l : List α} (h : l ≠ nil) :
    tail (l ++ [a]) = tail l ++ [a] 
Arguments: {α : Type u} {a : α} {l : List α} (h : l ≠ [])
Goal: (l ++ [a]).tail = l.tail ++ [a]
-- List.cons_head?_tail
theorem cons_head?_tail : ∀ {l : List α} {a : α}, a ∈ head? l → a :: tail l = l
  
Arguments: {α : Type u} {l : List α} {a : α}
Goal: a ∈ l.head? → a :: l.tail = l
-- List.head!_mem_head?
theorem head!_mem_head? [Inhabited α] : ∀ {l : List α}, l ≠ [] → head! l ∈ head? l
  
Arguments: {α : Type u} [Inhabited α] {l : List α}
Goal: l ≠ [] → l.head! ∈ l.head?
-- List.cons_head!_tail
theorem cons_head!_tail [Inhabited α] {l : List α} (h : l ≠ []) : head! l :: tail l = l 
Arguments: {α : Type u} [Inhabited α] {l : List α} (h : l ≠ [])
Goal: l.head! :: l.tail = l
-- List.head!_mem_self
theorem head!_mem_self [Inhabited α] {l : List α} (h : l ≠ nil) : l.head! ∈ l 
Arguments: {α : Type u} [Inhabited α] {l : List α} (h : l ≠ [])
Goal: l.head! ∈ l
-- List.head_mem
theorem head_mem {l : List α} : ∀ (h : l ≠ nil), l.head h ∈ l 
Arguments: {α : Type u} {l : List α} (h : l ≠ [])
Goal: l.head h ∈ l
-- List.tail_append_of_ne_nil
theorem tail_append_of_ne_nil (l l' : List α) (h : l ≠ []) : (l ++ l').tail = l.tail ++ l' 
Arguments: {α : Type u} (l l' : List α) (h : l ≠ [])
Goal: (l ++ l').tail = l.tail ++ l'
-- List.getElem_eq_getElem?
theorem getElem_eq_getElem? (l : List α) (i : Nat) (h : i < l.length) :
    l[i] = l[i]?.get (by simp [getElem?_eq_getElem, h]) 
Arguments: {α : Type u} (l : List α) (i : ℕ) (h : i < l.length)
Goal: l[i] = l[i]?.get ⋯
-- List.get_eq_get?
theorem get_eq_get? (l : List α) (i : Fin l.length) :
    l.get i = (l.get? i).get (by simp [getElem?_eq_getElem]) 
Arguments: {α : Type u} (l : List α) (i : Fin l.length)
Goal: l.get i = (l.get? ↑i).get ⋯
-- List.nthLe_tail
@[simp] theorem nthLe_tail (l : List α) (i) (h : i < l.tail.length)
    (h' : i + 1 < l.length := (by simp only [length_tail] at h; omega)) :
    l.tail.nthLe i h = l.nthLe (i + 1) h' 
Arguments: {α : Type u} (l : List α) (i : ℕ) (h : i < l.tail.length) (h' : i + 1 < l.length := ⋯)
Goal: l.tail.nthLe i h = l.nthLe (i + 1) h'
-- List.nthLe_cons_aux
theorem nthLe_cons_aux {l : List α} {a : α} {n} (hn : n ≠ 0) (h : n < (a :: l).length) :
    n - 1 < l.length 
Arguments: {α : Type u} {l : List α} {a : α} {n : ℕ} (hn : n ≠ 0) (h : n < (a :: l).length)
Goal: n - 1 < l.length
-- List.nthLe_cons
theorem nthLe_cons {l : List α} {a : α} {n} (hl) :
    (a :: l).nthLe n hl = if hn : n = 0 then a else l.nthLe (n - 1) (nthLe_cons_aux hn hl) 
Arguments: {α : Type u} {l : List α} {a : α} {n : ℕ} (hl : n < (a :: l).length)
Goal: (a :: l).nthLe n hl = if hn : n = 0 then a else l.nthLe (n - 1) ⋯
-- List.modifyHead_modifyHead
@[simp 1100]
theorem modifyHead_modifyHead (l : List α) (f g : α → α) :
    (l.modifyHead f).modifyHead g = l.modifyHead (g ∘ f) 
Arguments: {α : Type u} (l : List α) (f g : α → α)
Goal: List.modifyHead g (List.modifyHead f l) = List.modifyHead (g ∘ f) l
-- List.reverseRecOn_nil
@[simp]
theorem reverseRecOn_nil {motive : List α → Sort*} (nil : motive [])
    (append_singleton : ∀ (l : List α) (a : α), motive l → motive (l ++ [a])) :
    reverseRecOn [] nil append_singleton = nil 
Arguments: {α : Type u} {motive : List α → Sort u_2} (nil : motive []) (append_singleton : (l : List α) → (a : α) → motive l → motive (l ++ [a]))
Goal: List.reverseRecOn [] nil append_singleton = nil
-- List.reverseRecOn_concat
@[simp, nolint unusedHavesSuffices]
theorem reverseRecOn_concat {motive : List α → Sort*} (x : α) (xs : List α) (nil : motive [])
    (append_singleton : ∀ (l : List α) (a : α), motive l → motive (l ++ [a])) :
    reverseRecOn (motive := motive) (xs ++ [x]) nil append_singleton =
      append_singleton _ _ (reverseRecOn (motive := motive) xs nil append_singleton) 
Arguments: {α : Type u} {motive : List α → Sort u_2} (x : α) (xs : List α) (nil : motive []) (append_singleton : (l : List α) → (a : α) → motive l → motive (l ++ [a]))
Goal: List.reverseRecOn (xs ++ [x]) nil append_singleton = append_singleton xs x (List.reverseRecOn xs nil append_singleton)
-- List.bidirectionalRec_nil
@[simp]
theorem bidirectionalRec_nil {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b]))) :
    bidirectionalRec nil singleton cons_append [] = nil 
Arguments: {α : Type u} {motive : List α → Sort u_2} (nil : motive []) (singleton : (a : α) → motive [a]) (cons_append : (a : α) → (l : List α) → (b : α) → motive l → motive (a :: (l ++ [b])))
Goal: List.bidirectionalRec nil singleton cons_append [] = nil
-- List.bidirectionalRec_singleton
@[simp]
theorem bidirectionalRec_singleton {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b]))) (a : α) :
    bidirectionalRec nil singleton cons_append [a] = singleton a 
Arguments: {α : Type u} {motive : List α → Sort u_2} (nil : motive []) (singleton : (a : α) → motive [a]) (cons_append : (a : α) → (l : List α) → (b : α) → motive l → motive (a :: (l ++ [b]))) (a : α)
Goal: List.bidirectionalRec nil singleton cons_append [a] = singleton a
-- List.bidirectionalRec_cons_append
@[simp]
theorem bidirectionalRec_cons_append {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b])))
    (a : α) (l : List α) (b : α) :
    bidirectionalRec nil singleton cons_append (a :: (l ++ [b])) =
      cons_append a l b (bidirectionalRec nil singleton cons_append l) 
Arguments: {α : Type u} {motive : List α → Sort u_2} (nil : motive []) (singleton : (a : α) → motive [a]) (cons_append : (a : α) → (l : List α) → (b : α) → motive l → motive (a :: (l ++ [b]))) (a : α) (l : List α) (b : α)
Goal: List.bidirectionalRec nil singleton cons_append (a :: (l ++ [b])) =
  cons_append a l b (List.bidirectionalRec nil singleton cons_append l)
-- List.Sublist.cons_cons
theorem Sublist.cons_cons {l₁ l₂ : List α} (a : α) (s : l₁ <+ l₂) : a :: l₁ <+ a :: l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} (a : α) (s : l₁.Sublist l₂)
Goal: (a :: l₁).Sublist (a :: l₂)
-- List.cons_sublist_cons'
lemma cons_sublist_cons' {a b : α} : a :: l₁ <+ b :: l₂ ↔ a :: l₁ <+ l₂ ∨ a = b ∧ l₁ <+ l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} {a b : α}
Goal: (a :: l₁).Sublist (b :: l₂) ↔ (a :: l₁).Sublist l₂ ∨ a = b ∧ l₁.Sublist l₂
-- List.sublist_cons_of_sublist
theorem sublist_cons_of_sublist (a : α) (h : l₁ <+ l₂) : l₁ <+ a :: l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} (a : α) (h : l₁.Sublist l₂)
Goal: l₁.Sublist (a :: l₂)
-- List.tail_sublist
theorem tail_sublist : ∀ l : List α, tail l <+ l
  
Arguments: {α : Type u} (l : List α)
Goal: l.tail.Sublist l
-- List.Sublist.tail
@[gcongr] protected theorem Sublist.tail : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → tail l₁ <+ tail l₂
  
Arguments: {α : Type u} {l₁ l₂ : List α}
Goal: l₁.Sublist l₂ → l₁.tail.Sublist l₂.tail
-- List.Sublist.of_cons_cons
theorem Sublist.of_cons_cons {l₁ l₂ : List α} {a b : α} (h : a :: l₁ <+ b :: l₂) : l₁ <+ l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} {a b : α} (h : (a :: l₁).Sublist (b :: l₂))
Goal: l₁.Sublist l₂
-- List.sublist_of_cons_sublist_cons
@[deprecated (since := "2024-04-07")]
theorem sublist_of_cons_sublist_cons {a} (h : a :: l₁ <+ a :: l₂) : l₁ <+ l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} {a : α} (h : (a :: l₁).Sublist (a :: l₂))
Goal: l₁.Sublist l₂
-- List.eq_nil_of_sublist_nil
theorem eq_nil_of_sublist_nil {l : List α} (s : l <+ []) : l = [] 
Arguments: {α : Type u} {l : List α} (s : l.Sublist [])
Goal: l = []
-- List.sublist_singleton
@[simp] lemma sublist_singleton {l : List α} {a : α} : l <+ [a] ↔ l = [] ∨ l = [a] 
Arguments: {α : Type u} {l : List α} {a : α}
Goal: l.Sublist [a] ↔ l = [] ∨ l = [a]
-- List.sublist_replicate_iff
theorem sublist_replicate_iff {l : List α} {a : α} {n : ℕ} :
    l <+ replicate n a ↔ ∃ k ≤ n, l = replicate k a 
Arguments: {α : Type u} {l : List α} {a : α} {n : ℕ}
Goal: l.Sublist (List.replicate n a) ↔ ∃ k, k ≤ n ∧ l = List.replicate k a
-- List.Sublist.antisymm
theorem Sublist.antisymm (s₁ : l₁ <+ l₂) (s₂ : l₂ <+ l₁) : l₁ = l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} (s₁ : l₁.Sublist l₂) (s₂ : l₂.Sublist l₁)
Goal: l₁ = l₂
-- List.indexOf_cons_self
@[simp]
theorem indexOf_cons_self (a : α) (l : List α) : indexOf a (a :: l) = 0 
Arguments: {α : Type u} [DecidableEq α] (a : α) (l : List α)
Goal: List.indexOf a (a :: l) = 0
-- List.indexOf_cons_eq
theorem indexOf_cons_eq {a b : α} (l : List α) : b = a → indexOf a (b :: l) = 0
  
Arguments: {α : Type u} [DecidableEq α] {a b : α} (l : List α)
Goal: b = a → List.indexOf a (b :: l) = 0
-- List.indexOf_cons_ne
@[simp]
theorem indexOf_cons_ne {a b : α} (l : List α) : b ≠ a → indexOf a (b :: l) = succ (indexOf a l)
  
Arguments: {α : Type u} [DecidableEq α] {a b : α} (l : List α)
Goal: b ≠ a → List.indexOf a (b :: l) = (List.indexOf a l).succ
-- List.indexOf_eq_length
theorem indexOf_eq_length {a : α} {l : List α} : indexOf a l = length l ↔ a ∉ l 
Arguments: {α : Type u} [DecidableEq α] {a : α} {l : List α}
Goal: List.indexOf a l = l.length ↔ ¬a ∈ l
-- List.indexOf_of_not_mem
@[simp]
theorem indexOf_of_not_mem {l : List α} {a : α} : a ∉ l → indexOf a l = length l 
Arguments: {α : Type u} [DecidableEq α] {l : List α} {a : α}
Goal: ¬a ∈ l → List.indexOf a l = l.length
-- List.indexOf_le_length
theorem indexOf_le_length {a : α} {l : List α} : indexOf a l ≤ length l 
Arguments: {α : Type u} [DecidableEq α] {a : α} {l : List α}
Goal: List.indexOf a l ≤ l.length
-- List.indexOf_lt_length
theorem indexOf_lt_length {a} {l : List α} : indexOf a l < length l ↔ a ∈ l 
Arguments: {α : Type u} [DecidableEq α] {a : α} {l : List α}
Goal: List.indexOf a l < l.length ↔ a ∈ l
-- List.indexOf_append_of_mem
theorem indexOf_append_of_mem {a : α} (h : a ∈ l₁) : indexOf a (l₁ ++ l₂) = indexOf a l₁ 
Arguments: {α : Type u} {l₁ l₂ : List α} [DecidableEq α] {a : α} (h : a ∈ l₁)
Goal: List.indexOf a (l₁ ++ l₂) = List.indexOf a l₁
-- List.indexOf_append_of_not_mem
theorem indexOf_append_of_not_mem {a : α} (h : a ∉ l₁) :
    indexOf a (l₁ ++ l₂) = l₁.length + indexOf a l₂ 
Arguments: {α : Type u} {l₁ l₂ : List α} [DecidableEq α] {a : α} (h : ¬a ∈ l₁)
Goal: List.indexOf a (l₁ ++ l₂) = l₁.length + List.indexOf a l₂
-- List.nthLe_of_mem
@[deprecated get_of_mem (since := "2023-01-05")]
theorem nthLe_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n h, nthLe l n h = a 
Arguments: {α : Type u} {a : α} {l : List α} (h : a ∈ l)
Goal: ∃ n h, l.nthLe n h = a
-- List.nthLe_get?
@[deprecated get?_eq_get (since := "2023-01-05")]
theorem nthLe_get? {l : List α} {n} (h) : get? l n = some (nthLe l n h) 
Arguments: {α : Type u} {l : List α} {n : ℕ} (h : n < l.length)
Goal: l.get? n = some (l.nthLe n h)
-- List.getElem?_length
@[simp]
theorem getElem?_length (l : List α) : l[l.length]? = none 
Arguments: {α : Type u} (l : List α)
Goal: l[l.length]? = none
-- List.get?_length
@[deprecated getElem?_length (since := "2024-06-12")]
theorem get?_length (l : List α) : l.get? l.length = none 
Arguments: {α : Type u} (l : List α)
Goal: l.get? l.length = none
-- List.nthLe_mem
@[deprecated get_mem (since := "2023-01-05")]
theorem nthLe_mem (l : List α) (n h) : nthLe l n h ∈ l 
Arguments: {α : Type u} (l : List α) (n : ℕ) (h : n < l.length)
Goal: l.nthLe n h ∈ l
-- List.mem_iff_nthLe
@[deprecated mem_iff_get (since := "2023-01-05")]
theorem mem_iff_nthLe {a} {l : List α} : a ∈ l ↔ ∃ n h, nthLe l n h = a 
Arguments: {α : Type u} {a : α} {l : List α}
Goal: a ∈ l ↔ ∃ n h, l.nthLe n h = a