ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.of_mem_zip
theorem of_mem_zip {a b} : ∀ {l₁ : List α} {l₂ : List β}, (a, b) ∈ zip l₁ l₂ → a ∈ l₁ ∧ b ∈ l₂
  
Arguments: {α : Type u_1} {β : Type u_2} {a : α} {b : β} {l₁ : List α} {l₂ : List β}
Goal: (a, b) ∈ l₁.zip l₂ → a ∈ l₁ ∧ b ∈ l₂
-- List.map_fst_zip
theorem map_fst_zip :
    ∀ (l₁ : List α) (l₂ : List β), l₁.length ≤ l₂.length → map Prod.fst (zip l₁ l₂) = l₁
  
Arguments: {α : Type u_1} {β : Type u_2} (l₁ : List α) (l₂ : List β)
Goal: l₁.length ≤ l₂.length → List.map Prod.fst (l₁.zip l₂) = l₁
-- List.map_snd_zip
theorem map_snd_zip :
    ∀ (l₁ : List α) (l₂ : List β), l₂.length ≤ l₁.length → map Prod.snd (zip l₁ l₂) = l₂
  
Arguments: {α : Type u_1} {β : Type u_2} (l₁ : List α) (l₂ : List β)
Goal: l₂.length ≤ l₁.length → List.map Prod.snd (l₁.zip l₂) = l₂
-- List.zip_replicate'
@[simp] theorem zip_replicate' {a : α} {b : β} {n : Nat} :
    zip (replicate n a) (replicate n b) = replicate n (a, b) 
Arguments: {α : Type u_1} {β : Type u_2} {a : α} {b : β} {n : Nat}
Goal: (List.replicate n a).zip (List.replicate n b) = List.replicate n (a, b)
-- List.getElem?_zipWith
theorem getElem?_zipWith {f : α → β → γ} {i : Nat} :
    (List.zipWith f as bs)[i]? = match as[i]?, bs[i]? with
      | some a, some b => some (f a b) | _, _ => none 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {as : List α} {bs : List β} {f : α → β → γ} {i : Nat}
Goal: (List.zipWith f as bs)[i]? =
  match as[i]?, bs[i]? with
  | some a, some b => some (f a b)
  | x, x_1 => none
-- List.get?_zipWith
@[deprecated getElem?_zipWith (since := "2024-06-12")]
theorem get?_zipWith {f : α → β → γ} :
    (List.zipWith f as bs).get? i = match as.get? i, bs.get? i with
      | some a, some b => some (f a b) | _, _ => none 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {as : List α} {bs : List β} {i : Nat} {f : α → β → γ}
Goal: (List.zipWith f as bs).get? i =
  match as.get? i, bs.get? i with
  | some a, some b => some (f a b)
  | x, x_1 => none
-- List.zipWith_map
@[simp]
theorem zipWith_map {μ} (f : γ → δ → μ) (g : α → γ) (h : β → δ) (l₁ : List α) (l₂ : List β) :
    zipWith f (l₁.map g) (l₂.map h) = zipWith (fun a b => f (g a) (h b)) l₁ l₂ 
Arguments: {γ : Type u_1} {δ : Type u_2} {α : Type u_3} {β : Type u_4} {μ : Type u_5} (f : γ → δ → μ) (g : α → γ) (h : β → δ) (l₁ : List α) (l₂ : List β)
Goal: List.zipWith f (List.map g l₁) (List.map h l₂) = List.zipWith (fun a b => f (g a) (h b)) l₁ l₂
-- List.zipWith_map_left
theorem zipWith_map_left (l₁ : List α) (l₂ : List β) (f : α → α') (g : α' → β → γ) :
    zipWith g (l₁.map f) l₂ = zipWith (fun a b => g (f a) b) l₁ l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {α' : Type u_3} {γ : Type u_4} (l₁ : List α) (l₂ : List β) (f : α → α') (g : α' → β → γ)
Goal: List.zipWith g (List.map f l₁) l₂ = List.zipWith (fun a b => g (f a) b) l₁ l₂
-- List.zipWith_map_right
theorem zipWith_map_right (l₁ : List α) (l₂ : List β) (f : β → β') (g : α → β' → γ) :
    zipWith g l₁ (l₂.map f) = zipWith (fun a b => g a (f b)) l₁ l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {β' : Type u_3} {γ : Type u_4} (l₁ : List α) (l₂ : List β) (f : β → β') (g : α → β' → γ)
Goal: List.zipWith g l₁ (List.map f l₂) = List.zipWith (fun a b => g a (f b)) l₁ l₂
-- List.zipWith_foldr_eq_zip_foldr
theorem zipWith_foldr_eq_zip_foldr {f : α → β → γ} (i : δ):
    (zipWith f l₁ l₂).foldr g i = (zip l₁ l₂).foldr (fun p r => g (f p.1 p.2) r) i 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {l₁ : List α} {l₂ : List β} {g : γ → δ → δ} {f : α → β → γ} (i : δ)
Goal: List.foldr g i (List.zipWith f l₁ l₂) = List.foldr (fun p r => g (f p.fst p.snd) r) i (l₁.zip l₂)
-- List.zipWith_foldl_eq_zip_foldl
theorem zipWith_foldl_eq_zip_foldl {f : α → β → γ} (i : δ):
    (zipWith f l₁ l₂).foldl g i = (zip l₁ l₂).foldl (fun r p => g r (f p.1 p.2)) i 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {l₁ : List α} {l₂ : List β} {g : δ → γ → δ} {f : α → β → γ} (i : δ)
Goal: List.foldl g i (List.zipWith f l₁ l₂) = List.foldl (fun r p => g r (f p.fst p.snd)) i (l₁.zip l₂)
-- List.zipWith_eq_nil_iff
@[simp]
theorem zipWith_eq_nil_iff {f : α → β → γ} {l l'} : zipWith f l l' = [] ↔ l = [] ∨ l' = [] 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : α → β → γ} {l : List α} {l' : List β}
Goal: List.zipWith f l l' = [] ↔ l = [] ∨ l' = []
-- List.map_zipWith
theorem map_zipWith {δ : Type _} (f : α → β) (g : γ → δ → α) (l : List γ) (l' : List δ) :
    map f (zipWith g l l') = zipWith (fun x y => f (g x y)) l l' 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} (f : α → β) (g : γ → δ → α) (l : List γ) (l' : List δ)
Goal: List.map f (List.zipWith g l l') = List.zipWith (fun x y => f (g x y)) l l'
-- List.zipWith_distrib_take
theorem zipWith_distrib_take : (zipWith f l l').take n = zipWith f (l.take n) (l'.take n) 
Goal: ∀ {α : Type u_1} {α_1 : Type u_2} {α_2 : Type u_3} {f : α → α_1 → α_2} {l : List α} {l' : List α_1} {n : Nat},
  List.take n (List.zipWith f l l') = List.zipWith f (List.take n l) (List.take n l')
-- List.zipWith_distrib_drop
theorem zipWith_distrib_drop : (zipWith f l l').drop n = zipWith f (l.drop n) (l'.drop n) 
Goal: ∀ {α : Type u_1} {α_1 : Type u_2} {α_2 : Type u_3} {f : α → α_1 → α_2} {l : List α} {l' : List α_1} {n : Nat},
  List.drop n (List.zipWith f l l') = List.zipWith f (List.drop n l) (List.drop n l')
-- List.zipWith_append
theorem zipWith_append (f : α → β → γ) (l la : List α) (l' lb : List β)
    (h : l.length = l'.length) :
    zipWith f (l ++ la) (l' ++ lb) = zipWith f l l' ++ zipWith f la lb 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → β → γ) (l la : List α) (l' lb : List β) (h : l.length = l'.length)
Goal: List.zipWith f (l ++ la) (l' ++ lb) = List.zipWith f l l' ++ List.zipWith f la lb
-- List.zipWith_replicate'
@[simp] theorem zipWith_replicate' {a : α} {b : β} {n : Nat} :
    zipWith f (replicate n a) (replicate n b) = replicate n (f a b) 
Arguments: {α : Type u_1} {β : Type u_2}
Goal: ∀ {α_1 : Type u_3} {f : α → β → α_1} {a : α} {b : β} {n : Nat},
  List.zipWith f (List.replicate n a) (List.replicate n b) = List.replicate n (f a b)
-- List.getElem?_zipWithAll
theorem getElem?_zipWithAll {f : Option α → Option β → γ} {i : Nat} :
    (zipWithAll f as bs)[i]? = match as[i]?, bs[i]? with
      | none, none => .none | a?, b? => some (f a? b?) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {as : List α} {bs : List β} {f : Option α → Option β → γ} {i : Nat}
Goal: (List.zipWithAll f as bs)[i]? =
  match as[i]?, bs[i]? with
  | none, none => none
  | a?, b? => some (f a? b?)
-- List.get?_zipWithAll
@[deprecated getElem?_zipWithAll (since := "2024-06-12")]
theorem get?_zipWithAll {f : Option α → Option β → γ} :
    (zipWithAll f as bs).get? i = match as.get? i, bs.get? i with
      | none, none => .none | a?, b? => some (f a? b?) 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {as : List α} {bs : List β} {i : Nat} {f : Option α → Option β → γ}
Goal: (List.zipWithAll f as bs).get? i =
  match as.get? i, bs.get? i with
  | none, none => none
  | a?, b? => some (f a? b?)
-- List.zipWithAll_map
theorem zipWithAll_map {μ} (f : Option γ → Option δ → μ) (g : α → γ) (h : β → δ) (l₁ : List α) (l₂ : List β) :
    zipWithAll f (l₁.map g) (l₂.map h) = zipWithAll (fun a b => f (g <$> a) (h <$> b)) l₁ l₂ 
Arguments: {γ : Type u_1} {δ : Type u_2} {α : Type u_1} {β : Type u_2} {μ : Type u_3} (f : Option γ → Option δ → μ) (g : α → γ) (h : β → δ) (l₁ : List α) (l₂ : List β)
Goal: List.zipWithAll f (List.map g l₁) (List.map h l₂) = List.zipWithAll (fun a b => f (g <$> a) (h <$> b)) l₁ l₂
-- List.zipWithAll_map_left
theorem zipWithAll_map_left (l₁ : List α) (l₂ : List β) (f : α → α') (g : Option α' → Option β → γ) :
    zipWithAll g (l₁.map f) l₂ = zipWithAll (fun a b => g (f <$> a) b) l₁ l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {α' : Type u_1} {γ : Type u_3} (l₁ : List α) (l₂ : List β) (f : α → α') (g : Option α' → Option β → γ)
Goal: List.zipWithAll g (List.map f l₁) l₂ = List.zipWithAll (fun a b => g (f <$> a) b) l₁ l₂
-- List.zipWithAll_map_right
theorem zipWithAll_map_right (l₁ : List α) (l₂ : List β) (f : β → β') (g : Option α → Option β' → γ) :
    zipWithAll g l₁ (l₂.map f) = zipWithAll (fun a b => g a (f <$> b)) l₁ l₂ 
Arguments: {α : Type u_1} {β β' : Type u_2} {γ : Type u_3} (l₁ : List α) (l₂ : List β) (f : β → β') (g : Option α → Option β' → γ)
Goal: List.zipWithAll g l₁ (List.map f l₂) = List.zipWithAll (fun a b => g a (f <$> b)) l₁ l₂
-- List.map_zipWithAll
theorem map_zipWithAll {δ : Type _} (f : α → β) (g : Option γ → Option δ → α) (l : List γ) (l' : List δ) :
    map f (zipWithAll g l l') = zipWithAll (fun x y => f (g x y)) l l' 
Arguments: {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} (f : α → β) (g : Option γ → Option δ → α) (l : List γ) (l' : List δ)
Goal: List.map f (List.zipWithAll g l l') = List.zipWithAll (fun x y => f (g x y)) l l'
-- List.zipWithAll_replicate
@[simp] theorem zipWithAll_replicate {a : α} {b : β} {n : Nat} :
    zipWithAll f (replicate n a) (replicate n b) = replicate n (f a b) 
Arguments: {α : Type u_1} {β : Type u_2}
Goal: ∀ {α_1 : Type u_3} {f : Option α → Option β → α_1} {a : α} {b : β} {n : Nat},
  List.zipWithAll f (List.replicate n a) (List.replicate n b) = List.replicate n (f (some a) (some b))
-- List.unzip_replicate
@[simp] theorem unzip_replicate {n : Nat} {a : α} {b : β} :
    unzip (replicate n (a, b)) = (replicate n a, replicate n b) 
Arguments: {α : Type u_1} {β : Type u_2} {n : Nat} {a : α} {b : β}
Goal: (List.replicate n (a, b)).unzip = (List.replicate n a, List.replicate n b)
-- List.enumFrom_length
@[simp] theorem enumFrom_length : ∀ {n} {l : List α}, (enumFrom n l).length = l.length
  
Arguments: {α : Type u_1} {n : Nat} {l : List α}
Goal: (List.enumFrom n l).length = l.length
-- List.map_enumFrom
theorem map_enumFrom (f : α → β) (n : Nat) (l : List α) :
    map (Prod.map id f) (enumFrom n l) = enumFrom n (map f l) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (n : Nat) (l : List α)
Goal: List.map (Prod.map id f) (List.enumFrom n l) = List.enumFrom n (List.map f l)
-- List.enum_length
@[simp] theorem enum_length : (enum l).length = l.length 
Goal: ∀ {α : Type u_1} {l : List α}, l.enum.length = l.length
-- List.enum_cons
theorem enum_cons : (a::as).enum = (0, a) :: as.enumFrom 1 
Goal: ∀ {α : Type u_1} {a : α} {as : List α}, (a :: as).enum = (0, a) :: List.enumFrom 1 as
-- List.map_enum
theorem map_enum (f : α → β) (l : List α) : map (Prod.map id f) (enum l) = enum (map f l) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (l : List α)
Goal: List.map (Prod.map id f) l.enum = (List.map f l).enum
-- List.minimum?_nil
@[simp] theorem minimum?_nil [Min α] : ([] : List α).minimum? = none 
Arguments: {α : Type u_1} [Min α]
Goal: [].minimum? = none
-- List.minimum?_cons
theorem minimum?_cons [Min α] {xs : List α} : (x :: xs).minimum? = foldl min x xs 
Arguments: {α : Type u_1} {x : α} [Min α] {xs : List α}
Goal: (x :: xs).minimum? = some (List.foldl min x xs)
-- List.minimum?_eq_none_iff
@[simp] theorem minimum?_eq_none_iff {xs : List α} [Min α] : xs.minimum? = none ↔ xs = [] 
Arguments: {α : Type u_1} {xs : List α} [Min α]
Goal: xs.minimum? = none ↔ xs = []
-- List.minimum?_mem
theorem minimum?_mem [Min α] (min_eq_or : ∀ a b : α, min a b = a ∨ min a b = b) :
    {xs : List α} → xs.minimum? = some a → a ∈ xs 
Arguments: {α : Type u_1} {a : α} [Min α] (min_eq_or : ∀ (a b : α), min a b = a ∨ min a b = b) {xs : List α}
Goal: xs.minimum? = some a → a ∈ xs
-- List.le_minimum?_iff
theorem le_minimum?_iff [Min α] [LE α]
    (le_min_iff : ∀ a b c : α, a ≤ min b c ↔ a ≤ b ∧ a ≤ c) :
    {xs : List α} → xs.minimum? = some a → ∀ x, x ≤ a ↔ ∀ b, b ∈ xs → x ≤ b
  
Arguments: {α : Type u_1} {a : α} [Min α] [LE α] (le_min_iff : ∀ (a b c : α), a ≤ min b c ↔ a ≤ b ∧ a ≤ c) {xs : List α}
Goal: xs.minimum? = some a → ∀ (x : α), x ≤ a ↔ ∀ (b : α), b ∈ xs → x ≤ b
-- List.minimum?_eq_some_iff
theorem minimum?_eq_some_iff [Min α] [LE α] [anti : Antisymm ((· : α) ≤ ·)]
    (le_refl : ∀ a : α, a ≤ a)
    (min_eq_or : ∀ a b : α, min a b = a ∨ min a b = b)
    (le_min_iff : ∀ a b c : α, a ≤ min b c ↔ a ≤ b ∧ a ≤ c) {xs : List α} :
    xs.minimum? = some a ↔ a ∈ xs ∧ ∀ b, b ∈ xs → a ≤ b 
Arguments: {α : Type u_1} {a : α} [Min α] [LE α] [anti : Antisymm fun x x_1 => x ≤ x_1] (le_refl : ∀ (a : α), a ≤ a) (min_eq_or : ∀ (a b : α), min a b = a ∨ min a b = b) (le_min_iff : ∀ (a b c : α), a ≤ min b c ↔ a ≤ b ∧ a ≤ c) {xs : List α}
Goal: xs.minimum? = some a ↔ a ∈ xs ∧ ∀ (b : α), b ∈ xs → a ≤ b
-- List.minimum?_replicate
theorem minimum?_replicate [Min α] {n : Nat} {a : α} (w : min a a = a) :
    (replicate n a).minimum? = if n = 0 then none else some a 
Arguments: {α : Type u_1} [Min α] {n : Nat} {a : α} (w : min a a = a)
Goal: (List.replicate n a).minimum? = if n = 0 then none else some a
-- List.minimum?_replicate_of_pos
@[simp] theorem minimum?_replicate_of_pos [Min α] {n : Nat} {a : α} (w : min a a = a) (h : 0 < n) :
    (replicate n a).minimum? = some a 
Arguments: {α : Type u_1} [Min α] {n : Nat} {a : α} (w : min a a = a) (h : 0 < n)
Goal: (List.replicate n a).minimum? = some a
-- List.maximum?_nil
@[simp] theorem maximum?_nil [Max α] : ([] : List α).maximum? = none 
Arguments: {α : Type u_1} [Max α]
Goal: [].maximum? = none
-- List.maximum?_cons
theorem maximum?_cons [Max α] {xs : List α} : (x :: xs).maximum? = foldl max x xs 
Arguments: {α : Type u_1} {x : α} [Max α] {xs : List α}
Goal: (x :: xs).maximum? = some (List.foldl max x xs)
-- List.maximum?_eq_none_iff
@[simp] theorem maximum?_eq_none_iff {xs : List α} [Max α] : xs.maximum? = none ↔ xs = [] 
Arguments: {α : Type u_1} {xs : List α} [Max α]
Goal: xs.maximum? = none ↔ xs = []
-- List.maximum?_mem
theorem maximum?_mem [Max α] (min_eq_or : ∀ a b : α, max a b = a ∨ max a b = b) :
    {xs : List α} → xs.maximum? = some a → a ∈ xs
  
Arguments: {α : Type u_1} {a : α} [Max α] (min_eq_or : ∀ (a b : α), max a b = a ∨ max a b = b) {xs : List α}
Goal: xs.maximum? = some a → a ∈ xs
-- List.maximum?_le_iff
theorem maximum?_le_iff [Max α] [LE α]
    (max_le_iff : ∀ a b c : α, max b c ≤ a ↔ b ≤ a ∧ c ≤ a) :
    {xs : List α} → xs.maximum? = some a → ∀ x, a ≤ x ↔ ∀ b ∈ xs, b ≤ x
  
Arguments: {α : Type u_1} {a : α} [Max α] [LE α] (max_le_iff : ∀ (a b c : α), max b c ≤ a ↔ b ≤ a ∧ c ≤ a) {xs : List α}
Goal: xs.maximum? = some a → ∀ (x : α), a ≤ x ↔ ∀ (b : α), b ∈ xs → b ≤ x
-- List.maximum?_eq_some_iff
theorem maximum?_eq_some_iff [Max α] [LE α] [anti : Antisymm ((· : α) ≤ ·)]
    (le_refl : ∀ a : α, a ≤ a)
    (max_eq_or : ∀ a b : α, max a b = a ∨ max a b = b)
    (max_le_iff : ∀ a b c : α, max b c ≤ a ↔ b ≤ a ∧ c ≤ a) {xs : List α} :
    xs.maximum? = some a ↔ a ∈ xs ∧ ∀ b ∈ xs, b ≤ a 
Arguments: {α : Type u_1} {a : α} [Max α] [LE α] [anti : Antisymm fun x x_1 => x ≤ x_1] (le_refl : ∀ (a : α), a ≤ a) (max_eq_or : ∀ (a b : α), max a b = a ∨ max a b = b) (max_le_iff : ∀ (a b c : α), max b c ≤ a ↔ b ≤ a ∧ c ≤ a) {xs : List α}
Goal: xs.maximum? = some a ↔ a ∈ xs ∧ ∀ (b : α), b ∈ xs → b ≤ a
-- List.maximum?_replicate
theorem maximum?_replicate [Max α] {n : Nat} {a : α} (w : max a a = a) :
    (replicate n a).maximum? = if n = 0 then none else some a 
Arguments: {α : Type u_1} [Max α] {n : Nat} {a : α} (w : max a a = a)
Goal: (List.replicate n a).maximum? = if n = 0 then none else some a
-- List.maximum?_replicate_of_pos
@[simp] theorem maximum?_replicate_of_pos [Max α] {n : Nat} {a : α} (w : max a a = a) (h : 0 < n) :
    (replicate n a).maximum? = some a 
Arguments: {α : Type u_1} [Max α] {n : Nat} {a : α} (w : max a a = a) (h : 0 < n)
Goal: (List.replicate n a).maximum? = some a
-- List.mapM'_nil
@[simp] theorem mapM'_nil [Monad m] {f : α → m β} : mapM' f [] = pure [] 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] {f : α → m β}
Goal: List.mapM' f [] = pure []
-- List.mapM'_cons
@[simp] theorem mapM'_cons [Monad m] {f : α → m β} :
    mapM' f (a :: l) = return ((← f a) :: (← l.mapM' f)) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} {a : α} {l : List α} [Monad m] {f : α → m β}
Goal: List.mapM' f (a :: l) = do
  let __do_lift ← f a
  let __do_lift_1 ← List.mapM' f l
  pure (__do_lift :: __do_lift_1)
-- List.mapM'_eq_mapM
theorem mapM'_eq_mapM [Monad m] [LawfulMonad m] (f : α → m β) (l : List α) :
    mapM' f l = mapM f l 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (f : α → m β) (l : List α)
Goal: List.mapM' f l = List.mapM f l
-- List.mapM'_eq_mapM.go
theorem mapM'_eq_mapM [Monad m] [LawfulMonad m] (f : α → m β) (l : List α) :
    mapM' f l = mapM f l 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (f : α → m β) (l : List α) (acc : List β)
Goal: List.mapM.loop f l acc = do
  let __do_lift ← List.mapM' f l
  pure (acc.reverse ++ __do_lift)
-- List.mapM_nil
@[simp] theorem mapM_nil [Monad m] (f : α → m β) : [].mapM f = pure [] 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] (f : α → m β)
Goal: List.mapM f [] = pure []
-- List.mapM_cons
@[simp] theorem mapM_cons [Monad m] [LawfulMonad m] (f : α → m β) :
    (a :: l).mapM f = (return (← f a) :: (← l.mapM f)) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} {a : α} {l : List α} [Monad m] [LawfulMonad m] (f : α → m β)
Goal: List.mapM f (a :: l) = do
  let __do_lift ← f a
  let __do_lift_1 ← List.mapM f l
  pure (__do_lift :: __do_lift_1)
-- List.mapM_append
@[simp] theorem mapM_append [Monad m] [LawfulMonad m] (f : α → m β) {l₁ l₂ : List α} :
    (l₁ ++ l₂).mapM f = (return (← l₁.mapM f) ++ (← l₂.mapM f)) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (f : α → m β) {l₁ l₂ : List α}
Goal: List.mapM f (l₁ ++ l₂) = do
  let __do_lift ← List.mapM f l₁
  let __do_lift_1 ← List.mapM f l₂
  pure (__do_lift ++ __do_lift_1)
-- List.forM_nil'
@[simp] theorem forM_nil' [Monad m] : ([] : List α).forM f = (pure .unit : m PUnit) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {f : α → m PUnit} [Monad m]
Goal: [].forM f = pure PUnit.unit
-- List.forM_cons'
@[simp] theorem forM_cons' [Monad m] :
    (a::as).forM f = (f a >>= fun _ => as.forM f : m PUnit) 
Arguments: {m : Type u_1 → Type u_2}
Goal: ∀ {α : Type u_3} {a : α} {as : List α} {f : α → m PUnit} [inst : Monad m],
  (a :: as).forM f = do
    f a
    as.forM f
-- Batteries.RBNode.All.trivial
theorem All.trivial (H : ∀ {x : α}, p x) : ∀ {t : RBNode α}, t.All p
  
Arguments: {α : Type u_1} {p : α → Prop} (H : ∀ {x : α}, p x) {t : Batteries.RBNode α}
Goal: Batteries.RBNode.All p t
-- Batteries.RBNode.All_and
theorem All_and {t : RBNode α} : t.All (fun a => p a ∧ q a) ↔ t.All p ∧ t.All q 
Arguments: {α : Type u_1} {p q : α → Prop} {t : Batteries.RBNode α}
Goal: Batteries.RBNode.All (fun a => p a ∧ q a) t ↔ Batteries.RBNode.All p t ∧ Batteries.RBNode.All q t
-- Batteries.RBNode.cmpLT.flip
protected theorem cmpLT.flip (h₁ : cmpLT cmp x y) : cmpLT (flip cmp) y x 
Goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α},
  Batteries.RBNode.cmpLT cmp x y → Batteries.RBNode.cmpLT (flip cmp) y x
-- Batteries.RBNode.cmpLT.trans
theorem cmpLT.trans (h₁ : cmpLT cmp x y) (h₂ : cmpLT cmp y z) : cmpLT cmp x z 
Goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y z : α},
  Batteries.RBNode.cmpLT cmp x y → Batteries.RBNode.cmpLT cmp y z → Batteries.RBNode.cmpLT cmp x z
-- Batteries.RBNode.cmpLT.trans_l
theorem cmpLT.trans_l {cmp x y} (H : cmpLT cmp x y) {t : RBNode α}
    (h : t.All (cmpLT cmp y ·)) : t.All (cmpLT cmp x ·) 
Arguments: {α : Type u_1} {cmp : α → α → Ordering} {x y : α} (H : Batteries.RBNode.cmpLT cmp x y) {t : Batteries.RBNode α} (h : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp y x) t)
Goal: Batteries.RBNode.All (fun x_1 => Batteries.RBNode.cmpLT cmp x x_1) t
-- Batteries.RBNode.cmpLT.trans_r
theorem cmpLT.trans_r {cmp x y} (H : cmpLT cmp x y) {a : RBNode α}
    (h : a.All (cmpLT cmp · x)) : a.All (cmpLT cmp · y) 
Arguments: {α : Type u_1} {cmp : α → α → Ordering} {x y : α} (H : Batteries.RBNode.cmpLT cmp x y) {a : Batteries.RBNode α} (h : Batteries.RBNode.All (fun x_1 => Batteries.RBNode.cmpLT cmp x_1 x) a)
Goal: Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp x y) a
-- Batteries.RBNode.cmpEq.lt_congr_left
theorem cmpEq.lt_congr_left (H : cmpEq cmp x y) : cmpLT cmp x z ↔ cmpLT cmp y z 
Goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y z : α},
  Batteries.RBNode.cmpEq cmp x y → (Batteries.RBNode.cmpLT cmp x z ↔ Batteries.RBNode.cmpLT cmp y z)
-- Batteries.RBNode.cmpEq.lt_congr_right
theorem cmpEq.lt_congr_right (H : cmpEq cmp y z) : cmpLT cmp x y ↔ cmpLT cmp x z 
Goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {y z x : α},
  Batteries.RBNode.cmpEq cmp y z → (Batteries.RBNode.cmpLT cmp x y ↔ Batteries.RBNode.cmpLT cmp x z)
-- Batteries.RBNode.reverse_reverse
@[simp] theorem reverse_reverse (t : RBNode α) : t.reverse.reverse = t 
Arguments: {α : Type u_1} (t : Batteries.RBNode α)
Goal: t.reverse.reverse = t
-- Batteries.RBNode.reverse_eq_iff
theorem reverse_eq_iff {t t' : RBNode α} : t.reverse = t' ↔ t = t'.reverse 
Arguments: {α : Type u_1} {t t' : Batteries.RBNode α}
Goal: t.reverse = t' ↔ t = t'.reverse
-- Batteries.RBNode.reverse_balance1
@[simp] theorem reverse_balance1 (l : RBNode α) (v : α) (r : RBNode α) :
    (balance1 l v r).reverse = balance2 r.reverse v l.reverse 
Arguments: {α : Type u_1} (l : Batteries.RBNode α) (v : α) (r : Batteries.RBNode α)
Goal: (l.balance1 v r).reverse = r.reverse.balance2 v l.reverse
-- Batteries.RBNode.reverse_balance2
@[simp] theorem reverse_balance2 (l : RBNode α) (v : α) (r : RBNode α) :
    (balance2 l v r).reverse = balance1 r.reverse v l.reverse 
Arguments: {α : Type u_1} (l : Batteries.RBNode α) (v : α) (r : Batteries.RBNode α)
Goal: (l.balance2 v r).reverse = r.reverse.balance1 v l.reverse
-- Batteries.RBNode.All.reverse
@[simp] theorem All.reverse {t : RBNode α} : t.reverse.All p ↔ t.All p 
Arguments: {α : Type u_1} {p : α → Prop} {t : Batteries.RBNode α}
Goal: Batteries.RBNode.All p t.reverse ↔ Batteries.RBNode.All p t
-- Batteries.RBNode.Ordered.reverse
protected theorem Ordered.reverse : ∀ {t : RBNode α}, t.Ordered cmp → t.reverse.Ordered (flip cmp)
  
Arguments: {α : Type u_1} {cmp : α → α → Ordering} {t : Batteries.RBNode α}
Goal: Batteries.RBNode.Ordered cmp t → Batteries.RBNode.Ordered (flip cmp) t.reverse
-- Batteries.RBNode.Balanced.reverse
protected theorem Balanced.reverse {t : RBNode α} : t.Balanced c n → t.reverse.Balanced c n
  
Arguments: {α : Type u_1} {c : Batteries.RBColor} {n : Nat} {t : Batteries.RBNode α}
Goal: t.Balanced c n → t.reverse.Balanced c n
-- Batteries.RBNode.Ordered.balance1
protected theorem Ordered.balance1 {l : RBNode α} {v : α} {r : RBNode α}
    (lv : l.All (cmpLT cmp · v)) (vr : r.All (cmpLT cmp v ·))
    (hl : l.Ordered cmp) (hr : r.Ordered cmp) : (balance1 l v r).Ordered cmp 
Arguments: {α : Type u_1} {cmp : α → α → Ordering} {l : Batteries.RBNode α} {v : α} {r : Batteries.RBNode α} (lv : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp x v) l) (vr : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp v x) r) (hl : Batteries.RBNode.Ordered cmp l) (hr : Batteries.RBNode.Ordered cmp r)
Goal: Batteries.RBNode.Ordered cmp (l.balance1 v r)
-- Batteries.RBNode.balance1_All
@[simp] theorem balance1_All {l : RBNode α} {v : α} {r : RBNode α} :
    (balance1 l v r).All p ↔ p v ∧ l.All p ∧ r.All p 
Arguments: {α : Type u_1} {p : α → Prop} {l : Batteries.RBNode α} {v : α} {r : Batteries.RBNode α}
Goal: Batteries.RBNode.All p (l.balance1 v r) ↔ p v ∧ Batteries.RBNode.All p l ∧ Batteries.RBNode.All p r
-- Batteries.RBNode.Ordered.balance2
protected theorem Ordered.balance2 {l : RBNode α} {v : α} {r : RBNode α}
    (lv : l.All (cmpLT cmp · v)) (vr : r.All (cmpLT cmp v ·))
    (hl : l.Ordered cmp) (hr : r.Ordered cmp) : (balance2 l v r).Ordered cmp 
Arguments: {α : Type u_1} {cmp : α → α → Ordering} {l : Batteries.RBNode α} {v : α} {r : Batteries.RBNode α} (lv : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp x v) l) (vr : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp v x) r) (hl : Batteries.RBNode.Ordered cmp l) (hr : Batteries.RBNode.Ordered cmp r)
Goal: Batteries.RBNode.Ordered cmp (l.balance2 v r)