1 Maxima 5.9.3 http://maxima.sourceforge.net
2 Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
3 Distributed under the GNU Public License. See the file COPYING.
4 Dedicated to the memory of William Schelter.
5 This is a development version of Maxima. The function bug_report()
6 provides bug reporting information.
7 (%i1) batch("new_cartan_test4.bat");
9 batching #p/home/furuya/sagyo/new_cartan_test4.bat
10 (%i2) load(cartan_new.lisp)
14 (%i6) coords : read(Input new coordinate)
17 (%i7) dim : extdim : length(coords)
18 (%i8) basis : VR : extsub : extsubb : []
20 (%i9) for i thru dim do basis : endcons(concat(D, coords ), basis)
22 (%i10) for i thru dim do (extsub : cons(basis = - basis , extsub ),
24 extsubb : cons(basis = 0, extsub ), ci : concat(v, i), VR : endcons(ci, VR))
28 (%i12) cliffordtype : read(please input metric type,for example [1,1,1],if E3)
29 please input metric type,for example [1,1,1],if E3
32 (%i13) translist : read(represent the standard coordinates with new one)
33 represent the standard coordinates with new one
34 [(2+cos(a))*cos(b),(2+cos(a))*sin(b),sin(a)];
35 (%o13) [(cos(a) + 2) cos(b), (cos(a) + 2) sin(b), sin(a)]
36 (%i14) norm_table : []
37 (%i15) scale_factor : []
39 (%i17) for i thru dim do (_l : map(lambda([x], diff(x, coords )), translist),
42 _l : map(lambda([x], x ), _l), _p : ratsimp(trigsimp(apply(+, _l))),
45 norm_table : endcons(-------------, norm_table))
49 (%o18) [1, ----------------------]
51 cos (a) + 4 cos(a) + 4
54 (%i19) for i thru dim do extsubb2 : cons(basis = -----------, extsub )
58 (%i20) for i thru dim do (a_ : solve(x_ - -----------, [x_]),
61 scale_factor : cons(rhs(a_ ), scale_factor))
63 (%i21) scale_factor : reverse(scale_factor)
65 (%o22) [1, cos(a) + 2]
66 (%i23) nest2(_f, _x) := block([_a : [_x], i],
67 if listp(_f) then (_f : reverse(_f), for i thru length(_f)
68 do _a : map(_f , _a)) else _a : map(_f, _a), _a )
70 (%i24) nest3(_f, _x, _n) := block([_a, i], _a : [_x],
71 for i thru _n do _a : map(_f, _a), _a)
73 (%i25) aa_ : solve(x_ - apply(*, norm_table), [x_])
74 (%i26) volume : rhs(aa_ )
77 (%i27) volume : ------
79 (%i28) matrix_element_mult : lambda([x, y], x @ y)
80 (%i29) load(hodge_test3.mac)
81 (%i30) load(f_star_test4.mac)
82 (%i31) load(helpfunc.mac)
83 (%i32) load(coeflist.lisp)
84 (%i33) load(format.lisp)
86 (%i35) load(poisson.mac)
87 (%i36) load(frobenius.mac)
88 (%i37) load(curvture2.mac)
89 (%o38) new_cartan_test4.bat
91 /*[x,y,z]=translist,this case parametrized torous by [a,b] */
94 (%o38) [- cos(a) sin(b) Db - 2 sin(b) Db - sin(a) cos(b) Da,
95 cos(a) cos(b) Db + 2 cos(b) Db - sin(a) sin(b) Da, cos(a) Da]
96 (%i39) m:coefmatrix(%,basis);
97 [ - sin(a) cos(b) (- cos(a) - 2) sin(b) ]
99 (%o39) [ - sin(a) sin(b) (cos(a) + 2) cos(b) ]
102 (%i40) trigsimp(m.diag([1,1/(cos(a)+2)]));
103 [ - sin(a) cos(b) - sin(b) ]
105 (%o40) [ - sin(a) sin(b) cos(b) ]
108 (%i41) trigsimp(add_tan(%));
109 [ - sin(a) cos(b) - sin(b) - cos(a) cos(b) ]
111 (%o41) [ - sin(a) sin(b) cos(b) - cos(a) sin(b) ]
113 [ cos(a) 0 - sin(a) ]
114 (%i42) transpose(%).d(%)$
117 /*this is ¦¸ in Flanders P41 but transposed */
120 (%o43) [ - sin(a) Db 0 - cos(a) Db ]
123 (%i44) map("*",scale_factor,basis);
124 /*this is [sigma1,sigma2] in Flanders P41 but transposed */
125 (%o44) [Da, (cos(a) + 2) Db]
129 (%o46) [1, cos(a) + 2]
131 /*Gaussian curvature K is K*sigma1@aigma2=w1@w2
132 now w1=-Da,w2=-cos(a)*Db,and %o44 so K=cos(a)/(2+cos(a))
133 0<=a<2%pi,0<=b<2%pi,integrate K on this torous,
134 cos(a)/(2+cos(a)) *(2+cos(a))*Da@Db is equal cos(a)Da@Db
135 on 0<=a<2%pi,0<=b<2%pi ,apparently this is 0.
136 Theory says integrate K on total surface is 2*%pi*¦Ö
137 ¦Ö is euler character,torous's character is 0 */
140 /* d(¦¸)=-¦¸.¦¸ ,this style is Darling,Flanderse style is transpose
141 transpose(d(omega))=d(transpose(omega))=-(transpose(omega).transpose(omega))
142 obviously AL:transpose(omega)=-omega,d(AL)=AL.AL */
144 (%i47) d(%o43)+%o43.%o43;