List Permutations #
This file introduces the List.Perm relation, which is true if two lists are permutations of one
another.
Notation #
The notation ~ is used for permutation equivalence.
theorem
List.Subperm.filter
{α : Type u_1}
(p : α → Bool)
⦃l l' : List α⦄
(h : l.Subperm l')
:
(List.filter p l).Subperm (List.filter p l')
instance
List.decidableSubperm
{α : Type u_1}
[BEq α]
[LawfulBEq α]
:
DecidableRel fun (x1 x2 : List α) => x1.Subperm x2
Equations
- x✝¹.decidableSubperm x✝ = decidable_of_iff (x✝¹.isSubperm x✝ = true) ⋯
theorem
List.Perm.insertP
{α : Type u_1}
{l₁ l₂ : List α}
(p : α → Bool)
(a : α)
(h : l₁.Perm l₂)
:
(List.insertP p a l₁).Perm (List.insertP p a l₂)