|
| 1 | +{ |
| 2 | + "cells" : |
| 3 | + [ |
| 4 | + { |
| 5 | + "cell_origin" : "client", |
| 6 | + "cell_type" : "latex", |
| 7 | + "cells" : |
| 8 | + [ |
| 9 | + { |
| 10 | + "cell_origin" : "client", |
| 11 | + "cell_type" : "latex_view", |
| 12 | + "source" : "\\algorithm{explicit_indices}{Make indices explicit on an expression with implicit indices.}\n\nIn Cadabra you can write expressions which are understood to have indices suppressed, in order\nto get a cleaner notation. This is often used for vector/matrix notation, or when dealing\nwith spinors. In order to inform Cadabra about these implicit indices, you use the\n\\prop{ImplicitIndex} property (which is also necessary to prevent Cadabra from moving\nthese objects through each other when sorting products into canonical form). \nThe \\algo{explicit_indices} algorithm can then make these indices explicit, which can \nsometimes make them easier to work with, for example when doing substitutions." |
| 13 | + } |
| 14 | + ], |
| 15 | + "hidden" : true, |
| 16 | + "source" : "\\algorithm{explicit_indices}{Make indices explicit on an expression with implicit indices.}\n\nIn Cadabra you can write expressions which are understood to have indices suppressed, in order\nto get a cleaner notation. This is often used for vector/matrix notation, or when dealing\nwith spinors. In order to inform Cadabra about these implicit indices, you use the\n\\prop{ImplicitIndex} property (which is also necessary to prevent Cadabra from moving\nthese objects through each other when sorting products into canonical form). \nThe \\algo{explicit_indices} algorithm can then make these indices explicit, which can \nsometimes make them easier to work with, for example when doing substitutions." |
| 17 | + }, |
| 18 | + { |
| 19 | + "cell_origin" : "client", |
| 20 | + "cell_type" : "latex", |
| 21 | + "cells" : |
| 22 | + [ |
| 23 | + { |
| 24 | + "cell_origin" : "client", |
| 25 | + "cell_type" : "latex_view", |
| 26 | + "source" : "In the following example we define two sets of indices, and several objects which are assumed\nto have implicit indices." |
| 27 | + } |
| 28 | + ], |
| 29 | + "hidden" : true, |
| 30 | + "source" : "In the following example we define two sets of indices, and several objects which are assumed\nto have implicit indices." |
| 31 | + }, |
| 32 | + { |
| 33 | + "cell_origin" : "client", |
| 34 | + "cell_type" : "input", |
| 35 | + "cells" : |
| 36 | + [ |
| 37 | + { |
| 38 | + "cell_origin" : "server", |
| 39 | + "cell_type" : "latex_view", |
| 40 | + "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=fixed) to~}\\left[m,~\\discretionary{}{}{} n,~\\discretionary{}{}{} p\\right].\\end{dmath*}" |
| 41 | + }, |
| 42 | + { |
| 43 | + "cell_origin" : "server", |
| 44 | + "cell_type" : "latex_view", |
| 45 | + "source" : "\\begin{dmath*}{}\\text{Attached property Indices(position=fixed) to~}\\left[a,~\\discretionary{}{}{} b,~\\discretionary{}{}{} c,~\\discretionary{}{}{} d,~\\discretionary{}{}{} e,~\\discretionary{}{}{} f,~\\discretionary{}{}{} g,~\\discretionary{}{}{} h\\right].\\end{dmath*}" |
| 46 | + }, |
| 47 | + { |
| 48 | + "cell_origin" : "server", |
| 49 | + "cell_type" : "latex_view", |
| 50 | + "source" : "\\begin{dmath*}{}\\text{Attached property ImplicitIndex to~}\\sigma^{p}.\\end{dmath*}" |
| 51 | + }, |
| 52 | + { |
| 53 | + "cell_origin" : "server", |
| 54 | + "cell_type" : "latex_view", |
| 55 | + "source" : "\\begin{dmath*}{}\\text{Attached property ImplicitIndex to~}\\psi.\\end{dmath*}" |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_origin" : "server", |
| 59 | + "cell_type" : "latex_view", |
| 60 | + "source" : "\\begin{dmath*}{}\\text{Attached property ImplicitIndex to~}\\chi.\\end{dmath*}" |
| 61 | + } |
| 62 | + ], |
| 63 | + "source" : "{m,n,p}::Indices(spacetime, position=fixed);\n{a,b,c,d,e,f,g,h}::Indices(spinor, position=fixed);\n\\sigma^{p}::ImplicitIndex(\\sigma^{p a}_{b});\n\\psi::ImplicitIndex(\\psi_{a});\n\\chi::ImplicitIndex(\\chi^{a});" |
| 64 | + }, |
| 65 | + { |
| 66 | + "cell_origin" : "client", |
| 67 | + "cell_type" : "latex", |
| 68 | + "cells" : |
| 69 | + [ |
| 70 | + { |
| 71 | + "cell_origin" : "client", |
| 72 | + "cell_type" : "latex_view", |
| 73 | + "source" : "The following is a valid expression for a spinor bilinear," |
| 74 | + } |
| 75 | + ], |
| 76 | + "hidden" : true, |
| 77 | + "source" : "The following is a valid expression for a spinor bilinear," |
| 78 | + }, |
| 79 | + { |
| 80 | + "cell_origin" : "client", |
| 81 | + "cell_type" : "input", |
| 82 | + "cells" : |
| 83 | + [ |
| 84 | + { |
| 85 | + "cell_origin" : "server", |
| 86 | + "cell_type" : "latex_view", |
| 87 | + "cells" : |
| 88 | + [ |
| 89 | + { |
| 90 | + "cell_origin" : "server", |
| 91 | + "cell_type" : "input_form", |
| 92 | + "source" : "\\psi \\sigma^{m} \\sigma^{n} \\chi" |
| 93 | + } |
| 94 | + ], |
| 95 | + "source" : "\\begin{dmath*}{}\\psi \\sigma^{m} \\sigma^{n} \\chi\\end{dmath*}" |
| 96 | + } |
| 97 | + ], |
| 98 | + "source" : "ex:= \\psi \\sigma^{m} \\sigma^{n} \\chi;" |
| 99 | + }, |
| 100 | + { |
| 101 | + "cell_origin" : "client", |
| 102 | + "cell_type" : "latex", |
| 103 | + "cells" : |
| 104 | + [ |
| 105 | + { |
| 106 | + "cell_origin" : "client", |
| 107 | + "cell_type" : "latex_view", |
| 108 | + "source" : "We can now make the indices explicit using" |
| 109 | + } |
| 110 | + ], |
| 111 | + "hidden" : true, |
| 112 | + "source" : "We can now make the indices explicit using" |
| 113 | + }, |
| 114 | + { |
| 115 | + "cell_origin" : "client", |
| 116 | + "cell_type" : "input", |
| 117 | + "cells" : |
| 118 | + [ |
| 119 | + { |
| 120 | + "cell_origin" : "server", |
| 121 | + "cell_type" : "latex_view", |
| 122 | + "cells" : |
| 123 | + [ |
| 124 | + { |
| 125 | + "cell_origin" : "server", |
| 126 | + "cell_type" : "input_form", |
| 127 | + "source" : "\\psi_{a} \\sigma^{m a}_{b} \\sigma^{n b}_{c} \\chi^{c}" |
| 128 | + } |
| 129 | + ], |
| 130 | + "source" : "\\begin{dmath*}{}\\psi_{a} \\sigma^{m a}\\,_{b} \\sigma^{n b}\\,_{c} \\chi^{c}\\end{dmath*}" |
| 131 | + } |
| 132 | + ], |
| 133 | + "source" : "explicit_indices(ex);" |
| 134 | + }, |
| 135 | + { |
| 136 | + "cell_origin" : "client", |
| 137 | + "cell_type" : "latex", |
| 138 | + "cells" : |
| 139 | + [ |
| 140 | + { |
| 141 | + "cell_origin" : "client", |
| 142 | + "cell_type" : "latex_view", |
| 143 | + "source" : "This also works when there are trace operators, as is illustrated in the following \nexample." |
| 144 | + } |
| 145 | + ], |
| 146 | + "hidden" : true, |
| 147 | + "source" : "This also works when there are trace operators, as is illustrated in the following \nexample." |
| 148 | + }, |
| 149 | + { |
| 150 | + "cell_origin" : "client", |
| 151 | + "cell_type" : "input", |
| 152 | + "cells" : |
| 153 | + [ |
| 154 | + { |
| 155 | + "cell_origin" : "server", |
| 156 | + "cell_type" : "latex_view", |
| 157 | + "source" : "\\begin{dmath*}{}\\text{Attached property Trace to~}{\\rm Tr}\\left(\\#\\right).\\end{dmath*}" |
| 158 | + }, |
| 159 | + { |
| 160 | + "cell_origin" : "server", |
| 161 | + "cell_type" : "latex_view", |
| 162 | + "cells" : |
| 163 | + [ |
| 164 | + { |
| 165 | + "cell_origin" : "server", |
| 166 | + "cell_type" : "input_form", |
| 167 | + "source" : "Tr(\\sigma^{m} \\sigma^{n} + \\sigma^{n} \\sigma^{m})" |
| 168 | + } |
| 169 | + ], |
| 170 | + "source" : "\\begin{dmath*}{}{\\rm Tr}\\left(\\sigma^{m} \\sigma^{n}+\\sigma^{n} \\sigma^{m}\\right)\\end{dmath*}" |
| 171 | + } |
| 172 | + ], |
| 173 | + "source" : "Tr{#}::LaTeXForm(\"{\\rm Tr}\").\nTr{#}::Trace(indices=spinor);\nex:= Tr(\\sigma^{m} \\sigma^{n} + \\sigma^{n} \\sigma^{m});" |
| 174 | + }, |
| 175 | + { |
| 176 | + "cell_origin" : "client", |
| 177 | + "cell_type" : "input", |
| 178 | + "cells" : |
| 179 | + [ |
| 180 | + { |
| 181 | + "cell_origin" : "server", |
| 182 | + "cell_type" : "latex_view", |
| 183 | + "cells" : |
| 184 | + [ |
| 185 | + { |
| 186 | + "cell_origin" : "server", |
| 187 | + "cell_type" : "input_form", |
| 188 | + "source" : "\\sigma^{m a}_{b} \\sigma^{n b}_{a} + \\sigma^{n a}_{b} \\sigma^{m b}_{a}" |
| 189 | + } |
| 190 | + ], |
| 191 | + "source" : "\\begin{dmath*}{}\\sigma^{m a}\\,_{b} \\sigma^{n b}\\,_{a}+\\sigma^{n a}\\,_{b} \\sigma^{m b}\\,_{a}\\end{dmath*}" |
| 192 | + } |
| 193 | + ], |
| 194 | + "source" : "explicit_indices(_);" |
| 195 | + }, |
| 196 | + { |
| 197 | + "cell_origin" : "client", |
| 198 | + "cell_type" : "input", |
| 199 | + "source" : "" |
| 200 | + } |
| 201 | + ], |
| 202 | + "description" : "Cadabra JSON notebook format", |
| 203 | + "version" : 1 |
| 204 | +} |
0 commit comments