File: Mathlib/Data/List/Destutter.lean

full_name: List.destutter'_nil
code: @[simp]
theorem destutter'_nil : destutter' R a [] = [a] 
goal: List.destutter' R a [] = [a]

full_name: List.destutter'_cons
code: theorem destutter'_cons :
    (b :: l).destutter' R a = if R a b then a :: destutter' R b l else destutter' R a l 
goal: List.destutter' R a (b :: l) = if R a b then a :: List.destutter' R b l else List.destutter' R a l

full_name: List.destutter'_cons_pos
code: @[simp]
theorem destutter'_cons_pos (h : R b a) : (a :: l).destutter' R b = b :: l.destutter' R a 
goal: List.destutter' R b (a :: l) = b :: List.destutter' R a l

full_name: List.destutter'_cons_neg
code: @[simp]
theorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b 
goal: List.destutter' R b (a :: l) = List.destutter' R b l

full_name: List.destutter'_singleton
code: @[simp]
theorem destutter'_singleton : [b].destutter' R a = if R a b then [a, b] else [a] 
goal: List.destutter' R a [b] = if R a b then [a, b] else [a]

full_name: List.destutter'_sublist
code: theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l 
goal: (List.destutter' R a l).Sublist (a :: l)

full_name: List.mem_destutter'
code: theorem mem_destutter' (a) : a ∈ l.destutter' R a 
goal: a ∈ List.destutter' R a l

full_name: List.destutter'_is_chain
code: theorem destutter'_is_chain : ∀ l : List α, ∀ {a b}, R a b → (l.destutter' R b).Chain R a
  
goal: R a b → List.Chain R a (List.destutter' R b l)

full_name: List.destutter'_is_chain'
code: theorem destutter'_is_chain' (a) : (l.destutter' R a).Chain' R 
goal: List.Chain' R (List.destutter' R a l)

full_name: List.destutter'_of_chain
code: theorem destutter'_of_chain (h : l.Chain R a) : l.destutter' R a = a :: l 
goal: List.destutter' R a l = a :: l

full_name: List.destutter'_eq_self_iff
code: @[simp]
theorem destutter'_eq_self_iff (a) : l.destutter' R a = a :: l ↔ l.Chain R a 
goal: List.destutter' R a l = a :: l ↔ List.Chain R a l

full_name: List.destutter'_ne_nil
code: theorem destutter'_ne_nil : l.destutter' R a ≠ [] 
goal: List.destutter' R a l ≠ []

full_name: List.destutter_nil
code: @[simp]
theorem destutter_nil : ([] : List α).destutter R = [] 
goal: List.destutter R [] = []

full_name: List.destutter_cons'
code: theorem destutter_cons' : (a :: l).destutter R = destutter' R a l 
goal: List.destutter R (a :: l) = List.destutter' R a l

full_name: List.destutter_cons_cons
code: theorem destutter_cons_cons :
    (a :: b :: l).destutter R = if R a b then a :: destutter' R b l else destutter' R a l 
goal: List.destutter R (a :: b :: l) = if R a b then a :: List.destutter' R b l else List.destutter' R a l

full_name: List.destutter_singleton
code: @[simp]
theorem destutter_singleton : destutter R [a] = [a] 
goal: List.destutter R [a] = [a]

full_name: List.destutter_pair
code: @[simp]
theorem destutter_pair : destutter R [a, b] = if R a b then [a, b] else [a] 
goal: List.destutter R [a, b] = if R a b then [a, b] else [a]

full_name: List.destutter_sublist
code: theorem destutter_sublist : ∀ l : List α, l.destutter R <+ l
  
goal: (List.destutter R l).Sublist l

full_name: List.destutter_is_chain'
code: theorem destutter_is_chain' : ∀ l : List α, (l.destutter R).Chain' R
  
goal: List.Chain' R (List.destutter R l)

full_name: List.destutter_of_chain'
code: theorem destutter_of_chain' : ∀ l : List α, l.Chain' R → l.destutter R = l
  
goal: List.Chain' R l → List.destutter R l = l

full_name: List.destutter_eq_self_iff
code: @[simp]
theorem destutter_eq_self_iff : ∀ l : List α, l.destutter R = l ↔ l.Chain' R
  
goal: List.destutter R l = l ↔ List.Chain' R l

full_name: List.destutter_idem
code: theorem destutter_idem : (l.destutter R).destutter R = l.destutter R 
goal: List.destutter R (List.destutter R l) = List.destutter R l

full_name: List.destutter_eq_nil
code: @[simp]
theorem destutter_eq_nil : ∀ {l : List α}, destutter R l = [] ↔ l = []
  
goal: List.destutter R l = [] ↔ l = []