Unions of finite sets #
This file defines the union of a family t : α → Finset β of finsets bounded by a finset
s : Finset α.
Main declarations #
Finset.disjUnion: Given a hypothesishwhich states that finsetssandtare disjoint,s.disjUnion t his the set such thata ∈ disjUnion s t hiffa ∈ sora ∈ t; this does not require decidable equality on the typeα.Finset.biUnion: Finite unions of finsets; given an indexing functionf : α → Finset βand ans : Finset α,s.biUnion fis the union of all finsets of the formf afora ∈ s.
TODO #
Remove Finset.biUnion in favour of Finset.sup.
disjiUnion s f h is the set such that a ∈ disjiUnion s f iff a ∈ f i for some i ∈ s.
It is the same as s.biUnion f, but it does not require decidable equality on the type. The
hypothesis ensures that the sets are disjoint.
Equations
- s.disjiUnion t hf = { val := s.val.bind (Finset.val ∘ t), nodup := ⋯ }
Instances For
Finset.biUnion s t is the union of t a over a ∈ s.
(This was formerly bind due to the monad structure on types with DecidableEq.)
Instances For
Rewrite a biUnion over s.attach as a biUnion over s, in the case where the indexing
function on s.attach happens to factor through α. See Finset.attach_biUnion' for the version
without that hypothesis.
Rewrite a biUnion over s.attach as a biUnion over s by extending the function to all of
α with ∅ outside s. See Finset.attach_biUnion for the version when the indexing function is
already defined on all of α.