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.LinearAlgebra.TensorAlgebra.Basic

45 declarations. Mathlib docs · Source

Tensor Algebras

Given a commutative semiring R, and an R-module M, we construct the tensor algebra of M. This is the free R-algebra generated (R-linearly) by the module M.

Notation

  1. TensorAlgebra R M is the tensor algebra itself. It is endowed with an R-algebra structure.
  2. TensorAlgebra.ι R is the canonical R-linear map M → TensorAlgebra R M.
  3. Given a linear map f : M → A to an R-algebra A, lift R f is the lift of f to an R-algebra morphism TensorAlgebra R M → A.

Theorems

  1. ι_comp_lift states that the composition (lift R f) ∘ (ι R) is identical to f.
  2. lift_unique states that whenever an R-algebra morphism g : TensorAlgebra R M → A is given whose composition with ι R is f, then one has g = lift R f.
  3. hom_ext is a variant of lift_unique in the form of an extensionality theorem.
  4. lift_comp_ι is a combination of ι_comp_lift and lift_unique. It states that the lift of the composition of an algebra morphism with ι is the algebra morphism itself.

Implementation notes

As noted above, the tensor algebra of M is constructed as the free R-algebra generated by M, modulo the additional relations making the inclusion of M into an R-linear map.

theorem RingCon.liftₐ.congr_simp E1 #

∀ {M : Type u_1} {P : Type u_3} {R : Type u_4} [inst : CommSemiring R] [inst_1 : Semiring M] [inst_2 : Algebra R M]
  [inst_3 : Semiring P] [inst_4 : Algebra R P] (c : RingCon M) (f f_1 : M →ₐ[R] P) (e_f : f = f_1)
  (H : c ≤ RingCon.ker f.toRingHom), c.liftₐ f H = c.liftₐ f_1 ⋯

inductive TensorAlgebra.Rel E1 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    (M : Type u_2) → [inst_1 : AddCommMonoid M] → [Module R M] → FreeAlgebra R M → FreeAlgebra R M → Prop

An inductively defined relation on Pre R M used to force the initial algebra structure on the associated quotient.

ctor TensorAlgebra.Rel.add E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {a b : M},
  TensorAlgebra.Rel R M (FreeAlgebra.ι R (a + b)) (FreeAlgebra.ι R a + FreeAlgebra.ι R b)

ctor TensorAlgebra.Rel.smul E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {r : R}
  {a : M}, TensorAlgebra.Rel R M (FreeAlgebra.ι R (r • a)) ((algebraMap R (FreeAlgebra R M)) r * FreeAlgebra.ι R a)

def TensorAlgebra.ringCon E1 #

(R : Type u_1) →
  [inst : CommSemiring R] → (M : Type u_2) → [inst_1 : AddCommMonoid M] → [Module R M] → RingCon (FreeAlgebra R M)

Rel as a ring congruence, used to build the quotient.

def TensorAlgebra E3 #

(R : Type u_1) →
  [inst : CommSemiring R] → (M : Type u_2) → [inst_1 : AddCommMonoid M] → [Module R M] → Type (max u_1 u_2)

The tensor algebra of the module M over the commutative semiring R.

instance instInhabitedTensorAlgebra E0 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    (M : Type u_2) → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → Inhabited (TensorAlgebra R M)

instance TensorAlgebra.instSMulOfAlgebra E0 #

{R : Type u_3} →
  {A : Type u_4} →
    {M : Type u_5} →
      [inst : CommSemiring R] →
        [inst_1 : AddCommMonoid M] →
          [inst_2 : CommSemiring A] → [Algebra R A] → [inst : Module A M] → SMul R (TensorAlgebra A M)

instance TensorAlgebra.instSemiring E0 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    (M : Type u_2) → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → Semiring (TensorAlgebra R M)

instance TensorAlgebra.instAlgebra E0 #

{R : Type u_3} →
  {A : Type u_4} →
    {M : Type u_5} →
      [inst : CommSemiring R] →
        [inst_1 : AddCommMonoid M] →
          [inst_2 : CommSemiring A] →
            [inst_3 : Algebra R A] →
              [inst_4 : Module R M] → [inst_5 : Module A M] → [IsScalarTower R A M] → Algebra R (TensorAlgebra A M)

instance TensorAlgebra.instSMulCommClass E0 #

∀ {R : Type u_3} {S : Type u_4} {A : Type u_5} {M : Type u_6} [inst : CommSemiring R] [inst_1 : CommSemiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : CommSemiring A] [inst_4 : Algebra R A] [inst_5 : Algebra S A]
  [inst_6 : Module A M], SMulCommClass R S (TensorAlgebra A M)

instance TensorAlgebra.instIsScalarTower E0 #

∀ {R : Type u_3} {S : Type u_4} {A : Type u_5} {M : Type u_6} [inst : CommSemiring R] [inst_1 : CommSemiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : CommSemiring A] [inst_4 : SMul R S] [inst_5 : Algebra R A] [inst_6 : Algebra S A]
  [inst_7 : Module A M] [IsScalarTower R S A], IsScalarTower R S (TensorAlgebra A M)

instance TensorAlgebra.instRing E0 #

(M : Type u_2) →
  [inst : AddCommMonoid M] → {S : Type u_3} → [inst_1 : CommRing S] → [inst_2 : Module S M] → Ring (TensorAlgebra S M)

def TensorAlgebra.ι E1 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    {M : Type u_2} → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → M →ₗ[R] TensorAlgebra R M

The canonical linear map M →ₗ[R] TensorAlgebra R M.

theorem TensorAlgebra.ringQuot_mkAlgHom_freeAlgebra_ι_eq_ι E1 #

∀ (R : Type u_1) [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (m : M),
  (RingCon.mkₐ R (TensorAlgebra.ringCon R M)) (FreeAlgebra.ι R m) = (TensorAlgebra.ι R) m

def TensorAlgebra.lift E1 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    {M : Type u_2} →
      [inst_1 : AddCommMonoid M] →
        [inst_2 : Module R M] →
          {A : Type u_3} → [inst_3 : Semiring A] → [inst_4 : Algebra R A] → (M →ₗ[R] A) ≃ (TensorAlgebra R M →ₐ[R] A)

Given a linear map f : M → A where A is an R-algebra, lift R f is the unique lift of f to a morphism of R-algebras TensorAlgebra R M → A.

theorem TensorAlgebra.lift_symm_apply E0 #

∀ (R : Type u_1) [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (F : TensorAlgebra R M →ₐ[R] A),
  (TensorAlgebra.lift R).symm F = F.toLinearMap ∘ₗ TensorAlgebra.ι R

theorem TensorAlgebra.ι_comp_lift E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (f : M →ₗ[R] A),
  ((TensorAlgebra.lift R) f).toLinearMap ∘ₗ TensorAlgebra.ι R = f

theorem TensorAlgebra.lift_ι_apply E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (f : M →ₗ[R] A) (x : M),
  ((TensorAlgebra.lift R) f) ((TensorAlgebra.ι R) x) = f x

theorem TensorAlgebra.lift_unique E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (f : M →ₗ[R] A) (g : TensorAlgebra R M →ₐ[R] A),
  g.toLinearMap ∘ₗ TensorAlgebra.ι R = f ↔ g = (TensorAlgebra.lift R) f

theorem TensorAlgebra.lift_comp_ι E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (g : TensorAlgebra R M →ₐ[R] A),
  (TensorAlgebra.lift R) (g.toLinearMap ∘ₗ TensorAlgebra.ι R) = g

theorem TensorAlgebra.hom_ext E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] {f g : TensorAlgebra R M →ₐ[R] A},
  f.toLinearMap ∘ₗ TensorAlgebra.ι R = g.toLinearMap ∘ₗ TensorAlgebra.ι R → f = g

See note [partially-applied ext lemmas].

theorem TensorAlgebra.hom_ext_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] {f g : TensorAlgebra R M →ₐ[R] A},
  f = g ↔ f.toLinearMap ∘ₗ TensorAlgebra.ι R = g.toLinearMap ∘ₗ TensorAlgebra.ι R

theorem TensorAlgebra.induction E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {C : TensorAlgebra R M → Prop},
  (∀ (r : R), C ((algebraMap R (TensorAlgebra R M)) r)) →
    (∀ (x : M), C ((TensorAlgebra.ι R) x)) →
      (∀ (a b : TensorAlgebra R M), C a → C b → C (a * b)) →
        (∀ (a b : TensorAlgebra R M), C a → C b → C (a + b)) → ∀ (a : TensorAlgebra R M), C a

If C holds for the algebraMap of r : R into TensorAlgebra R M, the ι of x : M, and is preserved under addition and multiplication, then it holds for all of TensorAlgebra R M.

theorem TensorAlgebra.adjoin_range_ι E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Algebra.adjoin R (Set.range ⇑(TensorAlgebra.ι R)) = ⊤

theorem TensorAlgebra.range_lift E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {A : Type u_3}
  [inst_3 : Semiring A] [inst_4 : Algebra R A] (f : M →ₗ[R] A),
  ((TensorAlgebra.lift R) f).range = Algebra.adjoin R (Set.range ⇑f)

def TensorAlgebra.algebraMapInv E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Type u_2} → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → TensorAlgebra R M →ₐ[R] R

The left-inverse of algebraMap.

theorem TensorAlgebra.algebraMap_leftInverse E1 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Function.LeftInverse ⇑TensorAlgebra.algebraMapInv ⇑(algebraMap R (TensorAlgebra R M))

theorem TensorAlgebra.algebraMap_inj E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x y : R),
  (algebraMap R (TensorAlgebra R M)) x = (algebraMap R (TensorAlgebra R M)) y ↔ x = y

theorem TensorAlgebra.algebraMap_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x : R),
  (algebraMap R (TensorAlgebra R M)) x = 0 ↔ x = 0

theorem TensorAlgebra.algebraMap_eq_one_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x : R),
  (algebraMap R (TensorAlgebra R M)) x = 1 ↔ x = 1

instance TensorAlgebra.instNontrivial E0 #

∀ {R : Type u_1} [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Nontrivial R],
  Nontrivial (TensorAlgebra R M)

A TensorAlgebra over a nontrivial semiring is nontrivial.

def TensorAlgebra.toTrivSqZeroExt E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Type u_2} →
      [inst_1 : AddCommMonoid M] →
        [inst_2 : Module R M] →
          [inst_3 : Module Rᵐᵒᵖ M] → [inst_4 : IsCentralScalar R M] → TensorAlgebra R M →ₐ[R] TrivSqZeroExt R M

The canonical map from TensorAlgebra R M into TrivSqZeroExt R M that sends TensorAlgebra.ι to TrivSqZeroExt.inr.

theorem TensorAlgebra.toTrivSqZeroExt_ι E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x : M)
  [inst_3 : Module Rᵐᵒᵖ M] [inst_4 : IsCentralScalar R M],
  TensorAlgebra.toTrivSqZeroExt ((TensorAlgebra.ι R) x) = TrivSqZeroExt.inr x

def TensorAlgebra.ιInv E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Type u_2} → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → TensorAlgebra R M →ₗ[R] M

The left-inverse of ι.

As an implementation detail, we implement this using TrivSqZeroExt which has a suitable algebra structure.

theorem TensorAlgebra.ι_leftInverse E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Function.LeftInverse ⇑TensorAlgebra.ιInv ⇑(TensorAlgebra.ι R)

theorem TensorAlgebra.ι_inj E0 #

∀ (R : Type u_1) [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x y : M),
  (TensorAlgebra.ι R) x = (TensorAlgebra.ι R) y ↔ x = y

theorem TensorAlgebra.ι_eq_zero_iff E0 #

∀ (R : Type u_1) [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x : M),
  (TensorAlgebra.ι R) x = 0 ↔ x = 0

theorem TensorAlgebra.ι_eq_algebraMap_iff E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (x : M)
  (r : R), (TensorAlgebra.ι R) x = (algebraMap R (TensorAlgebra R M)) r ↔ x = 0 ∧ r = 0

theorem TensorAlgebra.ι_ne_one E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Nontrivial R]
  (x : M), (TensorAlgebra.ι R) x ≠ 1

theorem TensorAlgebra.ι_range_disjoint_one E1 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Disjoint (TensorAlgebra.ι R).range 1

The generators of the tensor algebra are disjoint from its scalars.

def TensorAlgebra.tprod E1 #

(R : Type u_1) →
  [inst : CommSemiring R] →
    (M : Type u_2) → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → (n : ℕ) → (Fin n → M) →ₘₗ[R] TensorAlgebra R M

Construct a product of n elements of the module within the tensor algebra.

See also PiTensorProduct.tprod.

theorem TensorAlgebra.tprod_apply E0 #

∀ (R : Type u_1) [inst : CommSemiring R] (M : Type u_2) [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {n : ℕ}
  (x : Fin n → M), (TensorAlgebra.tprod R M n) x = (List.ofFn fun i ↦ (TensorAlgebra.ι R) (x i)).prod

def FreeAlgebra.toTensor E1 #

{R : Type u_1} →
  [inst : CommSemiring R] →
    {M : Type u_2} → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → FreeAlgebra R M →ₐ[R] TensorAlgebra R M

The canonical image of the FreeAlgebra in the TensorAlgebra, which maps FreeAlgebra.ι R x to TensorAlgebra.ι R x.

theorem FreeAlgebra.toTensor_ι E0 #

∀ {R : Type u_1} [inst : CommSemiring R] {M : Type u_2} [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (m : M),
  FreeAlgebra.toTensor (FreeAlgebra.ι R m) = (TensorAlgebra.ι R) m