{ "cells" : [ { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "\\section*{The Kaluza-Klein example from section 2.5 of hep-th/0701238}\n\nThis example shows how to use \\algo{split_index} in a somewhat more complicated setting. \nWe first declare the indices that we will use." } ], "hidden" : true, "source" : "\\section*{The Kaluza-Klein example from section 2.5 of hep-th/0701238}\n\nThis example shows how to use \\algo{split_index} in a somewhat more complicated setting. \nWe first declare the indices that we will use." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=independent) to~}\\left[\\mu,~\\discretionary{}{}{} \\nu,~\\discretionary{}{}{} \\rho,~\\discretionary{}{}{} \\sigma,~\\discretionary{}{}{} \\kappa,~\\discretionary{}{}{} \\lambda,~\\discretionary{}{}{} \\eta,~\\discretionary{}{}{} \\chi\\#\\right].\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=independent) to~}\\left[m,~\\discretionary{}{}{} n,~\\discretionary{}{}{} p,~\\discretionary{}{}{} q,~\\discretionary{}{}{} r,~\\discretionary{}{}{} s,~\\discretionary{}{}{} t,~\\discretionary{}{}{} u,~\\discretionary{}{}{} v,~\\discretionary{}{}{} w,~\\discretionary{}{}{} x,~\\discretionary{}{}{} y,~\\discretionary{}{}{} z,~\\discretionary{}{}{} m\\#\\right].\\end{dmath*}" } ], "source" : "{\\mu,\\nu,\\rho,\\sigma,\\kappa,\\lambda,\\eta,\\chi#}::Indices(full, position=independent);\n{m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Indices(subspace, position=independent, parent=full);" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "Note the appearance of \\verb|parent=full|. This indicates that the indices in the second set\nspan a subspace of the indices in the first set. Also note that we have declared the indices\nas \\verb|position=independent|, to prevent Cadabra from automatically raising or lowering them \nwhen canonicalising (as this does not really help us here).\n\nThe remaining declarations are standard," } ], "hidden" : true, "source" : "Note the appearance of \\verb|parent=full|. This indicates that the indices in the second set\nspan a subspace of the indices in the first set. Also note that we have declared the indices\nas \\verb|position=independent|, to prevent Cadabra from automatically raising or lowering them \nwhen canonicalising (as this does not really help us here).\n\nThe remaining declarations are standard," }, { "cell_origin" : "client", "cell_type" : "input", "source" : "\\partial{#}::PartialDerivative.\ng_{\\mu\\nu}::Metric.\ng^{\\mu\\nu}::InverseMetric.\ng_{\\mu? \\nu?}::Symmetric.\ng^{\\mu? \\nu?}::Symmetric.\nh_{m n}::Metric.\nh^{m n}::InverseMetric.\n\\delta^{\\mu?}_{\\nu?}::KroneckerDelta.\n\\delta_{\\mu?}^{\\nu?}::KroneckerDelta.\nF_{m n}::AntiSymmetric." }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "We will want to expand the Riemann tensor in terms of the metric. The following two substitution\nrules do the conversion from Riemann tensor to Christoffel symbol and from Christoffel symbol\nto metric (a library with common substitution rules like these is in preparation)." } ], "hidden" : true, "source" : "We will want to expand the Riemann tensor in terms of the metric. The following two substitution\nrules do the conversion from Riemann tensor to Christoffel symbol and from Christoffel symbol\nto metric (a library with common substitution rules like these is in preparation)." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}R^{\\lambda?}\\,_{\\mu? \\nu? \\kappa?} \\rightarrow -\\partial_{\\kappa?}{\\Gamma^{\\lambda?}\\,_{\\mu? \\nu?}}+\\partial_{\\nu?}{\\Gamma^{\\lambda?}\\,_{\\mu? \\kappa?}}-\\Gamma^{\\eta}\\,_{\\mu? \\nu?} \\Gamma^{\\lambda?}\\,_{\\kappa? \\eta}+\\Gamma^{\\eta}\\,_{\\mu? \\kappa?} \\Gamma^{\\lambda?}\\,_{\\nu? \\eta}\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\Gamma^{\\lambda?}\\,_{\\mu? \\nu?} \\rightarrow \\frac{1}{2}g^{\\lambda? \\kappa} \\left(\\partial_{\\nu?}{g_{\\kappa \\mu?}}+\\partial_{\\mu?}{g_{\\kappa \\nu?}}-\\partial_{\\kappa}{g_{\\mu? \\nu?}}\\right)\\end{dmath*}" } ], "source" : "RtoG:= R^{\\lambda?}_{\\mu?\\nu?\\kappa?} -> \n - \\partial_{\\kappa?}{ \\Gamma^{\\lambda?}_{\\mu?\\nu?} }\n + \\partial_{\\nu?}{ \\Gamma^{\\lambda?}_{\\mu?\\kappa?} }\n - \\Gamma^{\\eta}_{\\mu?\\nu?} \\Gamma^{\\lambda?}_{\\kappa?\\eta}\n + \\Gamma^{\\eta}_{\\mu?\\kappa?} \\Gamma^{\\lambda?}_{\\nu?\\eta};\n\nGtog:= \\Gamma^{\\lambda?}_{\\mu?\\nu?} ->\n (1/2) * g^{\\lambda?\\kappa} ( \n \\partial_{\\nu?}{ g_{\\kappa\\mu?} } + \\partial_{\\mu?}{ g_{\\kappa\\nu?} } - \\partial_{\\kappa}{ g_{\\mu?\\nu?} } );" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "In this example we want to compute the Kaluza-Klein reduction of the $R_{m 4 n 4}$ component of the\nRiemann tensor. So we enter this component and do the substitution that takes the Riemann tensor\nto metrics. After each substitution, we distribute\nproducts over sums. We also apply the product rule to distribute derivatives over factors in a\nproduct." } ], "hidden" : true, "source" : "In this example we want to compute the Kaluza-Klein reduction of the $R_{m 4 n 4}$ component of the\nRiemann tensor. So we enter this component and do the substitution that takes the Riemann tensor\nto metrics. After each substitution, we distribute\nproducts over sums. We also apply the product rule to distribute derivatives over factors in a\nproduct." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}g_{m1 m} R^{m1}\\,_{4 n 4}+g_{4 m} R^{4}\\,_{4 n 4}\\end{dmath*}" } ], "source" : "todo:= g_{m1 m} R^{m1}_{4 n 4} + g_{4 m} R^{4}_{4 n 4};" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{} - \\frac{1}{2}\\partial_{n}{g_{\\kappa 4}} \\partial_{4}{g^{m1 \\kappa}} g_{m1 m} - \\frac{1}{2}\\partial_{4 n}{g_{\\kappa 4}} g_{m1 m} g^{m1 \\kappa} - \\frac{1}{2}\\partial_{4}{g^{m1 \\kappa}} \\partial_{4}{g_{\\kappa n}} g_{m1 m} - \\frac{1}{2}\\partial_{4 4}{g_{\\kappa n}} g_{m1 m} g^{m1 \\kappa}+\\frac{1}{2}\\partial_{\\kappa}{g_{4 n}} \\partial_{4}{g^{m1 \\kappa}} g_{m1 m}+\\frac{1}{2}\\partial_{4 \\kappa}{g_{4 n}} g_{m1 m} g^{m1 \\kappa}+\\partial_{n}{g^{m1 \\kappa}} \\partial_{4}{g_{\\kappa 4}} g_{m1 m}+\\partial_{n 4}{g_{\\kappa 4}} g_{m1 m} g^{m1 \\kappa} - \\frac{1}{2}\\partial_{\\kappa}{g_{4 4}} \\partial_{n}{g^{m1 \\kappa}} g_{m1 m} - \\frac{1}{2}\\partial_{n \\kappa}{g_{4 4}} g_{m1 m} g^{m1 \\kappa} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{n}{g_{\\kappa 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{n}{g_{\\kappa 4}} \\partial_{4}{g_{\\mu \\eta}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{n}{g_{\\kappa 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{4}{g_{\\kappa n}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{4}{g_{\\mu \\eta}} \\partial_{4}{g_{\\kappa n}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{4}{g_{\\kappa n}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{\\kappa}{g_{4 n}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{4}\\partial_{\\kappa}{g_{4 n}} \\partial_{4}{g_{\\mu \\eta}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{\\kappa}{g_{4 n}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}%\n+\\frac{1}{2}\\partial_{\\eta}{g_{\\mu n}} \\partial_{4}{g_{\\kappa 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{2}\\partial_{n}{g_{\\mu \\eta}} \\partial_{4}{g_{\\kappa 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{2}\\partial_{\\mu}{g_{n \\eta}} \\partial_{4}{g_{\\kappa 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu n}} \\partial_{\\kappa}{g_{4 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{4}\\partial_{\\kappa}{g_{4 4}} \\partial_{n}{g_{\\mu \\eta}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{n \\eta}} \\partial_{\\kappa}{g_{4 4}} g_{m1 m} g^{\\eta \\kappa} g^{m1 \\mu} - \\frac{1}{2}\\partial_{n}{g_{\\kappa 4}} \\partial_{4}{g^{4 \\kappa}} g_{4 m} - \\frac{1}{2}\\partial_{4 n}{g_{\\kappa 4}} g_{4 m} g^{4 \\kappa} - \\frac{1}{2}\\partial_{4}{g^{4 \\kappa}} \\partial_{4}{g_{\\kappa n}} g_{4 m} - \\frac{1}{2}\\partial_{4 4}{g_{\\kappa n}} g_{4 m} g^{4 \\kappa}+\\frac{1}{2}\\partial_{\\kappa}{g_{4 n}} \\partial_{4}{g^{4 \\kappa}} g_{4 m}+\\frac{1}{2}\\partial_{4 \\kappa}{g_{4 n}} g_{4 m} g^{4 \\kappa}+\\partial_{n}{g^{4 \\kappa}} \\partial_{4}{g_{\\kappa 4}} g_{4 m}+\\partial_{n 4}{g_{\\kappa 4}} g_{4 m} g^{4 \\kappa} - \\frac{1}{2}\\partial_{\\kappa}{g_{4 4}} \\partial_{n}{g^{4 \\kappa}} g_{4 m} - \\frac{1}{2}\\partial_{n \\kappa}{g_{4 4}} g_{4 m} g^{4 \\kappa} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{n}{g_{\\kappa 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{4}\\partial_{n}{g_{\\kappa 4}} \\partial_{4}{g_{\\mu \\eta}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{n}{g_{\\kappa 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{4}{g_{\\kappa n}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}%\n - \\frac{1}{4}\\partial_{4}{g_{\\mu \\eta}} \\partial_{4}{g_{\\kappa n}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{4}{g_{\\kappa n}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{4}\\partial_{\\eta}{g_{\\mu 4}} \\partial_{\\kappa}{g_{4 n}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{4}\\partial_{\\kappa}{g_{4 n}} \\partial_{4}{g_{\\mu \\eta}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{4}\\partial_{\\mu}{g_{4 \\eta}} \\partial_{\\kappa}{g_{4 n}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{2}\\partial_{\\eta}{g_{\\mu n}} \\partial_{4}{g_{\\kappa 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{2}\\partial_{n}{g_{\\mu \\eta}} \\partial_{4}{g_{\\kappa 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{2}\\partial_{\\mu}{g_{n \\eta}} \\partial_{4}{g_{\\kappa 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{4}\\partial_{\\eta}{g_{\\mu n}} \\partial_{\\kappa}{g_{4 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu} - \\frac{1}{4}\\partial_{\\kappa}{g_{4 4}} \\partial_{n}{g_{\\mu \\eta}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}+\\frac{1}{4}\\partial_{\\mu}{g_{n \\eta}} \\partial_{\\kappa}{g_{4 4}} g_{4 m} g^{\\eta \\kappa} g^{4 \\mu}\\end{dmath*}" } ], "source" : "substitute(_, RtoG)\nsubstitute(_, Gtog)\ndistribute(_)\nproduct_rule(_)\ndistribute(_)\nsort_product(_);" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "We then split the greek indices into roman indices and the 4-th direction. Notice the use\nof \\verb|repeat=True| which will keep doing this substitution until all greek indices\nhave been split. After that we again have to set all derivatives in the 4-th direction to zero." } ], "hidden" : true, "source" : "We then split the greek indices into roman indices and the 4-th direction. Notice the use\nof \\verb|repeat=True| which will keep doing this substitution until all greek indices\nhave been split. After that we again have to set all derivatives in the 4-th direction to zero." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{} - \\frac{1}{2}\\partial_{m1}{g_{4 4}} \\partial_{n}{g^{m1 p}} g_{m p} - \\frac{1}{2}\\partial_{n m1}{g_{4 4}} g_{m p} g^{m1 p} - \\frac{1}{4}\\partial_{n}{g_{4 m1}} \\partial_{p}{g_{4 q}} g_{m r} g^{m1 p} g^{q r} - \\frac{1}{2}\\partial_{m1}{g_{4 4}} \\partial_{n}{g_{4 p}} g_{m q} g^{m1 p} g^{4 q} - \\frac{1}{4}\\partial_{m1}{g_{4 p}} \\partial_{n}{g_{4 4}} g_{m q} g^{4 m1} g^{p q} - \\frac{1}{2}\\partial_{n}{g_{4 4}} \\partial_{m1}{g_{4 4}} g_{m p} g^{4 m1} g^{4 p}+\\frac{1}{4}\\partial_{m1}{g_{4 p}} \\partial_{n}{g_{4 q}} g_{m r} g^{m1 r} g^{p q}+\\frac{1}{4}\\partial_{m1}{g_{4 p}} \\partial_{n}{g_{4 4}} g_{m q} g^{4 p} g^{m1 q}+\\frac{1}{4}\\partial_{m1}{g_{4 4}} \\partial_{n}{g_{4 p}} g_{m q} g^{4 p} g^{m1 q}+\\frac{1}{4}\\partial_{n}{g_{4 4}} \\partial_{m1}{g_{4 4}} g_{m p} g^{4 4} g^{m1 p}+\\frac{1}{4}\\partial_{m1}{g_{4 p}} \\partial_{q}{g_{n 4}} g_{m r} g^{m1 q} g^{p r}+\\frac{1}{4}\\partial_{m1}{g_{4 4}} \\partial_{p}{g_{n 4}} g_{m q} g^{m1 p} g^{4 q} - \\frac{1}{4}\\partial_{m1}{g_{n 4}} \\partial_{p}{g_{4 q}} g_{m r} g^{m1 q} g^{p r} - \\frac{1}{4}\\partial_{m1}{g_{4 4}} \\partial_{p}{g_{n 4}} g_{m q} g^{4 p} g^{m1 q} - \\frac{1}{4}\\partial_{m1}{g_{n p}} \\partial_{q}{g_{4 4}} g_{m r} g^{m1 q} g^{p r} - \\frac{1}{4}\\partial_{m1}{g_{n 4}} \\partial_{p}{g_{4 4}} g_{m q} g^{m1 p} g^{4 q} - \\frac{1}{4}\\partial_{m1}{g_{4 4}} \\partial_{n}{g_{p q}} g_{m r} g^{m1 p} g^{q r} - \\frac{1}{4}\\partial_{m1}{g_{4 4}} \\partial_{n}{g_{4 p}} g_{m q} g^{4 m1} g^{p q}+\\frac{1}{4}\\partial_{m1}{g_{n p}} \\partial_{q}{g_{4 4}} g_{m r} g^{m1 r} g^{p q}%\n+\\frac{1}{4}\\partial_{m1}{g_{n 4}} \\partial_{p}{g_{4 4}} g_{m q} g^{4 p} g^{m1 q} - \\frac{1}{2}\\partial_{p}{g_{4 4}} \\partial_{n}{g^{4 p}} g_{m 4} - \\frac{1}{2}\\partial_{n p}{g_{4 4}} g_{m 4} g^{4 p} - \\frac{1}{4}\\partial_{n}{g_{4 p}} \\partial_{q}{g_{4 r}} g_{m 4} g^{p q} g^{4 r} - \\frac{1}{2}\\partial_{p}{g_{4 4}} \\partial_{n}{g_{4 q}} g_{m 4} g^{p q} g^{4 4} - \\frac{1}{4}\\partial_{p}{g_{4 q}} \\partial_{n}{g_{4 4}} g_{m 4} g^{4 p} g^{4 q} - \\frac{1}{2}\\partial_{n}{g_{4 4}} \\partial_{p}{g_{4 4}} g_{m 4} g^{4 p} g^{4 4}+\\frac{1}{4}\\partial_{p}{g_{4 q}} \\partial_{n}{g_{4 r}} g_{m 4} g^{q r} g^{4 p}+\\frac{1}{4}\\partial_{p}{g_{4 q}} \\partial_{n}{g_{4 4}} g_{m 4} g^{4 q} g^{4 p}+\\frac{1}{4}\\partial_{n}{g_{4 4}} \\partial_{p}{g_{4 4}} g_{m 4} g^{4 4} g^{4 p}+\\frac{1}{4}\\partial_{p}{g_{4 q}} \\partial_{r}{g_{n 4}} g_{m 4} g^{p r} g^{4 q}+\\frac{1}{4}\\partial_{p}{g_{4 4}} \\partial_{q}{g_{n 4}} g_{m 4} g^{p q} g^{4 4} - \\frac{1}{4}\\partial_{p}{g_{n 4}} \\partial_{q}{g_{4 r}} g_{m 4} g^{p r} g^{4 q} - \\frac{1}{4}\\partial_{p}{g_{4 4}} \\partial_{q}{g_{n 4}} g_{m 4} g^{4 p} g^{4 q} - \\frac{1}{4}\\partial_{p}{g_{n q}} \\partial_{r}{g_{4 4}} g_{m 4} g^{p r} g^{4 q} - \\frac{1}{4}\\partial_{p}{g_{n 4}} \\partial_{q}{g_{4 4}} g_{m 4} g^{p q} g^{4 4} - \\frac{1}{4}\\partial_{p}{g_{4 4}} \\partial_{n}{g_{q r}} g_{m 4} g^{p q} g^{4 r}+\\frac{1}{4}\\partial_{p}{g_{n q}} \\partial_{r}{g_{4 4}} g_{m 4} g^{q r} g^{4 p}+\\frac{1}{4}\\partial_{p}{g_{n 4}} \\partial_{q}{g_{4 4}} g_{m 4} g^{4 p} g^{4 q}\\end{dmath*}" } ], "source" : "split_index(_, $\\mu, m1, 4$, repeat=True)\nsubstitute(_, $\\partial_{4}{A??} -> 0$, repeat=True)\nsubstitute(_, $\\partial_{4 m?}{A??} -> 0$, repeat=True)\nsubstitute(_, $\\partial_{m? 4}{A??} -> 0$, repeat=True)\ncanonicalise(_);" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "Now comes the ansatz of the metric in terms of the Kaluza-Klein gauge field $A_\\mu$ and the scalar $\\phi$. \nWe substitute this with the lines below. The output is not particularly enlightening..." } ], "hidden" : true, "source" : "Now comes the ansatz of the metric in terms of the Kaluza-Klein gauge field $A_\\mu$ and the scalar $\\phi$. \nWe substitute this with the lines below. The output is not particularly enlightening..." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{} - \\frac{1}{2}\\partial_{m1}{\\phi} \\partial_{n}\\left(\\phi h^{m1 p}\\right) \\left({\\phi}^{-1} h_{m p}+\\phi A_{m} A_{p}\\right) - \\frac{1}{2}\\partial_{n m1}{\\phi} \\left({\\phi}^{-1} h_{m p}+\\phi A_{m} A_{p}\\right) \\phi h^{m1 p} - \\frac{1}{4}\\partial_{n}\\left(\\phi A_{m1}\\right) \\partial_{p}\\left(\\phi A_{q}\\right) \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 p} \\phi h^{q r}+\\frac{1}{2}\\partial_{m1}{\\phi} \\partial_{n}\\left(\\phi A_{p}\\right) \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{m1 p} \\phi h^{q r} A_{r}+\\frac{1}{4}\\partial_{m1}\\left(\\phi A_{p}\\right) \\partial_{n}{\\phi} \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{m1 r} A_{r} \\phi h^{p q} - \\frac{1}{2}\\partial_{n}{\\phi} \\partial_{m1}{\\phi} \\left({\\phi}^{-1} h_{m p}+\\phi A_{m} A_{p}\\right) \\phi h^{m1 q} A_{q} \\phi h^{p r} A_{r}+\\frac{1}{4}\\partial_{m1}\\left(\\phi A_{p}\\right) \\partial_{n}\\left(\\phi A_{q}\\right) \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 r} \\phi h^{p q} - \\frac{1}{4}\\partial_{m1}\\left(\\phi A_{p}\\right) \\partial_{n}{\\phi} \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{p r} A_{r} \\phi h^{m1 q} - \\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{n}\\left(\\phi A_{p}\\right) \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{p r} A_{r} \\phi h^{m1 q}+\\frac{1}{4}\\partial_{n}{\\phi} \\partial_{m1}{\\phi} \\left({\\phi}^{-1} h_{m p}+\\phi A_{m} A_{p}\\right) \\left({\\phi}^{-1}+\\phi A_{q} h^{q r} A_{r}\\right) \\phi h^{m1 p}+\\frac{1}{4}\\partial_{m1}\\left(\\phi A_{p}\\right) \\partial_{q}\\left(\\phi A_{n}\\right) \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 q} \\phi h^{p r} - \\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{p}\\left(\\phi A_{n}\\right) \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{m1 p} \\phi h^{q r} A_{r} - \\frac{1}{4}\\partial_{m1}\\left(\\phi A_{n}\\right) \\partial_{p}\\left(\\phi A_{q}\\right) \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 q} \\phi h^{p r}+\\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{p}\\left(\\phi A_{n}\\right) \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{p r} A_{r} \\phi h^{m1 q} - \\frac{1}{4}\\partial_{m1}\\left({\\phi}^{-1} h_{n p}+\\phi A_{n} A_{p}\\right) \\partial_{q}{\\phi} \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 q} \\phi h^{p r}+\\frac{1}{4}\\partial_{m1}\\left(\\phi A_{n}\\right) \\partial_{p}{\\phi} \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{m1 p} \\phi h^{q r} A_{r} - \\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{n}\\left({\\phi}^{-1} h_{p q}+\\phi A_{p} A_{q}\\right) \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 p} \\phi h^{q r}+\\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{n}\\left(\\phi A_{p}\\right) \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{m1 r} A_{r} \\phi h^{p q}+\\frac{1}{4}\\partial_{m1}\\left({\\phi}^{-1} h_{n p}+\\phi A_{n} A_{p}\\right) \\partial_{q}{\\phi} \\left({\\phi}^{-1} h_{m r}+\\phi A_{m} A_{r}\\right) \\phi h^{m1 r} \\phi h^{p q}%\n - \\frac{1}{4}\\partial_{m1}\\left(\\phi A_{n}\\right) \\partial_{p}{\\phi} \\left({\\phi}^{-1} h_{m q}+\\phi A_{m} A_{q}\\right) \\phi h^{p r} A_{r} \\phi h^{m1 q}+\\frac{1}{2}\\partial_{p}{\\phi} \\partial_{n}\\left(\\phi h^{p q} A_{q}\\right) \\phi A_{m}+\\frac{1}{2}\\partial_{n p}{\\phi} \\phi A_{m} \\phi h^{p q} A_{q}+\\frac{1}{4}\\partial_{n}\\left(\\phi A_{p}\\right) \\partial_{q}\\left(\\phi A_{r}\\right) \\phi A_{m} \\phi h^{p q} \\phi h^{r s} A_{s} - \\frac{1}{2}\\partial_{p}{\\phi} \\partial_{n}\\left(\\phi A_{q}\\right) \\phi A_{m} \\phi h^{p q} \\left({\\phi}^{-1}+\\phi A_{r} h^{r s} A_{s}\\right) - \\frac{1}{4}\\partial_{p}\\left(\\phi A_{q}\\right) \\partial_{n}{\\phi} \\phi A_{m} \\phi h^{p r} A_{r} \\phi h^{q s} A_{s}+\\frac{1}{2}\\partial_{n}{\\phi} \\partial_{p}{\\phi} \\phi A_{m} \\phi h^{p s} A_{s} \\left({\\phi}^{-1}+\\phi A_{q} h^{q r} A_{r}\\right) - \\frac{1}{4}\\partial_{p}\\left(\\phi A_{q}\\right) \\partial_{n}\\left(\\phi A_{r}\\right) \\phi A_{m} \\phi h^{q r} \\phi h^{p s} A_{s}+\\frac{1}{4}\\partial_{p}\\left(\\phi A_{q}\\right) \\partial_{n}{\\phi} \\phi A_{m} \\phi h^{q r} A_{r} \\phi h^{p s} A_{s} - \\frac{1}{4}\\partial_{n}{\\phi} \\partial_{p}{\\phi} \\phi A_{m} \\left({\\phi}^{-1}+\\phi A_{q} h^{q r} A_{r}\\right) \\phi h^{p s} A_{s} - \\frac{1}{4}\\partial_{p}\\left(\\phi A_{q}\\right) \\partial_{r}\\left(\\phi A_{n}\\right) \\phi A_{m} \\phi h^{p r} \\phi h^{q s} A_{s}+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{q}\\left(\\phi A_{n}\\right) \\phi A_{m} \\phi h^{p q} \\left({\\phi}^{-1}+\\phi A_{r} h^{r s} A_{s}\\right)+\\frac{1}{4}\\partial_{p}\\left(\\phi A_{n}\\right) \\partial_{q}\\left(\\phi A_{r}\\right) \\phi A_{m} \\phi h^{p r} \\phi h^{q s} A_{s} - \\frac{1}{4}\\partial_{p}{\\phi} \\partial_{q}\\left(\\phi A_{n}\\right) \\phi A_{m} \\phi h^{p r} A_{r} \\phi h^{q s} A_{s}+\\frac{1}{4}\\partial_{p}\\left({\\phi}^{-1} h_{n q}+\\phi A_{n} A_{q}\\right) \\partial_{r}{\\phi} \\phi A_{m} \\phi h^{p r} \\phi h^{q s} A_{s} - \\frac{1}{4}\\partial_{p}\\left(\\phi A_{n}\\right) \\partial_{q}{\\phi} \\phi A_{m} \\phi h^{p q} \\left({\\phi}^{-1}+\\phi A_{r} h^{r s} A_{s}\\right)+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{n}\\left({\\phi}^{-1} h_{q r}+\\phi A_{q} A_{r}\\right) \\phi A_{m} \\phi h^{p q} \\phi h^{r s} A_{s} - \\frac{1}{4}\\partial_{p}\\left({\\phi}^{-1} h_{n q}+\\phi A_{n} A_{q}\\right) \\partial_{r}{\\phi} \\phi A_{m} \\phi h^{q r} \\phi h^{p s} A_{s}+\\frac{1}{4}\\partial_{p}\\left(\\phi A_{n}\\right) \\partial_{q}{\\phi} \\phi A_{m} \\phi h^{p r} A_{r} \\phi h^{q s} A_{s}\\end{dmath*}" } ], "source" : "substitute(_, $g_{4 4} -> \\phi$ )\nsubstitute(_, $g_{m 4} -> \\phi A_{m}$ )\nsubstitute(_, $g_{4 m} -> \\phi A_{m}$ )\nsubstitute(_, $g_{m n} -> \\phi**{-1} h_{m n} + \\phi A_{m} A_{n}$ )\nsubstitute(_, $g^{4 4} -> \\phi**{-1} + \\phi A_{m} h^{m n} A_{n}$ )\nsubstitute(_, $g^{m 4} -> - \\phi h^{m n} A_{n}$ )\nsubstitute(_, $g^{4 m} -> - \\phi h^{m n} A_{n}$ )\nsubstitute(_, $g^{m n} -> \\phi h^{m n}$ );" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "We now need to distribute derivatives over sums and use the product rule. This has to be done a few times,\nso we wrap this in a \\verb|converge| block which applies the operations until the result no longer changes. The output \nof those operations is quite large, so we suppress it (by not writing semi-colons after the \nfunction calls or after the converge block)." } ], "hidden" : true, "source" : "We now need to distribute derivatives over sums and use the product rule. This has to be done a few times,\nso we wrap this in a \\verb|converge| block which applies the operations until the result no longer changes. The output \nof those operations is quite large, so we suppress it (by not writing semi-colons after the \nfunction calls or after the converge block)." }, { "cell_origin" : "client", "cell_type" : "input", "source" : "converge(todo):\n distribute(_)\n product_rule(_)\n canonicalise(_)" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "We then convert derivatives of the inverse metric to derivatives of the metric, and cleanup contractions\nwhich lead to Kronecker deltas." } ], "hidden" : true, "source" : "We then convert derivatives of the inverse metric to derivatives of the metric, and cleanup contractions\nwhich lead to Kronecker deltas." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{} - \\frac{1}{4}\\partial_{m}{\\phi} \\partial_{n}{\\phi} {\\phi}^{-1}+\\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{n}{h_{m p}} h^{m1 p} - \\frac{3}{4}A_{m} A_{m1} \\partial_{n}{\\phi} \\partial_{p}{\\phi} \\phi h^{m1 p} - \\frac{1}{2}A_{m} A_{m1} \\partial_{p}{\\phi} \\partial_{n}{h^{m1 p}} {\\phi}^{2} - \\frac{1}{2}\\partial_{m n}{\\phi} - \\frac{1}{2}A_{m} A_{m1} \\partial_{n p}{\\phi} {\\phi}^{2} h^{m1 p} - \\frac{1}{4}A_{m1} \\partial_{p}{A_{m}} \\partial_{n}{\\phi} {\\phi}^{2} h^{m1 p} - \\frac{1}{2}A_{m} \\partial_{n}{A_{m1}} \\partial_{p}{\\phi} {\\phi}^{2} h^{m1 p} - \\frac{1}{4}\\partial_{n}{A_{m1}} \\partial_{p}{A_{m}} {\\phi}^{3} h^{m1 p} - \\frac{1}{4}A_{m} A_{m1} \\partial_{n}{A_{p}} \\partial_{q}{A_{r}} {\\phi}^{5} h^{m1 r} h^{p q}+\\frac{3}{4}A_{m} A_{m1} \\partial_{n}{\\phi} \\partial_{q}{\\phi} \\phi h^{m1 q}+\\frac{1}{2}A_{m} \\partial_{n}{A_{p}} \\partial_{q}{\\phi} {\\phi}^{2} h^{p q}+\\frac{1}{4}A_{m1} \\partial_{r}{A_{m}} \\partial_{n}{\\phi} {\\phi}^{2} h^{m1 r}+\\frac{1}{4}A_{m1} A_{q} \\partial_{m}{\\phi} \\partial_{n}{\\phi} \\phi h^{m1 q}+\\frac{1}{4}A_{p} \\partial_{n}{A_{q}} \\partial_{m}{\\phi} {\\phi}^{2} h^{p q}+\\frac{1}{4}A_{p} \\partial_{m}{A_{q}} \\partial_{n}{\\phi} {\\phi}^{2} h^{p q}+\\frac{1}{4}\\partial_{m}{A_{m1}} \\partial_{n}{A_{q}} {\\phi}^{3} h^{m1 q}+\\frac{1}{4}A_{m} A_{m1} \\partial_{n}{A_{p}} \\partial_{q}{A_{r}} {\\phi}^{5} h^{m1 q} h^{p r} - \\frac{1}{4}A_{m1} A_{r} \\partial_{m}{\\phi} \\partial_{n}{\\phi} \\phi h^{m1 r}%\n - \\frac{1}{4}A_{p} \\partial_{m}{A_{r}} \\partial_{n}{\\phi} {\\phi}^{2} h^{p r} - \\frac{1}{4}A_{p} A_{r} \\partial_{m}{\\phi} \\partial_{n}{\\phi} \\phi h^{p r} - \\frac{1}{4}A_{p} \\partial_{n}{A_{r}} \\partial_{m}{\\phi} {\\phi}^{2} h^{p r}+\\frac{1}{4}A_{q} A_{r} \\partial_{m}{\\phi} \\partial_{n}{\\phi} \\phi h^{q r}+\\frac{1}{4}A_{m} A_{n} \\partial_{m1}{\\phi} \\partial_{p}{\\phi} \\phi h^{m1 p}+\\frac{1}{4}\\partial_{m1}{A_{m}} \\partial_{p}{A_{n}} {\\phi}^{3} h^{m1 p}+\\frac{1}{4}A_{m} A_{m1} \\partial_{p}{A_{n}} \\partial_{q}{A_{r}} {\\phi}^{5} h^{m1 r} h^{p q} - \\frac{1}{4}A_{n} A_{m1} \\partial_{m}{\\phi} \\partial_{q}{\\phi} \\phi h^{m1 q} - \\frac{1}{4}A_{n} \\partial_{m}{A_{m1}} \\partial_{q}{\\phi} {\\phi}^{2} h^{m1 q} - \\frac{1}{4}A_{m1} \\partial_{q}{A_{n}} \\partial_{m}{\\phi} {\\phi}^{2} h^{m1 q} - \\frac{1}{4}\\partial_{m}{A_{m1}} \\partial_{q}{A_{n}} {\\phi}^{3} h^{m1 q} - \\frac{1}{4}A_{m} A_{m1} \\partial_{p}{A_{n}} \\partial_{q}{A_{r}} {\\phi}^{5} h^{m1 q} h^{p r}+\\frac{1}{4}A_{p} \\partial_{r}{A_{n}} \\partial_{m}{\\phi} {\\phi}^{2} h^{p r}+\\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{q}{\\phi} {\\phi}^{-1} h_{m n} h^{m1 q} - \\frac{1}{4}\\partial_{m1}{\\phi} \\partial_{q}{h_{m n}} h^{m1 q}+\\frac{1}{4}A_{m} A_{n} \\partial_{p}{\\phi} \\partial_{q}{\\phi} \\phi h^{p q} - \\frac{1}{4}A_{m} A_{m1} \\partial_{p}{\\phi} \\partial_{q}{h_{n r}} {\\phi}^{2} h^{m1 r} h^{p q} - \\frac{1}{4}A_{m} A_{n} \\partial_{m1}{\\phi} \\partial_{q}{\\phi} \\phi h^{m1 q} - \\frac{1}{4}A_{m} A_{m1} \\partial_{p}{\\phi} \\partial_{n}{h_{q r}} {\\phi}^{2} h^{m1 q} h^{p r} - \\frac{1}{4}A_{m1} \\partial_{n}{A_{m}} \\partial_{p}{\\phi} {\\phi}^{2} h^{m1 p}%\n+\\frac{1}{4}A_{m1} \\partial_{n}{A_{m}} \\partial_{r}{\\phi} {\\phi}^{2} h^{m1 r}+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{m}{h_{n q}} h^{p q} - \\frac{1}{4}A_{m} A_{q} \\partial_{n}{\\phi} \\partial_{r}{\\phi} \\phi h^{q r}+\\frac{1}{4}A_{m} A_{m1} \\partial_{p}{\\phi} \\partial_{q}{h_{n r}} {\\phi}^{2} h^{m1 q} h^{p r}+\\frac{1}{4}A_{n} A_{m1} \\partial_{m}{\\phi} \\partial_{p}{\\phi} \\phi h^{m1 p}+\\frac{1}{4}A_{p} \\partial_{m}{A_{n}} \\partial_{q}{\\phi} {\\phi}^{2} h^{p q}+\\frac{1}{4}A_{n} \\partial_{m}{A_{p}} \\partial_{q}{\\phi} {\\phi}^{2} h^{p q} - \\frac{1}{4}A_{p} \\partial_{m}{A_{n}} \\partial_{r}{\\phi} {\\phi}^{2} h^{p r}+\\frac{1}{2}A_{m} A_{p} \\partial_{q}{\\phi} \\partial_{n}{h^{p q}} {\\phi}^{2}+\\frac{1}{2}A_{m} A_{p} \\partial_{n q}{\\phi} {\\phi}^{2} h^{p q}+\\frac{1}{4}A_{m} A_{p} \\partial_{n}{A_{q}} \\partial_{r}{A_{s}} {\\phi}^{5} h^{p s} h^{q r}+\\frac{1}{4}A_{m} A_{p} \\partial_{n}{\\phi} \\partial_{s}{\\phi} \\phi h^{p s} - \\frac{1}{4}A_{m} A_{p} \\partial_{n}{A_{q}} \\partial_{r}{A_{s}} {\\phi}^{5} h^{p r} h^{q s} - \\frac{1}{4}A_{m} A_{p} \\partial_{q}{A_{n}} \\partial_{r}{A_{s}} {\\phi}^{5} h^{p s} h^{q r}+\\frac{1}{4}A_{m} A_{p} \\partial_{q}{A_{n}} \\partial_{r}{A_{s}} {\\phi}^{5} h^{p r} h^{q s} - \\frac{1}{4}A_{m} A_{n} \\partial_{q}{\\phi} \\partial_{r}{\\phi} \\phi h^{q r}+\\frac{1}{4}A_{m} A_{p} \\partial_{q}{\\phi} \\partial_{r}{h_{n s}} {\\phi}^{2} h^{p s} h^{q r} - \\frac{1}{4}A_{m} A_{p} \\partial_{n}{\\phi} \\partial_{r}{\\phi} \\phi h^{p r}+\\frac{1}{4}A_{m} A_{p} \\partial_{q}{\\phi} \\partial_{n}{h_{r s}} {\\phi}^{2} h^{p r} h^{q s}+\\frac{1}{4}A_{m} A_{r} \\partial_{n}{\\phi} \\partial_{s}{\\phi} \\phi h^{r s}%\n - \\frac{1}{4}A_{m} A_{p} \\partial_{q}{\\phi} \\partial_{r}{h_{n s}} {\\phi}^{2} h^{p r} h^{q s}\\end{dmath*}" } ], "source" : "substitute(_, $\\partial_{p}{h^{n m}} h_{q m} -> - \\partial_{p}{h_{q m}} h^{n m}$ )\ncollect_factors(_)\nsort_product(_)\nconverge(todo):\n\tsubstitute(_, $h_{m1 m2} h^{m3 m2} -> \\delta_{m1}^{m3}$, repeat=True )\n\teliminate_kronecker(_)\n\tcanonicalise(_)\n;" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "This is almost the finaly result, but one would normally write it in terms of the field strength,\nnot the gauge potential. This can be done with one further substitution and some simplification, to \nget the result" } ], "hidden" : true, "source" : "This is almost the finaly result, but one would normally write it in terms of the field strength,\nnot the gauge potential. This can be done with one further substitution and some simplification, to \nget the result" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{} - \\frac{1}{4}\\partial_{m}{\\phi} \\partial_{n}{\\phi} {\\phi}^{-1}+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{n}{h_{m q}} h^{p q} - \\frac{1}{2}\\partial_{m n}{\\phi}+\\frac{1}{4}F_{m p} F_{n q} {\\phi}^{3} h^{p q}+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{q}{\\phi} {\\phi}^{-1} h_{m n} h^{p q} - \\frac{1}{4}\\partial_{p}{\\phi} \\partial_{q}{h_{m n}} h^{p q}+\\frac{1}{4}\\partial_{p}{\\phi} \\partial_{m}{h_{n q}} h^{p q}\\end{dmath*}" } ], "source" : "substitute(_, $\\partial_{n}{A_{m}} -> 1/2*\\partial_{n}{A_{m}} + 1/2*F_{n m} + 1/2*\\partial_{m}{A_{n}}$ )\ndistribute(_)\nsort_product(_)\ncanonicalise(_)\nrename_dummies(_);" }, { "cell_origin" : "client", "cell_type" : "input", "source" : "" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }