ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.injective_foldl_comp
theorem injective_foldl_comp {l : List (α → α)} {f : α → α}
    (hl : ∀ f ∈ l, Function.Injective f) (hf : Function.Injective f) :
    Function.Injective (@List.foldl (α → α) (α → α) Function.comp f l) 
Arguments: {α : Type u} {l : List (α → α)} {f : α → α} (hl : ∀ (f : α → α), f ∈ l → Function.Injective f) (hf : Function.Injective f)
Goal: Function.Injective (List.foldl Function.comp f l)
-- List.foldrRecOn_nil
@[simp]
theorem foldrRecOn_nil {C : β → Sort*} (op : α → β → β) (b) (hb : C b) (hl) :
    foldrRecOn [] op b hb hl = hb 
Arguments: {α : Type u} {β : Type v} {C : β → Sort u_2} (op : α → β → β) (b : β) (hb : C b) (hl : (b : β) → C b → (a : α) → a ∈ [] → C (op a b))
Goal: [].foldrRecOn op b hb hl = hb
-- List.foldrRecOn_cons
@[simp]
theorem foldrRecOn_cons {C : β → Sort*} (x : α) (l : List α) (op : α → β → β) (b) (hb : C b)
    (hl : ∀ b, C b → ∀ a ∈ x :: l, C (op a b)) :
    foldrRecOn (x :: l) op b hb hl =
      hl _ (foldrRecOn l op b hb fun b hb a ha => hl b hb a (mem_cons_of_mem _ ha)) x
        (mem_cons_self _ _) 
Arguments: {α : Type u} {β : Type v} {C : β → Sort u_2} (x : α) (l : List α) (op : α → β → β) (b : β) (hb : C b) (hl : (b : β) → C b → (a : α) → a ∈ x :: l → C (op a b))
Goal: (x :: l).foldrRecOn op b hb hl = hl (List.foldr op b l) (l.foldrRecOn op b hb fun b hb a ha => hl b hb a ⋯) x ⋯
-- List.foldlRecOn_nil
@[simp]
theorem foldlRecOn_nil {C : β → Sort*} (op : β → α → β) (b) (hb : C b) (hl) :
    foldlRecOn [] op b hb hl = hb 
Arguments: {α : Type u} {β : Type v} {C : β → Sort u_2} (op : β → α → β) (b : β) (hb : C b) (hl : (b : β) → C b → (a : α) → a ∈ [] → C (op b a))
Goal: [].foldlRecOn op b hb hl = hb
-- List.append_cons_inj_of_not_mem
lemma append_cons_inj_of_not_mem {x₁ x₂ z₁ z₂ : List α} {a₁ a₂ : α}
    (notin_x : a₂ ∉ x₁) (notin_z : a₂ ∉ z₁) :
    x₁ ++ a₁ :: z₁ = x₂ ++ a₂ :: z₂ ↔ x₁ = x₂ ∧ a₁ = a₂ ∧ z₁ = z₂ 
Arguments: {α : Type u} {x₁ x₂ z₁ z₂ : List α} {a₁ a₂ : α} (notin_x : ¬a₂ ∈ x₁) (notin_z : ¬a₂ ∈ z₁)
Goal: x₁ ++ a₁ :: z₁ = x₂ ++ a₂ :: z₂ ↔ x₁ = x₂ ∧ a₁ = a₂ ∧ z₁ = z₂
-- List.length_scanl
theorem length_scanl : ∀ a l, length (scanl f a l) = l.length + 1
  
Arguments: {α : Type u} {β : Type v} {f : β → α → β} (a : β) (l : List α)
Goal: (List.scanl f a l).length = l.length + 1
-- List.scanl_nil
@[simp]
theorem scanl_nil (b : β) : scanl f b nil = [b] 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} (b : β)
Goal: List.scanl f b [] = [b]
-- List.scanl_cons
@[simp]
theorem scanl_cons : scanl f b (a :: l) = [b] ++ scanl f (f b a) l 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {a : α} {l : List α}
Goal: List.scanl f b (a :: l) = [b] ++ List.scanl f (f b a) l
-- List.getElem?_scanl_zero
@[simp]
theorem getElem?_scanl_zero : (scanl f b l)[0]? = some b 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α}
Goal: (List.scanl f b l)[0]? = some b
-- List.get?_zero_scanl
@[deprecated getElem?_scanl_zero (since := "2024-06-12")]
theorem get?_zero_scanl : (scanl f b l).get? 0 = some b 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α}
Goal: (List.scanl f b l).get? 0 = some b
-- List.getElem_scanl_zero
@[simp]
theorem getElem_scanl_zero {h : 0 < (scanl f b l).length} : (scanl f b l)[0] = b 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {h : 0 < (List.scanl f b l).length}
Goal: (List.scanl f b l)[0] = b
-- List.get_zero_scanl
@[deprecated getElem_scanl_zero (since := "2024-06-12")]
theorem get_zero_scanl {h : 0 < (scanl f b l).length} : (scanl f b l).get ⟨0, h⟩ = b 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {h : 0 < (List.scanl f b l).length}
Goal: (List.scanl f b l).get ⟨0, h⟩ = b
-- List.nthLe_zero_scanl
@[simp, deprecated get_zero_scanl (since := "2023-01-05")]
theorem nthLe_zero_scanl {h : 0 < (scanl f b l).length} : (scanl f b l).nthLe 0 h = b 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {h : 0 < (List.scanl f b l).length}
Goal: (List.scanl f b l).nthLe 0 h = b
-- List.get?_succ_scanl
theorem get?_succ_scanl {i : ℕ} : (scanl f b l).get? (i + 1) =
    ((scanl f b l).get? i).bind fun x => (l.get? i).map fun y => f x y 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {i : ℕ}
Goal: (List.scanl f b l).get? (i + 1) = ((List.scanl f b l).get? i).bind fun x => Option.map (fun y => f x y) (l.get? i)
-- List.nthLe_succ_scanl
theorem nthLe_succ_scanl {i : ℕ} {h : i + 1 < (scanl f b l).length} :
    (scanl f b l).nthLe (i + 1) h =
      f ((scanl f b l).nthLe i (Nat.lt_of_succ_lt h))
        (l.nthLe i (Nat.lt_of_succ_lt_succ (lt_of_lt_of_le h (le_of_eq (length_scanl b l))))) 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {i : ℕ} {h : i + 1 < (List.scanl f b l).length}
Goal: (List.scanl f b l).nthLe (i + 1) h = f ((List.scanl f b l).nthLe i ⋯) (l.nthLe i ⋯)
-- List.get_succ_scanl
theorem get_succ_scanl {i : ℕ} {h : i + 1 < (scanl f b l).length} :
    (scanl f b l).get ⟨i + 1, h⟩ =
      f ((scanl f b l).get ⟨i, Nat.lt_of_succ_lt h⟩)
        (l.get ⟨i, Nat.lt_of_succ_lt_succ (lt_of_lt_of_le h (le_of_eq (length_scanl b l)))⟩) 
Arguments: {α : Type u} {β : Type v} {f : β → α → β} {b : β} {l : List α} {i : ℕ} {h : i + 1 < (List.scanl f b l).length}
Goal: (List.scanl f b l).get ⟨i + 1, h⟩ = f ((List.scanl f b l).get ⟨i, ⋯⟩) (l.get ⟨i, ⋯⟩)
-- List.scanr_nil
@[simp]
theorem scanr_nil (f : α → β → β) (b : β) : scanr f b [] = [b] 
Arguments: {α : Type u} {β : Type v} (f : α → β → β) (b : β)
Goal: List.scanr f b [] = [b]
-- List.scanr_cons
@[simp]
theorem scanr_cons (f : α → β → β) (b : β) (a : α) (l : List α) :
    scanr f b (a :: l) = foldr f b (a :: l) :: scanr f b l 
Arguments: {α : Type u} {β : Type v} (f : α → β → β) (b : β) (a : α) (l : List α)
Goal: List.scanr f b (a :: l) = List.foldr f b (a :: l) :: List.scanr f b l
-- List.foldl1_eq_foldr1
theorem foldl1_eq_foldr1 (hassoc : Associative f) :
    ∀ a b l, foldl f a (l ++ [b]) = foldr f b (a :: l)
  
Arguments: {α : Type u} {f : α → α → α} (hassoc : Associative f) (a b : α) (l : List α)
Goal: List.foldl f a (l ++ [b]) = List.foldr f b (a :: l)
-- List.foldl_eq_of_comm_of_assoc
theorem foldl_eq_of_comm_of_assoc (hcomm : Commutative f) (hassoc : Associative f) :
    ∀ a b l, foldl f a (b :: l) = f b (foldl f a l)
  
Arguments: {α : Type u} {f : α → α → α} (hcomm : Commutative f) (hassoc : Associative f) (a b : α) (l : List α)
Goal: List.foldl f a (b :: l) = f b (List.foldl f a l)
-- List.foldl_eq_foldr
theorem foldl_eq_foldr (hcomm : Commutative f) (hassoc : Associative f) :
    ∀ a l, foldl f a l = foldr f a l
  
Arguments: {α : Type u} {f : α → α → α} (hcomm : Commutative f) (hassoc : Associative f) (a : α) (l : List α)
Goal: List.foldl f a l = List.foldr f a l
-- List.foldl_eq_of_comm'
theorem foldl_eq_of_comm' : ∀ a b l, foldl f a (b :: l) = f (foldl f a l) b
  
Arguments: {α : Type u} {β : Type v} {f : α → β → α} (hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b) (a : α) (b : β) (l : List β)
Goal: List.foldl f a (b :: l) = f (List.foldl f a l) b
-- List.foldl_eq_foldr'
theorem foldl_eq_foldr' : ∀ a l, foldl f a l = foldr (flip f) a l
  
Arguments: {α : Type u} {β : Type v} {f : α → β → α} (hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b) (a : α) (l : List β)
Goal: List.foldl f a l = List.foldr (flip f) a l
-- List.foldr_eq_of_comm'
theorem foldr_eq_of_comm' : ∀ a b l, foldr f a (b :: l) = foldr f (f b a) l
  
Arguments: {α : Type u} {β : Type v} {f : α → β → β} (hf : ∀ (a b : α) (c : β), f a (f b c) = f b (f a c)) (a : β) (b : α) (l : List α)
Goal: List.foldr f a (b :: l) = List.foldr f (f b a) l
-- List.foldl_assoc
theorem foldl_assoc : ∀ {l : List α} {a₁ a₂}, (l <*> a₁ ⋆ a₂) = a₁ ⋆ l <*> a₂
  
Arguments: {α : Type u} {op : α → α → α} [ha : Std.Associative op] {l : List α} {a₁ a₂ : α}
Goal: List.foldl op (op a₁ a₂) l = op a₁ (List.foldl op a₂ l)
-- List.foldl_op_eq_op_foldr_assoc
theorem foldl_op_eq_op_foldr_assoc :
    ∀ {l : List α} {a₁ a₂}, ((l <*> a₁) ⋆ a₂) = a₁ ⋆ l.foldr (· ⋆ ·) a₂
  
Arguments: {α : Type u} {op : α → α → α} [ha : Std.Associative op] {l : List α} {a₁ a₂ : α}
Goal: op (List.foldl op a₁ l) a₂ = op a₁ (List.foldr (fun x x_1 => op x x_1) a₂ l)
-- List.foldl_assoc_comm_cons
theorem foldl_assoc_comm_cons {l : List α} {a₁ a₂} : ((a₁ :: l) <*> a₂) = a₁ ⋆ l <*> a₂ 
Arguments: {α : Type u} {op : α → α → α} [ha : Std.Associative op] [hc : Std.Commutative op] {l : List α} {a₁ a₂ : α}
Goal: List.foldl op a₂ (a₁ :: l) = op a₁ (List.foldl op a₂ l)
-- List.foldrM_eq_foldr
theorem foldrM_eq_foldr (f : α → β → m β) (b l) :
    foldrM f b l = foldr (fun a mb => mb >>= f a) (pure b) l 
Arguments: {α : Type u} {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (f : α → β → m β) (b : β) (l : List α)
Goal: List.foldrM f b l = List.foldr (fun a mb => mb >>= f a) (pure b) l
-- List.foldlM_eq_foldl
theorem foldlM_eq_foldl (f : β → α → m β) (b l) :
    List.foldlM f b l = foldl (fun mb a => mb >>= fun b => f b a) (pure b) l 
Arguments: {α : Type u} {β : Type v} {m : Type v → Type w} [Monad m] [LawfulMonad m] (f : β → α → m β) (b : β) (l : List α)
Goal: List.foldlM f b l =
  List.foldl
    (fun mb a => do
      let b ← mb
      f b a)
    (pure b) l
-- List.intersperse_singleton
@[simp]
theorem intersperse_singleton (a b : α) : intersperse a [b] = [b] 
Arguments: {α : Type u} (a b : α)
Goal: List.intersperse a [b] = [b]
-- List.intersperse_cons_cons
@[simp]
theorem intersperse_cons_cons (a b c : α) (tl : List α) :
    intersperse a (b :: c :: tl) = b :: a :: intersperse a (c :: tl) 
Arguments: {α : Type u} (a b c : α) (tl : List α)
Goal: List.intersperse a (b :: c :: tl) = b :: a :: List.intersperse a (c :: tl)
-- List.splitAt_eq_take_drop.go_eq_take_drop
@[simp]
theorem splitAt_eq_take_drop (n : ℕ) (l : List α) : splitAt n l = (take n l, drop n l) 
Arguments: {α : Type u} (n : ℕ) (l xs : List α) (acc : Array α)
Goal: List.splitAt.go l xs n acc = if n < xs.length then (acc.toList ++ List.take n xs, List.drop n xs) else (l, [])
-- List.splitAt_eq_take_drop
@[simp]
theorem splitAt_eq_take_drop (n : ℕ) (l : List α) : splitAt n l = (take n l, drop n l) 
Arguments: {α : Type u} (n : ℕ) (l : List α)
Goal: List.splitAt n l = (List.take n l, List.drop n l)
-- List.splitOn_nil
@[simp]
theorem splitOn_nil [DecidableEq α] (a : α) : [].splitOn a = [[]] 
Arguments: {α : Type u} [DecidableEq α] (a : α)
Goal: List.splitOn a [] = [[]]
-- List.splitOnP_nil
@[simp]
theorem splitOnP_nil : [].splitOnP p = [[]] 
Arguments: {α : Type u} (p : α → Bool)
Goal: List.splitOnP p [] = [[]]
-- List.splitOnP.go_ne_nil
theorem splitOnP.go_ne_nil (xs acc : List α) : splitOnP.go p xs acc ≠ [] 
Arguments: {α : Type u} (p : α → Bool) (xs acc : List α)
Goal: List.splitOnP.go p xs acc ≠ []
-- List.splitOnP.go_acc
theorem splitOnP.go_acc (xs acc : List α) :
    splitOnP.go p xs acc = modifyHead (acc.reverse ++ ·) (splitOnP p xs) 
Arguments: {α : Type u} (p : α → Bool) (xs acc : List α)
Goal: List.splitOnP.go p xs acc = List.modifyHead (fun x => acc.reverse ++ x) (List.splitOnP p xs)
-- List.splitOnP_ne_nil
theorem splitOnP_ne_nil (xs : List α) : xs.splitOnP p ≠ [] 
Arguments: {α : Type u} (p : α → Bool) (xs : List α)
Goal: List.splitOnP p xs ≠ []
-- List.splitOnP_cons
@[simp]
theorem splitOnP_cons (x : α) (xs : List α) :
    (x :: xs).splitOnP p =
      if p x then [] :: xs.splitOnP p else (xs.splitOnP p).modifyHead (cons x) 
Arguments: {α : Type u} (p : α → Bool) (x : α) (xs : List α)
Goal: List.splitOnP p (x :: xs) =
  if p x = true then [] :: List.splitOnP p xs else List.modifyHead (List.cons x) (List.splitOnP p xs)
-- List.splitOnP_spec.join_zipWith
theorem splitOnP_spec (as : List α) :
    join (zipWith (· ++ ·) (splitOnP p as) (((as.filter p).map fun x => [x]) ++ [[]])) = as 
Arguments: {α : Type u} {xs ys : List (List α)} {a : α} (hxs : xs ≠ []) (hys : ys ≠ [])
Goal: (List.zipWith (fun x x_1 => x ++ x_1) (List.modifyHead (List.cons a) xs) ys).join =
  a :: (List.zipWith (fun x x_1 => x ++ x_1) xs ys).join
-- List.splitOnP_spec
theorem splitOnP_spec (as : List α) :
    join (zipWith (· ++ ·) (splitOnP p as) (((as.filter p).map fun x => [x]) ++ [[]])) = as 
Arguments: {α : Type u} (p : α → Bool) (as : List α)
Goal: (List.zipWith (fun x x_1 => x ++ x_1) (List.splitOnP p as) (List.map (fun x => [x]) (List.filter p as) ++ [[]])).join =
  as
-- List.splitOnP_eq_single
theorem splitOnP_eq_single (h : ∀ x ∈ xs, ¬p x) : xs.splitOnP p = [xs] 
Arguments: {α : Type u} (p : α → Bool) (xs : List α) (h : ∀ (x : α), x ∈ xs → ¬p x = true)
Goal: List.splitOnP p xs = [xs]
-- List.splitOnP_first
theorem splitOnP_first (h : ∀ x ∈ xs, ¬p x) (sep : α) (hsep : p sep) (as : List α) :
    (xs ++ sep :: as).splitOnP p = xs :: as.splitOnP p 
Arguments: {α : Type u} (p : α → Bool) (xs : List α) (h : ∀ (x : α), x ∈ xs → ¬p x = true) (sep : α) (hsep : p sep = true) (as : List α)
Goal: List.splitOnP p (xs ++ sep :: as) = xs :: List.splitOnP p as
-- List.intercalate_splitOn
theorem intercalate_splitOn (x : α) [DecidableEq α] : [x].intercalate (xs.splitOn x) = xs 
Arguments: {α : Type u} (xs : List α) (x : α) [DecidableEq α]
Goal: [x].intercalate (List.splitOn x xs) = xs
-- List.splitOn_intercalate
theorem splitOn_intercalate [DecidableEq α] (x : α) (hx : ∀ l ∈ ls, x ∉ l) (hls : ls ≠ []) :
    ([x].intercalate ls).splitOn x = ls 
Arguments: {α : Type u} (ls : List (List α)) [DecidableEq α] (x : α) (hx : ∀ (l : List α), l ∈ ls → ¬x ∈ l) (hls : ls ≠ [])
Goal: List.splitOn x ([x].intercalate ls) = ls
-- List.modifyLast.go_append_one
theorem modifyLast.go_append_one (f : α → α) (a : α) (tl : List α) (r : Array α) :
    modifyLast.go f (tl ++ [a]) r = (r.toListAppend <| modifyLast.go f (tl ++ [a]) #[]) 
Arguments: {α : Type u} (f : α → α) (a : α) (tl : List α) (r : Array α)
Goal: List.modifyLast.go f (tl ++ [a]) r = r.toListAppend (List.modifyLast.go f (tl ++ [a]) #[])
-- List.modifyLast_append_one
theorem modifyLast_append_one (f : α → α) (a : α) (l : List α) :
    modifyLast f (l ++ [a]) = l ++ [f a] 
Arguments: {α : Type u} (f : α → α) (a : α) (l : List α)
Goal: List.modifyLast f (l ++ [a]) = l ++ [f a]
-- List.modifyLast_append
theorem modifyLast_append (f : α → α) (l₁ l₂ : List α) (_ : l₂ ≠ []) :
    modifyLast f (l₁ ++ l₂) = l₁ ++ modifyLast f l₂ 
Arguments: {α : Type u} (f : α → α) (l₁ l₂ : List α)
Goal: l₂ ≠ [] → List.modifyLast f (l₁ ++ l₂) = l₁ ++ List.modifyLast f l₂
-- List.attach_nil
@[simp] lemma attach_nil : ([] : List α).attach = [] 
Arguments: {α : Type u}
Goal: [].attach = []
-- List.sizeOf_lt_sizeOf_of_mem
theorem sizeOf_lt_sizeOf_of_mem [SizeOf α] {x : α} {l : List α} (hx : x ∈ l) :
    SizeOf.sizeOf x < SizeOf.sizeOf l 
Arguments: {α : Type u} [SizeOf α] {x : α} {l : List α} (hx : x ∈ l)
Goal: sizeOf x < sizeOf l
-- List.pmap_eq_map
@[simp]
theorem pmap_eq_map (p : α → Prop) (f : α → β) (l : List α) (H) :
    @pmap _ _ p (fun a _ => f a) l H = map f l 
Arguments: {α : Type u} {β : Type v} (p : α → Prop) (f : α → β) (l : List α) (H : ∀ (a : α), a ∈ l → p a)
Goal: List.pmap (fun a x => f a) l H = List.map f l
-- List.pmap_congr
theorem pmap_congr {p q : α → Prop} {f : ∀ a, p a → β} {g : ∀ a, q a → β} (l : List α) {H₁ H₂}
    (h : ∀ a ∈ l, ∀ (h₁ h₂), f a h₁ = g a h₂) : pmap f l H₁ = pmap g l H₂ 
Arguments: {α : Type u} {β : Type v} {p q : α → Prop} {f : (a : α) → p a → β} {g : (a : α) → q a → β} (l : List α) {H₁ : ∀ (a : α), a ∈ l → p a} {H₂ : ∀ (a : α), a ∈ l → q a} (h : ∀ (a : α), a ∈ l → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂)
Goal: List.pmap f l H₁ = List.pmap g l H₂
-- List.map_pmap
theorem map_pmap {p : α → Prop} (g : β → γ) (f : ∀ a, p a → β) (l H) :
    map g (pmap f l H) = pmap (fun a h => g (f a h)) l H 
Arguments: {α : Type u} {β : Type v} {γ : Type w} {p : α → Prop} (g : β → γ) (f : (a : α) → p a → β) (l : List α) (H : ∀ (a : α), a ∈ l → p a)
Goal: List.map g (List.pmap f l H) = List.pmap (fun a h => g (f a h)) l H
-- List.pmap_map
theorem pmap_map {p : β → Prop} (g : ∀ b, p b → γ) (f : α → β) (l H) :
    pmap g (map f l) H = pmap (fun a h => g (f a) h) l fun a h => H _ (mem_map_of_mem _ h) 
Arguments: {α : Type u} {β : Type v} {γ : Type w} {p : β → Prop} (g : (b : β) → p b → γ) (f : α → β) (l : List α) (H : ∀ (a : β), a ∈ List.map f l → p a)
Goal: List.pmap g (List.map f l) H = List.pmap (fun a h => g (f a) h) l ⋯
-- List.pmap_eq_map_attach
theorem pmap_eq_map_attach {p : α → Prop} (f : ∀ a, p a → β) (l H) :
    pmap f l H = l.attach.map fun x => f x.1 (H _ x.2) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) (l : List α) (H : ∀ (a : α), a ∈ l → p a)
Goal: List.pmap f l H = List.map (fun x => f ↑x ⋯) l.attach
-- List.attach_map_coe'
theorem attach_map_coe' (l : List α) (f : α → β) :
    (l.attach.map fun (i : {i // i ∈ l}) => f i) = l.map f 
Arguments: {α : Type u} {β : Type v} (l : List α) (f : α → β)
Goal: List.map (fun i => f ↑i) l.attach = List.map f l
-- List.attach_map_val'
theorem attach_map_val' (l : List α) (f : α → β) : (l.attach.map fun i => f i.val) = l.map f 
Arguments: {α : Type u} {β : Type v} (l : List α) (f : α → β)
Goal: List.map (fun i => f ↑i) l.attach = List.map f l
-- List.attach_map_val
@[simp]
theorem attach_map_val (l : List α) : l.attach.map Subtype.val = l 
Arguments: {α : Type u} (l : List α)
Goal: List.map Subtype.val l.attach = l
-- List.mem_attach
@[simp]
theorem mem_attach (l : List α) : ∀ x, x ∈ l.attach
  
Arguments: {α : Type u} (l : List α) (x : { x // x ∈ l })
Goal: x ∈ l.attach
-- List.mem_pmap
@[simp]
theorem mem_pmap {p : α → Prop} {f : ∀ a, p a → β} {l H b} :
    b ∈ pmap f l H ↔ ∃ (a : _) (h : a ∈ l), f a (H a h) = b 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} {f : (a : α) → p a → β} {l : List α} {H : ∀ (a : α), a ∈ l → p a} {b : β}
Goal: b ∈ List.pmap f l H ↔ ∃ a h, f a ⋯ = b
-- List.length_pmap
@[simp]
theorem length_pmap {p : α → Prop} {f : ∀ a, p a → β} {l H} : length (pmap f l H) = length l 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} {f : (a : α) → p a → β} {l : List α} {H : ∀ (a : α), a ∈ l → p a}
Goal: (List.pmap f l H).length = l.length
-- List.length_attach
@[simp]
theorem length_attach (L : List α) : L.attach.length = L.length 
Arguments: {α : Type u} (L : List α)
Goal: L.attach.length = L.length
-- List.pmap_eq_nil
@[simp]
theorem pmap_eq_nil {p : α → Prop} {f : ∀ a, p a → β} {l H} : pmap f l H = [] ↔ l = [] 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} {f : (a : α) → p a → β} {l : List α} {H : ∀ (a : α), a ∈ l → p a}
Goal: List.pmap f l H = [] ↔ l = []
-- List.attach_eq_nil
@[simp]
theorem attach_eq_nil (l : List α) : l.attach = [] ↔ l = [] 
Arguments: {α : Type u} (l : List α)
Goal: l.attach = [] ↔ l = []
-- List.getLast_pmap
theorem getLast_pmap (p : α → Prop) (f : ∀ a, p a → β) (l : List α)
    (hl₁ : ∀ a ∈ l, p a) (hl₂ : l ≠ []) :
    (l.pmap f hl₁).getLast (mt List.pmap_eq_nil.1 hl₂) =
      f (l.getLast hl₂) (hl₁ _ (List.getLast_mem hl₂)) 
Arguments: {α : Type u} {β : Type v} (p : α → Prop) (f : (a : α) → p a → β) (l : List α) (hl₁ : ∀ (a : α), a ∈ l → p a) (hl₂ : l ≠ [])
Goal: (List.pmap f l hl₁).getLast ⋯ = f (l.getLast hl₂) ⋯
-- List.getElem?_pmap
theorem getElem?_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) (n : ℕ) :
    (pmap f l h)[n]? = Option.pmap f l[n]? fun x H => h x (getElem?_mem H) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) {l : List α} (h : ∀ (a : α), a ∈ l → p a) (n : ℕ)
Goal: (List.pmap f l h)[n]? = Option.pmap f l[n]? ⋯
-- List.get?_pmap
theorem get?_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) (n : ℕ) :
    get? (pmap f l h) n = Option.pmap f (get? l n) fun x H => h x (get?_mem H) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) {l : List α} (h : ∀ (a : α), a ∈ l → p a) (n : ℕ)
Goal: (List.pmap f l h).get? n = Option.pmap f (l.get? n) ⋯
-- List.getElem_pmap
theorem getElem_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) {n : ℕ}
    (hn : n < (pmap f l h).length) :
    (pmap f l h)[n] =
      f (l[n]'(@length_pmap _ _ p f l h ▸ hn))
        (h _ (getElem_mem l n (@length_pmap _ _ p f l h ▸ hn))) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) {l : List α} (h : ∀ (a : α), a ∈ l → p a) {n : ℕ} (hn : n < (List.pmap f l h).length)
Goal: (List.pmap f l h)[n] = f l[n] ⋯
-- List.get_pmap
theorem get_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) {n : ℕ}
    (hn : n < (pmap f l h).length) :
    get (pmap f l h) ⟨n, hn⟩ =
      f (get l ⟨n, @length_pmap _ _ p f l h ▸ hn⟩)
        (h _ (get_mem l n (@length_pmap _ _ p f l h ▸ hn))) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) {l : List α} (h : ∀ (a : α), a ∈ l → p a) {n : ℕ} (hn : n < (List.pmap f l h).length)
Goal: (List.pmap f l h).get ⟨n, hn⟩ = f (l.get ⟨n, ⋯⟩) ⋯
-- List.nthLe_pmap
@[deprecated get_pmap (since := "2023-01-05")]
theorem nthLe_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) {n : ℕ}
    (hn : n < (pmap f l h).length) :
    nthLe (pmap f l h) n hn =
      f (nthLe l n (@length_pmap _ _ p f l h ▸ hn))
        (h _ (get_mem l n (@length_pmap _ _ p f l h ▸ hn))) 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) {l : List α} (h : ∀ (a : α), a ∈ l → p a) {n : ℕ} (hn : n < (List.pmap f l h).length)
Goal: (List.pmap f l h).nthLe n hn = f (l.nthLe n ⋯) ⋯
-- List.pmap_append
theorem pmap_append {p : ι → Prop} (f : ∀ a : ι, p a → α) (l₁ l₂ : List ι)
    (h : ∀ a ∈ l₁ ++ l₂, p a) :
    (l₁ ++ l₂).pmap f h =
      (l₁.pmap f fun a ha => h a (mem_append_left l₂ ha)) ++
        l₂.pmap f fun a ha => h a (mem_append_right l₁ ha) 
Arguments: {ι : Type u_1} {α : Type u} {p : ι → Prop} (f : (a : ι) → p a → α) (l₁ l₂ : List ι) (h : ∀ (a : ι), a ∈ l₁ ++ l₂ → p a)
Goal: List.pmap f (l₁ ++ l₂) h = List.pmap f l₁ ⋯ ++ List.pmap f l₂ ⋯
-- List.pmap_append'
theorem pmap_append' {p : α → Prop} (f : ∀ a : α, p a → β) (l₁ l₂ : List α)
    (h₁ : ∀ a ∈ l₁, p a) (h₂ : ∀ a ∈ l₂, p a) :
    ((l₁ ++ l₂).pmap f fun a ha => (List.mem_append.1 ha).elim (h₁ a) (h₂ a)) =
      l₁.pmap f h₁ ++ l₂.pmap f h₂ 
Arguments: {α : Type u} {β : Type v} {p : α → Prop} (f : (a : α) → p a → β) (l₁ l₂ : List α) (h₁ : ∀ (a : α), a ∈ l₁ → p a) (h₂ : ∀ (a : α), a ∈ l₂ → p a)
Goal: List.pmap f (l₁ ++ l₂) ⋯ = List.pmap f l₁ h₁ ++ List.pmap f l₂ h₂
-- List.lookmap.go_append
theorem lookmap.go_append (l : List α) (acc : Array α) :
    lookmap.go f l acc = acc.toListAppend (lookmap f l) 
Arguments: {α : Type u} (f : α → Option α) (l : List α) (acc : Array α)
Goal: List.lookmap.go f l acc = acc.toListAppend (List.lookmap f l)
-- List.lookmap_nil
@[simp]
theorem lookmap_nil : [].lookmap f = [] 
Arguments: {α : Type u} (f : α → Option α)
Goal: List.lookmap f [] = []
-- List.lookmap_cons_none
@[simp]
theorem lookmap_cons_none {a : α} (l : List α) (h : f a = none) :
    (a :: l).lookmap f = a :: l.lookmap f 
Arguments: {α : Type u} (f : α → Option α) {a : α} (l : List α) (h : f a = none)
Goal: List.lookmap f (a :: l) = a :: List.lookmap f l
-- List.lookmap_cons_some
@[simp]
theorem lookmap_cons_some {a b : α} (l : List α) (h : f a = some b) :
    (a :: l).lookmap f = b :: l 
Arguments: {α : Type u} (f : α → Option α) {a b : α} (l : List α) (h : f a = some b)
Goal: List.lookmap f (a :: l) = b :: l
-- List.lookmap_some
theorem lookmap_some : ∀ l : List α, l.lookmap some = l
  
Arguments: {α : Type u} (l : List α)
Goal: List.lookmap some l = l
-- List.lookmap_none
theorem lookmap_none : ∀ l : List α, (l.lookmap fun _ => none) = l
  
Arguments: {α : Type u} (l : List α)
Goal: List.lookmap (fun x => none) l = l
-- List.lookmap_congr
theorem lookmap_congr {f g : α → Option α} :
    ∀ {l : List α}, (∀ a ∈ l, f a = g a) → l.lookmap f = l.lookmap g
  
Arguments: {α : Type u} {f g : α → Option α} {l : List α}
Goal: (∀ (a : α), a ∈ l → f a = g a) → List.lookmap f l = List.lookmap g l
-- List.lookmap_of_forall_not
theorem lookmap_of_forall_not {l : List α} (H : ∀ a ∈ l, f a = none) : l.lookmap f = l 
Arguments: {α : Type u} (f : α → Option α) {l : List α} (H : ∀ (a : α), a ∈ l → f a = none)
Goal: List.lookmap f l = l
-- List.lookmap_map_eq
theorem lookmap_map_eq (g : α → β) (h : ∀ (a), ∀ b ∈ f a, g a = g b) :
    ∀ l : List α, map g (l.lookmap f) = map g l
  
Arguments: {α : Type u} {β : Type v} (f : α → Option α) (g : α → β) (h : ∀ (a b : α), b ∈ f a → g a = g b) (l : List α)
Goal: List.map g (List.lookmap f l) = List.map g l