(expression)
return res
Simplify single-line product of gamma matrices.

        Examples
        ========

        >>> from sympy.physics.hep.gamma_matrices import GammaMatrix as G, DiracSpinorIndex as DS
        >>> from sympy.tensor.tensor import tensor_indices, tensorhead
        >>> p = tensorhead('p', [G.LorentzIndex], [[1]])
        >>> i0,i1 = tensor_indices('i0:2', G.LorentzIndex)
        >>> G._simplify_single_line(G(i0)*G(i1)*p(-i1)*G(-i0)) + 2*G(i0)*p(-i0)
        0
Simplify single-line product of gamma matrices.
Simplify single - line product of gamma matrices .
def _simplify_single_line(expression):
        """
        Simplify single-line product of gamma matrices.

        Examples
        ========

        >>> from sympy.physics.hep.gamma_matrices import GammaMatrix as G, DiracSpinorIndex as DS
        >>> from sympy.tensor.tensor import tensor_indices, tensorhead
        >>> p = tensorhead('p', [G.LorentzIndex], [[1]])
        >>> i0,i1 = tensor_indices('i0:2', G.LorentzIndex)
        >>> G._simplify_single_line(G(i0)*G(i1)*p(-i1)*G(-i0)) + 2*G(i0)*p(-i0)
        0

        """
        t1, t2 = GammaMatrixHead.extract_type_tens(expression)
        if t1 != 1:
            t1 = GammaMatrixHead._kahane_simplify(t1.coeff, t1._tids)
        res = t1*t2
        return res
def _simplify_single_line ( expression ) : t1 , t2 = GammaMatrixHead . extract_type_tens ( expression ) if t1 != 1 : t1 = GammaMatrixHead . _kahane_simplify ( t1 . coeff , t1 . _tids ) res = t1 * t2 return res