# Documentation

Mathlib.Algebra.Hom.NonUnitalAlg

# Morphisms of non-unital algebras #

This file defines morphisms between two types, each of which carries:

• a multiplication,
• a scalar action.

The multiplications are not assumed to be associative or unital, or even to be compatible with the scalar actions. In a typical application, the operations will satisfy compatibility conditions making them into algebras (albeit possibly non-associative and/or non-unital) but such conditions are not required to make this definition.

This notion of morphism should be useful for any category of non-unital algebras. The motivating application at the time it was introduced was to be able to state the adjunction property for magma algebras. These are non-unital, non-associative algebras obtained by applying the group-algebra construction except where we take a type carrying just Mul instead of Group.

For a plausible future application, one could take the non-unital algebra of compactly-supported functions on a non-compact topological space. A proper map between a pair of such spaces (contravariantly) induces a morphism between their algebras of compactly-supported functions which will be a NonUnitalAlgHom.

TODO: add NonUnitalAlgEquiv when needed.

## Main definitions #

• NonUnitalAlgHom
• AlgHom.toNonUnitalAlgHom

## Tags #

non-unital, algebra, morphism

structure NonUnitalAlgHom (R : Type u) (A : Type v) (B : Type w) [] [] [] extends :
Type (max v w)

A morphism respecting addition, multiplication, and scalar multiplication. When these arise from algebra structures, this is the same as a not-necessarily-unital morphism of algebras.

Instances For

A morphism respecting addition, multiplication, and scalar multiplication. When these arise from algebra structures, this is the same as a not-necessarily-unital morphism of algebras.

Instances For

A morphism respecting addition, multiplication, and scalar multiplication. When these arise from algebra structures, this is the same as a not-necessarily-unital morphism of algebras.

Instances For
class NonUnitalAlgHomClass (F : Type u_1) (R : outParam (Type u_2)) (A : outParam (Type u_3)) (B : outParam (Type u_4)) [] [] [] extends :
Type (max (max u_1 u_3) u_4)
• coe : FAB
• coe_injective' : Function.Injective FunLike.coe
• map_smul : ∀ (f : F) (c : R) (x : A), f (c x) = c f x
• map_add : ∀ (f : F) (x y : A), f (x + y) = f x + f y
• map_zero : ∀ (f : F), f 0 = 0
• map_mul : ∀ (f : F) (x y : A), f (x * y) = f x * f y

The proposition that the function preserves multiplication

NonUnitalAlgHomClass F R A B asserts F is a type of bundled algebra homomorphisms from A to B.

Instances
instance NonUnitalAlgHomClass.toNonUnitalRingHomClass {F : Type u_1} {R : Type u_2} {A : Type u_3} {B : Type u_4} [] [] [] [] :
def NonUnitalAlgHomClass.toNonUnitalAlgHom {F : Type u_1} {R : Type u_2} {A : Type u_3} {B : Type u_4} [] [] [] [] (f : F) :

Turn an element of a type F satisfying NonUnitalAlgHomClass F R A B into an actual NonUnitalAlgHom. This is declared as the default coercion from F to A →ₙₐ[R] B.

Instances For
instance NonUnitalAlgHomClass.instCoeTCNonUnitalAlgHom {F : Type u_1} {R : Type u_2} {A : Type u_3} {B : Type u_4} [] [] [] [] :
instance NonUnitalAlgHom.instFunLikeNonUnitalAlgHom {R : Type u} {A : Type v} {B : Type w} [] [] [] :
FunLike (A →ₙₐ[R] B) A fun x => B
@[simp]
theorem NonUnitalAlgHom.toFun_eq_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
f.toFun = f
def NonUnitalAlgHom.Simps.apply {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
AB

See Note [custom simps projection]

Instances For
@[simp]
theorem NonUnitalAlgHom.coe_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] {F : Type u_1} [] (f : F) :
f = f
theorem NonUnitalAlgHom.coe_injective {R : Type u} {A : Type v} {B : Type w} [] [] [] :
Function.Injective FunLike.coe
theorem NonUnitalAlgHom.ext {R : Type u} {A : Type v} {B : Type w} [] [] [] {f : A →ₙₐ[R] B} {g : A →ₙₐ[R] B} (h : ∀ (x : A), f x = g x) :
f = g
theorem NonUnitalAlgHom.ext_iff {R : Type u} {A : Type v} {B : Type w} [] [] [] {f : A →ₙₐ[R] B} {g : A →ₙₐ[R] B} :
f = g ∀ (x : A), f x = g x
theorem NonUnitalAlgHom.congr_fun {R : Type u} {A : Type v} {B : Type w} [] [] [] {f : A →ₙₐ[R] B} {g : A →ₙₐ[R] B} (h : f = g) (x : A) :
f x = g x
@[simp]
theorem NonUnitalAlgHom.coe_mk {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : AB) (h₁ : ∀ (m : R) (x : A), f (m x) = m f x) (h₂ : MulActionHom.toFun { toFun := f, map_smul' := h₁ } 0 = 0) (h₃ : ∀ (x y : A), MulActionHom.toFun { toFun := f, map_smul' := h₁ } (x + y) = MulActionHom.toFun { toFun := f, map_smul' := h₁ } x + MulActionHom.toFun { toFun := f, map_smul' := h₁ } y) (h₄ : ∀ (x y : A), MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom (x * y) = MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom x * MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom y) :
{ toDistribMulActionHom := { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }, map_mul' := h₄ } = f
@[simp]
theorem NonUnitalAlgHom.mk_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (h₁ : ∀ (m : R) (x : A), f (m x) = m f x) (h₂ : MulActionHom.toFun { toFun := f, map_smul' := h₁ } 0 = 0) (h₃ : ∀ (x y : A), MulActionHom.toFun { toFun := f, map_smul' := h₁ } (x + y) = MulActionHom.toFun { toFun := f, map_smul' := h₁ } x + MulActionHom.toFun { toFun := f, map_smul' := h₁ } y) (h₄ : ∀ (x y : A), MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom (x * y) = MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom x * MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom y) :
{ toDistribMulActionHom := { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }, map_mul' := h₄ } = f
@[simp]
theorem NonUnitalAlgHom.toDistribMulActionHom_eq_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
f.toDistribMulActionHom = f
@[simp]
theorem NonUnitalAlgHom.toMulHom_eq_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
@[simp]
theorem NonUnitalAlgHom.coe_to_distribMulActionHom {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
f = f
@[simp]
theorem NonUnitalAlgHom.coe_to_mulHom {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
f = f
theorem NonUnitalAlgHom.to_distribMulActionHom_injective {R : Type u} {A : Type v} {B : Type w} [] [] [] {f : A →ₙₐ[R] B} {g : A →ₙₐ[R] B} (h : f = g) :
f = g
theorem NonUnitalAlgHom.to_mulHom_injective {R : Type u} {A : Type v} {B : Type w} [] [] [] {f : A →ₙₐ[R] B} {g : A →ₙₐ[R] B} (h : f = g) :
f = g
theorem NonUnitalAlgHom.coe_distribMulActionHom_mk {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (h₁ : ∀ (m : R) (x : A), f (m x) = m f x) (h₂ : MulActionHom.toFun { toFun := f, map_smul' := h₁ } 0 = 0) (h₃ : ∀ (x y : A), MulActionHom.toFun { toFun := f, map_smul' := h₁ } (x + y) = MulActionHom.toFun { toFun := f, map_smul' := h₁ } x + MulActionHom.toFun { toFun := f, map_smul' := h₁ } y) (h₄ : ∀ (x y : A), MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom (x * y) = MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom x * MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom y) :
{ toDistribMulActionHom := { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }, map_mul' := h₄ } = { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }
theorem NonUnitalAlgHom.coe_mulHom_mk {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (h₁ : ∀ (m : R) (x : A), f (m x) = m f x) (h₂ : MulActionHom.toFun { toFun := f, map_smul' := h₁ } 0 = 0) (h₃ : ∀ (x y : A), MulActionHom.toFun { toFun := f, map_smul' := h₁ } (x + y) = MulActionHom.toFun { toFun := f, map_smul' := h₁ } x + MulActionHom.toFun { toFun := f, map_smul' := h₁ } y) (h₄ : ∀ (x y : A), MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom (x * y) = MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom x * MulActionHom.toFun { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom y) :
{ toDistribMulActionHom := { toMulActionHom := { toFun := f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }, map_mul' := h₄ } = { toFun := f, map_mul' := h₄ }
theorem NonUnitalAlgHom.map_smul {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (c : R) (x : A) :
f (c x) = c f x
theorem NonUnitalAlgHom.map_add {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (x : A) (y : A) :
f (x + y) = f x + f y
theorem NonUnitalAlgHom.map_mul {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (x : A) (y : A) :
f (x * y) = f x * f y
theorem NonUnitalAlgHom.map_zero {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) :
f 0 = 0
def NonUnitalAlgHom.id (R : Type u_1) (A : Type u_2) [] [] :

The identity map as a NonUnitalAlgHom.

Instances For
@[simp]
theorem NonUnitalAlgHom.coe_id {R : Type u} {A : Type v} [] [] :
↑() = id
instance NonUnitalAlgHom.instZeroNonUnitalAlgHom {R : Type u} {A : Type v} {B : Type w} [] [] [] :
@[simp]
theorem NonUnitalAlgHom.coe_zero {R : Type u} {A : Type v} {B : Type w} [] [] [] :
0 = 0
@[simp]
theorem NonUnitalAlgHom.coe_one {R : Type u} {A : Type v} [] [] :
1 = id
theorem NonUnitalAlgHom.zero_apply {R : Type u} {A : Type v} {B : Type w} [] [] [] (a : A) :
0 a = 0
theorem NonUnitalAlgHom.one_apply {R : Type u} {A : Type v} [] [] (a : A) :
1 a = a
instance NonUnitalAlgHom.instInhabitedNonUnitalAlgHom {R : Type u} {A : Type v} {B : Type w} [] [] [] :
def NonUnitalAlgHom.comp {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) :

The composition of morphisms is a morphism.

Instances For
@[simp]
theorem NonUnitalAlgHom.coe_comp {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) :
↑() = f g
theorem NonUnitalAlgHom.comp_apply {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : B →ₙₐ[R] C) (g : A →ₙₐ[R] B) (x : A) :
↑() x = f (g x)
def NonUnitalAlgHom.inverse {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (g : BA) (h₁ : ) (h₂ : ) :

The inverse of a bijective morphism is a morphism.

Instances For
@[simp]
theorem NonUnitalAlgHom.coe_inverse {R : Type u} {A : Type v} {B : Type w} [] [] [] (f : A →ₙₐ[R] B) (g : BA) (h₁ : ) (h₂ : ) :
↑(NonUnitalAlgHom.inverse f g h₁ h₂) = g

### Operations on the product type #

Note that much of this is copied from LinearAlgebra/Prod.

@[simp]
theorem NonUnitalAlgHom.fst_toFun (R : Type u) (A : Type v) (B : Type w) [] [] [] (self : A × B) :
↑() self = self.fst
@[simp]
theorem NonUnitalAlgHom.fst_apply (R : Type u) (A : Type v) (B : Type w) [] [] [] (self : A × B) :
↑() self = self.fst
def NonUnitalAlgHom.fst (R : Type u) (A : Type v) (B : Type w) [] [] [] :

The first projection of a product is a non-unital alg_hom.

Instances For
@[simp]
theorem NonUnitalAlgHom.snd_apply (R : Type u) (A : Type v) (B : Type w) [] [] [] (self : A × B) :
↑() self = self.snd
@[simp]
theorem NonUnitalAlgHom.snd_toFun (R : Type u) (A : Type v) (B : Type w) [] [] [] (self : A × B) :
↑() self = self.snd
def NonUnitalAlgHom.snd (R : Type u) (A : Type v) (B : Type w) [] [] [] :

The second projection of a product is a non-unital alg_hom.

Instances For
@[simp]
theorem NonUnitalAlgHom.prod_toFun {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) (i : A) :
↑() i = Pi.prod (f) (g) i
@[simp]
theorem NonUnitalAlgHom.prod_apply {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) (i : A) :
↑() i = Pi.prod (f) (g) i
def NonUnitalAlgHom.prod {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) :

The prod of two morphisms is a morphism.

Instances For
theorem NonUnitalAlgHom.coe_prod {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) :
↑() = Pi.prod f g
@[simp]
theorem NonUnitalAlgHom.fst_prod {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) :
@[simp]
theorem NonUnitalAlgHom.snd_prod {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) :
@[simp]
theorem NonUnitalAlgHom.prod_fst_snd {R : Type u} {A : Type v} {B : Type w} [] [] [] :
@[simp]
theorem NonUnitalAlgHom.prodEquiv_symm_apply {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : A →ₙₐ[R] B × C) :
NonUnitalAlgHom.prodEquiv.symm f = (, )
@[simp]
theorem NonUnitalAlgHom.prodEquiv_apply {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] (f : (A →ₙₐ[R] B) × (A →ₙₐ[R] C)) :
NonUnitalAlgHom.prodEquiv f = NonUnitalAlgHom.prod f.fst f.snd
def NonUnitalAlgHom.prodEquiv {R : Type u} {A : Type v} {B : Type w} {C : Type w₁} [] [] [] [] :
(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.

Instances For
def NonUnitalAlgHom.inl (R : Type u) (A : Type v) (B : Type w) [] [] [] :

The left injection into a product is a non-unital algebra homomorphism.

Instances For
def NonUnitalAlgHom.inr (R : Type u) (A : Type v) (B : Type w) [] [] [] :

The right injection into a product is a non-unital algebra homomorphism.

Instances For
@[simp]
theorem NonUnitalAlgHom.coe_inl {R : Type u} {A : Type v} {B : Type w} [] [] [] :
↑() = fun x => (x, 0)
theorem NonUnitalAlgHom.inl_apply {R : Type u} {A : Type v} {B : Type w} [] [] [] (x : A) :
↑() x = (x, 0)
@[simp]
theorem NonUnitalAlgHom.coe_inr {R : Type u} {A : Type v} {B : Type w} [] [] [] :
↑() =
theorem NonUnitalAlgHom.inr_apply {R : Type u} {A : Type v} {B : Type w} [] [] [] (x : B) :
↑() x = (0, x)

### Interaction with AlgHom#

def AlgHom.toNonUnitalAlgHom {R : Type u} {A : Type v} {B : Type w} [] [] [] [Algebra R A] [Algebra R B] (f : A →ₐ[R] B) :

A unital morphism of algebras is a NonUnitalAlgHom.

Instances For
instance AlgHom.NonUnitalAlgHom.hasCoe {R : Type u} {A : Type v} {B : Type w} [] [] [] [Algebra R A] [Algebra R B] :
@[simp]
theorem AlgHom.toNonUnitalAlgHom_eq_coe {R : Type u} {A : Type v} {B : Type w} [] [] [] [Algebra R A] [Algebra R B] (f : A →ₐ[R] B) :
f = f
@[simp]
theorem AlgHom.coe_to_nonUnitalAlgHom {R : Type u} {A : Type v} {B : Type w} [] [] [] [Algebra R A] [Algebra R B] (f : A →ₐ[R] B) :
f = f