This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Assignments  /
DownValues

  • DownValues[ f ] gives a list of transformation rules corresponding to all downvalues defined for the symbol f.
  • You can specify the downvalues for f by making an assignment of the form DownValues[ f ] = list.
  • The list returned by DownValues has elements of the form HoldPattern[ lhs ] :> rhs.
  • See the Mathematica book: Section 2.4.13.
  • See also: Set, UpValues.

    Further Examples

    This defines a downvalue for f.

    In[1]:=

    The definition is associated with f.

    In[2]:=

    Global`f

    f[g[x_]] := x^2

    The definition is not associated with g; To associate the definition with g use TagSet (/:).

    In[3]:=

    Global`g