TraceDummy

TraceDummy[expr, splitrules] traces the dummy indices in expr as given by the splitrules.
TraceDummy[expr, splitrules, function] traces the dummies in expr and returns the expanded subexpressions wrapped with function, which may have holding attributes to prevent evaluation after tracing.

• A splitrule must be of the form index -> IndexList[i1, i2, ...], meaning that the upindex index is to be replaced by i1, i2, ... respectively in each of the terms of the array. The corresponding downindices are also replaced (there is internal duplication of the rules).
• The LHS of a splitrules can be a pattern, which will be applied on the dummies of expr.
• Tracing is performed only if the a dummy in the expression matches the splitrules.
• A list of splitrules traces several indices simultaneously. That is, a multidimensional matrix is internally produced with all components, which are then added up. Sequential tracing of different indices takes the previously expanded expression as starting point. Though it might seem strange, the former is more efficient, due to accummulation of overhead code in the latter case.
• Tracing is an operation for dummy indices and does not make any sense on free or blocked indices. The closely related operation of splitting is performed by the function SplitIndex.
• This function is essentially based on ReplaceIndex. It is highly efficient because it uses ReplaceIndex only once and then the rest of the replacement are performed with ReplaceAll.
• Log messages can be turned on setting the global variable $TraceDummyVerbose.
• See: Section 2.9.
• New in version 0.
• Last update: 3-XI-2007 for version 0.9.3 of xTensor`.

Further Examples


Created by Mathematica  (May 16, 2008) Valid XHTML 1.1!