Combinations #
Combinations in a type are finite subsets of given cardinality.
Set.powersetCard α nis the set of allFinset αwith cardinalityn. The name is chosen in relation withFinset.powersetCardwhich corresponds to the analogous structure for subsets of given cardinality of a givenFinset, as aFinset.Set.powersetCard.cardproves that theNat.card-cardinality of this set is equal to(Nat.card α).choose n.
Equations
The map powersetCard α n → powersetCard β n induced by embedding f : α ↪ β.
Equations
- Set.powersetCard.map n f s = ⟨Finset.map f ↑s, ⋯⟩
Instances For
The equivalence sending a : α to the singleton {a}.
Equations
- Set.powersetCard.ofSingleton = { toFun := fun (a : α) => ⟨{a}, ⋯⟩, invFun := fun (s : ↑(Set.powersetCard α 1)) => ⋯.choose, left_inv := ⋯, right_inv := ⋯ }
Instances For
The image of an embedding f : Fin n ↪ β as an element of powersetCard β n.
Equations
- Set.powersetCard.ofFinEmb n β f = Set.powersetCard.map n f ⟨Finset.univ, ⋯⟩
Instances For
Complement of Finsets as an equivalence on Set.powersetCard.
Equations
- Set.powersetCard.compl hm = { toFun := fun (s : ↑(Set.powersetCard α n)) => ⟨(↑s)ᶜ, ⋯⟩, invFun := fun (t : ↑(Set.powersetCard α m)) => ⟨(↑t)ᶜ, ⋯⟩, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equations
If 0 < n < ENat.card α, then powersetCard α n is nontrivial.
A variant of Set.powersetCard.nontrivial that uses Nat.card.