Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-08-02 Thread Stephen Kauffman
This should be helpful. I'm afraid strings are usually my quick and dirty solution to problems - don't know enough sage or python yet. Another place where I used string conversion was to sort the mons list for the quotient. Lex then lowest degree (or grade) first. What I did works up to 10 gener

[sage-support] Re: Clifford Algebras, grrrrrr

2014-08-01 Thread Nils Bruin
On Friday, August 1, 2014 11:23:27 AM UTC-7, John H Palmieri wrote: > > Have you looked at http://trac.sagemath.org/ticket/15300? This is at > attempt at adding Clifford algebras to Sage. I don't know if it does what > you want, but you should take a look. > Independent of that, I think it's a g

[sage-support] Re: Clifford Algebras, grrrrrr

2014-08-01 Thread John H Palmieri
On Saturday, July 26, 2014 12:21:38 PM UTC-7, Stephen Kauffman wrote: > > I attempted to create a Clifford Algebra for space-time with the gamma > matrices using the FreeAlgebraQuotient in analogy to the example for > constructing a quarternion algebra from the documentation with the code: > H

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-08-01 Thread Nils Bruin
On Thursday, July 31, 2014 8:09:04 PM UTC-7, Stephen Kauffman wrote: > > # examples > cliff_elt = g3*g2*g1*g0 > [ST.free_algebra()(str(cliff_elt)).coefficient(mon) for mon in > ST.monomial_basis()] # st_elt.coefficients() results in error since > it has no such attribute > ST is constructe

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-08-01 Thread Stephen Kauffman
caught a bug Integer(ii+nn^2) in MonsMats() should be Integer(ii+2**nn) just happens to work out with nn=4 oops On Thu, Jul 31, 2014 at 11:08 PM, Stephen Kauffman wrote: > Thanks for the tips. I got rid of the execs. Made it more general to > include non-othogonal generators and metric. Did som

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-31 Thread Stephen Kauffman
Thanks for the tips. I got rid of the execs. Made it more general to include non-othogonal generators and metric. Did some spot checks and seems to be working. Unfortunately for cliff_elt in the FreeAlgebraQuotient there is no cliff_elt.coefficients() or cliff_elt.coefficient(mon) nor cliff_elt.gen

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-28 Thread Nils Bruin
On Monday, July 28, 2014 7:24:47 PM UTC-7, Stephen Kauffman wrote: > > > exec preparse('ST.<' + gen_str + > '>=FreeAlgebraQuotient(PRGA,mons_mats[0],mons_mats[1])') > Congratulations to get all of this figured out! It's nice to see code of this generality. Please use gen_names=tuple(str(g) for

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-28 Thread Stephen Kauffman
Cleaned that code up a bit and made the var names a litle bit more meaningful, seems to work MyRing = QQ Metric = diagonal_matrix(MyRing,[1,-2,-3,-5]) nn = Metric.nrows() PRGA = FreeAlgebra(MyRing,nn,'g') F = PRGA.monoid() gen_str = str(PRGA.gens()) gen_str = gen_str[1:len(gen_str)-1] exec gen_str

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-28 Thread Stephen Kauffman
If anyone is curious here's my code so far unvetted to create clifford algebra with free algebra quotient: I need to add some comments... nn=4 MyRing=QQ Metric = diagonal_matrix(MyRing,[1,-2,-3,-5]) PRGA=FreeAlgebra(MyRing,nn,'g') F = PRGA.monoid() MyStr=str(PRGA.gens()) MyStr=MyStr[1:len(MyStr)-1

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-28 Thread Stephen Kauffman
The mons list MyList6 was in the original free algebra generators, but I managed to fix it so it's in the monoid F generators and that fixed the first error AttributeError: 'FreeAlgebra_generic_with_ category.element_class' object has no attribute '_element_list' My matrices were transposed but I f

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-28 Thread Stephen Kauffman
I fixed the first error (AttributeError: 'FreeAlgebra_generic_with_ category.element_class' object has no attribute '_element_list') but would still like to figure out the second two errors to further automate the free algebra generation. On Sun, Jul 27, 2014 at 11:40 PM, Stephen Kauffman wrote:

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-27 Thread Nils Bruin
On Sunday, July 27, 2014 8:40:50 PM UTC-7, Stephen Kauffman wrote: > > Thanks for your help but I think I need more. I've written some code for a > somewhat general case of n orthogonal generators and an arbitrary diagonal > metric and I think I've generated the correct 16x16 matrices for my n=4

Re: [sage-support] Re: Clifford Algebras, grrrrrr

2014-07-27 Thread Stephen Kauffman
Thanks for your help but I think I need more. I've written some code for a somewhat general case of n orthogonal generators and an arbitrary diagonal metric and I think I've generated the correct 16x16 matrices for my n=4 case. When I finish running the .sage file and return to sage I execute F =

[sage-support] Re: Clifford Algebras, grrrrrr

2014-07-26 Thread Nils Bruin
On Saturday, July 26, 2014 12:21:38 PM UTC-7, Stephen Kauffman wrote: > > TypeError: unsupported operand parent(s) for '*': 'Vector space of > dimension 16 over Rational Field' and 'Full MatrixSpace of 8 by 8 dense > matrices over Integer > Ring' > > The error that you're getting is because there