Lists with no duplicates #
List.Nodup
is defined in Data/List/Basic
. In this file we prove various properties of this
predicate.
Alias of the reverse direction of List.nodup_mergeSort
.
@[deprecated List.idxOf_getElem (since := "2025-01-30")]
theorem
List.indexOf_getElem
{α : Type u}
[DecidableEq α]
{l : List α}
(H : l.Nodup)
(i : ℕ)
(h : i < l.length)
:
Alias of List.idxOf_getElem
.
@[deprecated List.get_idxOf (since := "2025-01-30")]
theorem
List.get_indexOf
{α : Type u}
[DecidableEq α]
{l : List α}
(H : l.Nodup)
(i : Fin l.length)
:
Alias of List.get_idxOf
.
@[simp]
theorem
List.count_eq_one_of_mem
{α : Type u}
[DecidableEq α]
{a : α}
{l : List α}
(d : l.Nodup)
(h : a ∈ l)
:
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
@[deprecated List.nodup_flatMap (since := "2025-10-16")]
Alias of List.nodup_flatMap
.
theorem
List.Nodup.insert
{α : Type u}
{l : List α}
{a : α}
[DecidableEq α]
(h : l.Nodup)
:
(List.insert a l).Nodup