Trait creusot_contracts::logic::ord::OrdLogic
source · pub trait OrdLogic {
Show 14 methods
// Required methods
fn cmp_log(self, other: Self) -> Ordering;
fn cmp_le_log(x: Self, y: Self);
fn cmp_lt_log(x: Self, y: Self);
fn cmp_ge_log(x: Self, y: Self);
fn cmp_gt_log(x: Self, y: Self);
fn refl(x: Self);
fn trans(x: Self, y: Self, z: Self, o: Ordering);
fn antisym1(x: Self, y: Self);
fn antisym2(x: Self, y: Self);
fn eq_cmp(x: Self, y: Self);
// Provided methods
fn le_log(self, o: Self) -> bool { ... }
fn lt_log(self, o: Self) -> bool { ... }
fn ge_log(self, o: Self) -> bool { ... }
fn gt_log(self, o: Self) -> bool { ... }
}
Expand description
Trait for comparison operations (<
, >
, <=
, >=
) in pearlite.
Types that implement this trait must have a total order. In particular, the order must be:
- reflexive
- transitive
- antisymmetric (part1, part2)
Required Methods§
sourcefn cmp_log(self, other: Self) -> Ordering
fn cmp_log(self, other: Self) -> Ordering
The comparison operation. Returns:
Ordering::Less
ifself
is smaller thanother
Ordering::Equal
ifself
is equal toother
Ordering::Greater
ifself
is greater thanother
logic
sourcefn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
sourcefn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
sourcefn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
sourcefn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
sourcefn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
Transitivity of the order
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
sourcefn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
Antisymmetry of the order (x < y ==> !(y < x)
)
The antisymmetry is in two part; here is the second part.
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
sourcefn antisym2(x: Self, y: Self)
fn antisym2(x: Self, y: Self)
Antisymmetry of the order (x > y ==> !(y > x)
)
The antisymmetry is in two part; here is the first part.
law
requires
x.cmp_log(y) == Ordering::Greater
ensures
y.cmp_log(x) == Ordering::Less
sourcefn eq_cmp(x: Self, y: Self)
fn eq_cmp(x: Self, y: Self)
Compatibility between Ordering::Equal
and equality (==
).
law
ensures
(x == y) == (x.cmp_log(y) == Ordering::Equal)
Provided Methods§
sourcefn le_log(self, o: Self) -> bool
fn le_log(self, o: Self) -> bool
The logical <=
operation.
logic
pearlite! { self.cmp_log(o) != Ordering::Greater }
sourcefn lt_log(self, o: Self) -> bool
fn lt_log(self, o: Self) -> bool
The logical <
operation.
logic
pearlite! { self.cmp_log(o) == Ordering::Less }
Object Safety§
Implementations on Foreign Types§
source§impl OrdLogic for bool
impl OrdLogic for bool
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
match (self, o) { (false, false) => Ordering::Equal, (true, true) => Ordering::Equal, (false, true) => Ordering::Less, (true, false) => Ordering::Greater, }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for i8
impl OrdLogic for i8
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for i16
impl OrdLogic for i16
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for i32
impl OrdLogic for i32
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for i64
impl OrdLogic for i64
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for i128
impl OrdLogic for i128
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for isize
impl OrdLogic for isize
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for u8
impl OrdLogic for u8
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for u16
impl OrdLogic for u16
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for u32
impl OrdLogic for u32
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for u64
impl OrdLogic for u64
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for u128
impl OrdLogic for u128
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl OrdLogic for usize
impl OrdLogic for usize
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
if self < o { Ordering::Less } else if self == o { Ordering::Equal } else { Ordering::Greater }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater
source§impl<A: OrdLogic, B: OrdLogic> OrdLogic for (A, B)
impl<A: OrdLogic, B: OrdLogic> OrdLogic for (A, B)
source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
logic
pearlite! { { let r = self.0.cmp_log(o.0); if r == Ordering::Equal { self.1.cmp_log(o.1) } else { r } } }
source§fn le_log(self, o: Self) -> bool
fn le_log(self, o: Self) -> bool
logic
pearlite! { (self.0 == o.0 && self.1 <= o.1) || self.0 < o.0 }
source§fn lt_log(self, o: Self) -> bool
fn lt_log(self, o: Self) -> bool
logic
pearlite! { (self.0 == o.0 && self.1 < o.1) || self.0 < o.0 }
source§fn ge_log(self, o: Self) -> bool
fn ge_log(self, o: Self) -> bool
logic
pearlite! { (self.0 == o.0 && self.1 >= o.1) || self.0 > o.0 }
source§fn gt_log(self, o: Self) -> bool
fn gt_log(self, o: Self) -> bool
logic
pearlite! { (self.0 == o.0 && self.1 > o.1) || self.0 > o.0 }
source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
law
ensures
x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)
source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
law
ensures
x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)
source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
law
ensures
x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)
source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
law
ensures
x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)
source§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
law
requires
x.cmp_log(y) == o
requires
y.cmp_log(z) == o
ensures
x.cmp_log(z) == o
source§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
law
requires
x.cmp_log(y) == Ordering::Less
ensures
y.cmp_log(x) == Ordering::Greater