Non-commutative symbols
Hi, in chapter 4.15 "Non-commutative objects" the GiNaC documentation says: "Both symbols and user-defined functions can be specified as being non-commutative" I see that functions have the method set_return_type(), but how do I specify a symbol to be non-commutative? Thanks for a hint! Jan
On Mon, 23 Nov 2015 18:35:12 +0100, Jan Rheinländer <jrheinlaender@gmx.de> said:
JR> Hi, in chapter 4.15 "Non-commutative objects" the GiNaC JR> documentation says: JR> "Both symbols and user-defined functions can be specified as JR> being non-commutative" This seems to be a bug of the documentation, functions are the only objects which admit such user-defined specification. Quoting the previous discussion on this: "I couldn't figure out how to create a non-commutative symbol, though, except by defining a new subclass of symbol and overloading return_type()" http://www.ginac.de/pipermail/ginac-list/2011-February/001802.html Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/
Hi Vladimir, thanks for refreshing my memory :-) Is there any interest in a patch for symbols so that the promises of the documentation may be fulfilled? At first sight, it looks like a pretty simple task (basically adapting the existing code from function.cpp). Jan Am 23.11.2015 um 22:11 schrieb Vladimir V. Kisil:
On Mon, 23 Nov 2015 18:35:12 +0100, Jan Rheinländer <jrheinlaender@gmx.de> said: JR> Hi, in chapter 4.15 "Non-commutative objects" the GiNaC JR> documentation says:
JR> "Both symbols and user-defined functions can be specified as JR> being non-commutative"
This seems to be a bug of the documentation, functions are the only objects which admit such user-defined specification. Quoting the previous discussion on this:
"I couldn't figure out how to create a non-commutative symbol, though, except by defining a new subclass of symbol and overloading return_type()"
http://www.ginac.de/pipermail/ginac-list/2011-February/001802.html
Best wishes, Vladimir
On Tue, 24 Nov 2015 17:37:12 +0100, Jan Rheinländer <jrheinlaender@gmx.de> said: JR> Is there any interest in a patch for symbols so that the JR> promises of the documentation may be fulfilled? At first sight, JR> it looks like a pretty simple task (basically adapting the JR> existing code from function.cpp).
Well, Jan, this is above my understanding of GiNaC operations. For some reasons, commutativity/noncommutativity is completely separated from other flags like real/positive (which may be easier for reader to set). I suppose, it should be a reason for such a decision (which I do not know, however). But, if you will write the minimal description of the derived class, say, ncsymbol (non-commutative symbols), then it shall be welcomed as a patch to the tutorial. In fact, from a user point of view, cut&paste this code from the tutorial would be as easy as to learn which function sets noncommutative property of symbols (if it would be such a function). Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/
participants (2)
-
Jan Rheinländer
-
Vladimir V. Kisil