What is the name of a tensor product?
I have a tensor like
tensor([a,b,c])
where a, b, c lie in some CombinatorialFreeModule. Where (in Sage syntax) does this tensor lie? (I need to know, because I am writing a function using module_morphism, and it requires me to explicitly specify its codomain.)
Writing
type(tensor([a,b,c]))
doesn't help (it just gives generic trash).
What does `parent(tensor([a,b,c]))` say?
It says, in my case, "The Malvenuto-Reutenauer Hopf algebra over <class 'sage.interfaces.r.r'=""> # The Malvenuto-Reutenauer Hopf algebra over <class 'sage.interfaces.r.r'="">". I wish it would just give me the damned type name...
?! Something's gone horribly wrong. That "R" isn't the R of the reals, it's the R of the statistical package.
It's supposed to be QQ (the rationals)... and I have no idea how the R package could have entered the picture. Here is the part of the code necessary to reproduce the mess: http://mit.edu/~darij/www/wtf.htm / http://mit.edu/~darij/www/wtf.sws
PS. I have taken the tensor of two rather than three elements to simplify the situation.
Okay, I see where R came into it. Your _repr_ refers to R but that's not local, so it pulls out R from the globals, where it's the interface. Try running your code after "del R" to see the problem.
Ah, thanks. But this creates another problem: "def _repr_(self)" doesn't know what R is. How should I fix the definition of MRHopf?
Instead of "R" in _repr_, you can use self.base().
Thanks! At least this part is solved.