Перл сродни России - грязь, куча непонятных артефактов и никогда не знаешь, что
получится, пока не попробуешь.
|
Usage: lineq.pl --eq=<file> --alg=<file> [--debug=gap|trans] [--log=<file>] lineq.pl --help|--version Example: lineq.pl --eq=der --alg=W1.gap --log=gap.log --debug=trans --eq=<file> <file> contains equation(s) to be solved; --alg=<file> <file> contains GAP code with definition of an algebra and a module over it; --debug print debug messages: gap - related to interaction with GAP trans - performing perl transformations of algebraic expressions; this option can be repeated; --log=<file> log GAP session to <file>; --help print this help; --version print version.The input file with equation(s) to be solved (option --eq) should contain one entry per line, which are left-hand sides of the equation (left-hand side) = 0 . Comments and blank lines are ignored. The left-hand side should obey the following rules:
F(x*y,z) + F(z*x,y) + F(y*z,x) F(x,y) + F(y,x)
A := SimpleLieAlgebra ("W", [1], GF(5)); M := AdjointModule (A);The file der contains definition of derivations:
D(x*y) + y*D(x) - x*D(y)The output of the script will be:
finished compose linear system, solving it ... dimension: 5 #1: e[1] -> Z(5)*m[4] e[2] -> Z(5)^0*m[5] e[3] -> 0 e[4] -> 0 e[5] -> 0 #2: e[1] -> Z(5)^3*m[3] e[2] -> Z(5)^0*m[4] e[3] -> Z(5)^0*m[5] e[4] -> 0 e[5] -> 0 #3: e[1] -> Z(5)*m[2] e[2] -> Z(5)*m[3] e[3] -> 0 e[4] -> Z(5)^0*m[5] e[5] -> 0 #4: e[1] -> 0 e[2] -> Z(5)^0*m[1] e[3] -> Z(5)^0*m[2] e[4] -> Z(5)^0*m[3] e[5] -> Z(5)^0*m[4] #5: e[1] -> Z(5)^3*m[1] e[2] -> 0 e[3] -> Z(5)*m[3] e[4] -> Z(5)^2*m[4] e[5] -> Z(5)^0*m[5]what says that the derivation algebra is 5-dimensional, with the basis consisting of the 5 specified maps.
L := SimpleLieAlgebra ("A", 1, Rationals); M := HighestWeightModule (L, [1]);and
D(x*y) - 2*y^D(x) + 2*x^D(y)One may wish to modify the location of GAP at the beginning of the script. The whole thing is very messy and certainly full of bugs, but I would like to hear on any problems while using it. YMMV.