Spinors Extras Package SymbolTutorials »|More About »

RefSimplify

RefSimplify[expr, ref→{a, b, ...}]
returns simplest expression from list of results of replacing, in expr, spinor ref with a, b, ...
RefSimplify[expr, refpatt]
uses, for replacement, spinors found in expr that match pattern patt.
RefSimplify[expr, refPatt...]
replaces all occurrences of labels that match refPatt .
RefSimplify[expr, refPatt...]
replaces all occurrences of labels that match refPatt . refPatt can contain named sub-patterns that can be used on RHS of ⧴.
RefSimplify[expr, ref]
uses all spinors found in expr except ref.
RefSimplify[expr, refPatt]
replaces all occurrences of labels that match refPatt . For replacement uses all spinors found in expr except those that match refPatt .
RefSimplify[expr, {ref1, ref2patt2, refPatt3→{a3, b3, ...}, ... }]
simplifies expr with respect to reference vectors matching: ref1, ref2, refPatt3, ...
RefSimplify[expr, {{ref11, ref12patt12, ...}, {refPatt21→{a21, b21, ...}, ...}, ... }]
returns a List, each element of this list is a result of simplification of expr using subsequent list of patterns and rules.
RefSimplify[expr]
simplifies expr with respect to all explicit reference vectors found in expr.
  • The following options can be given:
"PostReplace"Simplifyfunction used to postprocess result of reference vectors replacement
"SimplicityMeasure"LeafCountfunction used to measure "simplicity" of results for different reference vectors, result with smallest value is considered simplest
"IndependentSpinors"Truewhether composite vectors, constructed by treating replacement labels as independent B and A spinors, should be used
"ReplacementPattern"_?SpinorQpattern used to extract, from given expression, spinors for replacement
"ExcludeReplacedRef"Truewhether replaced reference vectors should be excluded from list of spinors extracted from expression
"ExcludeInfinities"Truewhether indeterminate and infinite results should be excluded from results
"QuietInfinityWarnings"Truewhether messages informing about infinities and indeterminate results should be quieted
"Verbose"Falsewhether subsequent results and warrnings about reference vectors not present in expression should be printed
"PrintFunction"Function[{rule,simplicity,result,accepted},With[{rejected=If[accepted,""
(*else*),"Rejected: "]},Print[rejected,simplicity,": ",rule,": ",result]]]
function used to print result if "Verbose" option is set to true. This function should accept 4 arguments: replacement rules used for obtaining poarticular result, simplicity of result, result itself, boolean informing whether result was accepted
With "IndependentSpinors" set to True (default value) composite vectors formed from all pairs of replacement spinors are checked:
With "IndependentSpinors" set to False composite vectors are not formed automatically:
Composite vectors can still be passed explicitly:
With "Verbose" set to False (default value) only result is returned:
With "Verbose" set to True subsequent results are printed together with their simplicity. When some of reference vectors are not present in expression warnings are printed:
With "Verbose" set to True, value of "PrintFunction" option is used to print results:
by default it prints: info about result rejection, results simplicity, replacement rules used to get this result, and the result itself:
it can be changed to any function accepting 4 arguments:
RefSimplify uses "brute force" and checks all possibilities to find simplest one, so can be slow on large expressions. For expression with n reference vectors and m other spinors RefSimplify will, by default, check m 2n possibilities.