==

x == y -- a binary operator for testing mathematical equality.

The user may install binary methods for this operator with code such as

              X == Y := (x,y) -> ...
where X is the class of x and Y is the class of y .

A test for mathematical equality will typically involve doing a computation to see whether two representations of the same mathematical object are being compared. For example, an ideal in a ring is represented by giving its generators, and checking whether two sets of generators produce the same ideal involves a computation with Groebner bases.

It may happen that for certain types of objects, there is no method installed for testing mathematical equality, in which case an error will be given. If you wanted to test strict equality, use the operator === or =!=.

See also !=.

Go to main index.

Go to concepts index.