Module docstring
{"# The R-algebra structure on families of R-algebras
The R-algebra structure on Π i : I, A i when each A i is an R-algebra.
Main definitions
Pi.algebraPi.evalAlgHomPi.constAlgHom"}
{"# The R-algebra structure on families of R-algebras
The R-algebra structure on Π i : I, A i when each A i is an R-algebra.
Pi.algebraPi.evalAlgHomPi.constAlgHom
"}Pi.algebra
instance
: Algebra R (Π i, A i)
instance algebra : Algebra R (Π i, A i) where
algebraMap := Pi.ringHom fun i ↦ algebraMap R (A i)
commutes' := fun a f ↦ by ext; simp [Algebra.commutes]
smul_def' := fun a f ↦ by ext; simp [Algebra.smul_def]
Pi.algebraMap_def
theorem
(a : R) : algebraMap R (Π i, A i) a = fun i ↦ algebraMap R (A i) a
theorem algebraMap_def (a : R) : algebraMap R (Π i, A i) a = fun i ↦ algebraMap R (A i) a :=
rfl
Pi.algebraMap_apply
theorem
(a : R) (i : ι) : algebraMap R (Π i, A i) a i = algebraMap R (A i) a
@[simp]
theorem algebraMap_apply (a : R) (i : ι) : algebraMap R (Π i, A i) a i = algebraMap R (A i) a :=
rfl
Pi.algHom
definition
{B : Type*} [Semiring B] [Algebra R B] (g : ∀ i, B →ₐ[R] A i) : B →ₐ[R] Π i, A i
/-- A family of algebra homomorphisms `g i : B →ₐ[R] A i` defines a ring homomorphism
`Pi.algHom g : B →ₐ[R] Π i, A i` given by `Pi.algHom g x i = g i x`. -/
@[simps!]
def algHom {B : Type*} [Semiring B] [Algebra R B] (g : ∀ i, B →ₐ[R] A i) : B →ₐ[R] Π i, A i where
__ := Pi.ringHom fun i ↦ (g i).toRingHom
commutes' r := by ext; simp
Pi.evalAlgHom
definition
(i : ι) : (Π i, A i) →ₐ[R] A i
/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,
etc. -/
@[simps]
def evalAlgHom (i : ι) : (Π i, A i) →ₐ[R] A i :=
{ Pi.evalRingHom A i with
toFun := fun f ↦ f i
commutes' := fun _ ↦ rfl }
Pi.algHom_evalAlgHom
theorem
: algHom R A (evalAlgHom R A) = AlgHom.id R (Π i, A i)
@[simp]
theorem algHom_evalAlgHom : algHom R A (evalAlgHom R A) = AlgHom.id R (Π i, A i) := rfl
Pi.algHom_comp
theorem
{B C : Type*} [Semiring B] [Algebra R B] [Semiring C] [Algebra R C] (g : ∀ i, C →ₐ[R] A i) (h : B →ₐ[R] C) :
(algHom R A g).comp h = algHom R A (fun i ↦ (g i).comp h)
Pi.instAlgebraForall
instance
[∀ i, Algebra (S i) (A i)] : Algebra (Π i, S i) (Π i, A i)
instance [∀ i, Algebra (S i) (A i)] : Algebra (Π i, S i) (Π i, A i) where
algebraMap := Pi.ringHom fun _ ↦ (algebraMap _ _).comp (Pi.evalRingHom S _)
commutes' _ _ := funext fun _ ↦ Algebra.commutes _ _
smul_def' _ _ := funext fun _ ↦ Algebra.smul_def _ _
Pi.constAlgHom
definition
: B →ₐ[R] A → B
/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,
etc. -/
@[simps]
def constAlgHom : B →ₐ[R] A → B :=
{ Pi.constRingHom A B with
toFun := Function.const _
commutes' := fun _ ↦ rfl }
Pi.constRingHom_eq_algebraMap
theorem
: constRingHom A R = algebraMap R (A → R)
/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that
map. -/
@[simp]
theorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R) :=
rfl
Pi.constAlgHom_eq_algebra_ofId
theorem
: constAlgHom R A R = Algebra.ofId R (A → R)
@[simp]
theorem constAlgHom_eq_algebra_ofId : constAlgHom R A R = Algebra.ofId R (A → R) :=
rfl
Function.algebra
instance
{R : Type*} (ι : Type*) (A : Type*) [CommSemiring R] [Semiring A] [Algebra R A] : Algebra R (ι → A)
/-- A special case of `Pi.algebra` for non-dependent types. Lean struggles to elaborate
definitions elsewhere in the library without this. -/
instance Function.algebra {R : Type*} (ι : Type*) (A : Type*) [CommSemiring R] [Semiring A]
[Algebra R A] : Algebra R (ι → A) :=
Pi.algebra _ _
AlgHom.compLeft
definition
(f : A →ₐ[R] B) (ι : Type*) : (ι → A) →ₐ[R] ι → B
/-- `R`-algebra homomorphism between the function spaces `ι → A` and `ι → B`, induced by an
`R`-algebra homomorphism `f` between `A` and `B`. -/
@[simps]
protected def compLeft (f : A →ₐ[R] B) (ι : Type*) : (ι → A) →ₐ[R] ι → B :=
{ f.toRingHom.compLeft ι with
toFun := fun h ↦ f ∘ h
commutes' := fun c ↦ by
ext
exact f.commutes' c }
AlgEquiv.piCongrRight
definition
(e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (Π i, A₁ i) ≃ₐ[R] Π i, A₂ i
/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a
multiplicative equivalence between `Π i, A₁ i` and `Π i, A₂ i`.
This is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of
`AlgEquiv.arrowCongr`.
-/
@[simps apply]
def piCongrRight (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (Π i, A₁ i) ≃ₐ[R] Π i, A₂ i :=
{ @RingEquiv.piCongrRight ι A₁ A₂ _ _ fun i ↦ (e i).toRingEquiv with
toFun := fun x j ↦ e j (x j)
invFun := fun x j ↦ (e j).symm (x j)
commutes' := fun r ↦ by
ext i
simp }
AlgEquiv.piCongrRight_refl
theorem
: (piCongrRight fun i ↦ (AlgEquiv.refl : A₁ i ≃ₐ[R] A₁ i)) = AlgEquiv.refl
@[simp]
theorem piCongrRight_refl :
(piCongrRight fun i ↦ (AlgEquiv.refl : A₁ i ≃ₐ[R] A₁ i)) = AlgEquiv.refl :=
rfl
AlgEquiv.piCongrRight_symm
theorem
(e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (piCongrRight e).symm = piCongrRight fun i ↦ (e i).symm
@[simp]
theorem piCongrRight_symm (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) :
(piCongrRight e).symm = piCongrRight fun i ↦ (e i).symm :=
rfl
AlgEquiv.piCongrRight_trans
theorem
(e₁ : ∀ i, A₁ i ≃ₐ[R] A₂ i) (e₂ : ∀ i, A₂ i ≃ₐ[R] A₃ i) :
(piCongrRight e₁).trans (piCongrRight e₂) = piCongrRight fun i ↦ (e₁ i).trans (e₂ i)
@[simp]
theorem piCongrRight_trans (e₁ : ∀ i, A₁ i ≃ₐ[R] A₂ i) (e₂ : ∀ i, A₂ i ≃ₐ[R] A₃ i) :
(piCongrRight e₁).trans (piCongrRight e₂) = piCongrRight fun i ↦ (e₁ i).trans (e₂ i) :=
rfl