Christoffel symbols

Naive code to compute Christoffel symbols of a 2-dimensional manifold using Mathematica(TM). Just write the local chart f(u,v) in which you want to compute them and the (i,j,m)-th symbol \Gamma_{ij}^k will be Christoffel[f[x[1],x[2]]][i,j][m][u,v].

   Gramian[x_] := Table[x[[i]].x[[j]], {i, 1, Length[x]}, {j, 1, Length[x]}]
   Metric[fun_][u_, v_] :=
    Gramian[Evaluate[D[fun, {{u, v}}] //Transpose]] //Simplify
     
    PreChristoffel[fun_][i_, j_][l_] :=
      Sum[
       1/2 Inverse[Metric[fun][x[1], x[2]]][[l]][[k]]
        (D[Metric[fun][x[1], x[2]][[j]][[k]], x[i]] +
          D[Metric[fun][x[1], x[2]][[k]][[i]], x[j]] -
          D[Metric[fun][x[1], x[2]][[i]][[j]], x[k]]), 
        {k, 1, 2}];
   Christoffel[fun_][i_, j_][l_][u_, v_] := PreChristoffel[fun][i, j][l] /. {x[1] -> u, x[2] -> v}