# Documentation

Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra

# Free algebras #

Given a semiring R and a type X, we construct the free non-unital, non-associative algebra on X with coefficients in R, together with its universal property. The construction is valuable because it can be used to build free algebras with more structure, e.g., free Lie algebras.

Note that elsewhere we have a construction of the free unital, associative algebra. This is called FreeAlgebra.

## Main definitions #

• FreeNonUnitalNonAssocAlgebra
• FreeNonUnitalNonAssocAlgebra.lift
• FreeNonUnitalNonAssocAlgebra.of

## Implementation details #

We construct the free algebra as the magma algebra, with coefficients in R, of the free magma on X. However we regard this as an implementation detail and thus deliberately omit the lemmas of_apply and lift_apply, and we mark FreeNonUnitalNonAssocAlgebra and lift as irreducible once we have established the universal property.

## Tags #

free algebra, non-unital, non-associative, free magma, magma algebra, universal property, forgetful functor, adjoint functor

@[inline, reducible]
abbrev FreeNonUnitalNonAssocAlgebra (R : Type u) (X : Type v) [] :
Type (max u v)

The free non-unital, non-associative algebra on the type X with coefficients in R.

Instances For
def FreeNonUnitalNonAssocAlgebra.of (R : Type u) {X : Type v} [] :

The embedding of X into the free algebra with coefficients in R.

Instances For
def FreeNonUnitalNonAssocAlgebra.lift (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] :
(XA) ()

The functor X ↦ FreeNonUnitalNonAssocAlgebra R X from the category of types to the category of non-unital, non-associative algebras over R is adjoint to the forgetful functor in the other direction.

Instances For
@[simp]
theorem FreeNonUnitalNonAssocAlgebra.lift_symm_apply (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] (F : ) :
().symm F =
@[simp]
theorem FreeNonUnitalNonAssocAlgebra.of_comp_lift (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] (f : XA) :
@[simp]
theorem FreeNonUnitalNonAssocAlgebra.lift_unique (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] (f : XA) (F : ) :
@[simp]
theorem FreeNonUnitalNonAssocAlgebra.lift_of_apply (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] (f : XA) (x : X) :
↑() () = f x
@[simp]
theorem FreeNonUnitalNonAssocAlgebra.lift_comp_of (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] (F : ) :
theorem FreeNonUnitalNonAssocAlgebra.hom_ext (R : Type u) {X : Type v} [] {A : Type w} [Module R A] [] [] {F₁ : } {F₂ : } (h : ∀ (x : X), F₁ () = F₂ ()) :
F₁ = F₂