EqualityComparable<T> Concept

A type whose objects can be compared with operators == and !=.

Examples

int , String , List .

Definition

Line 62 of System.Base/Concept.cm

Type Parameters

T

Constraints

bool operator==(T, T)

Axioms

axiom equal(T a, T b)
{
    a == b <=> eq(a, b);
}

axiom reflexive(T a)
{
    a == a;
}

axiom symmetric(T a, T b)
{
    a == b => b == a;
}

axiom transitive(T a, T b, T c)
{
    a == b && b == c => a == c;
}

axiom notEqualTo(T a, T b)
{
    a != b <=> !(a == b);
}