From: Michael Orlitzky Date: Fri, 5 Jul 2019 00:22:46 +0000 (-0400) Subject: eja: fix the basis order for Sn. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=927961ca74f5a8937e1d9c0ba2fe1cdf1a050126;p=sage.d.git eja: fix the basis order for Sn. --- 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