Basic lemmas on finite sets #
This file contains lemmas on the interaction of various definitions on the Finset type.
For an explanation of Finset design decisions, please see Mathlib/Data/Finset/Defs.lean.
Main declarations #
Main definitions #
Finset.choose: Given a proofhof existence and uniqueness of a certain element satisfying a predicate,choose s hreturns the element ofssatisfying that predicate.
Equivalences between finsets #
- The
Mathlib/Logic/Equiv/Defs.leanfile describes a general type of equivalence, so look in there for any lemmas. There is some API for rewriting sums and products fromstotgiven thats ≃ t. TODO: examples
Tags #
finite sets, finset
Lattice structure #
union #
inter #
Alias of the reverse direction of Finset.not_disjoint_iff_nonempty_inter.
erase #
Alias of Finset.subset_insert_iff_of_notMem.
sdiff #
attach #
Alias of the reverse direction of Finset.attach_nonempty_iff.
filter #
Alias of Finset.filter_disjUnion.
After filtering out everything that does not equal a given value, at most that value remains.
This is equivalent to filter_eq with the equality the other way.
range #
dedup on list and multiset #
Alias of the reverse direction of Multiset.toFinset_nonempty.
Alias of the reverse direction of List.toFinset_nonempty_iff.
choose #
Given a finset l and a predicate p, associate to a proof that there is a unique element of
l satisfying p this unique element, as an element of the corresponding subtype.
Equations
- Finset.chooseX p l hp = Multiset.chooseX p l.val hp
Instances For
Given a finset l and a predicate p, associate to a proof that there is a unique element of
l satisfying p this unique element, as an element of the ambient type.
Equations
- Finset.choose p l hp = ↑(Finset.chooseX p l hp)
Instances For
The type of dependent functions on the disjoint union of finsets s ∪ t is equivalent to the
type of pairs of functions on s and on t. This is similar to Equiv.sumPiEquivProdPi.
Equations
- One or more equations did not get rendered due to their size.