Finsets in product types #
This file defines finset constructions on the product type α × β. Beware not to confuse with the
Finset.prod operation which computes the multiplicative product.
Main declarations #
prod #
@[instance_reducible]
Equations
- Finset.instSProd = { sprod := Finset.product }
The product s ×ˢ t of two finsets, viewed as a subtype, is equivalent to the product of the
subtypes s × t. The Finset analogue of Equiv.Set.prod.
Equations
Instances For
theorem Finset.subset_product_image_fst {α : Type u_1} {β : Type u_2} {s : Finset α} {t : Finset β} [DecidableEq α] :
theorem Finset.subset_product_image_snd {α : Type u_1} {β : Type u_2} {s : Finset α} {t : Finset β} [DecidableEq β] :
theorem Finset.subset_product {α : Type u_1} {β : Type u_2} [DecidableEq α] [DecidableEq β] {s : Finset (α × β)} :
The product of two Finsets is nontrivial iff both are nonempty at least one of them is nontrivial.
@[simp]
theorem Finset.union_product {α : Type u_1} {β : Type u_2} {s s' : Finset α} {t : Finset β} [DecidableEq α] [DecidableEq β] :
@[simp]
theorem Finset.product_union {α : Type u_1} {β : Type u_2} {s : Finset α} {t t' : Finset β} [DecidableEq α] [DecidableEq β] :
theorem Finset.inter_product {α : Type u_1} {β : Type u_2} {s s' : Finset α} {t : Finset β} [DecidableEq α] [DecidableEq β] :
theorem Finset.product_inter {α : Type u_1} {β : Type u_2} {s : Finset α} {t t' : Finset β} [DecidableEq α] [DecidableEq β] :
theorem Finset.product_inter_product {α : Type u_1} {β : Type u_2} {s s' : Finset α} {t t' : Finset β} [DecidableEq α] [DecidableEq β] :
Given a finite set s, the diagonal, s.diag is the set of pairs of the form (a, a) for
a ∈ s.
Equations
- s.diag = Finset.map { toFun := Function.diag, inj' := ⋯ } s
Instances For
@[simp]
theorem Finset.offDiag_filter_lt_eq_filter_le {ι : Type u_4} [PartialOrder ι] [DecidableLE ι] [DecidableLT ι] (s : Finset ι) :