File: Mathlib/Data/Multiset/Nodup.lean

full_name: Multiset.Nodup
code: /-- `Nodup s` means that `s` has no duplicates, i.e. the multiplicity of
  any element is at most 1. -/
def Nodup (s : Multiset α) : Prop 
goal: Prop

full_name: Multiset.coe_nodup
code: @[simp]
theorem coe_nodup {l : List α} : @Nodup α l ↔ l.Nodup 
goal: (↑l).Nodup ↔ l.Nodup

full_name: Multiset.nodup_zero
code: @[simp]
theorem nodup_zero : @Nodup α 0 
goal: Multiset.Nodup 0

full_name: Multiset.nodup_cons
code: @[simp]
theorem nodup_cons {a : α} {s : Multiset α} : Nodup (a ::ₘ s) ↔ a ∉ s ∧ Nodup s 
goal: (a ::ₘ s).Nodup ↔ a ∉ s ∧ s.Nodup

full_name: Multiset.Nodup.cons
code: theorem Nodup.cons (m : a ∉ s) (n : Nodup s) : Nodup (a ::ₘ s) 
goal: (a ::ₘ s).Nodup

full_name: Multiset.nodup_singleton
code: @[simp]
theorem nodup_singleton : ∀ a : α, Nodup ({a} : Multiset α) 
goal: {a}.Nodup

full_name: Multiset.Nodup.of_cons
code: theorem Nodup.of_cons (h : Nodup (a ::ₘ s)) : Nodup s 
goal: s.Nodup

full_name: Multiset.Nodup.not_mem
code: theorem Nodup.not_mem (h : Nodup (a ::ₘ s)) : a ∉ s 
goal: a ∉ s

full_name: Multiset.nodup_of_le
code: theorem nodup_of_le {s t : Multiset α} (h : s ≤ t) : Nodup t → Nodup s 
goal: t.Nodup → s.Nodup

full_name: Multiset.not_nodup_pair
code: theorem not_nodup_pair : ∀ a : α, ¬Nodup (a ::ₘ a ::ₘ 0) 
goal: ¬(a ::ₘ a ::ₘ 0).Nodup

full_name: Multiset.nodup_iff_le
code: theorem nodup_iff_le {s : Multiset α} : Nodup s ↔ ∀ a : α, ¬a ::ₘ a ::ₘ 0 ≤ s 
goal: s.Nodup ↔ ∀ (a : α), ¬a ::ₘ a ::ₘ 0 ≤ s

full_name: Multiset.nodup_iff_ne_cons_cons
code: theorem nodup_iff_ne_cons_cons {s : Multiset α} : s.Nodup ↔ ∀ a t, s ≠ a ::ₘ a ::ₘ t 
goal: s.Nodup ↔ ∀ (a : α) (t : Multiset α), s ≠ a ::ₘ a ::ₘ t

full_name: Multiset.nodup_iff_count_le_one
code: theorem nodup_iff_count_le_one [DecidableEq α] {s : Multiset α} : Nodup s ↔ ∀ a, count a s ≤ 1 
goal: s.Nodup ↔ ∀ (a : α), Multiset.count a s ≤ 1

full_name: Multiset.nodup_iff_count_eq_one
code: theorem nodup_iff_count_eq_one [DecidableEq α] : Nodup s ↔ ∀ a ∈ s, count a s = 1 
goal: s.Nodup ↔ ∀ a ∈ s, Multiset.count a s = 1

full_name: Multiset.count_eq_one_of_mem
code: @[simp]
theorem count_eq_one_of_mem [DecidableEq α] {a : α} {s : Multiset α} (d : Nodup s) (h : a ∈ s) :
    count a s = 1 
goal: Multiset.count a s = 1

full_name: Multiset.count_eq_of_nodup
code: theorem count_eq_of_nodup [DecidableEq α] {a : α} {s : Multiset α} (d : Nodup s) :
    count a s = if a ∈ s then 1 else 0 
goal: Multiset.count a s = if a ∈ s then 1 else 0

full_name: Multiset.nodup_iff_pairwise
code: theorem nodup_iff_pairwise {α} {s : Multiset α} : Nodup s ↔ Pairwise (· ≠ ·) s 
goal: s.Nodup ↔ Multiset.Pairwise (fun x x_1 => x ≠ x_1) s

full_name: Multiset.Nodup.pairwise
code: protected theorem Nodup.pairwise : (∀ a ∈ s, ∀ b ∈ s, a ≠ b → r a b) → Nodup s → Pairwise r s 
goal: (∀ a ∈ s, ∀ b ∈ s, a ≠ b → r a b) → s.Nodup → Multiset.Pairwise r s

full_name: Multiset.Pairwise.forall
code: theorem Pairwise.forall (H : Symmetric r) (hs : Pairwise r s) :
    ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → a ≠ b → r a b 
goal: a ∈ s → ∀ ⦃b : α⦄, b ∈ s → a ≠ b → r a b

full_name: Multiset.nodup_add
code: theorem nodup_add {s t : Multiset α} : Nodup (s + t) ↔ Nodup s ∧ Nodup t ∧ Disjoint s t 
goal: (s + t).Nodup ↔ s.Nodup ∧ t.Nodup ∧ s.Disjoint t

full_name: Multiset.disjoint_of_nodup_add
code: theorem disjoint_of_nodup_add {s t : Multiset α} (d : Nodup (s + t)) : Disjoint s t 
goal: s.Disjoint t

full_name: Multiset.Nodup.add_iff
code: theorem Nodup.add_iff (d₁ : Nodup s) (d₂ : Nodup t) : Nodup (s + t) ↔ Disjoint s t 
goal: (s + t).Nodup ↔ s.Disjoint t

full_name: Multiset.Nodup.of_map
code: theorem Nodup.of_map (f : α → β) : Nodup (map f s) → Nodup s 
goal: (Multiset.map f s).Nodup → s.Nodup

full_name: Multiset.Nodup.map_on
code: theorem Nodup.map_on {f : α → β} :
    (∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) → Nodup s → Nodup (map f s) 
goal: (∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) → s.Nodup → (Multiset.map f s).Nodup

full_name: Multiset.Nodup.map
code: theorem Nodup.map {f : α → β} {s : Multiset α} (hf : Injective f) : Nodup s → Nodup (map f s) 
goal: s.Nodup → (Multiset.map f s).Nodup

full_name: Multiset.nodup_map_iff_of_inj_on
code: theorem nodup_map_iff_of_inj_on {f : α → β} (d : ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) :
    Nodup (map f s) ↔ Nodup s 
goal: (Multiset.map f s).Nodup ↔ s.Nodup

full_name: Multiset.nodup_map_iff_of_injective
code: theorem nodup_map_iff_of_injective {f : α → β} (d : Function.Injective f) :
    Nodup (map f s) ↔ Nodup s 
goal: (Multiset.map f s).Nodup ↔ s.Nodup

full_name: Multiset.inj_on_of_nodup_map
code: theorem inj_on_of_nodup_map {f : α → β} {s : Multiset α} :
    Nodup (map f s) → ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y 
goal: (Multiset.map f s).Nodup → ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y

full_name: Multiset.nodup_map_iff_inj_on
code: theorem nodup_map_iff_inj_on {f : α → β} {s : Multiset α} (d : Nodup s) :
    Nodup (map f s) ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y 
goal: (Multiset.map f s).Nodup ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y

full_name: Multiset.Nodup.filter
code: theorem Nodup.filter (p : α → Prop) [DecidablePred p] {s} : Nodup s → Nodup (filter p s) 
goal: s.Nodup → (Multiset.filter p s).Nodup

full_name: Multiset.nodup_attach
code: @[simp]
theorem nodup_attach {s : Multiset α} : Nodup (attach s) ↔ Nodup s 
goal: s.attach.Nodup ↔ s.Nodup

full_name: Multiset.Nodup.pmap
code: theorem Nodup.pmap {p : α → Prop} {f : ∀ a, p a → β} {s : Multiset α} {H}
    (hf : ∀ a ha b hb, f a ha = f b hb → a = b) : Nodup s → Nodup (pmap f s H) 
goal: s.Nodup → (Multiset.pmap f s H).Nodup

full_name: Multiset.nodupDecidable
code: instance nodupDecidable [DecidableEq α] (s : Multiset α) : Decidable (Nodup s) 
goal: Decidable s.Nodup

full_name: Multiset.Nodup.erase_eq_filter
code: theorem Nodup.erase_eq_filter [DecidableEq α] (a : α) {s} :
    Nodup s → s.erase a = Multiset.filter (· ≠ a) s 
goal: s.Nodup → s.erase a = Multiset.filter (fun x => x ≠ a) s

full_name: Multiset.Nodup.erase
code: theorem Nodup.erase [DecidableEq α] (a : α) {l} : Nodup l → Nodup (l.erase a) 
goal: l.Nodup → (l.erase a).Nodup

full_name: Multiset.Nodup.mem_erase_iff
code: theorem Nodup.mem_erase_iff [DecidableEq α] {a b : α} {l} (d : Nodup l) :
    a ∈ l.erase b ↔ a ≠ b ∧ a ∈ l 
goal: a ∈ l.erase b ↔ a ≠ b ∧ a ∈ l

full_name: Multiset.Nodup.not_mem_erase
code: theorem Nodup.not_mem_erase [DecidableEq α] {a : α} {s} (h : Nodup s) : a ∉ s.erase a 
goal: a ∉ s.erase a

full_name: Multiset.Nodup.filterMap
code: protected theorem Nodup.filterMap (f : α → Option β) (H : ∀ a a' b, b ∈ f a → b ∈ f a' → a = a') :
    Nodup s → Nodup (filterMap f s) 
goal: s.Nodup → (Multiset.filterMap f s).Nodup

full_name: Multiset.nodup_range
code: theorem nodup_range (n : ℕ) : Nodup (range n) 
goal: (Multiset.range n).Nodup

full_name: Multiset.Nodup.inter_left
code: theorem Nodup.inter_left [DecidableEq α] (t) : Nodup s → Nodup (s ∩ t) 
goal: s.Nodup → (s ∩ t).Nodup

full_name: Multiset.Nodup.inter_right
code: theorem Nodup.inter_right [DecidableEq α] (s) : Nodup t → Nodup (s ∩ t) 
goal: t.Nodup → (s ∩ t).Nodup

full_name: Multiset.nodup_union
code: @[simp]
theorem nodup_union [DecidableEq α] {s t : Multiset α} : Nodup (s ∪ t) ↔ Nodup s ∧ Nodup t 
goal: (s ∪ t).Nodup ↔ s.Nodup ∧ t.Nodup

full_name: Multiset.Nodup.ext
code: theorem Nodup.ext {s t : Multiset α} : Nodup s → Nodup t → (s = t ↔ ∀ a, a ∈ s ↔ a ∈ t) 
goal: s.Nodup → t.Nodup → (s = t ↔ ∀ (a : α), a ∈ s ↔ a ∈ t)

full_name: Multiset.le_iff_subset
code: theorem le_iff_subset {s t : Multiset α} : Nodup s → (s ≤ t ↔ s ⊆ t) 
goal: s.Nodup → (s ≤ t ↔ s ⊆ t)

full_name: Multiset.range_le
code: theorem range_le {m n : ℕ} : range m ≤ range n ↔ m ≤ n 
goal: Multiset.range m ≤ Multiset.range n ↔ m ≤ n

full_name: Multiset.mem_sub_of_nodup
code: theorem mem_sub_of_nodup [DecidableEq α] {a : α} {s t : Multiset α} (d : Nodup s) :
    a ∈ s - t ↔ a ∈ s ∧ a ∉ t 
goal: a ∈ s - t ↔ a ∈ s ∧ a ∉ t

full_name: Multiset.map_eq_map_of_bij_of_nodup
code: theorem map_eq_map_of_bij_of_nodup (f : α → γ) (g : β → γ) {s : Multiset α} {t : Multiset β}
    (hs : s.Nodup) (ht : t.Nodup) (i : ∀ a ∈ s, β) (hi : ∀ a ha, i a ha ∈ t)
    (i_inj : ∀ a₁ ha₁ a₂ ha₂, i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂)
    (i_surj : ∀ b ∈ t, ∃ a ha, i a ha = b) (h : ∀ a ha, f a = g (i a ha)) : s.map f = t.map g 
goal: Multiset.map f s = Multiset.map g t