X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=mjo%2Feja%2Feuclidean_jordan_algebra.py;h=802171fb0c4cc029c43d4fb4b17004d76bb938ed;hb=d08aa61e7c6adc5d6bed4c23797959c483b021bb;hp=52a8a74634dbec03744324634ccefbaa3bd82c06;hpb=043ac868441eb01c3429c5c00a928c09bba4818e;p=sage.d.git diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 52a8a74..802171f 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -641,8 +641,16 @@ def eja_sn(dimension, field=QQ): def mat2vec(m): return vector(field, m.list()) + def vec2mat(v): + return matrix(field, dimension, v.list()) + W = V.span( mat2vec(s) for s in S ) + # Taking the span above reorders our basis (thanks, jerk!) so we + # need to put our "matrix basis" in the same order as the + # (reordered) vector basis. + S = [ vec2mat(b) for b in W.basis() ] + for s in S: # Brute force the multiplication-by-s matrix by looping # through all elements of the basis and doing the computation