%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % REDUCE file for a conformally transformed % Friedmann-Lemaitre-Robertson-Walker spacetime % % last edited by Jens Boos, Jul 22, 2014 % % file: conf_friedmann_v1.rei % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 1: define the spacetime dimension % % here: four-dimensional gravity n_dim := 4 $ n_sum := n_dim - 1 $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 2: define the coordinates % % time and spatial spherical coordinates operator x $ x(0) := t $ x(1) := r $ x(2) := theta $ x(3) := phi $ % set r to be positive for all r let abs(r) = r $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 3: define the metric % % help function omega (conformal factor) % depends on all coordinates depend omega, t, r, phi $ % auxiliary functions clear omega_conformal, n_lapse, a_scale, k_curve $ depend omega_conformal, t $ depend {n_lapse, a_scale}, t $ % the components of the covariant metric array g_ll(n_sum, n_sum), g_hh(n_sum, n_sum) $ g_ll(0, 0) := -1*omega_conformal*n_lapse**2 $ g_ll(1, 1) := omega_conformal*a_scale**2/(1-k_curve*r**2) $ g_ll(2, 2) := omega_conformal*a_scale**2*r**2 $ g_ll(3, 3) := omega_conformal*a_scale**2*r**2*sin(theta)**2 $ % get the contravariant metric by means of matrix inversion matrix m_g_ll(n_sum + 1, n_sum + 1), m_g_hh(n_sum + 1, n_sum + 1) $ for i := 0:n_sum do for j := 0:n_sum do m_g_ll(i + 1, j + 1) := g_ll(i, j) $ m_g_hh := 1 / m_g_ll $ for i := 0:n_sum do for j := 0:n_sum do g_hh(i, j) := m_g_hh(i + 1, j + 1) $ detg := det m_g_ll $ sqrtg := sqrt(-detg) $ clear m_g_ll, m_g_hh $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 4: calculate tensors: % % Kronecker delta % Levi-Civita-tensors % % note: Levi-Civita tensors explicitly for 3D % % Kronecker symbol array delta(n_sum, n_sum) $ for i := 0:n_sum do delta(i, i) := 1 $ % Levi-Civita tensors %array epsilon(2, 2, 2) $ %epsilon(0, 1, 2) := epsilon(1, 2, 0) := epsilon(2, 0, 1) := 1 $ %epsilon(1, 0, 2) := epsilon(0, 2, 1) := epsilon(2, 1, 0) := -1 $ %array epsilon_lll(2, 2, 2), epsilon_hhh(2, 2, 2) $ %for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do % << epsilon_lll(i, j, k) := sqrtg * epsilon(i, j, k) $ % epsilon_hhh(i, j, k) := -(1/sqrtg) * epsilon(i, j, k) >> $ %clear epsilon $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 5: calculate Christoffel symbols % % Christoffel symbols array christoffel_lll(n_sum, n_sum, n_sum), christoffel_hll(n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do christoffel_lll(i, j, k) := ( df(g_ll(i, j), x(k)) + df(g_ll(i, k), x(j)) - df(g_ll(j, k), x(i)) ) / 2 $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do christoffel_hll(i, j, k) := for m := 0:n_sum sum g_hh(i, m) * christoffel_lll(m, j, k) $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 6: calculate the Riemann curvature tensor, % the Ricci tensor, the Ricci scalar, % and the Einstein tensor % % Riemann curvature tensor with mixed index position array riemann_hlll(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do riemann_hlll(i, j, k, l) := df(christoffel_hll(i, j, l), x(k)) - df(christoffel_hll(i, j, k), x(l)) + for m := 0:n_sum sum ( christoffel_hll(i, m, k) * christoffel_hll(m, j, l) - christoffel_hll(i, m, l) * christoffel_hll(m, j, k) ) $ % Riemann curvature tensor with low index position array riemann_llll(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do riemann_llll(i, j, k, l) := for m := 0:n_sum sum g_ll(i, m) * riemann_hlll(m, j, k, l); % Riemann tensor with all high index position array riemann_hhhh(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do riemann_hhhh(i, j, k, l) := for a := 0:n_sum sum for b := 0:n_sum sum for c := 0:n_sum sum for d := 0:n_sum sum g_hh(i, a) * g_hh(j, b) * g_hh(k, c) * g_hh(l, d) * riemann_llll(a, b, c, d) $ % Riemann tensor with two high, two low index position % (useful for calculation of polynomial Kretschmann-type invariants, see below) array riemann_hhll(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do riemann_hhll(i, j, k, l) := for a := 0:n_sum sum for b := 0:n_sum sum g_hh(i, a) * g_hh(j, b) * riemann_llll(a, b, k, l) $ % Ricci tensor array ricci_ll(n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do ricci_ll(i, j) := for k := 0:n_sum sum riemann_hlll(k, i, k, j) $ % Ricci tensor with upper indices array ricci_hh(n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do ricci_hh(i, j) := for a := 0:n_sum sum for b := 0:n_sum sum g_hh(i, a) * g_hh(j, b) * ricci_ll(a, b) $ % Ricci scalar ricci := for i := 0:n_sum sum for j := 0:n_sum sum g_hh(i, j) * ricci_ll(i, j) $ % Einstein tensor array einstein_ll(n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do einstein_ll(i, j) := ricci_ll(i, j) - 1/2 * ricci * g_ll(i, j) $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 7: check the vacuum Einstein equation % with cosmological constant % % this tensor has to vanish by % virtue of the Einstein equation % array test_ll(n_sum, n_sum) $ % for i := 0:n_sum do for j:= 0:n_sum do write % test_ll(i, j) := ricci_ll(i, j) + 2/(BTZ_L**2) * g_ll(i, j) $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 8: calculate the tracefree Ricci tensor % and the Weyl tensor % % tracefree Ricci tensor array tracefree_ricci_ll(n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do tracefree_ricci_ll(i, j) := ricci_ll(i, j) - 1/n_dim * ricci * g_ll(i, j) $ % Weyl tensor array weyl_llll(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do weyl_llll(i, j, k, l) := riemann_llll(i, j, k, l) - 1/(n_dim - 2) * ( g_ll(i, k) * tracefree_ricci_ll(j, l) +g_ll(j, l) * tracefree_ricci_ll(i, k) -g_ll(i, l) * tracefree_ricci_ll(j, k) -g_ll(j, k) * tracefree_ricci_ll(i, l) ) - 1/n_dim/(n_dim - 1) * ricci * ( g_ll(i, k) * g_ll(j, l) - g_ll(i, l) * g_ll(j, k) ) $ array weyl_hhhh(n_sum, n_sum, n_sum, n_sum) $ for i := 0:n_sum do for j := 0:n_sum do for k := 0:n_sum do for l := 0:n_sum do weyl_hhhh(i, j, k, l) := for a:=0:n_sum sum for b:=0:n_sum sum for c:=0:n_sum sum for d:=0:n_sum sum g_hh(i, a) * g_hh(j, b) * g_hh(k, c) * g_hh(l, d) * weyl_llll(a, b, c, d) $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % STEP 9: calculate some C**2 related invariant % clear invariant $ invariant := (for a:= 0:n_sum sum for b := 0:n_sum sum ricci_ll(a, b)*ricci_hh(a, b)) - 1/3*ricci**2 $ clear test $ test := ( for a:= 0:n_sum sum for b:= 0:n_sum sum for c:= 0:n_sum sum for d:= 0:n_sum sum ( weyl_llll(a,b,c,d)*weyl_hhhh(a, b, c, d) - riemann_llll(a,b,c,d)*riemann_hhhh(a,b,c,d) ) ) + ( for a:= 0:n_sum sum for b:= 0:n_sum sum 2*ricci_ll(a,b)*ricci_hh(a,b) ) - 1/3*ricci**2 $ end $