# [GAP Forum] ComplexificationQuat

mim_ at op.pl mim_ at op.pl
Thu Oct 16 12:29:06 BST 2008

```Hi,

I have found following problem with current ComplexificationQuat function for split-quaternions.
Consider following code:

-----------------------------------------------------
Qs:=QuaternionAlgebra(Rationals, -1, 1); bq:=Basis(Qs);      imag:=bq{[2..4]};
M3Q:=MatrixAlgebra(Qs,3);  bm3q:=Basis(M3Q);

diag:=ListX([bm3q[1],bm3q[5],bm3q[9]], imag, \*);     # 9 diagonal

sym:=[bm3q[2]+bm3q[4] , bm3q[6]+bm3q[8], bm3q[3]+bm3q[7]];
asym:=[bm3q[2]-bm3q[4], bm3q[6]-bm3q[8], bm3q[3]-bm3q[7]];

V1:=Concatenation([asym[1]], List(imag, v->v*sym[1]));      # 9+1..9+4
V2:=Concatenation([asym[2]], List(imag, v->v*sym[2]));
V3:=Concatenation([asym[3]], List(imag, v->-v*sym[3]));

bas:=Concatenation(diag, V1, V2, V3);

cbas:=List(bas, x->ComplexificationQuat(x));
------------------------------------

Now following condition LieBracket(bas[12], bas[16])=bas[18] return true.
But the same condition for complexified matrices LieBracket(cbas[12], cbas[16])=cbas[18] return false !?

If I create complex matrices using my function below
nbas:=List(bas, x->complex_split_quat(x, bq));;

then condition for complexified matrices also returns true: LieBracket(nbas[12], nbas[16])=nbas[18].

In my function I have just replaced each split quaternion with proper 2*2 real matrix. Function ComplexificationQuat use different approach, which for some reason doesn't work well. Will you consider attaching my function to GAP ?

Regards,
Marek

# my version for split quaternions, works better than ComplexificationQuat
# (c) Marek Mitros 2008-10-16
# Note: It works only for matrices with +/- base elements and zeros !
complex_split_quat:=function(m, bas)
local mbas, dims, ix, mtempl, btempl, bl, res;
if Length(bas)=4 then
# split H matrix base 1,i,',i'
mbas:=[[[1,0],[0,1]], [[0,-1],[1,0]], [[1,0],[0,-1]], [[0,1],[1,0]]];
elif Length(bas)=2 then
# split C, matrix base 1,'
mbas:=[[[1,0],[0,1]], [[1,0],[0,-1]]];
fi;
btempl:=Concatenation(bas,[0*bas[1]], -bas);
mtempl:=Concatenation(mbas,[0*mbas[1]], -mbas);
dims:=DimensionsMat(m);  ix:=Cartesian([1..dims[1]], [1..dims[2]]);
# build template
bl:=List(ix, s->[s[1],s[2], mtempl[Position(btempl, m[s[1]][s[2]])]]);
res:=MatrixByBlockMatrix(BlockMatrix(bl, dims[1], dims[2]));
return res;
end;

```