Type class for finitely enumerable types. The property is stronger
than Fintype in that it assigns each element a rank in a finite
enumeration.
FinEnum α means that α is finite and can be enumerated in some order,
i.e. α has an explicit bijection with Fin n for some n.
- card : ℕ
FinEnum.cardis the cardinality of theFinEnum - decEq : DecidableEq α
Instances
create a FinEnum instance from an exhaustive list without duplicates
Equations
Instances For
create an exhaustive list of the values of a given type
Equations
Instances For
create a FinEnum instance using a surjection
Equations
Instances For
create a FinEnum instance using an injection
Equations
Instances For
Equations
enumerate all finite sets of a given type
Equations
Instances For
The enumeration merely adds an ordering, leaving the cardinality as is.
An empty type has a trivial enumeration. Not registered as an instance, to make sure that there aren't two definitionally differing instances around.
Equations
Instances For
A type with unique inhabitant has a trivial enumeration. Not registered as an instance, to make sure that there aren't two definitionally differing instances around.