# mathlibdocumentation

algebra.free_non_unital_non_assoc_algebra

# 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 free_algebra.

## Main definitions #

• free_non_unital_non_assoc_algebra
• free_non_unital_non_assoc_algebra.lift
• free_non_unital_non_assoc_algebra.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 free_non_unital_non_assoc_algebra 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

def free_non_unital_non_assoc_algebra (R : Type u) (X : Type v) [semiring R] :
Type (max u v)

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

noncomputable def free_non_unital_non_assoc_algebra.of (R : Type u) {X : Type v} [semiring R] :

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

Equations
noncomputable def free_non_unital_non_assoc_algebra.lift (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] :
(X → A)

The functor X ↦ free_non_unital_non_assoc_algebra 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.

Equations
@[simp]
theorem free_non_unital_non_assoc_algebra.lift_symm_apply (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] (F : A) :
@[simp]
theorem free_non_unital_non_assoc_algebra.of_comp_lift (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] (f : X → A) :
@[simp]
theorem free_non_unital_non_assoc_algebra.lift_unique (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] (f : X → A) (F : A) :
@[simp]
theorem free_non_unital_non_assoc_algebra.lift_of_apply (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] (f : X → A) (x : X) :
@[simp]
theorem free_non_unital_non_assoc_algebra.lift_comp_of (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] (F : A) :
@[ext]
theorem free_non_unital_non_assoc_algebra.hom_ext (R : Type u) {X : Type v} [semiring R] {A : Type w} [ A] [ A] [ A] {F₁ F₂ : A} (h : ∀ (x : X), ) :
F₁ = F₂