Algebra of Lie symmetries of KdV equation

SetDirectory[NotebookDirectory[]];

<<"SymboLie.wl"

gens={{1,0,0},{0,1,0},{0,t,1},{3 t,x,-2u}};vars={t,x,u};pars={{},{}};

cs=StructureConstants[gens,vars];

CommutatorTable[cs]//MatrixForm

alg1=SubAlgebra[cs,pars,1];

alg2=SubAlgebra[cs,pars,2];

alg3=SubAlgebra[cs,pars,3];

PrintOptimal[alg1]

PrintGraph[alg1,1]

PrintOptimal[alg2]

PrintGraph[alg2,1]

PrintOptimal[alg3]

PrintGraph[alg3,1]

alg = {alg1,alg2,alg3}

SessionTime[]