Finite products of types #
This file defines the product of types over a list. For l : List ι and α : ι → Type v we define
List.TProd α l = l.foldr (fun i β ↦ α i × β) PUnit.
This type should not be used if ∀ i, α i or ∀ i ∈ l, α i can be used instead
(in the last expression, we could also replace the list l by a set or a finset).
This type is used as an intermediary between binary products and finitary products.
The application of this type is finitary product measures, but it could be used in any
construction/theorem that is easier to define/prove on binary products than on finitary products.
- Once we have the construction on binary products (like binary product measures in
MeasureTheory.prod), we can easily define a finitary version on the typeTProd l αby iterating. Properties can also be easily extended from the binary case to the finitary case by iterating. - Then we can use the equivalence
List.TProd.piEquivTProdbelow (or enhanced versions of it, like aMeasurableEquivfor product measures) to get the construction on∀ i : ι, α i, at least when assuming[Fintype ι] [Encodable ι](usingEncodable.sortedUniv). Usingattribute [local instance] Fintype.toEncodablewe can get rid of the argument[Encodable ι].
Main definitions #
- We have the equivalence
TProd.piEquivTProd : (∀ i, α i) ≃ TProd α liflcontains every element ofιexactly once. - The product of sets is
Set.tprod : (∀ i, Set (α i)) → Set (TProd α l).
The product of a family of types over a list.
Equations
- List.TProd α l = List.foldr (fun (i : ι) (β : Type ?u.17) => α i × β) PUnit.{?u.17 + 1} l
Instances For
Turning a function f : ∀ i, α i into an element of the iterated product TProd α l.
Equations
- List.TProd.mk [] = fun (x : (i : ι) → α i) => PUnit.unit
- List.TProd.mk (i :: is) = fun (f : (i : ι) → α i) => (f i, List.TProd.mk is f)
Instances For
Equations
- List.TProd.instInhabited = { default := List.TProd.mk l default }
Given an element of the iterated product l.Prod α, take a projection into direction i.
If i appears multiple times in l, this chooses the first component in direction i.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A version of TProd.elim when l contains all elements. In this case we get a function into
Π i, α i.
Equations
- List.TProd.elim' h v i = v.elim ⋯
Instances For
Pi-types are equivalent to iterated products.
Equations
- List.TProd.piEquivTProd hnd h = { toFun := List.TProd.mk l, invFun := List.TProd.elim' h, left_inv := ⋯, right_inv := ⋯ }