Skip to content

Commit 2f6c094

Browse files
committed
split files
1 parent 75e3ee7 commit 2f6c094

3 files changed

Lines changed: 88 additions & 68 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5660,6 +5660,7 @@ public import Mathlib.RingTheory.Bialgebra.Equiv
56605660
public import Mathlib.RingTheory.Bialgebra.GroupLike
56615661
public import Mathlib.RingTheory.Bialgebra.Hom
56625662
public import Mathlib.RingTheory.Bialgebra.MonoidAlgebra
5663+
public import Mathlib.RingTheory.Bialgebra.TensorAlgebra
56635664
public import Mathlib.RingTheory.Bialgebra.TensorProduct
56645665
public import Mathlib.RingTheory.Binomial
56655666
public import Mathlib.RingTheory.ChainOfDivisors
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/-
2+
Copyright (c) 2025 Nikolas Tapia. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Nikolas Tapia
5+
-/
6+
module
7+
8+
public import Mathlib.LinearAlgebra.TensorAlgebra.Basic
9+
public import Mathlib.RingTheory.Bialgebra.Basic
10+
11+
/-!
12+
# Bialgebra structure on `TensorAlgebra R M`
13+
14+
In this file we implement the natural bialgebra structure on `TensorAlgebra R M`.
15+
The comultiplication is the unique algebra map satisfying `comul (ι R x) = ι R x ⊗ 1 + 1 ⊗ ι R
16+
x` for all `x : M`, and `algebraMapInv` acts as the counit.
17+
-/
18+
19+
@[expose] public section
20+
21+
namespace TensorAlgebra
22+
23+
open scoped TensorProduct RingTheory.LinearMap
24+
open TensorProduct
25+
26+
variable (R : Type*) [CommSemiring R] {M : Type*} [AddCommMonoid M] [Module R M]
27+
28+
local notation "T[" M "]" => TensorAlgebra R M
29+
30+
/-- Comultiplication in `TensorAlgebra R M` as an algebra map.
31+
It is induced by the linear map sending `(m : M)` to `ι R m ⊗ₜ[R] 1 + 1 ⊗ₜ[R] ι R m`.
32+
See `comul_apply`.
33+
-/
34+
def comul : T[M] →ₐ[R] T[M] ⊗[R] T[M] := lift R (
35+
(ι R ⊗ₘ Algebra.linearMap R T[M]) ∘ₗ (TensorProduct.rid R M).symm +
36+
(Algebra.linearMap R T[M] ⊗ₘ ι R) ∘ₗ (TensorProduct.lid R M).symm
37+
)
38+
39+
@[simp]
40+
lemma comul_apply (m : M) : comul R (ι R m) = ι R m ⊗ₜ[R] 1 + 1 ⊗ₜ[R] ι R m := by
41+
simp [comul]
42+
43+
@[simp]
44+
lemma algebraMapInv_ι_apply (m : M) : algebraMapInv (ι R m) = 0 := by
45+
simp [algebraMapInv]
46+
47+
@[simp]
48+
lemma algebraMapInv_ι_eq_zero : algebraMapInv.toLinearMap ∘ₗ (ι R) = (0 : M →ₗ[R] R) :=
49+
LinearMap.ext <| algebraMapInv_ι_apply _
50+
51+
instance instBialgebra : Bialgebra R T[M] := Bialgebra.ofAlgHom (comul R) algebraMapInv
52+
(by ext; simpa [comul, Algebra.TensorProduct.one_def, add_tmul, tmul_add] using by abel)
53+
(by ext; simp [comul, algebraMapInv])
54+
(by ext; simp [comul, algebraMapInv])
55+
56+
end TensorAlgebra

Mathlib/RingTheory/HopfAlgebra/TensorAlgebra.lean

Lines changed: 31 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Authors: Nikolas Tapia
55
-/
66
module
77

8-
public import Mathlib.LinearAlgebra.TensorAlgebra.Basic
9-
public import Mathlib.RingTheory.Coalgebra.Convolution
8+
public import Mathlib.RingTheory.Bialgebra.TensorAlgebra
109
public import Mathlib.RingTheory.HopfAlgebra.Basic
1110

1211
/-!
@@ -21,44 +20,9 @@ TensorAlgebra R M → (TensorAlgebra R M)ᵐᵒᵖ` induced by `fun x => op -(ι
2120
@[expose] public section
2221

2322
namespace TensorAlgebra
24-
open scoped TensorProduct RingTheory.LinearMap Coalgebra
25-
open LinearMap TensorProduct
26-
27-
section Bialgebra
28-
29-
variable (R : Type*) [CommSemiring R] {M : Type*} [AddCommMonoid M] [Module R M]
30-
31-
local notation "T[" M "]" => TensorAlgebra R M
32-
33-
/-- Comultiplication in `TensorAlgebra R M` as an algebra map.
34-
It is induced by the linear map sending `(m : M)` to `ι R m ⊗ₜ[R] 1 + 1 ⊗ₜ[R] ι R m`.
35-
See `comul_apply`.
36-
-/
37-
def comul : T[M] →ₐ[R] T[M] ⊗[R] T[M] := lift R (
38-
(ι R ⊗ₘ Algebra.linearMap R T[M]) ∘ₗ (TensorProduct.rid R M).symm +
39-
(Algebra.linearMap R T[M] ⊗ₘ ι R) ∘ₗ (TensorProduct.lid R M).symm
40-
)
41-
42-
@[simp]
43-
lemma comul_apply (m : M) : comul R (ι R m) = ι R m ⊗ₜ[R] 1 + 1 ⊗ₜ[R] ι R m := by
44-
simp [comul]
4523

46-
@[simp]
47-
lemma algebraMapInv_ι_apply (m : M) : algebraMapInv (ι R m) = 0 := by
48-
simp [algebraMapInv]
49-
50-
@[simp]
51-
lemma algebraMapInv_ι_eq_zero : algebraMapInv.toLinearMap ∘ₗ (ι R) = (0 : M →ₗ[R] R) :=
52-
LinearMap.ext <| algebraMapInv_ι_apply _
53-
54-
instance instBialgebra : Bialgebra R T[M] := Bialgebra.ofAlgHom (comul R) algebraMapInv
55-
(by ext; simpa [comul, Algebra.TensorProduct.one_def, add_tmul, tmul_add] using by abel)
56-
(by ext; simp [comul, algebraMapInv])
57-
(by ext; simp [comul, algebraMapInv])
58-
59-
end Bialgebra
60-
61-
section HopfAlgebra
24+
open scoped RingTheory.LinearMap
25+
open LinearMap TensorProduct
6226

6327
variable (R : Type*) [CommRing R] {M : Type*} [AddCommGroup M] [Module R M]
6428

@@ -91,31 +55,32 @@ open Algebra Bialgebra Coalgebra in
9155
instance instHopfAlgebra : HopfAlgebra R T[M] where
9256
antipode := antipode R
9357
mul_antipode_rTensor_comul := by
94-
rw [LinearMap.rTensor, ← LinearMap.convMul_def, ← convOne_def]
58+
rw [LinearMap.rTensor]
9559
ext x
9660
induction x using induction with
9761
| algebraMap r => simp
9862
| add u v hu hv => rw [map_add, hu, hv, ← map_add]
9963
| ι u =>
10064
conv =>
10165
rhs
102-
rw [convOne_def, comp_apply, CoalgebraStruct.counit, instBialgebra, toCoalgebraStruct,
66+
rw [comp_apply, CoalgebraStruct.counit, instBialgebra, toCoalgebraStruct,
10367
toCoalgebra, ofAlgHom, mk', coe_coe, algebraMapInv_ι_apply, map_zero]
10468
conv =>
10569
lhs
106-
rw [convMul_apply, CoalgebraStruct.comul, toCoalgebraStruct, toCoalgebra]
70+
rw [CoalgebraStruct.comul, toCoalgebraStruct, toCoalgebra]
10771
unfold instBialgebra ofAlgHom mk'
108-
simp only [coe_coe, comul_apply, map_add, map_tmul, antipode_ι_apply, id_coe, id_eq,
109-
mul'_apply, mul_one, ← map_one (algebraMap R T[M]), antipode_algebraMap_apply]
110-
simp only [map_one, mul_one, one_mul, neg_add_cancel]
72+
simp only [coe_semilinearMap, comp_apply, comul_apply, map_add, map_tmul,
73+
antipode_ι_apply, id_coe, id_eq, mul'_apply, mul_one]
74+
rw [← map_one (algebraMap R _), antipode_algebraMap_apply]
75+
simp
11176
| mul u v hu hv =>
11277
conv =>
11378
rhs
114-
rw [convOne_apply, counit_mul, map_mul, ← convOne_apply, ← convOne_apply]
79+
rw [comp_apply, counit_mul]
11580
have assoc4 {Q} [Semiring Q] (a b c d : Q) : a * b * (c * d) = a * (b * c) * d := by
11681
rw [← mul_assoc, mul_assoc a b c]
117-
rw [convMul_apply, comul_mul, ← Coalgebra.Repr.eq (ℛ R u), ← Coalgebra.Repr.eq (ℛ R v),
118-
Finset.sum_mul_sum, map_sum, map_sum] at *
82+
rw [comp_apply, comp_apply, comul_mul, ← Coalgebra.Repr.eq (ℛ R u),
83+
← Coalgebra.Repr.eq (ℛ R v), Finset.sum_mul_sum, map_sum, map_sum] at *
11984
simp only [TensorProduct.tmul_mul_tmul, map_sum, map_tmul, antipode_antihom_apply, id_coe,
12085
id_eq, mul'_apply] at *
12186
conv =>
@@ -133,41 +98,40 @@ instance instHopfAlgebra : HopfAlgebra R T[M] where
13398
conv =>
13499
arg 2
135100
intro i
136-
rw [← Finset.sum_mul, ← Finset.mul_sum, hu, convOne_apply,
137-
← Algebra.commutes, mul_assoc]
138-
rw [← Finset.mul_sum, hv, ← convOne_apply]
101+
rw [← Finset.sum_mul, ← Finset.mul_sum, hu, comp_apply, linearMap_apply,
102+
commutes, mul_assoc]
103+
rw [← Finset.mul_sum, hv, comp_apply, linearMap_apply, ← map_mul, ← linearMap_apply]
139104
mul_antipode_lTensor_comul := by
140-
rw [LinearMap.lTensor, ← LinearMap.convMul_def, ← convOne_def]
105+
rw [LinearMap.lTensor]
141106
ext x
142107
induction x using induction with
143108
| algebraMap r =>
144-
simp only [convMul_apply, comul_algebraMap, TensorProduct.algebraMap_apply, map_tmul,
145-
id_coe, id_eq, mul'_apply, convOne_apply, counit_algebraMap, ← map_one (algebraMap R
109+
simp only [comp_apply, comul_algebraMap, TensorProduct.algebraMap_apply, map_tmul,
110+
id_coe, id_eq, mul'_apply, counit_algebraMap, ← map_one (algebraMap R
146111
T[M]), antipode_algebraMap_apply]
147112
simp
148113
| add u v hu hv => rw [map_add, hu, hv, ← map_add]
149114
| ι u =>
150115
conv =>
151116
rhs
152-
rw [convOne_def, comp_apply, CoalgebraStruct.counit, instBialgebra, toCoalgebraStruct,
117+
rw [comp_apply, CoalgebraStruct.counit, instBialgebra, toCoalgebraStruct,
153118
toCoalgebra, ofAlgHom, mk', coe_coe, algebraMapInv_ι_apply, map_zero]
154119
conv =>
155120
lhs
156-
rw [convMul_apply, CoalgebraStruct.comul, toCoalgebraStruct, toCoalgebra]
121+
rw [CoalgebraStruct.comul, toCoalgebraStruct, toCoalgebra]
157122
unfold instBialgebra ofAlgHom mk'
158123
simp only [coe_coe, comul_apply, map_add, map_tmul, antipode_ι_apply, id_coe, id_eq,
159-
mul'_apply, mul_one, ← map_one (algebraMap R T[M]), antipode_algebraMap_apply]
160-
simp only [map_one, mul_one, one_mul, neg_add_cancel]
161-
abel_nf
124+
mul'_apply, mul_one, ← map_one (algebraMap R T[M]), antipode_algebraMap_apply,
125+
coe_semilinearMap, comp_apply]
126+
rw [map_one, one_mul, mul_one, add_neg_cancel]
162127
| mul u v hu hv =>
163128
conv =>
164129
rhs
165-
rw [convOne_apply, counit_mul, map_mul, Algebra.commutes, ← convOne_apply,
166-
← convOne_apply]
130+
rw [comp_apply, counit_mul]
167131
have assoc4 {Q} [Semiring Q] (a b c d : Q) : a * b * (c * d) = a * (b * c) * d := by
168132
rw [← mul_assoc, mul_assoc a b c]
169-
rw [convMul_apply, comul_mul, ← Coalgebra.Repr.eq (ℛ R u), ← Coalgebra.Repr.eq (ℛ R v),
170-
Finset.sum_mul_sum, map_sum, map_sum] at *
133+
rw [comp_apply, comp_apply, comul_mul, ← Coalgebra.Repr.eq (ℛ R u),
134+
← Coalgebra.Repr.eq (ℛ R v), Finset.sum_mul_sum, map_sum, map_sum] at *
171135
simp only [TensorProduct.tmul_mul_tmul, map_sum, map_tmul, antipode_antihom_apply, id_coe,
172136
id_eq, mul'_apply] at *
173137
conv =>
@@ -184,10 +148,9 @@ instance instHopfAlgebra : HopfAlgebra R T[M] where
184148
conv =>
185149
arg 2
186150
intro i
187-
rw [← Finset.sum_mul, ← Finset.mul_sum, hv, convOne_apply,
188-
← Algebra.commutes, mul_assoc]
189-
rw [← Finset.mul_sum, hu, ← convOne_apply]
190-
191-
end HopfAlgebra
151+
rw [← Finset.sum_mul, ← Finset.mul_sum, hv, comp_apply, linearMap_apply,
152+
← Algebra.commutes, mul_assoc]
153+
rw [← Finset.mul_sum, hu, comp_apply, linearMap_apply, commutes, ← map_mul,
154+
← linearMap_apply]
192155

193156
end TensorAlgebra

0 commit comments

Comments
 (0)