'Evaluates the discrete delta function.
Examples
>>> from sympy.functions.special.tensor_functions import KroneckerDelta
>>> from sympy.abc import i, j, k
>>> KroneckerDelta(i, j)
KroneckerDelta(i, j)
>>> KroneckerDelta(i, i)
1
>>> KroneckerDelta(i, i + 1)
0
>>> KroneckerDelta(i, i + 1 + k)
KroneckerDelta(i, i + k + 1)
# indirect doctest'

@classmethod
def eval(cls, i, j):

    diff = (i - j)
    if diff.is_zero:
        return S.One
    elif fuzzy_not(diff.is_zero):
        return S.Zero
    if (i.assumptions0.get('below_fermi') and j.assumptions0.get('above_fermi')):
        return S.Zero
    if (j.assumptions0.get('below_fermi') and i.assumptions0.get('above_fermi')):
        return S.Zero
    if (i is not min(i, j, key=default_sort_key)):
        return cls(j, i)
