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::Lessifselfis smaller thanotherOrdering::Equalifselfis equal tootherOrdering::Greaterifselfis greater thanother
⚠
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) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSourcefn 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::Lessensures
y.cmp_log(x) == Ordering::GreaterSourcefn 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::Greaterensures
y.cmp_log(x) == Ordering::LessSourcefn 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.
(open)
pearlite! { self.cmp_log(o) != Ordering::Greater }Sourcefn lt_log(self, o: Self) -> bool
fn lt_log(self, o: Self) -> bool
The logical < operation.
(open)
pearlite! { self.cmp_log(o) == Ordering::Less }Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
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
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for char
impl OrdLogic for char
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for i8
impl OrdLogic for i8
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for i16
impl OrdLogic for i16
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for i32
impl OrdLogic for i32
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for i64
impl OrdLogic for i64
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for i128
impl OrdLogic for i128
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for isize
impl OrdLogic for isize
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for u8
impl OrdLogic for u8
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for u16
impl OrdLogic for u16
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for u32
impl OrdLogic for u32
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for u64
impl OrdLogic for u64
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for u128
impl OrdLogic for u128
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl OrdLogic for usize
impl OrdLogic for usize
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§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
(open)
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
(open)
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
(open)
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
(open)
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
(open)
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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl<T: OrdLogic> OrdLogic for Option<T>
impl<T: OrdLogic> OrdLogic for Option<T>
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
match (self, o) { (None, None) => Ordering::Equal, (None, Some(_)) => Ordering::Less, (Some(_), None) => Ordering::Greater, (Some(x), Some(y)) => x.cmp_log(y), }
Source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl<T: OrdLogic> OrdLogic for &T
impl<T: OrdLogic> OrdLogic for &T
Source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(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)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::GreaterSource§impl<T: OrdLogic> OrdLogic for Reverse<T>
impl<T: OrdLogic> OrdLogic for Reverse<T>
Source§fn cmp_log(self, o: Self) -> Ordering
fn cmp_log(self, o: Self) -> Ordering
(open)
match self.0.cmp_log(o.0) { Ordering::Equal => Ordering::Equal, Ordering::Less => Ordering::Greater, Ordering::Greater => Ordering::Less, }
Source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
(open, 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)
(open, 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)
(open, 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)
(open, 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)
(open, law)
{}requires
x.cmp_log(y) == orequires
y.cmp_log(z) == oensures
x.cmp_log(z) == oSource§fn antisym1(x: Self, y: Self)
fn antisym1(x: Self, y: Self)
(open, law)
{}requires
x.cmp_log(y) == Ordering::Lessensures
y.cmp_log(x) == Ordering::Greater