List duplicates #
Main definitions #
List.Duplicate x l : Propis an inductive property that holds whenxis a duplicate inl
Implementation details #
In this file, x ∈+ l notation is shorthand for List.Duplicate x l.
The contrapositive of List.nodup_iff_sublist.
Equations
- List.decidableDuplicate x [] = isFalse ⋯
- List.decidableDuplicate x (y :: l) = match List.decidableDuplicate x l with | isTrue h => isTrue ⋯ | isFalse h => if hx : y = x ∧ x ∈ l then isTrue ⋯ else isFalse ⋯