File: Mathlib/Data/List/Duplicate.lean

full_name: List.Duplicate.cons_mem
code: /-- Property that an element `x : α` of `l : List α` can be found in the list more than once. -/
inductive Duplicate (x : α) : List α → Prop
  | cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
  | cons_duplicate {y : α} {l : List α} : Duplicate x l → Duplicate x (y :: l)
goal: x ∈ l → List.Duplicate x (x :: l)

full_name: List.Duplicate.cons_duplicate
code: /-- Property that an element `x : α` of `l : List α` can be found in the list more than once. -/
inductive Duplicate (x : α) : List α → Prop
  | cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
  | cons_duplicate {y : α} {l : List α} : Duplicate x l → Duplicate x (y :: l)
goal: List.Duplicate x l → List.Duplicate x (y :: l)

full_name: List.Duplicate
code: /-- Property that an element `x : α` of `l : List α` can be found in the list more than once. -/
inductive Duplicate (x : α) : List α → Prop
  | cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
  | cons_duplicate {y : α} {l : List α} : Duplicate x l → Duplicate x (y :: l)
goal: List α → Prop

full_name: List._aux_Mathlib_Data_List_Duplicate___unexpand_List_Duplicate_1
code: local infixl:50 " ∈+ " => List.Duplicate
goal: Lean.PrettyPrinter.Unexpander

full_name: List.«_aux_Mathlib_Data_List_Duplicate___macroRules_List_term_∈+__1»
code: local infixl:50 " ∈+ " => List.Duplicate
goal: Lean.Macro

full_name: List.Mem.duplicate_cons_self
code: theorem Mem.duplicate_cons_self (h : x ∈ l) : x ∈+ x :: l 
goal: List.Duplicate x (x :: l)

full_name: List.Duplicate.duplicate_cons
code: theorem Duplicate.duplicate_cons (h : x ∈+ l) (y : α) : x ∈+ y :: l 
goal: List.Duplicate x (y :: l)

full_name: List.Duplicate.mem
code: theorem Duplicate.mem (h : x ∈+ l) : x ∈ l 
goal: x ∈ l

full_name: List.Duplicate.mem_cons_self
code: theorem Duplicate.mem_cons_self (h : x ∈+ x :: l) : x ∈ l 
goal: x ∈ l

full_name: List.duplicate_cons_self_iff
code: @[simp]
theorem duplicate_cons_self_iff : x ∈+ x :: l ↔ x ∈ l 
goal: List.Duplicate x (x :: l) ↔ x ∈ l

full_name: List.Duplicate.ne_nil
code: theorem Duplicate.ne_nil (h : x ∈+ l) : l ≠ [] 
goal: l ≠ []

full_name: List.not_duplicate_nil
code: @[simp]
theorem not_duplicate_nil (x : α) : ¬x ∈+ [] 
goal: ¬List.Duplicate x []

full_name: List.Duplicate.ne_singleton
code: theorem Duplicate.ne_singleton (h : x ∈+ l) (y : α) : l ≠ [y] 
goal: l ≠ [y]

full_name: List.not_duplicate_singleton
code: @[simp]
theorem not_duplicate_singleton (x y : α) : ¬x ∈+ [y] 
goal: ¬List.Duplicate x [y]

full_name: List.Duplicate.elim_nil
code: theorem Duplicate.elim_nil (h : x ∈+ []) : False 
goal: False

full_name: List.Duplicate.elim_singleton
code: theorem Duplicate.elim_singleton {y : α} (h : x ∈+ [y]) : False 
goal: False

full_name: List.duplicate_cons_iff
code: theorem duplicate_cons_iff {y : α} : x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l 
goal: List.Duplicate x (y :: l) ↔ y = x ∧ x ∈ l ∨ List.Duplicate x l

full_name: List.Duplicate.of_duplicate_cons
code: theorem Duplicate.of_duplicate_cons {y : α} (h : x ∈+ y :: l) (hx : x ≠ y) : x ∈+ l 
goal: List.Duplicate x l

full_name: List.duplicate_cons_iff_of_ne
code: theorem duplicate_cons_iff_of_ne {y : α} (hne : x ≠ y) : x ∈+ y :: l ↔ x ∈+ l 
goal: List.Duplicate x (y :: l) ↔ List.Duplicate x l

full_name: List.Duplicate.mono_sublist
code: theorem Duplicate.mono_sublist {l' : List α} (hx : x ∈+ l) (h : l <+ l') : x ∈+ l' 
goal: List.Duplicate x l'

full_name: List.duplicate_iff_sublist
code: /-- The contrapositive of `List.nodup_iff_sublist`. -/
theorem duplicate_iff_sublist : x ∈+ l ↔ [x, x] <+ l 
goal: List.Duplicate x l ↔ [x, x].Sublist l

full_name: List.nodup_iff_forall_not_duplicate
code: theorem nodup_iff_forall_not_duplicate : Nodup l ↔ ∀ x : α, ¬x ∈+ l 
goal: l.Nodup ↔ ∀ (x : α), ¬List.Duplicate x l

full_name: List.exists_duplicate_iff_not_nodup
code: theorem exists_duplicate_iff_not_nodup : (∃ x : α, x ∈+ l) ↔ ¬Nodup l 
goal: (∃ x, List.Duplicate x l) ↔ ¬l.Nodup

full_name: List.Duplicate.not_nodup
code: theorem Duplicate.not_nodup (h : x ∈+ l) : ¬Nodup l 
goal: ¬l.Nodup

full_name: List.duplicate_iff_two_le_count
code: theorem duplicate_iff_two_le_count [DecidableEq α] : x ∈+ l ↔ 2 ≤ count x l 
goal: List.Duplicate x l ↔ 2 ≤ List.count x l

full_name: List.decidableDuplicate
code: instance decidableDuplicate [DecidableEq α] (x : α) : ∀ l : List α, Decidable (x ∈+ l)
  
goal: Decidable (List.Duplicate x l)