# # file: der.gap # purpose: GAP functions related to derivations # created: pasha jan 13 2005 # modified: pasha feb 17,19 2005 # modification: finished LieDerivationAlgebra() # # tests whether given mapping D:R->S is a derivation # (R and S supposed to be algebras); returns true of false TestDerivation := function (D) local R, B, i, j; R := Range(D); B := Basis(R); for i in [1..Dimension(R)] do for j in [1..Dimension(R)] do if Image (D, B[i]*B[j]) <> Image (D, B[i])*B[j] + B[i]*Image (D, B[j]) then return (false); fi; od; od; return (true); end; # get Lie algebra generated as a vector space # by the given list of derivations of (the same) algebra; # returns false if the given list is not a basis of a Lie algebra of derivations # (i.e. either it is not linearly independent or not closed under Lie multiplication) LieDerivationAlgebra := function (listder) local K, V, T, i, j, k, cf, list; # TODO: check that range and source of all derivations is the same K := LeftActingDomain (Range(listder[1])); V := VectorSpace (K, listder, "basis"); T := EmptySCTable (Length(listder), Zero(K)); for i in [1..Length(listder)] do for j in [1..i-1] do cf := Coefficients (Basis(V), listder[i]*listder[j] - listder[j]*listder[i]); list := []; for k in [1..Length(cf)] do if cf[k] <> 0 then Add (list, cf[k]); Add (list, k); fi; od; SetEntrySCTable (T, i, j, list); od; od; return (LieAlgebraByStructureConstants (K, T)); end; # end of der.gap