Maybe I shoud provide more detailed question. I try to make some calculus in Sage with noncommutative variables. I know how to do it in singular, as You may see in example from http://www.sagenb.org/home/pub/1474/ It works ok, but I have problem with switching into sage environment back. Of course I may copy and paste results, but this is dangerous because of noncommutativity. So I try to use examples from http://groups.google.com/group/sage-support/browse_thread/thread/73ea537d657a3654/ebdc76a97a0b1ea6?lnk=gst&q=noncommutative#ebdc76a97a0b1ea6 And it works. What is not clear to me, is substitutions:
How to use substitution in noncommutative variables when in Sage. I presume that there is some interface to singular and substitutions should work, but maybe I am wrong? Is there anybody who can help me, how to substitute in correct way? Here is Sage code I try to use: singular.LIB('ncall.lib') R=singular.ring(0,'(x,y,z,a,b)','dp') This are commutativity relations defined by formula: xi*xj=c[i,j] *xj*xi + d[i,j]. Note that for generators a,b we have pure commutative relations since C = 1 for this elements Also below we have definition for D matrix, and for a,b generators there are D=0 elements, so a,b commute with every other generators. C=singular.matrix (5,5,'1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1');C D=singular.matrix(5,5,'0,0,-y, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0');D S=C.nc_algebra(D) S;#Note that below we have noncommutative relations!!! /// // characteristic : 0 // number of vars : 5 // block 1 : ordering dp // : names x y z a b // block 2 : ordering C // noncommutative relations: ... S.set_ring() x=singular('x');x y=singular('y');y;z=singular('z');z;a=singular('a');a;b=singular ('b');b x*y z*x#<- here You see non-zero element from D matrix. <p><strong>And there are the troubles!!!!</strong></p> <p><strong>From manual we know that substitute returns the same value if substitute cannot be performed. So is this this case? Or maybe I should use direct singular function for substitution? How?</strong></ p> <p>Examples of substitutions:</p> f = a*x+ b*y+ 2*z + a*b*x + b*x*a*y;f f.substitute(x=1);f.substitute(x=y);f.substitute(x=a); gives: x*y*a*b+x*a*b+x*a+y*b+2*z x*y*a*b+x*a*b+x*a+y*b+2*z x*y*a*b+x*a*b+x*a+y*b+2*z Which is the same! Here You may find published worksheet with condes ( and comments) as above:http://www.sagenb.org/home/pub/1486/ Best Regards! Kazek Kurz -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org