LessThanComparable<T> Concept

A type whose objects can be compared with operators <, >, <= and >=.

Examples

int , String , List .

Definition

Line 77 of System.Base/Concept.cm

Type Parameters

T

Constraints

bool operator<(T, T)

Axioms

axiom irreflexive(T a)
{
    !(a < a);
}

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

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

axiom total(T a, T b)
{
    a < b || a == b || a > b;
}

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

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

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