Skip to content

Commit 5ee18dd

Browse files
committed
feat: comultiplication as a bialgebra hom
From toric
1 parent e44cdf8 commit 5ee18dd

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

Mathlib/RingTheory/Bialgebra/TensorProduct.lean

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ instance on a tensor product of bialgebras, and the tensor product of two `Bialg
2020

2121
@[expose] public section
2222

23+
open Coalgebra
2324
open scoped TensorProduct
2425

2526
namespace Bialgebra.TensorProduct
2627

2728
open Coalgebra.TensorProduct
2829

29-
variable (R S A B C D : Type*) [CommSemiring R] [CommSemiring S] [Semiring A] [Semiring B]
30-
[Bialgebra S A] [Bialgebra R B] [Algebra R A] [Algebra R S] [IsScalarTower R S A]
30+
variable {R S A B C D : Type*} [CommSemiring R] [CommSemiring S] [Semiring A] [Semiring B]
31+
32+
section Heterogeneous
33+
variable (R S A B) [Bialgebra S A] [Bialgebra R B] [Algebra R A] [Algebra R S] [IsScalarTower R S A]
3134

3235
lemma counit_eq_algHom_toLinearMap :
3336
Coalgebra.counit (R := S) (A := A ⊗[R] B) =
@@ -60,7 +63,7 @@ lemma comulAlgHom_def :
6063
(Algebra.TensorProduct.map (Bialgebra.comulAlgHom S A)
6164
(Bialgebra.comulAlgHom R B)) := rfl
6265

63-
variable {R S A B C D}
66+
variable {R S A B}
6467

6568
variable [Semiring C] [Semiring D] [Bialgebra S C]
6669
[Bialgebra R D] [Algebra R C] [IsScalarTower R S C]
@@ -161,7 +164,23 @@ theorem rid_tmul (r : R) (a : A) : Bialgebra.TensorProduct.rid R S A (a ⊗ₜ r
161164
@[simp]
162165
theorem rid_symm_apply (a : A) : (Bialgebra.TensorProduct.rid R S A).symm a = a ⊗ₜ 1 := rfl
163166

167+
end Heterogeneous
168+
169+
section Homogeneous
170+
variable (R S A B) [Bialgebra R A] [Bialgebra R B]
171+
172+
/-- The tensor product of `R`-bialgebras is commutative, up to bialgebra isomorphism. -/
173+
def comm : A ⊗[R] B ≃ₐc[R] B ⊗[R] A :=
174+
.ofAlgEquiv (Algebra.TensorProduct.comm R A B) (by ext <;> simp) <| by
175+
ext a <;>
176+
· dsimp
177+
rw [← (ℛ R a).eq]
178+
simp [TensorProduct.tmul_sum, TensorProduct.sum_tmul]
179+
rfl
180+
181+
end Homogeneous
164182
end Bialgebra.TensorProduct
183+
165184
namespace BialgHom
166185

167186
variable {R A B C : Type*} [CommRing R] [Ring A] [Ring B] [Ring C]
@@ -178,3 +197,17 @@ noncomputable abbrev rTensor (f : B →ₐc[R] C) : B ⊗[R] A →ₐc[R] C ⊗[
178197
Bialgebra.TensorProduct.map f (BialgHom.id R A)
179198

180199
end BialgHom
200+
201+
namespace Bialgebra
202+
variable (R A : Type*) [CommSemiring R] [Semiring A] [Bialgebra R A]
203+
204+
/-- Comultiplication as a bialgebra hom. -/
205+
def comulBialgHom [IsCocomm R A] : A →ₐc[R] A ⊗[R] A where
206+
__ := comulAlgHom R A
207+
__ := comulCoalgHom R A
208+
209+
lemma comm_comp_comulBialgHom [IsCocomm R A] :
210+
(TensorProduct.comm R A A).toBialgHom.comp (comulBialgHom R A) = comulBialgHom R A := by
211+
ext; exact comm_comul _ _
212+
213+
end Bialgebra

Mathlib/RingTheory/Coalgebra/TensorProduct.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ module
88
public import Mathlib.LinearAlgebra.TensorProduct.Tower
99
public import Mathlib.RingTheory.Coalgebra.Equiv
1010

11+
meta import Mathlib.RingTheory.Coalgebra.CoassocSimps
12+
13+
import Mathlib.Algebra.Algebra.Bilinear
14+
1115
/-!
1216
# Tensor products of coalgebras
1317
@@ -295,3 +299,28 @@ noncomputable abbrev rTensor (f : N →ₗc[R] P) : N ⊗[R] M →ₗc[R] P ⊗[
295299
Coalgebra.TensorProduct.map f (CoalgHom.id R M)
296300

297301
end CoalgHom
302+
303+
namespace Coalgebra
304+
variable {R C : Type*} [CommSemiring R] [AddCommMonoid C] [Module R C] [Coalgebra R C]
305+
[IsCocomm R C]
306+
307+
local notation3 "ε" => counit (R := R) (A := C)
308+
local notation3 "μ" => LinearMap.mul' R R
309+
local notation3 "δ" => comul (R := R)
310+
local infix:90 " ◁ " => LinearMap.lTensor
311+
local notation3:90 f:90 " ▷ " X:90 => LinearMap.rTensor X f
312+
local infix:70 " ⊗ₘ " => _root_.TensorProduct.map
313+
314+
variable (R C) in
315+
/-- Comultiplication as a coalgebra hom. -/
316+
noncomputable def comulCoalgHom : C →ₗc[R] C ⊗[R] C where
317+
__ := δ
318+
counit_comp := by
319+
simp only [counit_def, AlgebraTensorModule.rid_eq_rid, ← lid_eq_rid]
320+
calc
321+
(μ ∘ₗ (ε ⊗ₘ ε)) ∘ₗ δ
322+
_ = (μ ∘ₗ ε ▷ R) ∘ₗ (C ◁ ε ∘ₗ δ) := by simp [coassoc_simps]
323+
_ = ε := by ext; simp
324+
map_comp_comul := by simp [comul_def, coassoc_simps]
325+
326+
end Coalgebra

0 commit comments

Comments
 (0)