Module docstring
{"# The R-algebra structure on products of R-algebras
The R-algebra structure on (i : I) → A i when each A i is an R-algebra.
Main definitions
Prod.algebraAlgHom.fstAlgHom.sndAlgHom.prod"}
{"# The R-algebra structure on products of R-algebras
The R-algebra structure on (i : I) → A i when each A i is an R-algebra.
Prod.algebraAlgHom.fstAlgHom.sndAlgHom.prod
"}Prod.algebra
instance
: Algebra R (A × B)
instance algebra : Algebra R (A × B) where
algebraMap := RingHom.prod (algebraMap R A) (algebraMap R B)
commutes' := by
rintro r ⟨a, b⟩
dsimp
rw [commutes r a, commutes r b]
smul_def' := by
rintro r ⟨a, b⟩
dsimp
rw [Algebra.smul_def r a, Algebra.smul_def r b]
Prod.algebraMap_apply
theorem
(r : R) : algebraMap R (A × B) r = (algebraMap R A r, algebraMap R B r)
@[simp]
theorem algebraMap_apply (r : R) : algebraMap R (A × B) r = (algebraMap R A r, algebraMap R B r) :=
rfl
AlgHom.fst
definition
: A × B →ₐ[R] A
/-- First projection as `AlgHom`. -/
def fst : A × BA × B →ₐ[R] A :=
{ RingHom.fst A B with commutes' := fun _r => rfl }
AlgHom.snd
definition
: A × B →ₐ[R] B
/-- Second projection as `AlgHom`. -/
def snd : A × BA × B →ₐ[R] B :=
{ RingHom.snd A B with commutes' := fun _r => rfl }
AlgHom.fst_apply
theorem
(a) : fst R A B a = a.1
AlgHom.snd_apply
theorem
(a) : snd R A B a = a.2
AlgHom.prod
definition
(f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B × C
/-- The `Pi.prod` of two morphisms is a morphism. -/
@[simps!]
def prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : A →ₐ[R] B × C :=
{ f.toRingHom.prod g.toRingHom with
commutes' := fun r => by
simp only [toRingHom_eq_coe, RingHom.toFun_eq_coe, RingHom.prod_apply, coe_toRingHom,
commutes, Prod.algebraMap_apply] }
AlgHom.coe_prod
theorem
(f : A →ₐ[R] B) (g : A →ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g
AlgHom.fst_prod
theorem
(f : A →ₐ[R] B) (g : A →ₐ[R] C) : (fst R B C).comp (prod f g) = f
AlgHom.snd_prod
theorem
(f : A →ₐ[R] B) (g : A →ₐ[R] C) : (snd R B C).comp (prod f g) = g
AlgHom.prod_fst_snd
theorem
: prod (fst R A B) (snd R A B) = AlgHom.id R _
AlgHom.prod_comp
theorem
{C' : Type*} [Semiring C'] [Algebra R C'] (f : A →ₐ[R] B) (g : B →ₐ[R] C) (g' : B →ₐ[R] C') :
(g.prod g').comp f = (g.comp f).prod (g'.comp f)
AlgHom.prodEquiv
definition
: (A →ₐ[R] B) × (A →ₐ[R] C) ≃ (A →ₐ[R] B × C)
/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →ₐ[R] B) × (A →ₐ[R] C)(A →ₐ[R] B) × (A →ₐ[R] C) ≃ (A →ₐ[R] B × C) where
toFun f := f.1.prod f.2
invFun f := ((fst _ _ _).comp f, (snd _ _ _).comp f)
left_inv f := by ext <;> rfl
right_inv f := by ext <;> rfl
AlgHom.prodMap
definition
{D : Type*} [Semiring D] [Algebra R D] (f : A →ₐ[R] B) (g : C →ₐ[R] D) : A × C →ₐ[R] B × D