The powerset of a finset #
powerset #
When s
is a finset, s.powerset
is the finset of all subsets of s
(seen as finsets).
Equations
- s.powerset = { val := Multiset.pmap Finset.mk s.val.powerset ⋯, nodup := ⋯ }
Instances For
For predicate p
decidable on subsets, it is decidable whether p
holds for any subset.
Equations
- Finset.decidableExistsOfDecidableSubsets = decidable_of_iff (∃ (t : Finset α) (hs : t ∈ s.powerset), p t ⋯) ⋯
For predicate p
decidable on subsets, it is decidable whether p
holds for every subset.
Equations
- Finset.decidableForallOfDecidableSubsets = decidable_of_iff (∀ (t : Finset α) (h : t ∈ s.powerset), p t ⋯) ⋯
For predicate p
decidable on subsets, it is decidable whether p
holds for any subset.
Equations
- Finset.decidableExistsOfDecidableSubsets' = decidable_of_iff (∃ (t : Finset α) (_ : t ⊆ s), p t) ⋯
For predicate p
decidable on subsets, it is decidable whether p
holds for every subset.
Equations
- Finset.decidableForallOfDecidableSubsets' = decidable_of_iff (∀ t ⊆ s, p t) ⋯
For predicate p
decidable on ssubsets, it is decidable whether p
holds for any ssubset.
Equations
- Finset.decidableExistsOfDecidableSSubsets = decidable_of_iff (∃ (t : Finset α) (hs : t ∈ s.ssubsets), p t ⋯) ⋯
Instances For
For predicate p
decidable on ssubsets, it is decidable whether p
holds for every ssubset.
Equations
- Finset.decidableForallOfDecidableSSubsets = decidable_of_iff (∀ (t : Finset α) (h : t ∈ s.ssubsets), p t ⋯) ⋯
Instances For
A version of Finset.decidableExistsOfDecidableSSubsets
with a non-dependent p
.
Typeclass inference cannot find hu
here, so this is not an instance.
Equations
- Finset.decidableExistsOfDecidableSSubsets' hu = Finset.decidableExistsOfDecidableSSubsets
Instances For
A version of Finset.decidableForallOfDecidableSSubsets
with a non-dependent p
.
Typeclass inference cannot find hu
here, so this is not an instance.
Equations
- Finset.decidableForallOfDecidableSSubsets' hu = Finset.decidableForallOfDecidableSSubsets
Instances For
Given an integer n
and a finset s
, then powersetCard n s
is the finset of subsets of s
of cardinality n
.
Equations
- Finset.powersetCard n s = { val := Multiset.pmap Finset.mk (Multiset.powersetCard n s.val) ⋯, nodup := ⋯ }
Instances For
Formula for the Number of Combinations
Alias of the reverse direction of Finset.powersetCard_nonempty
.