Real 3 D Lie algebras
J. Patera, P. Winternitz. Subalgebras of real three and four--dimensional Lie algebras. 
Journal of Mathematical Physics, 18, 1449--1455,  1977.

SetDirectory[NotebookDirectory[]];

<<"SymboLie.wl"

CS=Table[0,{k,1,3},{i,1,3},{j,1,3}];
AllCS=Table[CS,{k,1,11}];
AllCS[[2,2,1,2]]=1;AllCS[[2,2,2,1]]=-1;

AllCS[[3,1,2,3]]=1;AllCS[[3,1,3,2]]=-1;

AllCS[[4,1,1,3]]=1;AllCS[[4,1,3,1]]=-1;
AllCS[[4,1,2,3]]=1;AllCS[[4,1,3,2]]=-1;
AllCS[[4,2,2,3]]=1;AllCS[[4,2,3,2]]=-1;

AllCS[[5,1,1,3]]=1;AllCS[[5,1,3,1]]=-1;
AllCS[[5,2,2,3]]=1;AllCS[[5,2,3,2]]=-1;

AllCS[[6,1,1,3]]=1;AllCS[[6,1,3,1]]=-1;
AllCS[[6,2,2,3]]=-1;AllCS[[6,2,3,2]]=1;

AllCS[[7,1,1,3]]=1;AllCS[[7,1,3,1]]=-1;
AllCS[[7,2,2,3]]=a;AllCS[[7,2,3,2]]=-a; (* 0<|a|<1 *)

AllCS[[8,2,1,3]]=-1;AllCS[[8,2,3,1]]=1;
AllCS[[8,1,2,3]]=1;AllCS[[8,1,3,2]]=-1;

AllCS[[9,1,1,3]]=a;AllCS[[9,1,3,1]]=-a;  (* a>0 *)
AllCS[[9,2,1,3]]=-1;AllCS[[9,2,3,1]]=1;
AllCS[[9,1,2,3]]=1;AllCS[[9,1,3,2]]=-1;
AllCS[[9,2,2,3]]=a;AllCS[[9,2,3,2]]=-a;

AllCS[[10,1,1,2]]=1;AllCS[[10,1,2,1]]=-1;
AllCS[[10,3,2,3]]=1;AllCS[[10,3,3,2]]=-1;
AllCS[[10,2,3,1]]=2;AllCS[[10,2,1,3]]=-2;

AllCS[[11,3,1,2]]=1;AllCS[[11,3,2,1]]=-1;
AllCS[[11,2,3,1]]=1;AllCS[[11,2,1,3]]=-1;
AllCS[[11,1,2,3]]=1;AllCS[[11,1,3,2]]=-1;

pars=Table[{{},{}},{k,1,11}];
pars[[7]]={{a},{Element[a,Reals],0<Abs[a]<1}};
pars[[9]]={{a},{a>0}};

PrintDebug=0;

allalg1={};allalg2={};

results={{"Id Algebra","# 1D OS", "# 2D OS"}};

For[cont=1,cont<=11,cont++,
Print["=========================================="];
Print["Algebra n. ",cont];
Print[CommutatorTable[AllCS[[cont]]]//MatrixForm];
alg1=SubAlgebra[AllCS[[cont]],pars[[cont]],1];
AppendTo[allalg1,alg1];
opt1=PrintOptimal[alg1];
Print[opt1];
PrintClasses[alg1];
G=PrintGraph[alg1,1];
Print[G];
alg2=SubAlgebra[AllCS[[cont]],pars[[cont]],2];
AppendTo[allalg2,alg2];
opt2 = PrintOptimal[alg2];
Print[opt2];
PrintClasses[alg2];
G=PrintGraph[alg2,1];
Print[G];
];
Print["=========================================="];

allalg1

allalg2

SessionTime[]