Module docstring
{"# Finite sets
This file provides Fintype instances for many set constructions. It also proves basic facts about
finite sets and gives ways to manipulate Set.Finite expressions.
Note that the instances in this file are selected somewhat arbitrarily on the basis of them not
needing any imports beyond Data.Fintype.Card (which is required by Finite.ofFinset); they can
certainly be organized better.
Main definitions
Set.Finite.toFinsetto noncomputably produce aFinsetfrom aSet.Finiteproof. (SeeSet.toFinsetfor a computable version.)
Implementation
A finite set is defined to be a set whose coercion to a type has a Finite instance.
There are two components to finiteness constructions. The first is Fintype instances for each
construction. This gives a way to actually compute a Finset that represents the set, and these
may be accessed using set.toFinset. This gets the Finset in the correct form, since otherwise
Finset.univ : Finset s is a Finset for the subtype for s. The second component is
\"constructors\" for Set.Finite that give proofs that Fintype instances exist classically given
other Set.Finite proofs. Unlike the Fintype instances, these do not use any decidability
instances since they do not compute anything.
Tags
finite sets
","### Basic properties of Set.Finite.toFinset ","### Fintype instances
Every instance here should have a corresponding Set.Finite constructor in the next section.
","### Finset ","### 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.
","### 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.
","### Properties ","### Cardinality ","### Infinite sets ","### Order properties "}