mathlib documentation

data.tprod

Finite products of types #

This file defines the product of types over a list. For l : list ι and α : ι → Type* we define list.tprod α l = l.foldr (λ 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.

Main definitions #

def list.tprod {ι : Type u_1} (α : ι → Type u_2) (l : list ι) :
Type (max u_2 u_3)

The product of a family of types over a list.

Equations
def list.tprod.mk {ι : Type u_1} {α : ι → Type u_2} (l : list ι) (f : Π (i : ι), α i) :

Turning a function f : Π i, α i into an element of the iterated product tprod α l.

Equations
@[instance]
def list.tprod.inhabited {ι : Type u_1} {α : ι → Type u_2} {l : list ι} [Π (i : ι), inhabited (α i)] :
Equations
@[simp]
theorem list.tprod.fst_mk {ι : Type u_1} {α : ι → Type u_2} (i : ι) (l : list ι) (f : Π (i : ι), α i) :
(list.tprod.mk (i :: l) f).fst = f i
@[simp]
theorem list.tprod.snd_mk {ι : Type u_1} {α : ι → Type u_2} (i : ι) (l : list ι) (f : Π (i : ι), α i) :
def list.tprod.elim {ι : Type u_1} {α : ι → Type u_2} [decidable_eq ι] {l : list ι} (v : list.tprod α l) {i : ι} (hi : i l) :
α i

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
@[simp]
theorem list.tprod.elim_self {ι : Type u_1} {α : ι → Type u_2} {i : ι} {l : list ι} [decidable_eq ι] (v : list.tprod α (i :: l)) :
v.elim _ = v.fst
@[simp]
theorem list.tprod.elim_of_ne {ι : Type u_1} {α : ι → Type u_2} {i j : ι} {l : list ι} [decidable_eq ι] (hj : j i :: l) (hji : j i) (v : list.tprod α (i :: l)) :
@[simp]
theorem list.tprod.elim_of_mem {ι : Type u_1} {α : ι → Type u_2} {i j : ι} {l : list ι} [decidable_eq ι] (hl : (i :: l).nodup) (hj : j l) (v : list.tprod α (i :: l)) :
theorem list.tprod.elim_mk {ι : Type u_1} {α : ι → Type u_2} [decidable_eq ι] (l : list ι) (f : Π (i : ι), α i) {i : ι} (hi : i l) :
(list.tprod.mk l f).elim hi = f i
@[ext]
theorem list.tprod.ext {ι : Type u_1} {α : ι → Type u_2} [decidable_eq ι] {l : list ι} (hl : l.nodup) {v w : list.tprod α l} (hvw : ∀ (i : ι) (hi : i l), v.elim hi = w.elim hi) :
v = w
@[simp]
def list.tprod.elim' {ι : Type u_1} {α : ι → Type u_2} {l : list ι} [decidable_eq ι] (h : ∀ (i : ι), i l) (v : list.tprod α l) (i : ι) :
α i

A version of tprod.elim when l contains all elements. In this case we get a function into Π i, α i.

Equations
theorem list.tprod.mk_elim {ι : Type u_1} {α : ι → Type u_2} {l : list ι} [decidable_eq ι] (hnd : l.nodup) (h : ∀ (i : ι), i l) (v : list.tprod α l) :
def list.tprod.pi_equiv_tprod {ι : Type u_1} {α : ι → Type u_2} {l : list ι} [decidable_eq ι] (hnd : l.nodup) (h : ∀ (i : ι), i l) :
(Π (i : ι), α i) list.tprod α l

Pi-types are equivalent to iterated products.

Equations
@[simp]
def set.tprod {ι : Type u_1} {α : ι → Type u_2} (l : list ι) (t : Π (i : ι), set (α i)) :

A product of sets in tprod α l.

Equations
theorem set.mk_preimage_tprod {ι : Type u_1} {α : ι → Type u_2} (l : list ι) (t : Π (i : ι), set (α i)) :
list.tprod.mk l ⁻¹' set.tprod l t = {i : ι | i l}.pi t
theorem set.elim_preimage_pi {ι : Type u_1} {α : ι → Type u_2} [decidable_eq ι] {l : list ι} (hnd : l.nodup) (h : ∀ (i : ι), i l) (t : Π (i : ι), set (α i)) :