Remove references to the obsolete srrat function
[maxima.git] / share / calculus / cartan.dem
blob788544e3c86338f906dfd7039c0178565febbe71
1 /* 
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License as
4  * published by the Free Software Foundation; either version 2 of
5  * the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be
8  * useful, but WITHOUT ANY WARRANTY; without even the implied
9  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  * PURPOSE.  See the GNU General Public License for more details.
11  *
12  * Cartan algebra of exterior forms
13  */
15 ("The Cartan package implements index-free exterior calculus")$
16 if get('cartan,'version)=false then load(cartan);
17 derivabbrev:true;
18 ("Initialize the package by supplying the list of coordinates")$
19 init_cartan([x,y,z]);
20 ("The basis will be stored in cartan_basis")$
21 cartan_basis;
22 ("Let us define a vector as a list of elements")$
23 vr:[v1,v2,v3];
24 ("This is an example of a 1-form")$
25 f1:x~dy+z~dz;
26 ("This one is a 2-form")$
27 f2:dz~f1;
28 ("Contraction with a vector space is denoted by the | operator")$
29 vr|f1;
30 ("The exterior derivative of a form is computed by ext_diff")$
31 ext_diff(f1);
32 ext_diff(f3(x,y,z)~dx);
33 ("Let use define vr now as a vector field over the coordinates")$
34 depends(v1,[x,y,z],v2,[x,y,z],v3,[x,y,z]);
35 ("The Lie derivative of a form with respect to a scalar")$
36 lie_diff(vr,f2);
37 ("Let us define another vector field")$
38 depends(w1,[x,y,z],w2,[x,y,z],w3,[x,y,z]);
39 wr:[w1,w2,w3];
40 ("And compute its Lie-derivative")$
41 lie_diff(vr,wr);