This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Structure Manipulation  /
OrderedQ

  • OrderedQ[ h [ , , ... ]] gives True if the are in canonical order, and False otherwise.
  • See notes for Order.
  • OrderedQ[ e , e ] gives True.
  • By default, OrderedQ uses canonical order as described in the notes for Sort.
  • OrderedQ[ list , p ] uses the function p to determine whether each pair of elements in list is in order.
  • See the Mathematica book: Section 1.8.13Section 2.3.5.
  • See also: Signature, Sort.

    Further Examples

    Mathematica puts lower-case expressions before upper-case expressions that start with the same letter.

    In[1]:=

    Out[1]=

    Shorter expressions come before longer expressions.

    In[2]:=

    Out[2]=