feynlag.dirac

Dirac / Clifford algebra layer.

Ported from bsm-calc/models/DLRSM1/dirac.py. Non-commutative symbolic gamma matrices with a rule-based Clifford simplifier; chiral projectors with their algebra baked into __mul__/__add__.

Changes with respect to the original:

  • the diracPR = None forward-declaration wart is gone: projector algebra uses isinstance checks against the singleton classes;

  • no import-time dependency on the momentum function;

  • metric signature defaults to the house convention '+---' (feynlag.conventions.METRIC_SIGNATURE).

Module Attributes

MetricTensor(*args)

Symbolic metric tensor head used inside expressions: MetricTensor(mu, nu).

Functions

dirac_conjugate(gamma)

Dirac-conjugate Γ̄ = γ⁰ Γ† γ⁰ of a Bilinear middle slot Γ.

gamma_simplify(expr[, metric_func, ...])

Apply Clifford algebra rules to expr with canonical ordering.

majorana_symmetry_sign(gamma)

Sign s with ψ₁ᵀ (C Γ) ψ₂ = s · ψ₂ᵀ (C Γ) ψ₁ for Grassmann ψ.

minkowski_metric(idx1, idx2[, convention])

Minkowski metric component g^{idx1 idx2}.

Classes

DiracC()

Charge-conjugation matrix C = iγ²γ⁰ (singleton diracC).

DiracGamma(index)

Dirac gamma matrix γ^μ (upper Lorentz index).

DiracGammaLower(index)

Dirac gamma matrix γ_μ (lower Lorentz index).

DiracIdentity()

4x4 identity in Dirac space (singleton diracI).

DiracLatexPrinter([settings])

LaTeX printer that parenthesizes powers of gamma matrices.

DiracZero()

4x4 zero matrix in Dirac space (singleton dirac0).

PL()

Left-handed chiral projector P_L = (1 − γ₅)/2 (singleton).

PR()

Right-handed chiral projector P_R = (1 + γ₅)/2 (singleton).