Here's my rewrite of one of the notebooks at http://web.physics.ucsb.edu/~gravitybook/mathematica.html.
rewritten from http://web.physics.ucsb.edu/~gravitybook/math/curvature.pdf
In[5]:= n = 4;
In[6]:= coord = {r, \[Theta], \[Phi], t};
In[8]:= metric = DiagonalMatrix[{(1 - 2 m/r)^-1, r^2, r^2 Sin[\[Theta]]^2,
2 m/r - 1}];
In[10]:= inversemetric = Simplify @ Inverse[metric];
In[12]:= affine = Simplify @
Table[1/2 Sum[
inversemetric[[i,
s]]*(D[metric[[s, j]], coord[[k]]] + D[metric[[s, k]], coord[[j]]] -
D[metric[[j, k]], coord[[s]]]), {s, n}], {i, n}, {j, n}, {k, n}];
In[14]:= riemann = Simplify @
Table[D[affine[[i, j, l]], coord[[k]]] - D[affine[[i, j, k]], coord[[l]]] +
Sum[affine[[s, j, l]] affine[[i, k, s]] -
affine[[s, j, k]] affine[[i, l, s]], {s, n}], {i, n}, {j, n}, {k,
n}, {l, n}];
In[15]:= ricci = Simplify @ Table[Sum[riemann[[i, j, i, l]], {i, n}], {j, n}, {l, n}]
Out[15]= {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
In[16]:= scalar = Simplify[Sum[inversemetric[[i, j]] ricci[[i, j]], {i, n}, {j, n}]]
Out[16]= 0
In[17]:= einstein = ricci - 1/2 scalar*metric
Out[17]= {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
It shows that the Schwarzschild metric satisifes the Einstein equation. I didn't show the components of the 3rd and 4th rank tensors here.