class_docstr: The discrete, or Kronecker, delta function.
  
  Explanation
  ===========
  
  A function that takes in two integers $i$ and $j$. It returns $0$ if $i$
  and $j$ are not equal, or it returns $1$ if $i$ and $j$ are equal.
  
  Examples
  ========
  
  An example with integer indices:
  
      >>> from sympy import KroneckerDelta
      >>> KroneckerDelta(1, 2)
      0
      >>> KroneckerDelta(3, 3)
      1
  
  Symbolic indices:
  
      >>> 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)
  
  Parameters
  ==========
  
  i : Number, Symbol
      The first index of the delta function.
  j : Number, Symbol
      The second index of the delta function.
  
  See Also
  ========
  
  eval
  DiracDelta
  
  References
  ==========
  
  .. [1] https://en.wikipedia.org/wiki/Kronecker_delta
class_docstr_tok: ["The","discrete",",","or","Kronecker",",","delta","function",".","Explanation","===========","A","function","that","takes","in","two","integers","$","i","$","and","$","j","$",".","It","returns","$","0","$","if","$","i","$","and","$","j","$","are","not","equal",",","or","it","returns","$","1","$","if","$","i","$","and","$","j","$","are","equal",".","Examples","========","An","example","with","integer","indices",":",">",">",">","from","sympy","import","KroneckerDelta",">",">",">","KroneckerDelta","(","1",",","2",")","0",">",">",">","KroneckerDelta","(","3",",","3",")","1","Symbolic","indices",":",">",">",">","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",")","Parameters","==========","i",":","Number",",","Symbol","The","first","index","of","the","delta","function",".","j",":","Number",",","Symbol","The","second","index","of","the","delta","function",".","See","Also","========","eval","DiracDelta","References","==========","..","[","1","]","https",":","\/\/en.wikipedia.org\/wiki\/Kronecker_delta"]
docstr: Evaluates the discrete delta function.
  
  Examples
  ========
  
  >>> from sympy 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
docstr_tok: ["Evaluates","the","discrete","delta","function",".","Examples","========",">",">",">","from","sympy","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"]
code: def eval(cls, i, j, delta_range=None):
      """
      Evaluates the discrete delta function.
  
      Examples
      ========
  
      >>> from sympy 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
  
      """
  
      if delta_range is not None:
          dinf, dsup = delta_range
          if (dinf - i > 0) == True:
              return S.Zero
          if (dinf - j > 0) == True:
              return S.Zero
          if (dsup - i < 0) == True:
              return S.Zero
          if (dsup - j < 0) == True:
              return S.Zero
  
      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
      # to make KroneckerDelta canonical
      # following lines will check if inputs are in order
      # if not, will return KroneckerDelta with correct order
      if i != min(i, j, key=default_sort_key):
          if delta_range:
              return cls(j, i, delta_range)
          else:
              return cls(j, i)
  
imports: from math import prod
  from sympy.core import S, Integer
  from sympy.core.function import Function
  from sympy.core.logic import fuzzy_not
  from sympy.core.relational import Ne
  from sympy.core.sorting import default_sort_key
  from sympy.external.gmpy import SYMPY_INTS
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.functions.elementary.piecewise import Piecewise
  from sympy.utilities.iterables import has_dups
label_desc: Use image node_id 1 for calling the KroneckerDelta obj's underlying member method code with example usage: obj.eval(cls, i, j, delta_range) and returns: S, S, S, S, S, S, S, S, cls, cls