Subsets of finite types #
In a Fintype, all Sets are automatically Finsets, and there are only finitely many of them.
Main results #
Set.toFinset: convert a subset of a finite type to aFinsetFinset.fintypeCoeSort:((s : Finset α) : Type*)is a finite typeFintype.finsetEquivSet:Finset αandSet αare equivalent ifαis aFintype
Membership of a set with a Fintype instance is decidable.
Using this as an instance leads to potential loops with Subtype.fintype under certain decidability
assumptions, so it should only be declared a local instance.
Equations
Instances For
Alias of the reverse direction of Set.toFinset_nonempty.
Alias of the reverse direction of Set.toFinset_subset_toFinset.
Alias of the reverse direction of Set.toFinset_subset_toFinset.
Alias of the reverse direction of Set.toFinset_subset_toFinset.
Alias of the reverse direction of Set.toFinset_ssubset_toFinset.
Equations
Equations
Equations
A set on a fintype, when coerced to a type, is a fintype.
Equations
Instances For
Given Fintype α, finsetEquivSet is the equiv between Finset α and Set α. (All
sets on a finite type are finite.)
Equations
Instances For
Given a fintype α, finsetOrderIsoSet is the order isomorphism between Finset α and Set α
(all sets on a finite type are finite).
Equations
Instances For
finset% t elaborates t as a Finset.
If t is a Set, then inserts Set.toFinset.
Does not make use of the expected type; useful for big operators over finsets.
#check finset% Finset.range 2 -- Finset Nat
#check finset% (Set.univ : Set Bool) -- Finset Bool
Equations
Instances For
quot_precheck for the finset% syntax.