%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% REDUCE file deriving the Friedmann
% equations within Cartan calculus
%
% last edited by Jens Boos, Jul 1, 2014
%
% conventions: see lecture notes C. Kiefer
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 1: load the package for exterior calculus
%
load_package excalc $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 2: define the frame
%
% constants: k ............. spatial curvature
%
% we are in (3 + 1) dimensions
spacedim 4 $
indexrange 0, 1, 2, 3 $
% coordinates
operator x $
x(0) := t $
x(1) := r $
x(2) := theta $
x(3) := phi $
% r is always a positive number
for all r let abs(r) = r $
% the scale factor a depends on time only
% since a is often used as an index, to avoid confusion
% we choose "scale0" as the name - the 0 at the end
% denotes that it is a 0-form, i.e. a scalar function
pform scale0 = 0 $
fdomain scale0 = scale0(t) $
% omega is the help function and denepds on r only
% again, the 0 at the end denotes that it is a 0-form
pform omega0 = 0 $
fdomain omega0 = omega0(r) $
omega0 := sqrt(1 - k*r**2) $
% set up the coframe
coframe o(t) = d t ,
o(r) = scale0/sqrt(1-k*r**2) * d r ,
o(theta) = scale0 * r * d theta ,
o(phi) = scale0 * r * sin(theta) * d phi
with metric g = -o(t)*o(t) + o(r)*o(r) + o(theta)*o(theta) + o(phi)*o(phi) $
% denote the frame by e
frame e $
% show the frame as a test
displayframe $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 3: define the connection
%
pform conx_1(a, b) = 1 $
riemannconx conx_1 $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 4: define the eta-basis
% (helpful for later on)
%
pform eta_0(a, b, c, d) = 0 ,
eta_1(a, b, c) = 1 ,
eta_2(a, b) = 2 ,
eta_3(a) = 3 ,
eta_4 = 4 $
eta_4 := # 1 $
eta_3(a) := e(a) _| eta_4 $
eta_2(a, b) := e(b) _| eta_3(a) $
eta_1(a, b, c) := e(c) _| eta_2(a, b) $
eta_0(a, b, c, d) := e(d) _| eta_1(a, b, c)$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 5: calculate the curvature
%
% curvature is an antisymmetric 2-form
pform curv_2(a, b) = 2 $
antisymmetric curv_2 $
% calculate and display the components
write curv_2(a, -b) := d conx_1(a, -b)
+ conx_1(a, -c) ^ conx_1(c, -b) $
% translate it to tensore components
pform riem_0(a, b, c, d) = 0 $
riem_0(a, b, c, d) := e(d) _| (e(c) _| curv_2(a, b)) $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 6: calculate the torsion
% (torsion vanishes for Riemannian spacetime)
%
% torsion is a two-form
pform torsion_2(a) = 2 $
% calculate and display the components
write torsion_2(a) := d o(a)
+ conx_1(a, -b) ^ o(b) $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STEP 7: calculate the Einstein 3-form
%
% Einstein 3-form
pform einstein_3(a) = 3 $
einstein_3(-a) := 1/2 * eta_1(-a, -b, -c)
^ curv_2(b, c) $
% Einstein tensor components
pform einstein_0(a, b) = 0 $
write einstein_0(a, b) := e(b) _| # einstein_3(a);
end $