% % REDUCE sample script % for a diagonal vacuum metric ansatz % % http://reduce-algebra.com/ % % exterior calculus package load excalc $ % define our coordinates operator x $ x(0) := t $ x(1) := r $ x(2) := theta $ x(3) := phi $ % define scalar functions % (they are 0-forms and depend on our coordinates) clear g_00, g_11, a, b $ pform {g_00, g_11, a, b} = 0 $ fdomain g_00 = g_00(r, t) $ fdomain g_11 = g_11(r, t) $ fdomain a = a(r, t) $ fdomain b = b(r, t) $ g_00 := exp(2*a) $ g_11 := exp(2*b) $ % define our orthonormal coframe coframe o(t) = sqrt(g_00) * d t , o(r) = sqrt(g_11) * d r , o(theta) = r * d theta , o(phi) = r * sin(theta) * d phi with metric g = -o(t)*o(t) + o(r)*o(r) + o(theta)*o(theta) + o(phi)*o(phi) $ frame e $ % get the Riemannien conenction one-form % (+ = upper index, - = lower index) riemannconx chris1 $ % get curvature two-form pform {riem2(a, b), curv2(a, b)} = 2 $ riem2(a, -b) := d chris1(a, -b) + chris1(a, -c) ^ chris1(c, -b) $ % eta basis (see lecture) pform eta0(a, b, c, d) = 0, eta1(a, b, c) = 1, eta2(a, b) = 2, eta3(a) = 3, eta4 = 4 $ eta4 := # 1 $ eta3(a) := e(a) _| eta4 $ eta2(a, b) := e(b) _| eta3(a) $ eta1(a, b, c) := e(c) _| eta2(a, b) $ eta0(a, b, c, d) := e(d) _| eta1(a, b, c) $ % use eta basis to calculate Einstein three-form pform einstein3(a) = 3 $ einstein3(a) := 1/2 * eta1(a, b, c) ^ riem2(-b, -c) $ % get Ricci scalar clear grscalar $ grscalar := e(-a) _| ( e(-b) _| riem2(a, b) ) $ % calculate torsion two-form (vanishes) pform torsion2(a) = 2 $ torsion2(a) := d o(a) + chris1(a, -b) ^ o(b) $