Lists with no duplicates #
List.Nodup is defined in Data/List/Basic. In this file we prove various properties of this
predicate.
theorem List.Pairwise.nodup {α : Type u} {l : List α} {r : α → α → Prop} [Std.Irrefl r] (h : Pairwise r l) :
l.Nodup
Alias of the reverse direction of List.nodup_mergeSort.
Alias of List.disjoint_of_nodup_append.
theorem List.Nodup.map {α : Type u} {β : Type v} {l : List α} {f : α → β} (hf : Function.Injective f) :
theorem List.nodup_map_iff {α : Type u} {β : Type v} {f : α → β} {l : List α} (hf : Function.Injective f) :
Alias of the forward direction of List.nodup_attach.
Alias of the reverse direction of List.nodup_attach.
theorem List.Nodup.filter {α : Type u} (p : α → Bool) {l : List α} :
l.Nodup → (List.filter p l).Nodup
theorem List.Nodup.insert {α : Type u} {l : List α} {a : α} [BEq α] [LawfulBEq α] (h : l.Nodup) :
(List.insert a l).Nodup
@[deprecated List.Nodup.sdiff_eq_filter (since := "2026-06-03")]
Alias of List.Nodup.sdiff_eq_filter.