{ "cells" : [ { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "\\algorithm{rename_dummies}{Rename dummy indices, within a set or from one set to another.}\n\nRename the dummy indices in an expression. This can be necessary in\norder to make various terms in a sum use the same names for the\nindices, so that they can be collected." } ], "hidden" : true, "source" : "\\algorithm{rename_dummies}{Rename dummy indices, within a set or from one set to another.}\n\nRename the dummy indices in an expression. This can be necessary in\norder to make various terms in a sum use the same names for the\nindices, so that they can be collected." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=free) to~}\\left(m, \\linebreak[0] n, \\linebreak[0] p, \\linebreak[0] q, \\linebreak[0] r, \\linebreak[0] s\\right).\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}A_{m n} B_{m n}-A_{p q} B_{p q}\\end{dmath*}" } ], "source" : "{m,n,p,q,r,s}::Indices(vector);\nex:=A_{m n} B_{m n} - A_{p q} B_{p q};" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "Using \\algo{canonicalise} does nothing here, " } ], "hidden" : true, "source" : "Using \\algo{canonicalise} does nothing here, " }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}A_{m n} B_{m n}-A_{p q} B_{p q}\\end{dmath*}" } ], "source" : "canonicalise(_);" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "However, renaming indices does the trick," } ], "hidden" : true, "source" : "However, renaming indices does the trick," }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}0\\end{dmath*}" } ], "source" : "rename_dummies(_);" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "Note that the indices need to have been declared as being part of an\nindex list, using the \\prop{Indices} property.\n" } ], "hidden" : true, "source" : "Note that the indices need to have been declared as being part of an\nindex list, using the \\prop{Indices} property.\n" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "The algorithm can also be used to rename dummies from one set to another one, e.g. to change index conventions\n(this is used in many of Cadabra's packages). Here is an example." } ], "hidden" : true, "source" : "The algorithm can also be used to rename dummies from one set to another one, e.g. to change index conventions\n(this is used in many of Cadabra's packages). Here is an example." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=free) to~}\\left[m,~\\discretionary{}{}{} n,~\\discretionary{}{}{} p,~\\discretionary{}{}{} q\\right].\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=free) to~}\\left[a,~\\discretionary{}{}{} b,~\\discretionary{}{}{} c,~\\discretionary{}{}{} d\\right].\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}A_{m} A^{m}+B_{m} C^{m}+A_{n} A^{n}+Q_{c d} R^{d c}\\end{dmath*}" } ], "source" : "{m,n,p,q}::Indices(\"one\");\n{a,b,c,d}::Indices(\"two\");\nex:= A_{m} A^{m} + B_{m} C^{m} + A_{n} A^{n} + Q_{c d} R^{d c};" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "The above expression has indices in two different sets. We now rename the first set to the second," } ], "hidden" : true, "source" : "The above expression has indices in two different sets. We now rename the first set to the second," }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}2A_{a} A^{a}+B_{a} C^{a}+Q_{c d} R^{d c}\\end{dmath*}" } ], "source" : "rename_dummies(_, \"one\", \"two\");" }, { "cell_origin" : "client", "cell_type" : "input", "source" : "" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }