Extra facts about prod
#
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines prod.swap : α × β → β × α
and proves various simple lemmas about prod
.
@[simp]
theorem
prod.fst_comp_mk
{α : Type u_1}
{β : Type u_2}
(x : α) :
prod.fst ∘ prod.mk x = function.const β x
theorem
prod.mk.inj_right
{α : Type u_1}
{β : Type u_2}
(b : β) :
function.injective (λ (a : α), (a, b))
@[simp]
@[simp]
@[protected, instance]
def
prod.lex.decidable
{α : Type u_1}
{β : Type u_2}
[decidable_eq α]
(r : α → α → Prop)
(s : β → β → Prop)
[decidable_rel r]
[decidable_rel s] :
decidable_rel (prod.lex r s)
Equations
- prod.lex.decidable r s = λ (p q : α × β), decidable_of_decidable_of_iff or.decidable _
@[protected, instance]
def
prod.lex.is_antisymm
{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[is_strict_order α r]
[is_antisymm β s] :
is_antisymm (α × β) (prod.lex r s)
@[protected, instance]
def
prod.is_trichotomous
{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[is_trichotomous α r]
[is_trichotomous β s] :
is_trichotomous (α × β) (prod.lex r s)
theorem
function.injective.prod_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : α → γ}
{g : β → δ}
(hf : function.injective f)
(hg : function.injective g) :
function.injective (prod.map f g)
theorem
function.surjective.prod_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : α → γ}
{g : β → δ}
(hf : function.surjective f)
(hg : function.surjective g) :
function.surjective (prod.map f g)
theorem
function.bijective.prod_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : α → γ}
{g : β → δ}
(hf : function.bijective f)
(hg : function.bijective g) :
function.bijective (prod.map f g)
theorem
function.left_inverse.prod_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ}
(hf : function.left_inverse f₁ f₂)
(hg : function.left_inverse g₁ g₂) :
function.left_inverse (prod.map f₁ g₁) (prod.map f₂ g₂)
theorem
function.right_inverse.prod_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ} :
function.right_inverse f₁ f₂ → function.right_inverse g₁ g₂ → function.right_inverse (prod.map f₁ g₁) (prod.map f₂ g₂)
@[simp]
theorem
prod.map_left_inverse
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[nonempty β]
[nonempty δ]
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ} :
function.left_inverse (prod.map f₁ g₁) (prod.map f₂ g₂) ↔ function.left_inverse f₁ f₂ ∧ function.left_inverse g₁ g₂
@[simp]
theorem
prod.map_right_inverse
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[nonempty α]
[nonempty γ]
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ} :
function.right_inverse (prod.map f₁ g₁) (prod.map f₂ g₂) ↔ function.right_inverse f₁ f₂ ∧ function.right_inverse g₁ g₂