{ "cells" : [ { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "\\property{IndexInherit}{Make an object inherit all indices from its child objects.}\n\nIndicates that an object should inherit the indices of its child\nobjects. This is useful mainly for operators. Matrix transposition,\nfor instance, could be written as" } ], "hidden" : true, "source" : "\\property{IndexInherit}{Make an object inherit all indices from its child objects.}\n\nIndicates that an object should inherit the indices of its child\nobjects. This is useful mainly for operators. Matrix transposition,\nfor instance, could be written as" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property IndexInherit to~}T\\left(\\#\\right).\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_origin" : "server", "cell_type" : "input_form", "source" : "T(B_{m n}) + C_{m n}" } ], "source" : "\\begin{dmath*}{}T\\left(B_{m n}\\right)+C_{m n}\\end{dmath*}" } ], "source" : "T{#}::IndexInherit;\nex:=T(B_{m n}) + C_{m n};" }, { "cell_origin" : "client", "cell_type" : "latex", "cells" : [ { "cell_origin" : "client", "cell_type" : "latex_view", "source" : "Without the \\prop{IndexInherit} property, the object \n\\verb|T(B_{m n})| would be considered a scalar, without indices, and an index mismatch\nerror would be reported. With the property, the first term has\nexternal indices \\verb|m| and \\verb|n|, just like the second term.\n\nNote that indices which are 'direct indices' of the object still count, of course.\nThis is also visible if you ask for the free indices directly, as the following\nexample shows." } ], "hidden" : true, "source" : "Without the \\prop{IndexInherit} property, the object \n\\verb|T(B_{m n})| would be considered a scalar, without indices, and an index mismatch\nerror would be reported. With the property, the first term has\nexternal indices \\verb|m| and \\verb|n|, just like the second term.\n\nNote that indices which are 'direct indices' of the object still count, of course.\nThis is also visible if you ask for the free indices directly, as the following\nexample shows." }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "cells" : [ { "cell_origin" : "server", "cell_type" : "input_form", "source" : "T_{m}(A_{n})" } ], "source" : "\\begin{dmath*}{}T_{m}\\left(A_{n}\\right)\\end{dmath*}" } ], "source" : "ex:= T_{m}(A_{n});" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "verbatim", "source" : "\\begin{verbatim}m\\end{verbatim}" }, { "cell_origin" : "server", "cell_type" : "verbatim", "source" : "\\begin{verbatim}n\\end{verbatim}" } ], "source" : "for i in ex.top().free_indices(): \n display(i)" }, { "cell_origin" : "client", "cell_type" : "input", "source" : "" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }