Equal ()

WMA link


Equal[x, y]

x == y

is True if x and y are known to be equal, or
False if x and y are known to be unequal, in which case
case, Not[x == y] will be True.

Commutative properties apply, so if x == y then y == x.

For any expression x and y, Equal[x, y] == Not[Unequal[x, y]].

For any expression SameQ[xy] implies Equal[x, y].


x == y == z == ...

express a chain of equalities.

Numerical Equalities:

Comparisons are done using the lower precision:

Compare an exact numeric expression and its corresponding approximate number:

Symbolic constants are compared numerically:

Compare two exact numeric expressions; a numeric test may suffice to disprove equality:

Compare an exact expression against an approximate real number:

Real values are considered equal if they only differ in their last digits:

Numeric evaluation using Equal:

String equalities:

When we have symbols without values, the values are equal
only if the symbols are equal:

Comparison to mismatched types is False:

Lists are compared based on their elements:

For chains of equalities, the comparison is done amongst all the pairs. The evaluation is successful only if the equality is satisfied over all the pairs:

Equality can also be combined with other inequality expressions, like:

Equal with no parameter or an empty list is True:

Equal on one parameter or list element is also True

This degenerate behavior is the same for Unequal;
empty or single-element lists are both Equal and Unequal.

BooleanQ
Greater