(delta, index)
return False
Returns True if ``delta`` is a KroneckerDelta and is nonzero for a single
    value of the index ``index``.
Returns True if ``delta`` is a KroneckerDelta and is nonzero for a single
    value of the index ``index``.
Returns True if delta is a KroneckerDelta and is nonzero for a single value of the index index .
def _is_simple_delta(delta, index):
    """
    Returns True if ``delta`` is a KroneckerDelta and is nonzero for a single
    value of the index ``index``.
    """
    if isinstance(delta, KroneckerDelta) and delta.has(index):
        p = (delta.args[0] - delta.args[1]).as_poly(index)
        if p:
            return p.degree() == 1
    return False
def _is_simple_delta ( delta , index ) : if isinstance ( delta , KroneckerDelta ) and delta . has ( index ) : p = ( delta . args [ 0 ] - delta . args [ 1 ] ) . as_poly ( index ) if p : return p . degree ( ) == 1 return False