Zulip Chat Archive
Stream: mathlib4
Topic: TensorProduct vs TensorProduct.AlgebraTensorModule vs ...
Yaël Dillies (May 29 2025 at 12:56):
We currently have two ways to talk about the tensor product of modules:
- Things in the
TensorProductnamespace are about the tensor product of twoR-modulesMandNas anR-module - Things in the
TensorProduct.AlgebraTensorModulenamespace are about the tensor product of anR-moduleMwith anA-moduleNas anA-module, whereAis anR-algebra
Yaël Dillies (May 29 2025 at 12:57):
On top of this, there's the tensor product of algebras and of coalgebras whose respective APIs lie in the Algebra.TensorProduct and Coalgebra.TensorProduct namespaces (making the Algebra and Coalgebra namespaces basically unopenable btw, since almost everything in Algebra.TensorProduct/Coalgebra.TensorProduct would conflict with almost everything in the TensorProduct namespace).
Yaël Dillies (May 29 2025 at 13:01):
Declarations in the TensorProduct namespace are not defeq to their analogues in the TensorProduct.AlgebraTensorModule namespace. For most of these declarations, mathlib doesn't even know that they are equal (in fact, docs#TensorProduct.AlgebraTensorModule.rid_eq_rid is the only one I could find)
Yaël Dillies (May 29 2025 at 13:02):
Recently, @Andrew Yang changed the defeq of the declarations in the Coalgebra.TensorProduct namespace from the ones in TensorProduct to the ones in TensorProduct.AlgebraTensorModule. Toric quite literally exploded.
Eric Wieser (May 29 2025 at 13:03):
Have you considered removing the || catch_fire step from your CI, if the explosion was literal?
Yaël Dillies (May 29 2025 at 13:04):
Okay, it didn't explode that literally :laughing:
Eric Wieser (May 29 2025 at 13:04):
I would guess that we want to drop everything in TensorProduct and replace it with the stuff in AlgebraTensorModule, but that we didn't do so in the past because of performance
Eric Wieser (May 29 2025 at 13:04):
Or maybe the generalities were not comparable until more recently
Eric Wieser (May 29 2025 at 13:05):
I also agree that the Foo.TensorProduct namespacing is terrible, but I think it's difficult to clean this up without first doing the merge I just described.
Andrew Yang (May 29 2025 at 13:09):
Here's the PR making them defeq so we can switch more easily later: #25298
Yaël Dillies (May 29 2025 at 13:24):
(deleted)
Last updated: Dec 20 2025 at 21:32 UTC