{ "cells" : [ { "cell_origin" : "client", "cell_type" : "input", "source" : "import cdb.gr as gr" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}R^{\\rho}\\,_{\\sigma \\mu \\nu} = \\partial_{\\mu}\\left(\\Gamma^{\\rho}\\,_{\\nu \\sigma}\\right)-\\partial_{\\nu}\\left(\\Gamma^{\\rho}\\,_{\\mu \\sigma}\\right)+\\Gamma^{\\rho}\\,_{\\mu \\lambda} \\Gamma^{\\lambda}\\,_{\\nu \\sigma}-\\Gamma^{\\rho}\\,_{\\nu \\lambda} \\Gamma^{\\lambda}\\,_{\\mu \\sigma}\\end{dmath*}" } ], "source" : "ex = gr.RiemannFromChristoffel($R$, $\\Gamma$);" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}Q^{\\rho}\\,_{\\sigma \\mu \\nu} = \\partial_{\\mu}\\left(\\gamma^{\\rho}\\,_{\\nu \\sigma}\\right)-\\partial_{\\nu}\\left(\\gamma^{\\rho}\\,_{\\mu \\sigma}\\right)+\\gamma^{\\rho}\\,_{\\mu \\lambda} \\gamma^{\\lambda}\\,_{\\nu \\sigma}-\\gamma^{\\rho}\\,_{\\nu \\lambda} \\gamma^{\\lambda}\\,_{\\mu \\sigma}\\end{dmath*}" } ], "source" : "ex = gr.RiemannFromChristoffel($Q$, $\\gamma$);" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}R^{\\mu}\\,_{\\nu \\rho \\sigma} R^{\\nu}\\,_{\\mu \\lambda \\kappa}\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "error", "source" : "{\\color{red}{\\begin{verbatim}Traceback (most recent call last):\n File \"\", line 2, in \nNameError: name 'ChristoffelSymbol' is not defined\n\\end{verbatim}}}" } ], "source" : "ex:=R^{\\mu}_{\\nu\\rho\\sigma} R^{\\nu}_{\\mu\\lambda\\kappa};\n\\Gamma^{\\mu}_{\\nu\\rho}::ChristoffelSymbol;\ngr.RiemannToChristoffel(ex, $\\Gamma^{\\mu}_{\\nu\\rho}$);" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "error", "source" : "{\\color{red}{\\begin{verbatim}Traceback (most recent call last):\n File \"\", line 1, in \nAttributeError: 'module' object has no attribute 'RiemannToChristoffel'\n\\end{verbatim}}}" } ], "source" : "substitute(ex, gr.RiemannToChristoffel);" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}S = \\int{}F_{\\mu \\nu} F^{\\mu \\nu}\\, {\\rm d}x\\end{dmath*}" } ], "source" : "ex:=S=\\int{ F_{\\mu\\nu}F^{\\mu\\nu} }{x};" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property PartialDerivative to~}\\partial{\\#}.\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}S = \\int{}\\left(\\partial_{\\mu}{A_{\\nu}}-\\partial_{\\nu}{A_{\\mu}}\\right) F^{\\mu \\nu}\\, {\\rm d}x\\end{dmath*}" } ], "source" : "\\partial{#}::PartialDerivative;\nsubstitute(ex, $F_{\\mu\\nu} = \\partial_{\\mu}{A_{\\nu}} - \\partial_{\\nu}{A_{\\mu}}$ );" }, { "cell_origin" : "client", "cell_type" : "input", "source" : "\\nabla{#}::Derivative(torsion=$T$);\nR^{\\mu}_{\\nu\\rho\\sigma}::RiemannTensor(derivative=$\\nabla$, christoffel=$\\Gamma$, torsion=$T$);\nR^{\\mu}_{\\nu\\rho\\sigma}::RiemannTensor(derivative=nabla, christoffel=gamma);" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }