1 /* Copyright (C) 2004 Viktor T. Toth <http://www.vttoth.com/>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
16 if get('atensor,'version)=false then load(atensor);
18 ("ATENSOR can simplify noncommutative products in various algebras.")$
20 ("Let us begin with a Clifford algebra")$
21 init_atensor(clifford);
25 ("Here is the symplectic algebra")$
26 init_atensor(symplectic);
28 ("The function af is an antisymmetric scalar-valued function.")$
32 ("A Clifford algebra of positive dimension 3 is defined as")$
33 init_atensor(clifford,3);
35 ("The symbol used for base vectors is stored in asymbol")$
39 ("ATENSOR knows about predefined algebras, such as quaternions")$
40 init_atensor(quaternion);
42 ("Quaternions are defined as a Clifford algebra of 2 negative dimensions")$
45 ("The antisymmetric function af() takes its values from the matrix aform")$
48 ("Quaternionic units are v[1], v[2], and v[1].v[2]")$
51 atensimp((v[1].v[2]).(v[1].v[2]));
53 ("We can even construct the quaternionic multiplication table:")$
56 for i thru adim do q[1,i+1]:q[i+1,1]:v[i];
57 q[1,4]:q[4,1]:v[1].v[2];
58 for i from 2 thru 4 do for j from 2 thru 4 do q[i,j]:atensimp(q[i,1].q[1,j]);
61 ("Scalar variables are treated appropriately")$
62 declare([a,b],scalar);
63 atensimp((a+b*v[1].v[2]).(v[1].v[2]));
65 ("Verify the Jacobi-identity for Lie algebras")$
66 init_atensor(lie_envelop);
67 ("Let's define the Lie-bracket")$
69 atensimp(lbr(u,lbr(v,w)));
70 atensimp(lbr(v,lbr(w,u)));
71 atensimp(lbr(w,lbr(u,v)));
74 /* End of demo -- comment line needed by MAXIMA to resume demo menu */