Finiteness of unions and intersections #
Implementation notes #
Each result in this file should come in three forms: a Fintype instance, a Finite instance
and a Set.Finite constructor.
Tags #
finite sets
Fintype instances #
Every instance here should have a corresponding Set.Finite constructor in the next section.
Equations
- Set.fintypeiUnion f = Fintype.ofFinset (Finset.univ.biUnion fun (i : PLift ι) => (f i.down).toFinset) ⋯
Equations
Equations
- s.fintypeBiUnion' t = Fintype.ofFinset (s.toFinset.biUnion fun (x : ι) => (t x).toFinset) ⋯
Finite instances #
There is seemingly some overlap between the following instances and the Fintype instances
in Data.Set.Finite. While every Fintype instance gives a Finite instance, those
instances that depend on Fintype or Decidable instances need an additional Finite instance
to be able to generally apply.
Some set instances do not appear here since they are consequences of others, for example
Subtype.Finite for subsets of a finite type.
Example: Finite (⋃ (i < n), f i) where f : ℕ → Set α and [∀ i, Finite (f i)]
(when given instances from Order.Interval.Finset.Nat).
Constructors for Set.Finite #
Every constructor here should have a corresponding Fintype instance in the previous section
(or in the Fintype module).
The implementation of these constructors ideally should be no more than Set.toFinite,
after possibly setting up some Fintype and classical Decidable instances.
An indexed union of pairwise disjoint sets is finite iff all sets are finite, and all but finitely many are empty.
If the image of s under f is finite, and each fiber of f has a finite intersection
with s, then s is itself finite.
It is useful to give f explicitly here so this can be used with apply.
Properties #
Infinite sets #
Order properties #
A decreasing union distributes over finite intersection.
An increasing intersection distributes over finite union.
A finite set is bounded above.
A finite union of sets which are all bounded above is still bounded above.
A finite set is bounded below.
A finite union of sets which are all bounded below is still bounded below.
A finset is bounded above.
A finset is bounded below.