@@ -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
2324open scoped TensorProduct
2425
2526namespace Bialgebra.TensorProduct
2627
2728open 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
3235lemma 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
6568variable [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]
162165theorem 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
164182end Bialgebra.TensorProduct
183+
165184namespace BialgHom
166185
167186variable {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
180199end 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
0 commit comments