On this page

simplify_gamma

symbolica.community.idenso Function

simplify_gamma(expression: Expression, settings: Optional[GammaSimplifySettings] = None) -> Expression

Simplify registered Spenso gamma chains and traces with Idenso's default rules.

The dimension-generic part applies compatible Clifford anticommutation, adjacent contractions, and ordinary odd/even trace recursion. Chisholm identities, gamma-five anticommutation and traces, gamma-zero conjugation, and chiral-projector rules are applied only when the expression carries explicit four-dimensional Minkowski and bispinor representations.

This function does not select or implement a dimensional-regularization gamma-five scheme. Its gamma-five rules are strictly four-dimensional, and the default Python entry point does not enable the optional three-gamma epsilon expansion available through GammaSimplifySettings. Gamma factors must use the Spenso representation-aware forms registered on import; unrecognized plain Symbolica functions are left unchanged.

Examples

from symbolica import E
from symbolica.community.idenso import simplify_gamma
# Built-in representations are registered automatically on import.
trace = E('''
    gamma(bis(4,a),bis(4,b),mink(4,mu))
    * gamma(bis(4,b),bis(4,a),mink(4,nu))
''', default_namespace="spenso")
simplified = simplify_gamma(trace)
"gamma(" not in str(simplified) and "g(" in str(simplified)

The native gamma argument order is bis(dim,alpha), bis(dim,beta), mink(dim,mu): alpha and beta are spinor indices, followed by the Lorentz index mu. These forms can also be constructed through the HEP tensor library.

Arguments

  • expression: expression containing gamma matrix products and traces

Returns

The simplified expression with gamma algebra applied.

Examples

from symbolica.community.spenso import TensorLibrary, TensorName
from symbolica.community.idenso import simplify_gamma
from symbolica import S, Expression
# Get HEP library with standard tensors
hep_lib = TensorLibrary.hep_lib()
# Access standard tensors like gamma matrices
gamma_structure = hep_lib[S("spenso::gamma")]
print(gamma_structure)
print(simplify_gamma(gamma_structure(3, 4, 7) * gamma_structure(7, 4, 3)))