The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V01. The language of Mathlib

Mathlib.Logic.Equiv.Prod

138 declarations. Mathlib docs · Source

Equivalence between product types

In this file we continue the work on equivalences begun in Mathlib/Logic/Equiv/Defs.lean, focusing on product types.

Main definitions

  • Equiv.prodCongr ea eb : α₁ × β₁ ≃ α₂ × β₂: combine two equivalences ea : α₁ ≃ α₂ and eb : β₁ ≃ β₂ using Prod.map.

Tags

equivalence, congruence, bijective map

def Equiv.pprodEquivProd E1 #

{α : Type u_9} → {β : Type u_10} → α ×' β ≃ α × β

PProd α β is equivalent to α × β

theorem Equiv.pprodEquivProd_apply E0 #

∀ {α : Type u_9} {β : Type u_10} (x : α ×' β), Equiv.pprodEquivProd x = (x.fst, x.snd)

theorem Equiv.pprodEquivProd_symm_apply E0 #

∀ {α : Type u_9} {β : Type u_10} (x : α × β), Equiv.pprodEquivProd.symm x = ⟨x.1, x.2⟩

def Equiv.pprodCongr E1 #

{α : Sort u_1} → {β : Sort u_4} → {γ : Sort u_7} → {δ : Sort u_8} → α ≃ β → γ ≃ δ → α ×' γ ≃ β ×' δ

Product of two equivalences, in terms of PProd. If α ≃ β and γ ≃ δ, then PProd α γ ≃ PProd β δ.

theorem Equiv.pprodCongr_symm_apply E0 #

∀ {α : Sort u_1} {β : Sort u_4} {γ : Sort u_7} {δ : Sort u_8} (e₁ : α ≃ β) (e₂ : γ ≃ δ) (x : β ×' δ),
  (e₁.pprodCongr e₂).symm x = ⟨e₁.symm x.fst, e₂.symm x.snd⟩

theorem Equiv.pprodCongr_apply E0 #

∀ {α : Sort u_1} {β : Sort u_4} {γ : Sort u_7} {δ : Sort u_8} (e₁ : α ≃ β) (e₂ : γ ≃ δ) (x : α ×' γ),
  (e₁.pprodCongr e₂) x = ⟨e₁ x.fst, e₂ x.snd⟩

def Equiv.pprodProd E1 #

{α₁ : Sort u_2} → {β₁ : Sort u_5} → {α₂ : Type u_9} → {β₂ : Type u_10} → α₁ ≃ α₂ → β₁ ≃ β₂ → α₁ ×' β₁ ≃ α₂ × β₂

Combine two equivalences using PProd in the domain and Prod in the codomain.

theorem Equiv.pprodProd_apply E0 #

∀ {α₁ : Sort u_2} {β₁ : Sort u_5} {α₂ : Type u_9} {β₂ : Type u_10} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) (a : α₁ ×' β₁),
  (ea.pprodProd eb) a = (ea a.fst, eb a.snd)

theorem Equiv.pprodProd_symm_apply E0 #

∀ {α₁ : Sort u_2} {β₁ : Sort u_5} {α₂ : Type u_9} {β₂ : Type u_10} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) (a : α₂ × β₂),
  (ea.pprodProd eb).symm a = ⟨ea.symm a.1, eb.symm a.2⟩

def Equiv.prodPProd E1 #

{α₂ : Sort u_3} → {β₂ : Sort u_6} → {α₁ : Type u_9} → {β₁ : Type u_10} → α₁ ≃ α₂ → β₁ ≃ β₂ → α₁ × β₁ ≃ α₂ ×' β₂

Combine two equivalences using PProd in the codomain and Prod in the domain.

theorem Equiv.prodPProd_apply E0 #

∀ {α₂ : Sort u_3} {β₂ : Sort u_6} {α₁ : Type u_9} {β₁ : Type u_10} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) (a : α₁ × β₁),
  (ea.prodPProd eb) a = ⟨ea a.1, eb a.2⟩

theorem Equiv.prodPProd_symm_apply E0 #

∀ {α₂ : Sort u_3} {β₂ : Sort u_6} {α₁ : Type u_9} {β₁ : Type u_10} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) (a : α₂ ×' β₂),
  (ea.prodPProd eb).symm a = (ea.symm a.fst, eb.symm a.snd)

def Equiv.pprodEquivProdPLift E1 #

{α : Sort u_1} → {β : Sort u_4} → α ×' β ≃ PLift α × PLift β

PProd α β is equivalent to PLift α × PLift β

theorem Equiv.pprodEquivProdPLift_apply E0 #

∀ {α : Sort u_1} {β : Sort u_4} (a : α ×' β), Equiv.pprodEquivProdPLift a = ({ down := a.fst }, { down := a.snd })

theorem Equiv.pprodEquivProdPLift_symm_apply E0 #

∀ {α : Sort u_1} {β : Sort u_4} (a : PLift α × PLift β), Equiv.pprodEquivProdPLift.symm a = ⟨a.1.down, a.2.down⟩

def Equiv.prodCongr E1 #

{α₁ : Type u_9} → {α₂ : Type u_10} → {β₁ : Type u_11} → {β₂ : Type u_12} → α₁ ≃ α₂ → β₁ ≃ β₂ → α₁ × β₁ ≃ α₂ × β₂

Product of two equivalences. If α₁ ≃ α₂ and β₁ ≃ β₂, then α₁ × β₁ ≃ α₂ × β₂. This is Prod.map as an equivalence.

theorem Equiv.prodCongr_apply E0 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {β₁ : Type u_11} {β₂ : Type u_12} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂),
  ⇑(e₁.prodCongr e₂) = Prod.map ⇑e₁ ⇑e₂

theorem Equiv.prodCongr_symm E0 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {β₁ : Type u_11} {β₂ : Type u_12} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂),
  (e₁.prodCongr e₂).symm = e₁.symm.prodCongr e₂.symm

theorem Equiv.prodCongr_refl_refl E0 #

∀ {α : Type u_9} {β : Type u_10}, (Equiv.refl α).prodCongr (Equiv.refl β) = Equiv.refl (α × β)

theorem Equiv.prodCongr_trans_prodCongr E0 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {α₃ : Type u_11} {β₁ : Type u_12} {β₂ : Type u_13} {β₃ : Type u_14} (e₁ : α₁ ≃ α₂)
  (e₂ : β₁ ≃ β₂) (e₁' : α₂ ≃ α₃) (e₂' : β₂ ≃ β₃),
  (e₁.prodCongr e₂).trans (e₁'.prodCongr e₂') = (e₁.trans e₁').prodCongr (e₂.trans e₂')

def Equiv.prodComm E1 #

(α : Type u_9) → (β : Type u_10) → α × β ≃ β × α

Type product is commutative up to an equivalence: α × β ≃ β × α. This is Prod.swap as an equivalence.

theorem Equiv.coe_prodComm E0 #

∀ (α : Type u_9) (β : Type u_10), ⇑(Equiv.prodComm α β) = Prod.swap

theorem Equiv.prodComm_apply E0 #

∀ {α : Type u_9} {β : Type u_10} (x : α × β), (Equiv.prodComm α β) x = x.swap

theorem Equiv.prodComm_symm E0 #

∀ (α : Type u_9) (β : Type u_10), (Equiv.prodComm α β).symm = Equiv.prodComm β α

theorem Equiv.prodComm_trans_prodComm E0 #

∀ (α : Type u_9) (β : Type u_10), (Equiv.prodComm α β).trans (Equiv.prodComm β α) = Equiv.refl (α × β)

theorem Equiv.prodComm_trans_prodCongr E1 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {β₁ : Type u_11} {β₂ : Type u_12} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂),
  (Equiv.prodComm α₁ β₁).trans (e₂.prodCongr e₁) = (e₁.prodCongr e₂).trans (Equiv.prodComm α₂ β₂)

def Equiv.prodAssoc E1 #

(α : Type u_9) → (β : Type u_10) → (γ : Type u_11) → (α × β) × γ ≃ α × β × γ

Type product is associative up to an equivalence.

theorem Equiv.prodAssoc_apply E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Type u_11) (p : (α × β) × γ), (Equiv.prodAssoc α β γ) p = (p.1.1, p.1.2, p.2)

theorem Equiv.prodAssoc_symm_apply E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Type u_11) (p : α × β × γ), (Equiv.prodAssoc α β γ).symm p = ((p.1, p.2.1), p.2.2)

def Equiv.prodProdProdComm E1 #

(α : Type u_9) → (β : Type u_10) → (γ : Type u_11) → (δ : Type u_12) → (α × β) × γ × δ ≃ (α × γ) × β × δ

Four-way commutativity of prod. The name matches mul_mul_mul_comm.

theorem Equiv.prodProdProdComm_apply E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Type u_11) (δ : Type u_12) (abcd : (α × β) × γ × δ),
  (Equiv.prodProdProdComm α β γ δ) abcd = ((abcd.1.1, abcd.2.1), abcd.1.2, abcd.2.2)

theorem Equiv.prodProdProdComm_symm E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Type u_11) (δ : Type u_12),
  (Equiv.prodProdProdComm α β γ δ).symm = Equiv.prodProdProdComm α γ β δ

def Equiv.curry E1 #

(α : Type u_9) → (β : Type u_10) → (γ : Sort u_11) → (α × β → γ) ≃ (α → β → γ)

γ-valued functions on α × β are equivalent to functions α → β → γ.

theorem Equiv.curry_apply E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Sort u_11), ⇑(Equiv.curry α β γ) = Function.curry

theorem Equiv.curry_symm_apply E0 #

∀ (α : Type u_9) (β : Type u_10) (γ : Sort u_11), ⇑(Equiv.curry α β γ).symm = Function.uncurry

def Equiv.prodPUnit E1 #

(α : Type u_9) → α × PUnit.{u_10 + 1} ≃ α

PUnit is a right identity for type product up to an equivalence.

theorem Equiv.prodPUnit_apply E0 #

∀ (α : Type u_9) (p : α × PUnit.{u_10 + 1}), (Equiv.prodPUnit α) p = p.1

theorem Equiv.prodPUnit_symm_apply E0 #

∀ (α : Type u_9) (a : α), (Equiv.prodPUnit α).symm a = (a, PUnit.unit)

def Equiv.punitProd E1 #

(α : Type u_9) → PUnit.{u_10 + 1} × α ≃ α

PUnit is a left identity for type product up to an equivalence.

theorem Equiv.punitProd_symm_apply E0 #

∀ (α : Type u_9) (a : α), (Equiv.punitProd α).symm a = (PUnit.unit, a)

theorem Equiv.punitProd_apply E0 #

∀ (α : Type u_9) (a : PUnit.{u_10 + 1} × α), (Equiv.punitProd α) a = a.2

def Equiv.sigmaPUnit E1 #

(α : Type u_9) → (_ : α) × PUnit.{u_10 + 1} ≃ α

PUnit is a right identity for dependent type product up to an equivalence.

theorem Equiv.sigmaPUnit_symm_apply_snd E0 #

∀ (α : Type u_9) (a : α), ((Equiv.sigmaPUnit α).symm a).snd = PUnit.unit

theorem Equiv.sigmaPUnit_symm_apply_fst E0 #

∀ (α : Type u_9) (a : α), ((Equiv.sigmaPUnit α).symm a).fst = a

theorem Equiv.sigmaPUnit_apply E0 #

∀ (α : Type u_9) (p : (_ : α) × PUnit.{u_10 + 1}), (Equiv.sigmaPUnit α) p = p.fst

def Equiv.prodUnique E1 #

(α : Type u_9) → (β : Type u_10) → [Unique β] → α × β ≃ α

Any Unique type is a right identity for type product up to equivalence.

def Equiv.uniqueProd E1 #

(α : Type u_9) → (β : Type u_10) → [Unique β] → β × α ≃ α

Any Unique type is a left identity for type product up to equivalence.

theorem Equiv.coe_prodUnique E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β], ⇑(Equiv.prodUnique α β) = Prod.fst

theorem Equiv.coe_uniqueProd E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β], ⇑(Equiv.uniqueProd α β) = Prod.snd

theorem Equiv.prodUnique_apply E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β] (x : α × β), (Equiv.prodUnique α β) x = x.1

theorem Equiv.uniqueProd_apply E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β] (x : β × α), (Equiv.uniqueProd α β) x = x.2

theorem Equiv.prodUnique_symm_apply E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β] (x : α), (Equiv.prodUnique α β).symm x = (x, default)

theorem Equiv.uniqueProd_symm_apply E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β] (x : α), (Equiv.uniqueProd α β).symm x = (default, x)

theorem Equiv.prodComm_trans_prodUnique E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β],
  (Equiv.prodComm β α).trans (Equiv.prodUnique α β) = Equiv.uniqueProd α β

theorem Equiv.prodComm_trans_uniqueProd E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β],
  (Equiv.prodComm α β).trans (Equiv.uniqueProd α β) = Equiv.prodUnique α β

theorem Equiv.symm_prodUnique_trans_prodComm E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β],
  (Equiv.prodUnique α β).symm.trans (Equiv.prodComm α β) = (Equiv.uniqueProd α β).symm

theorem Equiv.symm_uniqueProd_trans_prodComm E0 #

∀ {α : Type u_9} {β : Type u_10} [inst : Unique β],
  (Equiv.uniqueProd α β).symm.trans (Equiv.prodComm β α) = (Equiv.prodUnique α β).symm

def Equiv.sigmaUnique E1 #

(α : Type u_10) → (β : α → Type u_9) → [(a : α) → Unique (β a)] → (a : α) × β a ≃ α

Any family of Unique types is a right identity for dependent type product up to equivalence.

theorem Equiv.coe_sigmaUnique E0 #

∀ {α : Type u_10} {β : α → Type u_9} [inst : (a : α) → Unique (β a)], ⇑(Equiv.sigmaUnique α β) = Sigma.fst

theorem Equiv.sigmaUnique_apply E0 #

∀ {α : Type u_10} {β : α → Type u_9} [inst : (a : α) → Unique (β a)] (x : (a : α) × β a),
  (Equiv.sigmaUnique α β) x = x.fst

theorem Equiv.sigmaUnique_symm_apply E0 #

∀ {α : Type u_10} {β : α → Type u_9} [inst : (a : α) → Unique (β a)] (x : α),
  (Equiv.sigmaUnique α β).symm x = ⟨x, default⟩

def Equiv.uniqueSigma E1 #

{α : Type u_10} → (β : α → Type u_9) → [inst : Unique α] → (i : α) × β i ≃ β default

Any Unique type is a left identity for type sigma up to equivalence. Compare with uniqueProd which is non-dependent.

theorem Equiv.uniqueSigma_apply E0 #

∀ {α : Type u_10} {β : α → Type u_9} [inst : Unique α] (x : (a : α) × β a), (Equiv.uniqueSigma β) x = ⋯ ▸ x.snd

theorem Equiv.uniqueSigma_symm_apply E0 #

∀ {α : Type u_10} {β : α → Type u_9} [inst : Unique α] (y : β default), (Equiv.uniqueSigma β).symm y = ⟨default, y⟩

def Equiv.prodEmpty E1 #

(α : Type u_9) → α × Empty ≃ Empty

Empty type is a right absorbing element for type product up to an equivalence.

def Equiv.emptyProd E1 #

(α : Type u_9) → Empty × α ≃ Empty

Empty type is a left absorbing element for type product up to an equivalence.

def Equiv.prodPEmpty E1 #

(α : Type u_9) → α × PEmpty.{u_10 + 1} ≃ PEmpty.{u_11}

PEmpty type is a right absorbing element for type product up to an equivalence.

def Equiv.pemptyProd E1 #

(α : Type u_9) → PEmpty.{u_10 + 1} × α ≃ PEmpty.{u_11}

PEmpty type is a left absorbing element for type product up to an equivalence.

def Equiv.prodCongrLeft E1 #

{α₁ : Type u_9} → {β₁ : Type u_11} → {β₂ : Type u_12} → (α₁ → β₁ ≃ β₂) → β₁ × α₁ ≃ β₂ × α₁

A family of equivalences ∀ (a : α₁), β₁ ≃ β₂ generates an equivalence between β₁ × α₁ and β₂ × α₁.

theorem Equiv.prodCongrLeft_apply_snd E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (ab : β₁ × α₁),
  ((Equiv.prodCongrLeft e) ab).2 = ab.2

theorem Equiv.prodCongrLeft_apply_fst E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (ab : β₁ × α₁),
  ((Equiv.prodCongrLeft e) ab).1 = (e ab.2) ab.1

theorem Equiv.prodCongrLeft_apply E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (b : β₁) (a : α₁),
  (Equiv.prodCongrLeft e) (b, a) = ((e a) b, a)

theorem Equiv.prodCongr_refl_right E1 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : β₁ ≃ β₂),
  e.prodCongr (Equiv.refl α₁) = Equiv.prodCongrLeft fun x ↦ e

theorem Equiv.prodCongrLeft_symm E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.prodCongrLeft e).symm = Equiv.prodCongrLeft (Equiv.symm ∘ e)

def Equiv.prodCongrRight E1 #

{α₁ : Type u_9} → {β₁ : Type u_11} → {β₂ : Type u_12} → (α₁ → β₁ ≃ β₂) → α₁ × β₁ ≃ α₁ × β₂

A family of equivalences ∀ (a : α₁), β₁ ≃ β₂ generates an equivalence between α₁ × β₁ and α₁ × β₂.

theorem Equiv.prodCongrRight_apply_snd E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (ab : α₁ × β₁),
  ((Equiv.prodCongrRight e) ab).2 = (e ab.1) ab.2

theorem Equiv.prodCongrRight_apply_fst E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (ab : α₁ × β₁),
  ((Equiv.prodCongrRight e) ab).1 = ab.1

theorem Equiv.prodCongrRight_apply E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂) (a : α₁) (b : β₁),
  (Equiv.prodCongrRight e) (a, b) = (a, (e a) b)

theorem Equiv.prodCongr_refl_left E1 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : β₁ ≃ β₂),
  (Equiv.refl α₁).prodCongr e = Equiv.prodCongrRight fun x ↦ e

theorem Equiv.prodCongrRight_symm E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.prodCongrRight e).symm = Equiv.prodCongrRight (Equiv.symm ∘ e)

theorem Equiv.prodCongrLeft_trans_prodComm E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.prodCongrLeft e).trans (Equiv.prodComm β₂ α₁) = (Equiv.prodComm β₁ α₁).trans (Equiv.prodCongrRight e)

theorem Equiv.prodCongrRight_trans_prodComm E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.prodCongrRight e).trans (Equiv.prodComm α₁ β₂) = (Equiv.prodComm α₁ β₁).trans (Equiv.prodCongrLeft e)

theorem Equiv.sigmaCongrRight_sigmaEquivProd E1 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.sigmaCongrRight e).trans (Equiv.sigmaEquivProd α₁ β₂) =
    (Equiv.sigmaEquivProd α₁ β₁).trans (Equiv.prodCongrRight e)

theorem Equiv.sigmaEquivProd_sigmaCongrRight E1 #

∀ {α₁ : Type u_9} {β₁ : Type u_11} {β₂ : Type u_12} (e : α₁ → β₁ ≃ β₂),
  (Equiv.sigmaEquivProd α₁ β₁).symm.trans (Equiv.sigmaCongrRight e) =
    (Equiv.prodCongrRight e).trans (Equiv.sigmaEquivProd α₁ β₂).symm

def Equiv.prodShear E1 #

{α₁ : Type u_9} → {α₂ : Type u_10} → {β₁ : Type u_11} → {β₂ : Type u_12} → α₁ ≃ α₂ → (α₁ → β₁ ≃ β₂) → α₁ × β₁ ≃ α₂ × β₂

A variation on Equiv.prodCongr where the equivalence in the second component can depend on the first component. A typical example is a shear mapping, explaining the name of this declaration.

theorem Equiv.prodShear_apply E0 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {β₁ : Type u_11} {β₂ : Type u_12} (e₁ : α₁ ≃ α₂) (e₂ : α₁ → β₁ ≃ β₂),
  ⇑(e₁.prodShear e₂) = fun x ↦ (e₁ x.1, (e₂ x.1) x.2)

theorem Equiv.prodShear_symm_apply E0 #

∀ {α₁ : Type u_9} {α₂ : Type u_10} {β₁ : Type u_11} {β₂ : Type u_12} (e₁ : α₁ ≃ α₂) (e₂ : α₁ → β₁ ≃ β₂),
  ⇑(e₁.prodShear e₂).symm = fun y ↦ (e₁.symm y.1, (e₂ (e₁.symm y.1)).symm y.2)

def Equiv.Perm.prodExtendRight E1 #

{α₁ : Type u_9} → {β₁ : Type u_10} → [DecidableEq α₁] → α₁ → Equiv.Perm β₁ → Equiv.Perm (α₁ × β₁)

prodExtendRight a e extends e : Perm β to Perm (α × β) by sending (a, b) to (a, e b) and keeping the other (a', b) fixed.

theorem Equiv.Perm.prodExtendRight_apply_eq E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_10} [inst : DecidableEq α₁] (a : α₁) (e : Equiv.Perm β₁) (b : β₁),
  (Equiv.Perm.prodExtendRight a e) (a, b) = (a, e b)

theorem Equiv.Perm.prodExtendRight_apply_ne E1 #

∀ {α₁ : Type u_9} {β₁ : Type u_10} [inst : DecidableEq α₁] (e : Equiv.Perm β₁) {a a' : α₁},
  a' ≠ a → ∀ (b : β₁), (Equiv.Perm.prodExtendRight a e) (a', b) = (a', b)

theorem Equiv.Perm.fst_prodExtendRight E0 #

∀ {α₁ : Type u_9} {β₁ : Type u_10} [inst : DecidableEq α₁] (a : α₁) (e : Equiv.Perm β₁) (ab : α₁ × β₁),
  ((Equiv.Perm.prodExtendRight a e) ab).1 = ab.1

def Equiv.arrowProdEquivProdArrow E1 #

(α : Type u_9) → (β : α → Type u_10) → (γ : α → Type u_11) → ((i : α) → β i × γ i) ≃ ((i : α) → β i) × ((i : α) → γ i)

The type of functions to a product β × γ is equivalent to the type of pairs of functions α → β and β → γ.

theorem Equiv.arrowProdEquivProdArrow_apply E0 #

∀ (α : Type u_9) (β : α → Type u_10) (γ : α → Type u_11) (f : (i : α) → β i × γ i),
  (Equiv.arrowProdEquivProdArrow α β γ) f = (fun c ↦ (f c).1, fun c ↦ (f c).2)

theorem Equiv.arrowProdEquivProdArrow_symm_apply E0 #

∀ (α : Type u_9) (β : α → Type u_10) (γ : α → Type u_11) (p : ((i : α) → β i) × ((i : α) → γ i)) (c : α),
  (Equiv.arrowProdEquivProdArrow α β γ).symm p c = (p.1 c, p.2 c)

def Equiv.sumPiEquivProdPi E3 #

{ι : Type u_10} →
  {ι' : Type u_11} →
    (π : ι ⊕ ι' → Type u_9) → ((i : ι ⊕ ι') → π i) ≃ ((i : ι) → π (Sum.inl i)) × ((i' : ι') → π (Sum.inr i'))

The type of dependent functions on a sum type ι ⊕ ι' is equivalent to the type of pairs of functions on ι and on ι'. This is a dependent version of Equiv.sumArrowEquivProdArrow.

theorem Equiv.sumPiEquivProdPi_symm_apply E0 #

∀ {ι : Type u_10} {ι' : Type u_11} (π : ι ⊕ ι' → Type u_9)
  (g : ((i : ι) → π (Sum.inl i)) × ((i' : ι') → π (Sum.inr i'))) (t : ι ⊕ ι'),
  (Equiv.sumPiEquivProdPi π).symm g t = Sum.rec g.1 g.2 t

theorem Equiv.sumPiEquivProdPi_apply E0 #

∀ {ι : Type u_10} {ι' : Type u_11} (π : ι ⊕ ι' → Type u_9) (f : (i : ι ⊕ ι') → π i),
  (Equiv.sumPiEquivProdPi π) f = (fun i ↦ f (Sum.inl i), fun i' ↦ f (Sum.inr i'))

def Equiv.prodPiEquivSumPi E1 #

{ι : Type u_9} →
  {ι' : Type u_10} →
    (π : ι → Type u) → (π' : ι' → Type u) → ((i : ι) → π i) × ((i' : ι') → π' i') ≃ ((i : ι ⊕ ι') → Sum.elim π π' i)

The equivalence between a product of two dependent functions types and a single dependent function type. Basically a symmetric version of Equiv.sumPiEquivProdPi.

theorem Equiv.prodPiEquivSumPi_apply E0 #

∀ {ι : Type u_9} {ι' : Type u_10} (π : ι → Type u) (π' : ι' → Type u)
  (a : ((i : ι) → Sum.elim π π' (Sum.inl i)) × ((i' : ι') → Sum.elim π π' (Sum.inr i'))) (i : ι ⊕ ι'),
  (Equiv.prodPiEquivSumPi π π') a i = (Equiv.sumPiEquivProdPi (Sum.elim π π')).symm a i

theorem Equiv.prodPiEquivSumPi_symm_apply E0 #

∀ {ι : Type u_9} {ι' : Type u_10} (π : ι → Type u) (π' : ι' → Type u) (a : (i : ι ⊕ ι') → Sum.elim π π' i),
  (Equiv.prodPiEquivSumPi π π').symm a = (Equiv.sumPiEquivProdPi (Sum.elim π π')) a

def Equiv.sumArrowEquivProdArrow E1 #

(α : Type u_9) → (β : Type u_10) → (γ : Type u_11) → (α ⊕ β → γ) ≃ (α → γ) × (β → γ)

The type of functions on a sum type α ⊕ β is equivalent to the type of pairs of functions on α and on β.

theorem Equiv.sumArrowEquivProdArrow_apply_fst E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (f : α ⊕ β → γ) (a : α),
  ((Equiv.sumArrowEquivProdArrow α β γ) f).1 a = f (Sum.inl a)

theorem Equiv.sumArrowEquivProdArrow_apply_snd E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (f : α ⊕ β → γ) (b : β),
  ((Equiv.sumArrowEquivProdArrow α β γ) f).2 b = f (Sum.inr b)

theorem Equiv.sumArrowEquivProdArrow_symm_apply_inl E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (f : α → γ) (g : β → γ) (a : α),
  (Equiv.sumArrowEquivProdArrow α β γ).symm (f, g) (Sum.inl a) = f a

theorem Equiv.sumArrowEquivProdArrow_symm_apply_inr E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (f : α → γ) (g : β → γ) (b : β),
  (Equiv.sumArrowEquivProdArrow α β γ).symm (f, g) (Sum.inr b) = g b

def Equiv.sumProdDistrib E1 #

(α : Type u_9) → (β : Type u_10) → (γ : Type u_11) → (α ⊕ β) × γ ≃ α × γ ⊕ β × γ

Type product is right distributive with respect to type sum up to an equivalence.

theorem Equiv.sumProdDistrib_apply_left E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (a : α) (c : γ),
  (Equiv.sumProdDistrib α β γ) (Sum.inl a, c) = Sum.inl (a, c)

theorem Equiv.sumProdDistrib_apply_right E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (b : β) (c : γ),
  (Equiv.sumProdDistrib α β γ) (Sum.inr b, c) = Sum.inr (b, c)

theorem Equiv.sumProdDistrib_symm_apply_left E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (a : α × γ),
  (Equiv.sumProdDistrib α β γ).symm (Sum.inl a) = (Sum.inl a.1, a.2)

theorem Equiv.sumProdDistrib_symm_apply_right E0 #

∀ {α : Type u_9} {β : Type u_10} {γ : Type u_11} (b : β × γ),
  (Equiv.sumProdDistrib α β γ).symm (Sum.inr b) = (Sum.inr b.1, b.2)

def Equiv.sigmaProdDistrib E1 #

{ι : Type u_9} → (α : ι → Type u_10) → (β : Type u_11) → ((i : ι) × α i) × β ≃ (i : ι) × α i × β

The product of an indexed sum of types (formally, a Sigma-type Σ i, α i) by a type β is equivalent to the sum of products Σ i, (α i × β).

theorem Equiv.sigmaProdDistrib_symm_apply E0 #

∀ {ι : Type u_9} (α : ι → Type u_10) (β : Type u_11) (p : (i : ι) × α i × β),
  (Equiv.sigmaProdDistrib α β).symm p = (⟨p.fst, p.snd.1⟩, p.snd.2)

theorem Equiv.sigmaProdDistrib_apply E0 #

∀ {ι : Type u_9} (α : ι → Type u_10) (β : Type u_11) (p : ((i : ι) × α i) × β),
  (Equiv.sigmaProdDistrib α β) p = ⟨p.1.fst, (p.1.snd, p.2)⟩

def Equiv.boolProdEquivSum E1 #

(α : Type u_9) → Bool × α ≃ α ⊕ α

The product Bool × α is equivalent to α ⊕ α.

theorem Equiv.boolProdEquivSum_symm_apply E0 #

∀ (α : Type u_9) (a : α ⊕ α), (Equiv.boolProdEquivSum α).symm a = Sum.elim (Prod.mk false) (Prod.mk true) a

theorem Equiv.boolProdEquivSum_apply E0 #

∀ (α : Type u_9) (p : Bool × α), (Equiv.boolProdEquivSum α) p = if p.1 = true then Sum.inr p.2 else Sum.inl p.2

def Equiv.boolArrowEquivProd E1 #

(α : Type u_9) → (Bool → α) ≃ α × α

The function type Bool → α is equivalent to α × α.

theorem Equiv.boolArrowEquivProd_symm_apply E0 #

∀ (α : Type u_9) (p : α × α) (b : Bool), (Equiv.boolArrowEquivProd α).symm p b = if b = true then p.2 else p.1

theorem Equiv.boolArrowEquivProd_apply E0 #

∀ (α : Type u_9) (f : Bool → α), (Equiv.boolArrowEquivProd α) f = (f false, f true)

def Equiv.subtypeSigmaEquivSigma E1 #

{α : Type u_10} →
  {β : α → Type u_9} →
    {p : α → Prop} →
      {q : (i : α) → β i → Prop} → { c // p c.fst ∧ q c.fst c.snd } ≃ (i : { a // p a }) × { b // q (↑i) b }

A subtype of a Sigma-type defined by componentwise conditions is equivalent to a Sigma-type of subtypes.

def Equiv.subtypeProdEquivProd E1 #

{α : Type u_9} →
  {β : Type u_10} → {p : α → Prop} → {q : β → Prop} → { c // p c.1 ∧ q c.2 } ≃ { a // p a } × { b // q b }

A subtype of a product defined by componentwise conditions is equivalent to a product of subtypes.

def Equiv.prodSubtypeFstEquivSubtypeProd E1 #

{α : Type u_9} → {β : Type u_10} → {p : α → Prop} → { s // p s.1 } ≃ { a // p a } × β

A subtype of a Prod that depends only on the first component is equivalent to the corresponding subtype of the first type times the second type.

def Equiv.subtypeProdEquivSigmaSubtype E1 #

{α : Type u_9} → {β : Type u_10} → (p : α → β → Prop) → { x // p x.1 x.2 } ≃ (a : α) × { b // p a b }

A subtype of a Prod is equivalent to a sigma type whose fibers are subtypes.

def Equiv.piEquivPiSubtypeProd E1 #

{α : Type u_9} →
  (p : α → Prop) →
    (β : α → Type u_10) →
      [DecidablePred p] → ((i : α) → β i) ≃ ((i : { x // p x }) → β ↑i) × ((i : { x // ¬p x }) → β ↑i)

The type ∀ (i : α), β i can be split as a product by separating the indices in α depending on whether they satisfy a predicate p or not.

theorem Equiv.piEquivPiSubtypeProd_symm_apply E0 #

∀ {α : Type u_9} (p : α → Prop) (β : α → Type u_10) [inst : DecidablePred p]
  (f : ((i : { x // p x }) → β ↑i) × ((i : { x // ¬p x }) → β ↑i)) (x : α),
  (Equiv.piEquivPiSubtypeProd p β).symm f x = if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩

theorem Equiv.piEquivPiSubtypeProd_apply E0 #

∀ {α : Type u_9} (p : α → Prop) (β : α → Type u_10) [inst : DecidablePred p] (f : (i : α) → β i),
  (Equiv.piEquivPiSubtypeProd p β) f = (fun x ↦ f ↑x, fun x ↦ f ↑x)

def Equiv.piSplitAt E1 #

{α : Type u_9} → [DecidableEq α] → (i : α) → (β : α → Type u_10) → ((j : α) → β j) ≃ β i × ((j : { j // j ≠ i }) → β ↑j)

A product of types can be split as the binary product of one of the types and the product of all the remaining types.

theorem Equiv.piSplitAt_symm_apply E0 #

∀ {α : Type u_9} [inst : DecidableEq α] (i : α) (β : α → Type u_10) (f : β i × ((j : { j // j ≠ i }) → β ↑j)) (j : α),
  (Equiv.piSplitAt i β).symm f j = if h : j = i then ⋯ ▸ f.1 else f.2 ⟨j, h⟩

theorem Equiv.piSplitAt_apply E0 #

∀ {α : Type u_9} [inst : DecidableEq α] (i : α) (β : α → Type u_10) (f : (j : α) → β j),
  (Equiv.piSplitAt i β) f = (f i, fun j ↦ f ↑j)

def Equiv.funSplitAt E1 #

{α : Type u_9} → [DecidableEq α] → (i : α) → (β : Type u_10) → (α → β) ≃ β × ({ j // j ≠ i } → β)

A product of copies of a type can be split as the binary product of one copy and the product of all the remaining copies.

theorem Equiv.funSplitAt_symm_apply E0 #

∀ {α : Type u_9} [inst : DecidableEq α] (i : α) (β : Type u_10)
  (f : (fun a ↦ β) i × ((j : { j // j ≠ i }) → (fun a ↦ β) ↑j)) (j : α),
  (Equiv.funSplitAt i β).symm f j = if h : j = i then f.1 else f.2 ⟨j, ⋯⟩

theorem Equiv.funSplitAt_apply E0 #

∀ {α : Type u_9} [inst : DecidableEq α] (i : α) (β : Type u_10) (f : (j : α) → (fun a ↦ β) j),
  (Equiv.funSplitAt i β) f = (f i, fun j ↦ f ↑j)

def subsingletonProdSelfEquiv E1 #

{α : Type u_9} → [Subsingleton α] → α × α ≃ α

If α is a subsingleton, then it is equivalent to α × α.

def optionProdEquiv E1 #

{α : Type u_9} → {β : Type u_10} → Option α × β ≃ β ⊕ α × β

(1 + α) × β = β + α × β

theorem optionProdEquiv_mk_none E0 #

∀ {α : Type u_9} {β : Type u_10} (b : β), optionProdEquiv (none, b) = Sum.inl b

theorem optionProdEquiv_mk_some E0 #

∀ {α : Type u_9} {β : Type u_10} (a : α) (b : β), optionProdEquiv (some a, b) = Sum.inr (a, b)

theorem optionProdEquiv_symm_inl E0 #

∀ {α : Type u_9} {β : Type u_10} (b : β), optionProdEquiv.symm (Sum.inl b) = (none, b)

theorem optionProdEquiv_symm_inr E0 #

∀ {α : Type u_9} {β : Type u_10} (p : α × β), optionProdEquiv.symm (Sum.inr p) = Prod.map some id p