ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.modifyNth_eq_take_cons_drop
theorem modifyNth_eq_take_cons_drop (f : α → α) {n l} (h : n < length l) :
    modifyNth f n l = take n l ++ f l[n] :: drop (n + 1) l 
Arguments: {α : Type u_1} (f : α → α) {n : Nat} {l : List α} (h : n < l.length)
Goal: List.modifyNth f n l = List.take n l ++ f l[n] :: List.drop (n + 1) l
-- List.set_eq_modifyNth
theorem set_eq_modifyNth (a : α) : ∀ n (l : List α), set l n a = modifyNth (fun _ => a) n l
  
Arguments: {α : Type u_1} (a : α) (n : Nat) (l : List α)
Goal: l.set n a = List.modifyNth (fun x => a) n l
-- List.set_eq_take_cons_drop
theorem set_eq_take_cons_drop (a : α) {n l} (h : n < length l) :
    set l n a = take n l ++ a :: drop (n + 1) l 
Arguments: {α : Type u_1} (a : α) {n : Nat} {l : List α} (h : n < l.length)
Goal: l.set n a = List.take n l ++ a :: List.drop (n + 1) l
-- List.modifyNth_eq_set_get?
theorem modifyNth_eq_set_get? (f : α → α) :
    ∀ n (l : List α), l.modifyNth f n = ((fun a => l.set n (f a)) <$> l.get? n).getD l
  
Arguments: {α : Type u_1} (f : α → α) (n : Nat) (l : List α)
Goal: List.modifyNth f n l = ((fun a => l.set n (f a)) <$> l.get? n).getD l
-- List.modifyNth_eq_set_get
theorem modifyNth_eq_set_get (f : α → α) {n} {l : List α} (h) :
    l.modifyNth f n = l.set n (f (l.get ⟨n, h⟩)) 
Arguments: {α : Type u_1} (f : α → α) {n : Nat} {l : List α} (h : n < l.length)
Goal: List.modifyNth f n l = l.set n (f (l.get ⟨n, h⟩))
-- List.exists_of_set
theorem exists_of_set {l : List α} (h : n < l.length) :
    ∃ l₁ a l₂, l = l₁ ++ a :: l₂ ∧ l₁.length = n ∧ l.set n a' = l₁ ++ a' :: l₂ 
Arguments: {α : Type u_1} {n : Nat} {a' : α} {l : List α} (h : n < l.length)
Goal: ∃ l₁ a l₂, l = l₁ ++ a :: l₂ ∧ l₁.length = n ∧ l.set n a' = l₁ ++ a' :: l₂
-- List.exists_of_set'
theorem exists_of_set' {l : List α} (h : n < l.length) :
    ∃ l₁ l₂, l = l₁ ++ l[n] :: l₂ ∧ l₁.length = n ∧ l.set n a' = l₁ ++ a' :: l₂ 
Arguments: {α : Type u_1} {n : Nat} {a' : α} {l : List α} (h : n < l.length)
Goal: ∃ l₁ l₂, l = l₁ ++ l[n] :: l₂ ∧ l₁.length = n ∧ l.set n a' = l₁ ++ a' :: l₂
-- List.getElem?_set_eq'
@[simp]
theorem getElem?_set_eq' (a : α) (n) (l : List α) : (set l n a)[n]? = (fun _ => a) <$> l[n]? 
Arguments: {α : Type u_1} (a : α) (n : Nat) (l : List α)
Goal: (l.set n a)[n]? = (fun x => a) <$> l[n]?
-- List.get?_set_eq
@[deprecated getElem?_set_eq' (since := "2024-06-12")]
theorem get?_set_eq (a : α) (n) (l : List α) : (set l n a).get? n = (fun _ => a) <$> l.get? n 
Arguments: {α : Type u_1} (a : α) (n : Nat) (l : List α)
Goal: (l.set n a).get? n = (fun x => a) <$> l.get? n
-- List.getElem?_set_eq_of_lt
theorem getElem?_set_eq_of_lt (a : α) {n} {l : List α} (h : n < length l) :
    (set l n a)[n]? = some a 
Arguments: {α : Type u_1} (a : α) {n : Nat} {l : List α} (h : n < l.length)
Goal: (l.set n a)[n]? = some a
-- List.get?_set_eq_of_lt
@[deprecated getElem?_set_eq_of_lt (since := "2024-06-12")]
theorem get?_set_eq_of_lt (a : α) {n} {l : List α} (h : n < length l) :
    (set l n a).get? n = some a 
Arguments: {α : Type u_1} (a : α) {n : Nat} {l : List α} (h : n < l.length)
Goal: (l.set n a).get? n = some a
-- List.get?_set_ne
@[deprecated getElem?_set_ne (since := "2024-06-12")]
theorem get?_set_ne (a : α) {m n} (l : List α) (h : m ≠ n) : (set l m a).get? n = l.get? n 
Arguments: {α : Type u_1} (a : α) {m n : Nat} (l : List α) (h : m ≠ n)
Goal: (l.set m a).get? n = l.get? n
-- List.getElem?_set'
theorem getElem?_set' (a : α) {m n} (l : List α) :
    (set l m a)[n]? = if m = n then (fun _ => a) <$> l[n]? else l[n]? 
Arguments: {α : Type u_1} (a : α) {m n : Nat} (l : List α)
Goal: (l.set m a)[n]? = if m = n then (fun x => a) <$> l[n]? else l[n]?
-- List.get?_set
@[deprecated getElem?_set (since := "2024-06-12")]
theorem get?_set (a : α) {m n} (l : List α) :
    (set l m a).get? n = if m = n then (fun _ => a) <$> l.get? n else l.get? n 
Arguments: {α : Type u_1} (a : α) {m n : Nat} (l : List α)
Goal: (l.set m a).get? n = if m = n then (fun x => a) <$> l.get? n else l.get? n
-- List.get?_set_of_lt
theorem get?_set_of_lt (a : α) {m n} (l : List α) (h : n < length l) :
    (set l m a).get? n = if m = n then some a else l.get? n 
Arguments: {α : Type u_1} (a : α) {m n : Nat} (l : List α) (h : n < l.length)
Goal: (l.set m a).get? n = if m = n then some a else l.get? n
-- List.get?_set_of_lt'
theorem get?_set_of_lt' (a : α) {m n} (l : List α) (h : m < length l) :
    (set l m a).get? n = if m = n then some a else l.get? n 
Arguments: {α : Type u_1} (a : α) {m n : Nat} (l : List α) (h : m < l.length)
Goal: (l.set m a).get? n = if m = n then some a else l.get? n
-- List.drop_set_of_lt
theorem drop_set_of_lt (a : α) {n m : Nat} (l : List α) (h : n < m) :
    (l.set n a).drop m = l.drop m 
Arguments: {α : Type u_1} (a : α) {n m : Nat} (l : List α) (h : n < m)
Goal: List.drop m (l.set n a) = List.drop m l
-- List.take_set_of_lt
theorem take_set_of_lt (a : α) {n m : Nat} (l : List α) (h : m < n) :
    (l.set n a).take m = l.take m 
Arguments: {α : Type u_1} (a : α) {n m : Nat} (l : List α) (h : m < n)
Goal: List.take m (l.set n a) = List.take m l
-- List.length_eraseIdx
theorem length_eraseIdx : ∀ {l i}, i < length l → length (@eraseIdx α l i) = length l - 1
  
Arguments: {α : Type u_1} {l : List α} {i : Nat}
Goal: i < l.length → (l.eraseIdx i).length = l.length - 1
-- List.length_tail
@[simp] theorem length_tail (l : List α) : length (tail l) = length l - 1 
Arguments: {α : Type u_1} (l : List α)
Goal: l.tail.length = l.length - 1
-- List.eraseP_nil
@[simp] theorem eraseP_nil : [].eraseP p = [] 
Goal: ∀ {α : Type u_1} {p : α → Bool}, List.eraseP p [] = []
-- List.eraseP_cons
theorem eraseP_cons (a : α) (l : List α) :
    (a :: l).eraseP p = bif p a then l else a :: l.eraseP p 
Arguments: {α : Type u_1} {p : α → Bool} (a : α) (l : List α)
Goal: List.eraseP p (a :: l) = bif p a then l else a :: List.eraseP p l
-- List.eraseP_cons_of_pos
@[simp] theorem eraseP_cons_of_pos {l : List α} (p) (h : p a) : (a :: l).eraseP p = l 
Arguments: {α : Type u_1} {a : α} {l : List α} (p : α → Bool) (h : p a = true)
Goal: List.eraseP p (a :: l) = l
-- List.eraseP_cons_of_neg
@[simp] theorem eraseP_cons_of_neg {l : List α} (p) (h : ¬p a) :
    (a :: l).eraseP p = a :: l.eraseP p 
Arguments: {α : Type u_1} {a : α} {l : List α} (p : α → Bool) (h : ¬p a = true)
Goal: List.eraseP p (a :: l) = a :: List.eraseP p l
-- List.eraseP_of_forall_not
theorem eraseP_of_forall_not {l : List α} (h : ∀ a, a ∈ l → ¬p a) : l.eraseP p = l 
Arguments: {α : Type u_1} {p : α → Bool} {l : List α} (h : ∀ (a : α), a ∈ l → ¬p a = true)
Goal: List.eraseP p l = l
-- List.exists_of_eraseP
theorem exists_of_eraseP : ∀ {l : List α} {a} (al : a ∈ l) (pa : p a),
    ∃ a l₁ l₂, (∀ b ∈ l₁, ¬p b) ∧ p a ∧ l = l₁ ++ a :: l₂ ∧ l.eraseP p = l₁ ++ l₂
  
Arguments: {α : Type u_1} {p : α → Bool} {l : List α} {a : α} (al : a ∈ l) (pa : p a = true)
Goal: ∃ a l₁ l₂, (∀ (b : α), b ∈ l₁ → ¬p b = true) ∧ p a = true ∧ l = l₁ ++ a :: l₂ ∧ List.eraseP p l = l₁ ++ l₂
-- List.exists_or_eq_self_of_eraseP
theorem exists_or_eq_self_of_eraseP (p) (l : List α) :
    l.eraseP p = l ∨
    ∃ a l₁ l₂, (∀ b ∈ l₁, ¬p b) ∧ p a ∧ l = l₁ ++ a :: l₂ ∧ l.eraseP p = l₁ ++ l₂ 
Arguments: {α : Type u_1} (p : α → Bool) (l : List α)
Goal: List.eraseP p l = l ∨
  ∃ a l₁ l₂, (∀ (b : α), b ∈ l₁ → ¬p b = true) ∧ p a = true ∧ l = l₁ ++ a :: l₂ ∧ List.eraseP p l = l₁ ++ l₂
-- List.length_eraseP_of_mem
@[simp] theorem length_eraseP_of_mem (al : a ∈ l) (pa : p a) :
    length (l.eraseP p) = Nat.pred (length l) 
Goal: ∀ {α : Type u_1} {a : α} {l : List α} {p : α → Bool}, a ∈ l → p a = true → (List.eraseP p l).length = l.length.pred
-- List.eraseP_append_left
theorem eraseP_append_left {a : α} (pa : p a) :
    ∀ {l₁ : List α} l₂, a ∈ l₁ → (l₁++l₂).eraseP p = l₁.eraseP p ++ l₂
  
Arguments: {α : Type u_1} {p : α → Bool} {a : α} (pa : p a = true) {l₁ : List α} (l₂ : List α)
Goal: a ∈ l₁ → List.eraseP p (l₁ ++ l₂) = List.eraseP p l₁ ++ l₂
-- List.eraseP_append_right
theorem eraseP_append_right :
    ∀ {l₁ : List α} l₂, (∀ b ∈ l₁, ¬p b) → eraseP p (l₁++l₂) = l₁ ++ l₂.eraseP p
  
Arguments: {α : Type u_1} {p : α → Bool} {l₁ : List α} (l₂ : List α)
Goal: (∀ (b : α), b ∈ l₁ → ¬p b = true) → List.eraseP p (l₁ ++ l₂) = l₁ ++ List.eraseP p l₂
-- List.eraseP_sublist
theorem eraseP_sublist (l : List α) : l.eraseP p <+ l 
Arguments: {α : Type u_1} {p : α → Bool} (l : List α)
Goal: List.eraseP p l <+ l
-- List.eraseP_subset
theorem eraseP_subset (l : List α) : l.eraseP p ⊆ l 
Arguments: {α : Type u_1} {p : α → Bool} (l : List α)
Goal: List.eraseP p l ⊆ l
-- List.Sublist.eraseP
protected theorem Sublist.eraseP : l₁ <+ l₂ → l₁.eraseP p <+ l₂.eraseP p
  
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α} {p : α → Bool}, l₁ <+ l₂ → List.eraseP p l₁ <+ List.eraseP p l₂
-- List.mem_of_mem_eraseP
theorem mem_of_mem_eraseP {l : List α} : a ∈ l.eraseP p → a ∈ l 
Arguments: {α : Type u_1} {a : α} {p : α → Bool} {l : List α}
Goal: a ∈ List.eraseP p l → a ∈ l
-- List.mem_eraseP_of_neg
@[simp] theorem mem_eraseP_of_neg {l : List α} (pa : ¬p a) : a ∈ l.eraseP p ↔ a ∈ l 
Arguments: {α : Type u_1} {p : α → Bool} {a : α} {l : List α} (pa : ¬p a = true)
Goal: a ∈ List.eraseP p l ↔ a ∈ l
-- List.eraseP_map
theorem eraseP_map (f : β → α) : ∀ (l : List β), (map f l).eraseP p = map f (l.eraseP (p ∘ f))
  
Arguments: {β : Type u_1} {α : Type u_2} {p : α → Bool} (f : β → α) (l : List β)
Goal: List.eraseP p (List.map f l) = List.map f (List.eraseP (p ∘ f) l)
-- List.extractP_eq_find?_eraseP
@[simp] theorem extractP_eq_find?_eraseP
    (l : List α) : extractP p l = (find? p l, eraseP p l) 
Arguments: {α : Type u_1} {p : α → Bool} (l : List α)
Goal: List.extractP p l = (List.find? p l, List.eraseP p l)
-- List.extractP_eq_find?_eraseP.go
@[simp] theorem extractP_eq_find?_eraseP
    (l : List α) : extractP p l = (find? p l, eraseP p l) 
Arguments: {α : Type u_1} {p : α → Bool} (l : List α) (acc : Array α) (xs : List α)
Goal: l = acc.data ++ xs → List.extractP.go p l xs acc = (List.find? p xs, acc.data ++ List.eraseP p xs)
-- List.erase_eq_eraseP'
theorem erase_eq_eraseP' (a : α) (l : List α) : l.erase a = l.eraseP (· == a) 
Arguments: {α : Type u_1} [BEq α] (a : α) (l : List α)
Goal: l.erase a = List.eraseP (fun x => x == a) l
-- List.erase_eq_eraseP
theorem erase_eq_eraseP [LawfulBEq α] (a : α) : ∀ l : List α,  l.erase a = l.eraseP (a == ·)
  
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] (a : α) (l : List α)
Goal: l.erase a = List.eraseP (fun x => a == x) l
-- List.exists_erase_eq
theorem exists_erase_eq [LawfulBEq α] {a : α} {l : List α} (h : a ∈ l) :
    ∃ l₁ l₂, a ∉ l₁ ∧ l = l₁ ++ a :: l₂ ∧ l.erase a = l₁ ++ l₂ 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] {a : α} {l : List α} (h : a ∈ l)
Goal: ∃ l₁ l₂, ¬a ∈ l₁ ∧ l = l₁ ++ a :: l₂ ∧ l.erase a = l₁ ++ l₂
-- List.length_erase_of_mem
@[simp] theorem length_erase_of_mem [LawfulBEq α] {a : α} {l : List α} (h : a ∈ l) :
    length (l.erase a) = Nat.pred (length l) 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] {a : α} {l : List α} (h : a ∈ l)
Goal: (l.erase a).length = l.length.pred
-- List.erase_append_left
theorem erase_append_left [LawfulBEq α] {l₁ : List α} (l₂) (h : a ∈ l₁) :
    (l₁ ++ l₂).erase a = l₁.erase a ++ l₂ 
Arguments: {α : Type u_1} [BEq α] {a : α} [LawfulBEq α] {l₁ : List α} (l₂ : List α) (h : a ∈ l₁)
Goal: (l₁ ++ l₂).erase a = l₁.erase a ++ l₂
-- List.erase_append_right
theorem erase_append_right [LawfulBEq α] {a : α} {l₁ : List α} (l₂ : List α) (h : a ∉ l₁) :
    (l₁ ++ l₂).erase a = (l₁ ++ l₂.erase a) 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] {a : α} {l₁ : List α} (l₂ : List α) (h : ¬a ∈ l₁)
Goal: (l₁ ++ l₂).erase a = l₁ ++ l₂.erase a
-- List.erase_sublist
theorem erase_sublist (a : α) (l : List α) : l.erase a <+ l 
Arguments: {α : Type u_1} [BEq α] (a : α) (l : List α)
Goal: l.erase a <+ l
-- List.erase_subset
theorem erase_subset (a : α) (l : List α) : l.erase a ⊆ l 
Arguments: {α : Type u_1} [BEq α] (a : α) (l : List α)
Goal: l.erase a ⊆ l
-- List.Sublist.erase
theorem Sublist.erase (a : α) {l₁ l₂ : List α} (h : l₁ <+ l₂) : l₁.erase a <+ l₂.erase a 
Arguments: {α : Type u_1} [BEq α] (a : α) {l₁ l₂ : List α} (h : l₁ <+ l₂)
Goal: l₁.erase a <+ l₂.erase a
-- List.mem_of_mem_erase
theorem mem_of_mem_erase {a b : α} {l : List α} (h : a ∈ l.erase b) : a ∈ l 
Arguments: {α : Type u_1} [BEq α] {a b : α} {l : List α} (h : a ∈ l.erase b)
Goal: a ∈ l
-- List.mem_erase_of_ne
@[simp] theorem mem_erase_of_ne [LawfulBEq α] {a b : α} {l : List α} (ab : a ≠ b) :
    a ∈ l.erase b ↔ a ∈ l 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] {a b : α} {l : List α} (ab : a ≠ b)
Goal: a ∈ l.erase b ↔ a ∈ l
-- List.erase_comm
theorem erase_comm [LawfulBEq α] (a b : α) (l : List α) :
    (l.erase a).erase b = (l.erase b).erase a 
Arguments: {α : Type u_1} [BEq α] [LawfulBEq α] (a b : α) (l : List α)
Goal: (l.erase a).erase b = (l.erase b).erase a
-- List.filter_sublist
@[simp] theorem filter_sublist {p : α → Bool} : ∀ (l : List α), filter p l <+ l
  
Arguments: {α : Type u_1} {p : α → Bool} (l : List α)
Goal: List.filter p l <+ l
-- List.Sublist.filterMap
protected theorem Sublist.filterMap (f : α → Option β) (s : l₁ <+ l₂) :
    filterMap f l₁ <+ filterMap f l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {l₁ l₂ : List α} (f : α → Option β) (s : l₁ <+ l₂)
Goal: List.filterMap f l₁ <+ List.filterMap f l₂
-- List.Sublist.filter
theorem Sublist.filter (p : α → Bool) {l₁ l₂} (s : l₁ <+ l₂) : filter p l₁ <+ filter p l₂ 
Arguments: {α : Type u_1} (p : α → Bool) {l₁ l₂ : List α} (s : l₁ <+ l₂)
Goal: List.filter p l₁ <+ List.filter p l₂
-- List.findIdx_nil
@[simp] theorem findIdx_nil {α : Type _} (p : α → Bool) : [].findIdx p = 0 
Arguments: {α : Type u_1} (p : α → Bool)
Goal: List.findIdx p [] = 0
-- List.findIdx_cons.findIdx_go_succ
theorem findIdx_cons (p : α → Bool) (b : α) (l : List α) :
    (b :: l).findIdx p = bif p b then 0 else (l.findIdx p) + 1 
Arguments: {α : Type u_1} (p : α → Bool) (l : List α) (n : Nat)
Goal: List.findIdx.go p l (n + 1) = List.findIdx.go p l n + 1
-- List.findIdx_cons
theorem findIdx_cons (p : α → Bool) (b : α) (l : List α) :
    (b :: l).findIdx p = bif p b then 0 else (l.findIdx p) + 1 
Arguments: {α : Type u_1} (p : α → Bool) (b : α) (l : List α)
Goal: List.findIdx p (b :: l) = bif p b then 0 else List.findIdx p l + 1
-- List.findIdx_of_get?_eq_some
theorem findIdx_of_get?_eq_some {xs : List α} (w : xs.get? (xs.findIdx p) = some y) : p y 
Arguments: {α : Type u_1} {p : α → Bool} {y : α} {xs : List α} (w : xs.get? (List.findIdx p xs) = some y)
Goal: p y = true
-- List.findIdx_get
theorem findIdx_get {xs : List α} {w : xs.findIdx p < xs.length} :
    p (xs.get ⟨xs.findIdx p, w⟩) 
Arguments: {α : Type u_1} {p : α → Bool} {xs : List α} {w : List.findIdx p xs < xs.length}
Goal: p (xs.get ⟨List.findIdx p xs, w⟩) = true
-- List.findIdx_lt_length_of_exists
theorem findIdx_lt_length_of_exists {xs : List α} (h : ∃ x ∈ xs, p x) :
    xs.findIdx p < xs.length 
Arguments: {α : Type u_1} {p : α → Bool} {xs : List α} (h : ∃ x, x ∈ xs ∧ p x = true)
Goal: List.findIdx p xs < xs.length
-- List.findIdx_get?_eq_get_of_exists
theorem findIdx_get?_eq_get_of_exists {xs : List α} (h : ∃ x ∈ xs, p x) :
    xs.get? (xs.findIdx p) = some (xs.get ⟨xs.findIdx p, xs.findIdx_lt_length_of_exists h⟩) 
Arguments: {α : Type u_1} {p : α → Bool} {xs : List α} (h : ∃ x, x ∈ xs ∧ p x = true)
Goal: xs.get? (List.findIdx p xs) = some (xs.get ⟨List.findIdx p xs, ⋯⟩)
-- List.findIdx?_nil
@[simp] theorem findIdx?_nil : ([] : List α).findIdx? p i = none 
Arguments: {α : Type u_1} {p : α → Bool} {i : Nat}
Goal: List.findIdx? p [] i = none
-- List.findIdx?_cons
@[simp] theorem findIdx?_cons :
    (x :: xs).findIdx? p i = if p x then some i else findIdx? p xs (i + 1) 
Goal: ∀ {α : Type u_1} {x : α} {xs : List α} {p : α → Bool} {i : Nat},
  List.findIdx? p (x :: xs) i = if p x = true then some i else List.findIdx? p xs (i + 1)
-- List.findIdx?_succ
@[simp] theorem findIdx?_succ :
    (xs : List α).findIdx? p (i+1) = (xs.findIdx? p i).map fun i => i + 1 
Arguments: {α : Type u_1} {xs : List α} {p : α → Bool} {i : Nat}
Goal: List.findIdx? p xs (i + 1) = Option.map (fun i => i + 1) (List.findIdx? p xs i)
-- List.findIdx?_eq_some_iff
theorem findIdx?_eq_some_iff (xs : List α) (p : α → Bool) :
    xs.findIdx? p = some i ↔ (xs.take (i + 1)).map p = replicate i false ++ [true] 
Arguments: {α : Type u_1} {i : Nat} (xs : List α) (p : α → Bool)
Goal: List.findIdx? p xs = some i ↔ List.map p (List.take (i + 1) xs) = List.replicate i false ++ [true]
-- List.findIdx?_of_eq_some
theorem findIdx?_of_eq_some {xs : List α} {p : α → Bool} (w : xs.findIdx? p = some i) :
    match xs.get? i with | some a => p a | none => false 
Arguments: {α : Type u_1} {i : Nat} {xs : List α} {p : α → Bool} (w : List.findIdx? p xs = some i)
Goal: match xs.get? i with
| some a => p a = true
| none => false = true
-- List.findIdx?_of_eq_none
theorem findIdx?_of_eq_none {xs : List α} {p : α → Bool} (w : xs.findIdx? p = none) :
    ∀ i, match xs.get? i with | some a => ¬ p a | none => true 
Arguments: {α : Type u_1} {xs : List α} {p : α → Bool} (w : List.findIdx? p xs = none) (i : Nat)
Goal: match xs.get? i with
| some a => ¬p a = true
| none => true = true
-- List.findIdx?_append
@[simp] theorem findIdx?_append :
    (xs ++ ys : List α).findIdx? p =
      (xs.findIdx? p <|> (ys.findIdx? p).map fun i => i + xs.length) 
Arguments: {α : Type u_1} {xs ys : List α} {p : α → Bool}
Goal: List.findIdx? p (xs ++ ys) =
  HOrElse.hOrElse (List.findIdx? p xs) fun x => Option.map (fun i => i + xs.length) (List.findIdx? p ys)
-- List.findIdx?_replicate
@[simp] theorem findIdx?_replicate :
    (replicate n a).findIdx? p = if 0 < n ∧ p a then some 0 else none 
Arguments: {n : Nat}
Goal: ∀ {α : Type u_1} {a : α} {p : α → Bool},
  List.findIdx? p (List.replicate n a) = if 0 < n ∧ p a = true then some 0 else none
-- List.Pairwise.sublist
theorem Pairwise.sublist : l₁ <+ l₂ → l₂.Pairwise R → l₁.Pairwise R
  
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α} {R : α → α → Prop}, l₁ <+ l₂ → List.Pairwise R l₂ → List.Pairwise R l₁
-- List.pairwise_map
theorem pairwise_map {l : List α} :
    (l.map f).Pairwise R ↔ l.Pairwise fun a b => R (f a) (f b) 
Arguments: {α : Type u_1}
Goal: ∀ {α_1 : Type u_2} {f : α → α_1} {R : α_1 → α_1 → Prop} {l : List α},
  List.Pairwise R (List.map f l) ↔ List.Pairwise (fun a b => R (f a) (f b)) l
-- List.pairwise_append
theorem pairwise_append {l₁ l₂ : List α} :
    (l₁ ++ l₂).Pairwise R ↔ l₁.Pairwise R ∧ l₂.Pairwise R ∧ ∀ a ∈ l₁, ∀ b ∈ l₂, R a b 
Arguments: {α : Type u_1} {R : α → α → Prop} {l₁ l₂ : List α}
Goal: List.Pairwise R (l₁ ++ l₂) ↔ List.Pairwise R l₁ ∧ List.Pairwise R l₂ ∧ ∀ (a : α), a ∈ l₁ → ∀ (b : α), b ∈ l₂ → R a b
-- List.pairwise_reverse
theorem pairwise_reverse {l : List α} :
    l.reverse.Pairwise R ↔ l.Pairwise (fun a b => R b a) 
Arguments: {α : Type u_1} {R : α → α → Prop} {l : List α}
Goal: List.Pairwise R l.reverse ↔ List.Pairwise (fun a b => R b a) l
-- List.Pairwise.imp
theorem Pairwise.imp {α R S} (H : ∀ {a b}, R a b → S a b) :
    ∀ {l : List α}, l.Pairwise R → l.Pairwise S
  
Arguments: {α : Type u_1} {R S : α → α → Prop} (H : ∀ {a b : α}, R a b → S a b) {l : List α}
Goal: List.Pairwise R l → List.Pairwise S l
-- List.replaceF_nil
theorem replaceF_nil : [].replaceF p = [] 
Goal: ∀ {α : Type u_1} {p : α → Option α}, List.replaceF p [] = []
-- List.replaceF_cons
theorem replaceF_cons (a : α) (l : List α) :
    (a :: l).replaceF p = match p a with
      | none => a :: replaceF p l
      | some a' => a' :: l 
Arguments: {α : Type u_1} {p : α → Option α} (a : α) (l : List α)
Goal: List.replaceF p (a :: l) =
  match p a with
  | none => a :: List.replaceF p l
  | some a' => a' :: l
-- List.replaceF_cons_of_some
theorem replaceF_cons_of_some {l : List α} (p) (h : p a = some a') :
    (a :: l).replaceF p = a' :: l 
Arguments: {α : Type u_1} {a' a : α} {l : List α} (p : α → Option α) (h : p a = some a')
Goal: List.replaceF p (a :: l) = a' :: l
-- List.replaceF_cons_of_none
theorem replaceF_cons_of_none {l : List α} (p) (h : p a = none) :
    (a :: l).replaceF p = a :: l.replaceF p 
Arguments: {α : Type u_1} {a : α} {l : List α} (p : α → Option α) (h : p a = none)
Goal: List.replaceF p (a :: l) = a :: List.replaceF p l
-- List.replaceF_of_forall_none
theorem replaceF_of_forall_none {l : List α} (h : ∀ a, a ∈ l → p a = none) : l.replaceF p = l 
Arguments: {α : Type u_1} {p : α → Option α} {l : List α} (h : ∀ (a : α), a ∈ l → p a = none)
Goal: List.replaceF p l = l
-- List.exists_of_replaceF
theorem exists_of_replaceF : ∀ {l : List α} {a a'} (al : a ∈ l) (pa : p a = some a'),
    ∃ a a' l₁ l₂,
      (∀ b ∈ l₁, p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ l.replaceF p = l₁ ++ a' :: l₂
  
Arguments: {α : Type u_1} {p : α → Option α} {l : List α} {a a' : α} (al : a ∈ l) (pa : p a = some a')
Goal: ∃ a a' l₁ l₂, (∀ (b : α), b ∈ l₁ → p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ List.replaceF p l = l₁ ++ a' :: l₂
-- List.exists_or_eq_self_of_replaceF
theorem exists_or_eq_self_of_replaceF (p) (l : List α) :
    l.replaceF p = l ∨ ∃ a a' l₁ l₂,
      (∀ b ∈ l₁, p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ l.replaceF p = l₁ ++ a' :: l₂ 
Arguments: {α : Type u_1} (p : α → Option α) (l : List α)
Goal: List.replaceF p l = l ∨
  ∃ a a' l₁ l₂,
    (∀ (b : α), b ∈ l₁ → p b = none) ∧ p a = some a' ∧ l = l₁ ++ a :: l₂ ∧ List.replaceF p l = l₁ ++ a' :: l₂
-- List.length_replaceF
@[simp] theorem length_replaceF : length (replaceF f l) = length l 
Goal: ∀ {α : Type u_1} {f : α → Option α} {l : List α}, (List.replaceF f l).length = l.length
-- List.disjoint_symm
theorem disjoint_symm (d : Disjoint l₁ l₂) : Disjoint l₂ l₁ 
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Disjoint l₂ → l₂.Disjoint l₁
-- List.disjoint_comm
theorem disjoint_comm : Disjoint l₁ l₂ ↔ Disjoint l₂ l₁ 
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Disjoint l₂ ↔ l₂.Disjoint l₁
-- List.disjoint_left
theorem disjoint_left : Disjoint l₁ l₂ ↔ ∀ ⦃a⦄, a ∈ l₁ → a ∉ l₂ 
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Disjoint l₂ ↔ ∀ ⦃a : α⦄, a ∈ l₁ → ¬a ∈ l₂
-- List.disjoint_right
theorem disjoint_right : Disjoint l₁ l₂ ↔ ∀ ⦃a⦄, a ∈ l₂ → a ∉ l₁ 
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Disjoint l₂ ↔ ∀ ⦃a : α⦄, a ∈ l₂ → ¬a ∈ l₁
-- List.disjoint_iff_ne
theorem disjoint_iff_ne : Disjoint l₁ l₂ ↔ ∀ a ∈ l₁, ∀ b ∈ l₂, a ≠ b 
Goal: ∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Disjoint l₂ ↔ ∀ (a : α), a ∈ l₁ → ∀ (b : α), b ∈ l₂ → a ≠ b
-- List.disjoint_of_subset_left
theorem disjoint_of_subset_left (ss : l₁ ⊆ l) (d : Disjoint l l₂) : Disjoint l₁ l₂ 
Goal: ∀ {α : Type u_1} {l₁ l l₂ : List α}, l₁ ⊆ l → l.Disjoint l₂ → l₁.Disjoint l₂
-- List.disjoint_of_subset_right
theorem disjoint_of_subset_right (ss : l₂ ⊆ l) (d : Disjoint l₁ l) : Disjoint l₁ l₂ 
Goal: ∀ {α : Type u_1} {l₂ l l₁ : List α}, l₂ ⊆ l → l₁.Disjoint l → l₁.Disjoint l₂
-- List.disjoint_of_disjoint_cons_left
theorem disjoint_of_disjoint_cons_left {l₁ l₂} : Disjoint (a :: l₁) l₂ → Disjoint l₁ l₂ 
Goal: ∀ {α : Type u_1} {a : α} {l₁ l₂ : List α}, (a :: l₁).Disjoint l₂ → l₁.Disjoint l₂
-- List.disjoint_of_disjoint_cons_right
theorem disjoint_of_disjoint_cons_right {l₁ l₂} : Disjoint l₁ (a :: l₂) → Disjoint l₁ l₂ 
Goal: ∀ {α : Type u_1} {a : α} {l₁ l₂ : List α}, l₁.Disjoint (a :: l₂) → l₁.Disjoint l₂
-- List.disjoint_nil_left
@[simp] theorem disjoint_nil_left (l : List α) : Disjoint [] l 
Arguments: {α : Type u_1} (l : List α)
Goal: [].Disjoint l
-- List.disjoint_nil_right
@[simp] theorem disjoint_nil_right (l : List α) : Disjoint l [] 
Arguments: {α : Type u_1} (l : List α)
Goal: l.Disjoint []
-- List.singleton_disjoint
@[simp 1100] theorem singleton_disjoint : Disjoint [a] l ↔ a ∉ l 
Goal: ∀ {α : Type u_1} {a : α} {l : List α}, [a].Disjoint l ↔ ¬a ∈ l
-- List.disjoint_singleton
@[simp 1100] theorem disjoint_singleton : Disjoint l [a] ↔ a ∉ l 
Goal: ∀ {α : Type u_1} {l : List α} {a : α}, l.Disjoint [a] ↔ ¬a ∈ l
-- List.disjoint_append_left
@[simp] theorem disjoint_append_left : Disjoint (l₁ ++ l₂) l ↔ Disjoint l₁ l ∧ Disjoint l₂ l 
Goal: ∀ {α : Type u_1} {l₁ l₂ l : List α}, (l₁ ++ l₂).Disjoint l ↔ l₁.Disjoint l ∧ l₂.Disjoint l
-- List.disjoint_append_right
@[simp] theorem disjoint_append_right : Disjoint l (l₁ ++ l₂) ↔ Disjoint l l₁ ∧ Disjoint l l₂ 
Goal: ∀ {α : Type u_1} {l l₁ l₂ : List α}, l.Disjoint (l₁ ++ l₂) ↔ l.Disjoint l₁ ∧ l.Disjoint l₂