Open fe60a72e-b3d0-4317-856b-4536ec0e4b8d opened 6 years ago
Confirmed with
L = lie_algebras.sl(QQ, 2)
U = L.universal_enveloping_algebra()
PBW = L.pbw_basis()
E, F, H = PBW.algebra_generators()
Q = QuadraticForm(QQ, 2, [1,0,1])
C = CliffordAlgebra(Q)
e, f = C.algebra_generators()
UC = PBW.tensor(C)
C.tensor(PBW)
HOWEVER, I'm not sure if this is a bug! C
is a superalgebra whereas PBW
is an algebra. Per se, I wouldn't expect Sage to know how to tensor them. I suspect we need to teach it. Or maybe even create a functorial construction that turns a superalgebra into an algebra and vice versa?
FTR, I have confirmed this as well.
No, the category framework should be able to work this out as a superalgebra is an algebra under the forgetful functor (i.e., Algebras(QQ)
appears in all_super_categories()
of Algebras(QQ).Super()
). It definitely should not result in the error above. It is also very strange that it is a heisenbug.
A superalgebra is an algebra, but an algebra is also a superalgebra. So there is a tensor product in either category. And they're different! The one in Algebras has forgotten the super-structure from the super-tensorand. How do we decide which to use?
IIRC, Sage takes the safest route by taking the meet category, which in this case should be Algebras(QQ)
since we essentially say an algebra is not a superalgebra (in the same way we do not say a ring is a ZZ-algebra).
The following code
usually works but sometimes fires AttributeError exception. Or sometimes it runs fine, but when you try the tensor product with the algebras swapped it throws the exception. E.g.
produced
Well, at least that was the situation yesterday. Today it seems that PBW.tensor(C) always works and C.tensor(PBW) always doesn't. No... wait a minute. Nope. Now both tensor products work. So it is still nondeterministic. :-(
Tested on Sage-8.2beta6
CC: @nthiery @tscrim @darijgr
Component: categories
Keywords: tensor, algebras
Issue created by migration from https://trac.sagemath.org/ticket/24822