/usr/share/axiom-20170501/src/algebra/LSQM.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | )abbrev domain LSQM LieSquareMatrix
++ Author: J. Grabmeier
++ Date Created: 07 March 1991
++ Date Last Updated: 08 March 1991
++ Description:
++ LieSquareMatrix(n,R) implements the Lie algebra of the n by n
++ matrices over the commutative ring R.
++ The Lie bracket (commutator) of the algebra is given by\br
++ \spad{a*b := (a *$SQMATRIX(n,R) b - b *$SQMATRIX(n,R) a)},\br
++ where \spadfun{*$SQMATRIX(n,R)} is the usual matrix multiplication.
LieSquareMatrix(n,R) : SIG == CODE where
n : PositiveInteger
R : CommutativeRing
Row ==> DirectProduct(n,R)
Col ==> DirectProduct(n,R)
SIG ==> Join(SquareMatrixCategory(n,R,Row,Col), CoercibleTo Matrix R,_
FramedNonAssociativeAlgebra R) --with
CODE ==> AssociatedLieAlgebra (R,SquareMatrix(n, R)) add
Rep := AssociatedLieAlgebra (R,SquareMatrix(n, R))
-- local functions
n2 : PositiveInteger := n*n
convDM : DirectProduct(n2,R) -> %
--++ converts n2-vector to (n,n)-matrix row by row
conv : DirectProduct(n2,R) -> SquareMatrix(n,R)
conv v ==
cond : Matrix(R) := new(n,n,0$R)$Matrix(R)
z : Integer := 0
for i in 1..n repeat
for j in 1..n repeat
z := z+1
setelt(cond,i,j,v.z)
squareMatrix(cond)$SquareMatrix(n, R)
coordinates(a:%,b:Vector(%)):Vector(R) ==
-- only valid for b canonicalBasis
res : Vector R := new(n2,0$R)
z : Integer := 0
for i in 1..n repeat
for j in 1..n repeat
z := z+1
res.z := elt(a,i,j)$%
res
convDM v ==
sq := conv v
coerce(sq)$Rep :: %
basis() ==
n2 : PositiveInteger := n*n
ldp : List DirectProduct(n2,R) :=
[unitVector(i::PositiveInteger)$DirectProduct(n2,R) for i in 1..n2]
res:Vector % := vector map(convDM,_
ldp)$ListFunctions2(DirectProduct(n2,R), %)
someBasis() == basis()
rank() == n*n
|