ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- List.Nodup.rotate_congr
theorem Nodup.rotate_congr {l : List α} (hl : l.Nodup) (hn : l ≠ []) (i j : ℕ)
    (h : l.rotate i = l.rotate j) : i % l.length = j % l.length 
Arguments: {α : Type u} {l : List α} (hl : l.Nodup) (hn : l ≠ []) (i j : ℕ) (h : l.rotate i = l.rotate j)
Goal: i % l.length = j % l.length
-- List.Nodup.rotate_congr_iff
theorem Nodup.rotate_congr_iff {l : List α} (hl : l.Nodup) {i j : ℕ} :
    l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = [] 
Arguments: {α : Type u} {l : List α} (hl : l.Nodup) {i j : ℕ}
Goal: l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = []
-- List.Nodup.rotate_eq_self_iff
theorem Nodup.rotate_eq_self_iff {l : List α} (hl : l.Nodup) {n : ℕ} :
    l.rotate n = l ↔ n % l.length = 0 ∨ l = [] 
Arguments: {α : Type u} {l : List α} (hl : l.Nodup) {n : ℕ}
Goal: l.rotate n = l ↔ n % l.length = 0 ∨ l = []
-- List.IsRotated.refl
@[refl]
theorem IsRotated.refl (l : List α) : l ~r l 
Arguments: {α : Type u} (l : List α)
Goal: l ~r l
-- List.IsRotated.symm
@[symm]
theorem IsRotated.symm (h : l ~r l') : l' ~r l 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l')
Goal: l' ~r l
-- List.isRotated_comm
theorem isRotated_comm : l ~r l' ↔ l' ~r l 
Arguments: {α : Type u} {l l' : List α}
Goal: l ~r l' ↔ l' ~r l
-- List.IsRotated.forall
@[simp]
protected theorem IsRotated.forall (l : List α) (n : ℕ) : l.rotate n ~r l 
Arguments: {α : Type u} (l : List α) (n : ℕ)
Goal: l.rotate n ~r l
-- List.IsRotated.trans
@[trans]
theorem IsRotated.trans : ∀ {l l' l'' : List α}, l ~r l' → l' ~r l'' → l ~r l''
  
Arguments: {α : Type u} {l l' l'' : List α}
Goal: l ~r l' → l' ~r l'' → l ~r l''
-- List.IsRotated.eqv
theorem IsRotated.eqv : Equivalence (@IsRotated α) 
Arguments: {α : Type u}
Goal: Equivalence List.IsRotated
-- List.IsRotated.perm
theorem IsRotated.perm (h : l ~r l') : l ~ l' 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l')
Goal: l.Perm l'
-- List.IsRotated.nodup_iff
theorem IsRotated.nodup_iff (h : l ~r l') : Nodup l ↔ Nodup l' 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l')
Goal: l.Nodup ↔ l'.Nodup
-- List.IsRotated.mem_iff
theorem IsRotated.mem_iff (h : l ~r l') {a : α} : a ∈ l ↔ a ∈ l' 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l') {a : α}
Goal: a ∈ l ↔ a ∈ l'
-- List.isRotated_nil_iff
@[simp]
theorem isRotated_nil_iff : l ~r [] ↔ l = [] 
Arguments: {α : Type u} {l : List α}
Goal: l ~r [] ↔ l = []
-- List.isRotated_nil_iff'
@[simp]
theorem isRotated_nil_iff' : [] ~r l ↔ [] = l 
Arguments: {α : Type u} {l : List α}
Goal: [] ~r l ↔ [] = l
-- List.isRotated_singleton_iff
@[simp]
theorem isRotated_singleton_iff {x : α} : l ~r [x] ↔ l = [x] 
Arguments: {α : Type u} {l : List α} {x : α}
Goal: l ~r [x] ↔ l = [x]
-- List.isRotated_singleton_iff'
@[simp]
theorem isRotated_singleton_iff' {x : α} : [x] ~r l ↔ [x] = l 
Arguments: {α : Type u} {l : List α} {x : α}
Goal: [x] ~r l ↔ [x] = l
-- List.isRotated_concat
theorem isRotated_concat (hd : α) (tl : List α) : (tl ++ [hd]) ~r (hd :: tl) 
Arguments: {α : Type u} (hd : α) (tl : List α)
Goal: (tl ++ [hd]) ~r (hd :: tl)
-- List.isRotated_append
theorem isRotated_append : (l ++ l') ~r (l' ++ l) 
Arguments: {α : Type u} {l l' : List α}
Goal: (l ++ l') ~r (l' ++ l)
-- List.IsRotated.reverse
theorem IsRotated.reverse (h : l ~r l') : l.reverse ~r l'.reverse 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l')
Goal: l.reverse ~r l'.reverse
-- List.isRotated_reverse_comm_iff
theorem isRotated_reverse_comm_iff : l.reverse ~r l' ↔ l ~r l'.reverse 
Arguments: {α : Type u} {l l' : List α}
Goal: l.reverse ~r l' ↔ l ~r l'.reverse
-- List.isRotated_reverse_iff
@[simp]
theorem isRotated_reverse_iff : l.reverse ~r l'.reverse ↔ l ~r l' 
Arguments: {α : Type u} {l l' : List α}
Goal: l.reverse ~r l'.reverse ↔ l ~r l'
-- List.isRotated_iff_mod
theorem isRotated_iff_mod : l ~r l' ↔ ∃ n ≤ l.length, l.rotate n = l' 
Arguments: {α : Type u} {l l' : List α}
Goal: l ~r l' ↔ ∃ n ≤ l.length, l.rotate n = l'
-- List.isRotated_iff_mem_map_range
theorem isRotated_iff_mem_map_range : l ~r l' ↔ l' ∈ (List.range (l.length + 1)).map l.rotate 
Arguments: {α : Type u} {l l' : List α}
Goal: l ~r l' ↔ l' ∈ List.map l.rotate (List.range (l.length + 1))
-- List.IsRotated.map
theorem IsRotated.map {β : Type*} {l₁ l₂ : List α} (h : l₁ ~r l₂) (f : α → β) :
    map f l₁ ~r map f l₂ 
Arguments: {α : Type u} {β : Type u_1} {l₁ l₂ : List α} (h : l₁ ~r l₂) (f : α → β)
Goal: List.map f l₁ ~r List.map f l₂
-- List.cyclicPermutations_nil
@[simp]
theorem cyclicPermutations_nil : cyclicPermutations ([] : List α) = [[]] 
Arguments: {α : Type u}
Goal: [].cyclicPermutations = [[]]
-- List.cyclicPermutations_cons
theorem cyclicPermutations_cons (x : α) (l : List α) :
    cyclicPermutations (x :: l) = dropLast (zipWith (· ++ ·) (tails (x :: l)) (inits (x :: l))) 
Arguments: {α : Type u} (x : α) (l : List α)
Goal: (x :: l).cyclicPermutations = (List.zipWith (fun x x_1 => x ++ x_1) (x :: l).tails (x :: l).inits).dropLast
-- List.cyclicPermutations_of_ne_nil
theorem cyclicPermutations_of_ne_nil (l : List α) (h : l ≠ []) :
    cyclicPermutations l = dropLast (zipWith (· ++ ·) (tails l) (inits l)) 
Arguments: {α : Type u} (l : List α) (h : l ≠ [])
Goal: l.cyclicPermutations = (List.zipWith (fun x x_1 => x ++ x_1) l.tails l.inits).dropLast
-- List.length_cyclicPermutations_cons
theorem length_cyclicPermutations_cons (x : α) (l : List α) :
    length (cyclicPermutations (x :: l)) = length l + 1 
Arguments: {α : Type u} (x : α) (l : List α)
Goal: (x :: l).cyclicPermutations.length = l.length + 1
-- List.length_cyclicPermutations_of_ne_nil
@[simp]
theorem length_cyclicPermutations_of_ne_nil (l : List α) (h : l ≠ []) :
    length (cyclicPermutations l) = length l 
Arguments: {α : Type u} (l : List α) (h : l ≠ [])
Goal: l.cyclicPermutations.length = l.length
-- List.cyclicPermutations_ne_nil
@[simp]
theorem cyclicPermutations_ne_nil : ∀ l : List α, cyclicPermutations l ≠ []
  
Arguments: {α : Type u} (l : List α)
Goal: l.cyclicPermutations ≠ []
-- List.getElem_cyclicPermutations
@[simp]
theorem getElem_cyclicPermutations (l : List α) (n : Nat) (h : n < length (cyclicPermutations l)) :
    (cyclicPermutations l)[n] = l.rotate n 
Arguments: {α : Type u} (l : List α) (n : ℕ) (h : n < l.cyclicPermutations.length)
Goal: l.cyclicPermutations[n] = l.rotate n
-- List.get_cyclicPermutations
theorem get_cyclicPermutations (l : List α) (n : Fin (length (cyclicPermutations l))) :
    (cyclicPermutations l).get n = l.rotate n 
Arguments: {α : Type u} (l : List α) (n : Fin l.cyclicPermutations.length)
Goal: l.cyclicPermutations.get n = l.rotate ↑n
-- List.head_cyclicPermutations
@[simp]
theorem head_cyclicPermutations (l : List α) :
    (cyclicPermutations l).head (cyclicPermutations_ne_nil l) = l 
Arguments: {α : Type u} (l : List α)
Goal: l.cyclicPermutations.head ⋯ = l
-- List.head?_cyclicPermutations
@[simp]
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l 
Arguments: {α : Type u} (l : List α)
Goal: l.cyclicPermutations.head? = some l
-- List.cyclicPermutations_injective
theorem cyclicPermutations_injective : Function.Injective (@cyclicPermutations α) 
Arguments: {α : Type u}
Goal: Function.Injective List.cyclicPermutations
-- List.cyclicPermutations_inj
@[simp]
theorem cyclicPermutations_inj {l l' : List α} :
    cyclicPermutations l = cyclicPermutations l' ↔ l = l' 
Arguments: {α : Type u} {l l' : List α}
Goal: l.cyclicPermutations = l'.cyclicPermutations ↔ l = l'
-- List.length_mem_cyclicPermutations
theorem length_mem_cyclicPermutations (l : List α) (h : l' ∈ cyclicPermutations l) :
    length l' = length l 
Arguments: {α : Type u} {l' : List α} (l : List α) (h : l' ∈ l.cyclicPermutations)
Goal: l'.length = l.length
-- List.mem_cyclicPermutations_self
theorem mem_cyclicPermutations_self (l : List α) : l ∈ cyclicPermutations l 
Arguments: {α : Type u} (l : List α)
Goal: l ∈ l.cyclicPermutations
-- List.cyclicPermutations_rotate
@[simp]
theorem cyclicPermutations_rotate (l : List α) (k : ℕ) :
    (l.rotate k).cyclicPermutations = l.cyclicPermutations.rotate k 
Arguments: {α : Type u} (l : List α) (k : ℕ)
Goal: (l.rotate k).cyclicPermutations = l.cyclicPermutations.rotate k
-- List.mem_cyclicPermutations_iff
@[simp]
theorem mem_cyclicPermutations_iff : l ∈ cyclicPermutations l' ↔ l ~r l' 
Arguments: {α : Type u} {l l' : List α}
Goal: l ∈ l'.cyclicPermutations ↔ l ~r l'
-- List.cyclicPermutations_eq_nil_iff
@[simp]
theorem cyclicPermutations_eq_nil_iff {l : List α} : cyclicPermutations l = [[]] ↔ l = [] 
Arguments: {α : Type u} {l : List α}
Goal: l.cyclicPermutations = [[]] ↔ l = []
-- List.cyclicPermutations_eq_singleton_iff
@[simp]
theorem cyclicPermutations_eq_singleton_iff {l : List α} {x : α} :
    cyclicPermutations l = [[x]] ↔ l = [x] 
Arguments: {α : Type u} {l : List α} {x : α}
Goal: l.cyclicPermutations = [[x]] ↔ l = [x]
-- List.Nodup.cyclicPermutations
protected theorem Nodup.cyclicPermutations {l : List α} (hn : Nodup l) :
    Nodup (cyclicPermutations l) 
Arguments: {α : Type u} {l : List α} (hn : l.Nodup)
Goal: l.cyclicPermutations.Nodup
-- List.IsRotated.cyclicPermutations
protected theorem IsRotated.cyclicPermutations {l l' : List α} (h : l ~r l') :
    l.cyclicPermutations ~r l'.cyclicPermutations 
Arguments: {α : Type u} {l l' : List α} (h : l ~r l')
Goal: l.cyclicPermutations ~r l'.cyclicPermutations
-- List.isRotated_cyclicPermutations_iff
@[simp]
theorem isRotated_cyclicPermutations_iff {l l' : List α} :
    l.cyclicPermutations ~r l'.cyclicPermutations ↔ l ~r l' 
Arguments: {α : Type u} {l l' : List α}
Goal: l.cyclicPermutations ~r l'.cyclicPermutations ↔ l ~r l'
-- List.destutter'_nil
@[simp]
theorem destutter'_nil : destutter' R a [] = [a] 
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] {a : α}
Goal: List.destutter' R a [] = [a]
-- List.destutter'_cons
theorem destutter'_cons :
    (b :: l).destutter' R a = if R a b then a :: destutter' R b l else destutter' R a l 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] {a b : α}
Goal: List.destutter' R a (b :: l) = if R a b then a :: List.destutter' R b l else List.destutter' R a l
-- List.destutter'_cons_pos
@[simp]
theorem destutter'_cons_pos (h : R b a) : (a :: l).destutter' R b = b :: l.destutter' R a 
Arguments: {α : Type u_1} (l : List α) {R : α → α → Prop} [DecidableRel R] {a b : α} (h : R b a)
Goal: List.destutter' R b (a :: l) = b :: List.destutter' R a l
-- List.destutter'_cons_neg
@[simp]
theorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b 
Arguments: {α : Type u_1} (l : List α) {R : α → α → Prop} [DecidableRel R] {a b : α} (h : ¬R b a)
Goal: List.destutter' R b (a :: l) = List.destutter' R b l
-- List.destutter'_singleton
@[simp]
theorem destutter'_singleton : [b].destutter' R a = if R a b then [a, b] else [a] 
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] {a b : α}
Goal: List.destutter' R a [b] = if R a b then [a, b] else [a]
-- List.destutter'_sublist
theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] (a : α)
Goal: (List.destutter' R a l).Sublist (a :: l)
-- List.mem_destutter'
theorem mem_destutter' (a) : a ∈ l.destutter' R a 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] (a : α)
Goal: a ∈ List.destutter' R a l
-- List.destutter'_is_chain
theorem destutter'_is_chain : ∀ l : List α, ∀ {a b}, R a b → (l.destutter' R b).Chain R a
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] (l : List α) {a b : α}
Goal: R a b → List.Chain R a (List.destutter' R b l)
-- List.destutter'_is_chain'
theorem destutter'_is_chain' (a) : (l.destutter' R a).Chain' R 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] (a : α)
Goal: List.Chain' R (List.destutter' R a l)
-- List.destutter'_of_chain
theorem destutter'_of_chain (h : l.Chain R a) : l.destutter' R a = a :: l 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] {a : α} (h : List.Chain R a l)
Goal: List.destutter' R a l = a :: l
-- List.destutter'_eq_self_iff
@[simp]
theorem destutter'_eq_self_iff (a) : l.destutter' R a = a :: l ↔ l.Chain R a 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] (a : α)
Goal: List.destutter' R a l = a :: l ↔ List.Chain R a l
-- List.destutter'_ne_nil
theorem destutter'_ne_nil : l.destutter' R a ≠ [] 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] {a : α}
Goal: List.destutter' R a l ≠ []
-- List.destutter_nil
@[simp]
theorem destutter_nil : ([] : List α).destutter R = [] 
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R]
Goal: List.destutter R [] = []
-- List.destutter_cons'
theorem destutter_cons' : (a :: l).destutter R = destutter' R a l 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] {a : α}
Goal: List.destutter R (a :: l) = List.destutter' R a l
-- List.destutter_cons_cons
theorem destutter_cons_cons :
    (a :: b :: l).destutter R = if R a b then a :: destutter' R b l else destutter' R a l 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R] {a b : α}
Goal: List.destutter R (a :: b :: l) = if R a b then a :: List.destutter' R b l else List.destutter' R a l
-- List.destutter_singleton
@[simp]
theorem destutter_singleton : destutter R [a] = [a] 
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] {a : α}
Goal: List.destutter R [a] = [a]
-- List.destutter_pair
@[simp]
theorem destutter_pair : destutter R [a, b] = if R a b then [a, b] else [a] 
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] {a b : α}
Goal: List.destutter R [a, b] = if R a b then [a, b] else [a]
-- List.destutter_sublist
theorem destutter_sublist : ∀ l : List α, l.destutter R <+ l
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] (l : List α)
Goal: (List.destutter R l).Sublist l
-- List.destutter_is_chain'
theorem destutter_is_chain' : ∀ l : List α, (l.destutter R).Chain' R
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] (l : List α)
Goal: List.Chain' R (List.destutter R l)
-- List.destutter_of_chain'
theorem destutter_of_chain' : ∀ l : List α, l.Chain' R → l.destutter R = l
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] (l : List α)
Goal: List.Chain' R l → List.destutter R l = l
-- List.destutter_eq_self_iff
@[simp]
theorem destutter_eq_self_iff : ∀ l : List α, l.destutter R = l ↔ l.Chain' R
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] (l : List α)
Goal: List.destutter R l = l ↔ List.Chain' R l
-- List.destutter_idem
theorem destutter_idem : (l.destutter R).destutter R = l.destutter R 
Arguments: {α : Type u_1} (l : List α) (R : α → α → Prop) [DecidableRel R]
Goal: List.destutter R (List.destutter R l) = List.destutter R l
-- List.destutter_eq_nil
@[simp]
theorem destutter_eq_nil : ∀ {l : List α}, destutter R l = [] ↔ l = []
  
Arguments: {α : Type u_1} (R : α → α → Prop) [DecidableRel R] {l : List α}
Goal: List.destutter R l = [] ↔ l = []
-- List.nil_product
@[simp]
theorem nil_product (l : List β) : (@nil α) ×ˢ l = [] 
Arguments: {α : Type u_1} {β : Type u_2} (l : List β)
Goal: [] ×ˢ l = []
-- List.product_cons
@[simp]
theorem product_cons (a : α) (l₁ : List α) (l₂ : List β) :
    (a :: l₁) ×ˢ l₂ = map (fun b => (a, b)) l₂ ++ (l₁ ×ˢ l₂) 
Arguments: {α : Type u_1} {β : Type u_2} (a : α) (l₁ : List α) (l₂ : List β)
Goal: (a :: l₁) ×ˢ l₂ = List.map (fun b => (a, b)) l₂ ++ l₁ ×ˢ l₂
-- List.product_nil
@[simp]
theorem product_nil : ∀ l : List α, l ×ˢ (@nil β) = []
  
Arguments: {α : Type u_1} {β : Type u_2} (l : List α)
Goal: l ×ˢ [] = []
-- List.mem_product
@[simp]
theorem mem_product {l₁ : List α} {l₂ : List β} {a : α} {b : β} :
    (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {l₁ : List α} {l₂ : List β} {a : α} {b : β}
Goal: (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂
-- List.length_product
theorem length_product (l₁ : List α) (l₂ : List β) :
    length (l₁ ×ˢ l₂) = length l₁ * length l₂ 
Arguments: {α : Type u_1} {β : Type u_2} (l₁ : List α) (l₂ : List β)
Goal: (l₁ ×ˢ l₂).length = l₁.length * l₂.length
-- List.nil_sigma
@[simp]
theorem nil_sigma (l : ∀ a, List (σ a)) : (@nil α).sigma l = [] 
Arguments: {α : Type u_1} {σ : α → Type u_3} (l : (a : α) → List (σ a))
Goal: [].sigma l = []
-- List.sigma_cons
@[simp]
theorem sigma_cons (a : α) (l₁ : List α) (l₂ : ∀ a, List (σ a)) :
    (a :: l₁).sigma l₂ = map (Sigma.mk a) (l₂ a) ++ l₁.sigma l₂ 
Arguments: {α : Type u_1} {σ : α → Type u_3} (a : α) (l₁ : List α) (l₂ : (a : α) → List (σ a))
Goal: (a :: l₁).sigma l₂ = List.map (Sigma.mk a) (l₂ a) ++ l₁.sigma l₂
-- List.sigma_nil
@[simp]
theorem sigma_nil : ∀ l : List α, (l.sigma fun a => @nil (σ a)) = []
  
Arguments: {α : Type u_1} {σ : α → Type u_3} (l : List α)
Goal: (l.sigma fun a => []) = []
-- List.mem_sigma
@[simp]
theorem mem_sigma {l₁ : List α} {l₂ : ∀ a, List (σ a)} {a : α} {b : σ a} :
    Sigma.mk a b ∈ l₁.sigma l₂ ↔ a ∈ l₁ ∧ b ∈ l₂ a 
Arguments: {α : Type u_1} {σ : α → Type u_3} {l₁ : List α} {l₂ : (a : α) → List (σ a)} {a : α} {b : σ a}
Goal: ⟨a, b⟩ ∈ l₁.sigma l₂ ↔ a ∈ l₁ ∧ b ∈ l₂ a
-- List.length_sigma'
theorem length_sigma' (l₁ : List α) (l₂ : ∀ a, List (σ a)) :
    length (l₁.sigma l₂) = Nat.sum (l₁.map fun a ↦ length (l₂ a)) 
Arguments: {α : Type u_1} {σ : α → Type u_3} (l₁ : List α) (l₂ : (a : α) → List (σ a))
Goal: (l₁.sigma l₂).length = Nat.sum (List.map (fun a => (l₂ a).length) l₁)
-- List.length_filter_lt_length_iff_exists
theorem length_filter_lt_length_iff_exists (l) :
    length (filter p l) < length l ↔ ∃ x ∈ l, ¬p x 
Arguments: {α : Type u_1} (p : α → Bool) (l : List α)
Goal: (List.filter p l).length < l.length ↔ ∃ x, x ∈ l ∧ ¬p x = true
-- List.countP_attach
lemma countP_attach (l : List α) : l.attach.countP (fun a : {x // x ∈ l} ↦ p a) = l.countP p 
Arguments: {α : Type u_1} (p : α → Bool) (l : List α)
Goal: List.countP (fun a => p ↑a) l.attach = List.countP p l
-- List.count_map_of_injective
@[simp]
theorem count_map_of_injective {β} [DecidableEq α] [DecidableEq β] (l : List α) (f : α → β)
    (hf : Function.Injective f) (x : α) : count (f x) (map f l) = count x l 
Arguments: {α : Type u_1} {β : Type u_2} [DecidableEq α] [DecidableEq β] (l : List α) (f : α → β) (hf : Function.Injective f) (x : α)
Goal: List.count (f x) (List.map f l) = List.count x l
-- List.count_cons'
@[deprecated (since := "2023-08-23")]
theorem count_cons' (a b : α) (l : List α) :
    count a (b :: l) = count a l + if a = b then 1 else 0 
Arguments: {α : Type u_1} [DecidableEq α] (a b : α) (l : List α)
Goal: List.count a (b :: l) = List.count a l + if a = b then 1 else 0
-- List.count_attach
@[simp]
lemma count_attach (a : {x // x ∈ l}) : l.attach.count a = l.count ↑a 
Arguments: {α : Type u_1} {l : List α} [DecidableEq α] (a : { x // x ∈ l })
Goal: List.count a l.attach = List.count (↑a) l
-- List.coe_toFinsupp
@[norm_cast]
theorem coe_toFinsupp : (l.toFinsupp : ℕ → M) = (l.getD · 0) 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0]
Goal: ⇑l.toFinsupp = fun x => l.getD x 0
-- List.toFinsupp_apply
@[simp, norm_cast]
theorem toFinsupp_apply (i : ℕ) : (l.toFinsupp : ℕ → M) i = l.getD i 0 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0] (i : ℕ)
Goal: l.toFinsupp i = l.getD i 0
-- List.toFinsupp_support
theorem toFinsupp_support :
    l.toFinsupp.support = (Finset.range l.length).filter (getD l · 0 ≠ 0) 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0]
Goal: l.toFinsupp.support = Finset.filter (fun x => l.getD x 0 ≠ 0) (Finset.range l.length)
-- List.toFinsupp_apply_lt
theorem toFinsupp_apply_lt (hn : n < l.length) : l.toFinsupp n = l.get ⟨n, hn⟩ 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0] (n : ℕ) (hn : n < l.length)
Goal: l.toFinsupp n = l.get ⟨n, hn⟩
-- List.toFinsupp_apply_fin
theorem toFinsupp_apply_fin (n : Fin l.length) : l.toFinsupp n = l.get n 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0] (n : Fin l.length)
Goal: l.toFinsupp ↑n = l.get n
-- List.toFinsupp_apply_lt'
@[deprecated (since := "2023-04-10")]
theorem toFinsupp_apply_lt' (hn : n < l.length) : l.toFinsupp n = l.nthLe n hn 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0] (n : ℕ) (hn : n < l.length)
Goal: l.toFinsupp n = l.nthLe n hn
-- List.toFinsupp_apply_le
theorem toFinsupp_apply_le (hn : l.length ≤ n) : l.toFinsupp n = 0 
Arguments: {M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 ≠ 0] (n : ℕ) (hn : l.length ≤ n)
Goal: l.toFinsupp n = 0
-- List.toFinsupp_nil
@[simp]
theorem toFinsupp_nil [DecidablePred fun i => getD ([] : List M) i 0 ≠ 0] :
    toFinsupp ([] : List M) = 0 
Arguments: {M : Type u_1} [Zero M] [DecidablePred fun i => [].getD i 0 ≠ 0]
Goal: [].toFinsupp = 0
-- List.toFinsupp_singleton
theorem toFinsupp_singleton (x : M) [DecidablePred (getD [x] · 0 ≠ 0)] :
    toFinsupp [x] = Finsupp.single 0 x 
Arguments: {M : Type u_1} [Zero M] (x : M) [DecidablePred fun x_1 => [x].getD x_1 0 ≠ 0]
Goal: [x].toFinsupp = Finsupp.single 0 x
-- List.toFinsupp_cons_apply_zero
@[deprecated "This lemma is unused, and can be proved by `simp`." (since := "2024-06-12")]
theorem toFinsupp_cons_apply_zero (x : M) (xs : List M)
    [DecidablePred (getD (x::xs) · 0 ≠ 0)] : (x::xs).toFinsupp 0 = x 
Arguments: {M : Type u_1} [Zero M] (x : M) (xs : List M) [DecidablePred fun x_1 => (x :: xs).getD x_1 0 ≠ 0]
Goal: (x :: xs).toFinsupp 0 = x
-- List.toFinsupp_cons_apply_succ
@[deprecated "This lemma is unused, and can be proved by `simp`." (since := "2024-06-12")]
theorem toFinsupp_cons_apply_succ (x : M) (xs : List M) (n : ℕ)
    [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :
    (x::xs).toFinsupp n.succ = xs.toFinsupp n 
Arguments: {M : Type u_1} [Zero M] (x : M) (xs : List M) (n : ℕ) [DecidablePred fun x_1 => (x :: xs).getD x_1 0 ≠ 0] [DecidablePred fun x => xs.getD x 0 ≠ 0]
Goal: (x :: xs).toFinsupp n.succ = xs.toFinsupp n
-- List.toFinsupp_append
theorem toFinsupp_append {R : Type*} [AddZeroClass R] (l₁ l₂ : List R)
    [DecidablePred (getD (l₁ ++ l₂) · 0 ≠ 0)] [DecidablePred (getD l₁ · 0 ≠ 0)]
    [DecidablePred (getD l₂ · 0 ≠ 0)] :
    toFinsupp (l₁ ++ l₂) =
      toFinsupp l₁ + (toFinsupp l₂).embDomain (addLeftEmbedding l₁.length) 
Arguments: {R : Type u_2} [AddZeroClass R] (l₁ l₂ : List R) [DecidablePred fun x => (l₁ ++ l₂).getD x 0 ≠ 0] [DecidablePred fun x => l₁.getD x 0 ≠ 0] [DecidablePred fun x => l₂.getD x 0 ≠ 0]
Goal: (l₁ ++ l₂).toFinsupp = l₁.toFinsupp + Finsupp.embDomain (addLeftEmbedding l₁.length) l₂.toFinsupp
-- List.toFinsupp_cons_eq_single_add_embDomain
theorem toFinsupp_cons_eq_single_add_embDomain {R : Type*} [AddZeroClass R] (x : R) (xs : List R)
    [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :
    toFinsupp (x::xs) =
      Finsupp.single 0 x + (toFinsupp xs).embDomain ⟨Nat.succ, Nat.succ_injective⟩ 
Arguments: {R : Type u_2} [AddZeroClass R] (x : R) (xs : List R) [DecidablePred fun x_1 => (x :: xs).getD x_1 0 ≠ 0] [DecidablePred fun x => xs.getD x 0 ≠ 0]
Goal: (x :: xs).toFinsupp =
  Finsupp.single 0 x + Finsupp.embDomain { toFun := Nat.succ, inj' := Nat.succ_injective } xs.toFinsupp
-- List.toFinsupp_concat_eq_toFinsupp_add_single
theorem toFinsupp_concat_eq_toFinsupp_add_single {R : Type*} [AddZeroClass R] (x : R) (xs : List R)
    [DecidablePred fun i => getD (xs ++ [x]) i 0 ≠ 0] [DecidablePred fun i => getD xs i 0 ≠ 0] :
    toFinsupp (xs ++ [x]) = toFinsupp xs + Finsupp.single xs.length x 
Arguments: {R : Type u_2} [AddZeroClass R] (x : R) (xs : List R) [DecidablePred fun i => (xs ++ [x]).getD i 0 ≠ 0] [DecidablePred fun i => xs.getD i 0 ≠ 0]
Goal: (xs ++ [x]).toFinsupp = xs.toFinsupp + Finsupp.single xs.length x
-- List.toFinsupp_eq_sum_map_enum_single
theorem toFinsupp_eq_sum_map_enum_single {R : Type*} [AddMonoid R] (l : List R)
    [DecidablePred (getD l · 0 ≠ 0)] :
    toFinsupp l = (l.enum.map fun nr : ℕ × R => Finsupp.single nr.1 nr.2).sum 
Arguments: {R : Type u_2} [AddMonoid R] (l : List R) [DecidablePred fun x => l.getD x 0 ≠ 0]
Goal: l.toFinsupp = (List.map (fun nr => Finsupp.single nr.1 nr.2) l.enum).sum