Preparations for defining operations on Finset. #
The operations here ignore multiplicities,
and prepare for defining the corresponding operations on Finset.
finset insert #
ndinsert a s is the lift of the list insert operation. This operation
does not respect multiplicities, unlike cons, but it is suitable as
an insert operation on Finset.
Equations
- Multiset.ndinsert a s = Quot.liftOn s (fun (l : List α) => ↑(List.insert a l)) ⋯
Instances For
Alias of Multiset.ndinsert_of_notMem.
Alias of Multiset.length_ndinsert_of_notMem.
finset union #
ndunion s t is the lift of the list union operation. This operation
does not respect multiplicities, unlike s ∪ t, but it is suitable as
a union operation on Finset. (s ∪ t would also work as a union operation
on finset, but this is more efficient.)
Equations
- s.ndunion t = Quotient.liftOn₂ s t (fun (l₁ l₂ : List α) => ↑(l₁.union l₂)) ⋯
Instances For
finset inter #
ndinter s t is the lift of the list ∩ operation. This operation
does not respect multiplicities, unlike s ∩ t, but it is suitable as
an intersection operation on Finset. (s ∩ t would also work as an intersection operation
on finset, but this is more efficient.)
Equations
- s.ndinter t = Multiset.filter (fun (x : α) => x ∈ t) s
Instances For
Alias of Multiset.ndinter_cons_of_notMem.
Alias of the reverse direction of Multiset.ndinter_eq_zero_iff_disjoint.