The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V08. Multilinear algebra and forms

Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra

10 declarations. Mathlib docs · Source

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 notes

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

abbrev FreeNonUnitalNonAssocAlgebra E3 #

(R : Type u_1) → Type u_2 → [Semiring R] → Type (max u_1 u_2)

If α is a type, and R is a semiring, then FreeNonUnitalNonAssocAlgebra R α is the free non-unital non-associative R-algebra generated by α. This is an R-algebra equipped with a function FreeNonUnitalNonAssocAlgebra.of R : α → FreeNonUnitalNonAssocAlgebra R α which has the following universal property: if A is any R-algebra, and f : α → A is any function, then this function is the composite of FreeNonUnitalNonAssocAlgebra.of R and a unique non-unital R-algebra homomorphism FreeNonUnitalNonAssocAlgebra.lift R f : FreeNonUnitalNonAssocAlgebra R α →ₙₐ[R] A.

A typical element of FreeNonUnitalNonAssocAlgebra R α is an R-linear combination of nonempty formal (non-commutative, non-associative) products of elements of α. For example if x and y are terms of type α and a, b are terms of type R then (3 * a * a) • (x * (y * x)) + (2 * b + 1) • (y * x) is a "typical" element of FreeNonUnitalNonAssocAlgebra R α.

def FreeNonUnitalNonAssocAlgebra.of E3 #

(R : Type u_1) → {X : Type u_2} → [inst : Semiring R] → X → FreeNonUnitalNonAssocAlgebra R X

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

def FreeNonUnitalNonAssocAlgebra.lift E3 #

(R : Type u_1) →
  {X : Type u_2} →
    {A : Type u_3} →
      [inst : Semiring R] →
        [inst_1 : NonUnitalNonAssocSemiring A] →
          [inst_2 : Module R A] →
            [IsScalarTower R A A] → [SMulCommClass R A A] → (X → A) ≃ (FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A)

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.

theorem FreeNonUnitalNonAssocAlgebra.lift_symm_apply E0 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [inst_3 : IsScalarTower R A A] [inst_4 : SMulCommClass R A A]
  (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A),
  (FreeNonUnitalNonAssocAlgebra.lift R).symm F = ⇑F ∘ FreeNonUnitalNonAssocAlgebra.of R

theorem FreeNonUnitalNonAssocAlgebra.of_comp_lift E0 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [inst_3 : IsScalarTower R A A] [inst_4 : SMulCommClass R A A] (f : X → A),
  ⇑((FreeNonUnitalNonAssocAlgebra.lift R) f) ∘ FreeNonUnitalNonAssocAlgebra.of R = f

theorem FreeNonUnitalNonAssocAlgebra.lift_unique E0 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [inst_3 : IsScalarTower R A A] [inst_4 : SMulCommClass R A A] (f : X → A)
  (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A),
  ⇑F ∘ FreeNonUnitalNonAssocAlgebra.of R = f ↔ F = (FreeNonUnitalNonAssocAlgebra.lift R) f

theorem FreeNonUnitalNonAssocAlgebra.lift_of_apply E0 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [inst_3 : IsScalarTower R A A] [inst_4 : SMulCommClass R A A] (f : X → A) (x : X),
  ((FreeNonUnitalNonAssocAlgebra.lift R) f) (FreeNonUnitalNonAssocAlgebra.of R x) = f x

theorem FreeNonUnitalNonAssocAlgebra.lift_comp_of E0 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [inst_3 : IsScalarTower R A A] [inst_4 : SMulCommClass R A A]
  (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A),
  (FreeNonUnitalNonAssocAlgebra.lift R) (⇑F ∘ FreeNonUnitalNonAssocAlgebra.of R) = F

theorem FreeNonUnitalNonAssocAlgebra.hom_ext E1 #

∀ (R : Type u_1) {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [IsScalarTower R A A] [SMulCommClass R A A] {F₁ F₂ : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A},
  (∀ (x : X), F₁ (FreeNonUnitalNonAssocAlgebra.of R x) = F₂ (FreeNonUnitalNonAssocAlgebra.of R x)) → F₁ = F₂

theorem FreeNonUnitalNonAssocAlgebra.hom_ext_iff E0 #

∀ {R : Type u_1} {X : Type u_2} {A : Type u_3} [inst : Semiring R] [inst_1 : NonUnitalNonAssocSemiring A]
  [inst_2 : Module R A] [IsScalarTower R A A] [SMulCommClass R A A] {F₁ F₂ : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A},
  F₁ = F₂ ↔ ∀ (x : X), F₁ (FreeNonUnitalNonAssocAlgebra.of R x) = F₂ (FreeNonUnitalNonAssocAlgebra.of R x)