Skip to main content

OrdLogic

Trait 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:

Required Methods§

Source

fn cmp_log(self, other: Self) -> Ordering

The comparison operation. Returns:

logic

Source

fn cmp_le_log(x: Self, y: Self)

logic(law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source

fn cmp_lt_log(x: Self, y: Self)

logic(law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source

fn cmp_ge_log(x: Self, y: Self)

logic(law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source

fn cmp_gt_log(x: Self, y: Self)

logic(law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source

fn refl(x: Self)

Reflexivity of the order

logic(law)

ensures

x.cmp_log(x) == Ordering::Equal

Source

fn trans(x: Self, y: Self, z: Self, o: Ordering)

Transitivity of the order

logic(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)

Antisymmetry of the order (x < y ==> !(y < x))

The antisymmetry is in two part; here is the second part.

logic(law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source

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.

logic(law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source

fn eq_cmp(x: Self, y: Self)

Compatibility between Ordering::Equal and equality (==).

logic(law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Provided Methods§

Source

fn le_log(self, o: Self) -> bool

The logical <= operation.

logic(open)

self.cmp_log(o) != Ordering::Greater

Source

fn lt_log(self, o: Self) -> bool

The logical < operation.

logic(open)

self.cmp_log(o) == Ordering::Less

Source

fn ge_log(self, o: Self) -> bool

The logical >= operation.

logic(open)

self.cmp_log(o) != Ordering::Less

Source

fn gt_log(self, o: Self) -> bool

The logical > operation.

logic(open)

self.cmp_log(o) == Ordering::Greater

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

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for char

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for i8

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for i16

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for i32

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for i64

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for i128

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for isize

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for u8

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for u16

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for u32

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for u64

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for u128

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl OrdLogic for usize

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

/* Macro-generated */

Source§

fn le_log(self, _: Self) -> bool

logic

Source§

fn lt_log(self, _: Self) -> bool

logic

Source§

fn ge_log(self, _: Self) -> bool

logic

Source§

fn gt_log(self, _: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl<A: OrdLogic, B: OrdLogic> OrdLogic for (A, B)

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

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

logic(open)

(self.0 == o.0 && self.1 <= o.1) || self.0 < o.0

Source§

fn lt_log(self, o: Self) -> bool

logic(open)

(self.0 == o.0 && self.1 < o.1) || self.0 < o.0

Source§

fn ge_log(self, o: Self) -> bool

logic(open)

(self.0 == o.0 && self.1 >= o.1) || self.0 > o.0

Source§

fn gt_log(self, o: Self) -> bool

logic(open)

(self.0 == o.0 && self.1 > o.1) || self.0 > o.0

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl<T: OrdLogic> OrdLogic for Option<T>

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(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)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl<T: OrdLogic> OrdLogic for &T

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(open)

T::cmp_log(*self, *o)

Source§

fn le_log(self, other: Self) -> bool

logic

Source§

fn lt_log(self, other: Self) -> bool

logic

Source§

fn ge_log(self, other: Self) -> bool

logic

Source§

fn gt_log(self, other: Self) -> bool

logic

Source§

fn cmp_le_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open(pub(self)), law)

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open(pub(self)), 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)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open(pub(self)), law)

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open(pub(self)), law)

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Source§

impl<T: OrdLogic> OrdLogic for Reverse<T>

Source§

fn cmp_log(self, o: Self) -> Ordering

logic(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)

logic(open, law)

/* Macro-generated */

ensures

x.le_log(y) == (x.cmp_log(y) != Ordering::Greater)

Source§

fn cmp_lt_log(x: Self, y: Self)

logic(open, law)

/* Macro-generated */

ensures

x.lt_log(y) == (x.cmp_log(y) == Ordering::Less)

Source§

fn cmp_ge_log(x: Self, y: Self)

logic(open, law)

/* Macro-generated */

ensures

x.ge_log(y) == (x.cmp_log(y) != Ordering::Less)

Source§

fn cmp_gt_log(x: Self, y: Self)

logic(open, law)

/* Macro-generated */

ensures

x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater)

Source§

fn refl(x: Self)

logic(open, law)

/* Macro-generated */

ensures

x.cmp_log(x) == Ordering::Equal

Source§

fn trans(x: Self, y: Self, z: Self, o: Ordering)

logic(open, law)

/* Macro-generated */

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)

logic(open, law)

/* Macro-generated */

requires

x.cmp_log(y) == Ordering::Less

ensures

y.cmp_log(x) == Ordering::Greater

Source§

fn antisym2(x: Self, y: Self)

logic(open, law)

/* Macro-generated */

requires

x.cmp_log(y) == Ordering::Greater

ensures

y.cmp_log(x) == Ordering::Less

Source§

fn eq_cmp(x: Self, y: Self)

logic(open, law)

/* Macro-generated */

ensures

(x == y) == (x.cmp_log(y) == Ordering::Equal)

Implementors§