{ "cell_id" : 3662228307020711861, "cells" : [ { "cell_id" : 12813496339189008854, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 15852928793838010821, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "\\algorithm{meld}{Combine terms when allowed by symmetries.}\n\nIn a sum of terms, combine terms using mono-term and multi-term symmetries such that\nthe expression does not use an overcomplete basis. The \\algo{meld} algorithm does \\emph{not}\nrewrite the expression to a canonical form, but it instead combines terms such that no terms\nremain which are a linear combination of the other terms. It can hence be used to prove equivalency of\nexpressions under both mono-term and multi-term symmetries." } ], "hidden" : true, "source" : "\\algorithm{meld}{Combine terms when allowed by symmetries.}\n\nIn a sum of terms, combine terms using mono-term and multi-term symmetries such that\nthe expression does not use an overcomplete basis. The \\algo{meld} algorithm does \\emph{not}\nrewrite the expression to a canonical form, but it instead combines terms such that no terms\nremain which are a linear combination of the other terms. It can hence be used to prove equivalency of\nexpressions under both mono-term and multi-term symmetries." }, { "cell_id" : 10430932811586932061, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 13010077731798931907, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "A typical use cases where \\algo{meld} is preferable over e.g.~\\algo{canonicalise} is when \nthe expression contains tensors with multi-term symmetries:" } ], "hidden" : true, "source" : "A typical use cases where \\algo{meld} is preferable over e.g.~\\algo{canonicalise} is when \nthe expression contains tensors with multi-term symmetries:" }, { "cell_id" : 323968739795205784, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 8988964609217598141, "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property TableauSymmetry to~}R_{a b c d}.\\end{dmath*}" }, { "cell_id" : 1065448456801871039, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 13154882953131082344, "cell_origin" : "server", "cell_type" : "input_form", "source" : "R_{a b c d} R_{a b c d} + R_{a b c d} R_{a c b d}" } ], "source" : "\\begin{dmath*}{}R_{a b c d} R_{a b c d}+R_{a b c d} R_{a c b d}\\end{dmath*}" }, { "cell_id" : 36583085602117144, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 4631733436145613510, "cell_origin" : "server", "cell_type" : "input_form", "source" : " 3/2 R_{a b c d} R_{a b c d}" } ], "source" : "\\begin{dmath*}{}\\frac{3}{2}R_{a b c d} R_{a b c d}\\end{dmath*}" } ], "source" : "R_{a b c d}::RiemannTensor;\nex:=R_{a b c d}R_{a b c d} + R_{a b c d}R_{a c b d};\nmeld(ex);" }, { "cell_id" : 15791155294640585690, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 549755148636681523, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "What has happened here is that the algorithm figured out that the first term is \nexpressible in terms of the second, and has combined the two. If you write the\nterms in the opposite order, \\algo{meld} still combines them, but now in the form\nof the other term:" } ], "hidden" : true, "source" : "What has happened here is that the algorithm figured out that the first term is \nexpressible in terms of the second, and has combined the two. If you write the\nterms in the opposite order, \\algo{meld} still combines them, but now in the form\nof the other term:" }, { "cell_id" : 9029450935143328467, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 12220530943791649783, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 18413295438109622151, "cell_origin" : "server", "cell_type" : "input_form", "source" : "R_{a b c d} R_{a c b d} + R_{a b c d} R_{a b c d}" } ], "source" : "\\begin{dmath*}{}R_{a b c d} R_{a c b d}+R_{a b c d} R_{a b c d}\\end{dmath*}" }, { "cell_id" : 3165521023551330747, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 9944219571662242538, "cell_origin" : "server", "cell_type" : "input_form", "source" : "3R_{a b c d} R_{a c b d}" } ], "source" : "\\begin{dmath*}{}3R_{a b c d} R_{a c b d}\\end{dmath*}" } ], "source" : "ex:=R_{a b c d}R_{a c b d}+ R_{a b c d}R_{a b c d};\nmeld(ex);" }, { "cell_id" : 1216084673125169191, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 6488164179292980876, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "So \\algo{meld} does not canonicalise, but rather writes the expression such that there\nremain no linear dependencies between terms." } ], "hidden" : true, "source" : "So \\algo{meld} does not canonicalise, but rather writes the expression such that there\nremain no linear dependencies between terms." }, { "cell_id" : 4207227977087905811, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 16224843818528585899, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "This algorithm can of course be used for simpler situations, e.g.~one which uses\nmono-term symmetries only:" } ], "hidden" : true, "source" : "This algorithm can of course be used for simpler situations, e.g.~one which uses\nmono-term symmetries only:" }, { "cell_id" : 4713573064776445830, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 12868928690304720995, "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property AntiSymmetric to~}A_{m n}.\\end{dmath*}" }, { "cell_id" : 6839470590631291578, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 16338866573341407972, "cell_origin" : "server", "cell_type" : "input_form", "source" : "A_{m n}-A_{n m}" } ], "source" : "\\begin{dmath*}{}A_{m n}-A_{n m}\\end{dmath*}" }, { "cell_id" : 11737426428168493788, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 17438531506218084942, "cell_origin" : "server", "cell_type" : "input_form", "source" : "2A_{m n}" } ], "source" : "\\begin{dmath*}{}2A_{m n}\\end{dmath*}" } ], "source" : "A_{m n}::AntiSymmetric;\nex:=A_{m n} - A_{n m};\nmeld(ex);" }, { "cell_id" : 6514381677355245703, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 11668151019223862308, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "The \\algo{meld} algorithm can also be used as a quick way to collect terms which only differ by dummy index\nrelabelling (even when there are no symmetries present), e.g." } ], "hidden" : true, "source" : "The \\algo{meld} algorithm can also be used as a quick way to collect terms which only differ by dummy index\nrelabelling (even when there are no symmetries present), e.g." }, { "cell_id" : 14013980821582684444, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 5390606172301622082, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 15488886801634223375, "cell_origin" : "server", "cell_type" : "input_form", "source" : "Q_{m n} R^{m n} + R^{p q} Q_{p q}" } ], "source" : "\\begin{dmath*}{}Q_{m n} R^{m n}+R^{p q} Q_{p q}\\end{dmath*}" } ], "source" : "ex:=Q_{m n} R^{m n} + R^{p q} Q_{p q};" }, { "cell_id" : 1656392514422199773, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 7063320059612004650, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 3548296417909860369, "cell_origin" : "server", "cell_type" : "input_form", "source" : "2Q_{m n} R^{m n}" } ], "source" : "\\begin{dmath*}{}2Q_{m n} R^{m n}\\end{dmath*}" } ], "source" : "meld(ex);" }, { "cell_id" : 11870955447027965657, "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_id" : 8936521076228235993, "cell_origin" : "client", "cell_type" : "latex_view", "source" : "The algorithm also handles cyclic symmetries of traces:" } ], "hidden" : true, "source" : "The algorithm also handles cyclic symmetries of traces:" }, { "cell_id" : 406611350630800730, "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_id" : 6605104543728451938, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 1701022937828344821, "cell_origin" : "server", "cell_type" : "input_form", "source" : "tr(u^{\\mu} u^{\\mu} u^{\\nu} u^{\\nu})-tr(u^{\\mu} u^{\\nu} u^{\\nu} u^{\\mu})" } ], "source" : "\\begin{dmath*}{}tr\\left(u^{\\mu} u^{\\mu} u^{\\nu} u^{\\nu}\\right)-tr\\left(u^{\\mu} u^{\\nu} u^{\\nu} u^{\\mu}\\right)\\end{dmath*}" }, { "cell_id" : 14496227590260612013, "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_id" : 2255656535567173132, "cell_origin" : "server", "cell_type" : "input_form", "source" : "0" } ], "source" : "\\begin{dmath*}{}0\\end{dmath*}" } ], "source" : "{\\mu,\\nu}::Indices(vector).\nu^{\\mu}::ImplicitIndex.\nu^{\\mu}::SelfNonCommuting.\ntr{#}::Trace.\nex := tr{u^{\\mu} u^{\\mu} u^{\\nu} u^{\\nu}} - \n tr{u^{\\mu} u^{\\nu} u^{\\nu} u^{\\mu}};\nmeld(ex);" }, { "cell_id" : 130835195174808300, "cell_origin" : "client", "cell_type" : "input", "source" : "" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }