Hey Vit,
   Some of these issues are probably related to bad input. Let us start 
with *.algebras_generators(). It is useful to look at the output:

sage: PBW.algebra_generators()
Finite family {-alpha[1]: PBW[-alpha[1]], alpha[1]: PBW[alpha[1]], 
alphacheck[1]: PBW[alphacheck[1]]}

So it is expecting a simple root as input. Similarly, for your tensor 
product:

sage: UC = PBW.tensor(C)
Lazy family (Term map from Image of Cartesian product of Free abelian 
monoid indexed by {alpha[1], alphacheck[1], -alpha[1]}, Subsets of {0, 1} by 
<type 'tuple'> to Universal enveloping algebra of Lie algebra of ['A', 1] in 
the Chevalley basis in the Poincare-Birkhoff-Witt basis # The Clifford 
algebra of the Quadratic form in 2 variables over Rational Field with 
coefficients: 
[ 1 0 ]
[ * 1 ](i))_{i in Image of Cartesian product of Free abelian monoid indexed 
by {alpha[1], alphacheck[1], -alpha[1]}, Subsets of {0, 1} by <type 'tuple'
>}

The tensor product as QQ-modules knows that it is a QQ-algebra, but it 
plays it safe and uses its basis as the generating set, which in turn, is a 
Cartesian product of the bases of its factors. Subsequently, the keys for 
the basis is the Cartesian product of the keys of the factors. So in this 
case, the (1,1) corresponds to the keys for the Clifford algebra basis 
(more of a by-product of the implementation, but the subsets are natural):

sage: C.basis()
Lazy family (Term map from Subsets of {0, 1} to The Clifford algebra of the 
Quadratic form in 2 variables over Rational Field with coefficients: 
[ 1 0 ]
[ * 1 ](i))_{i in Subsets of {0, 1}}

So it is expecting subsets and that the user will not input bad data. There 
is no reason for it to simplify and not a bug. Granted, we could put a 
check on the user input here, but there is a speed penalty as this can be a 
well-used code path internally. Moreover, ducktyping can also be useful. So 
we are fairly permissive here, but not without due cause IMO.

Do not confuse a bug with a not-yet-implemented feature: (noncommutative) 
polynomial rings are not in AlgebrasWithBasis, so it is not expected that 
they work with something like tensor(). However, it would be a good feature 
to add. :)

if you want to access the basis, use the .basis() method.

Also, how is pbw_basis not an intuitive name for obtaining the PBW basis 
(there is also the fully spelled out version too)? If you want to change 
the ordering, RTM of "PBW?" to pass in an ordering function to 
L.pbw_basis().

Now the fact that you sometimes obtaining random attribute errors when 
running that code block is a definite bug. Please submit a trac ticket.

In general, I think it is difficult to determine the tensor product of two 
(non commutative, non PBW) algebras over an arbitrary subalgebra. There is 
some code for doing smash products somewhere on #15874, but it has 
bitrotted and IDK if that will give you what you want. I did write some 
code to compute Verma modules via the PBW basis. I had to work somewhat 
hard to make it work, and it wasn't apparent to me how to extend that to 
more general framework.

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to