pub struct Positive(/* private fields */);Expand description
Positive numbers, i.e. numbers that are strictly greater than 0.
Implementations§
Trait Implementations§
Source§impl OrdLogic for Positive
impl OrdLogic for Positive
Source§fn cmp_le_log(x: Self, y: Self)
fn cmp_le_log(x: Self, y: Self)
logic(open(pub(self)), law) ⚠
ensures
x.le_log(y) == (x.cmp_log(y) != core::cmp::Ordering::Greater)Source§fn cmp_lt_log(x: Self, y: Self)
fn cmp_lt_log(x: Self, y: Self)
logic(open(pub(self)), law) ⚠
ensures
x.lt_log(y) == (x.cmp_log(y) == core::cmp::Ordering::Less)Source§fn cmp_ge_log(x: Self, y: Self)
fn cmp_ge_log(x: Self, y: Self)
logic(open(pub(self)), law) ⚠
ensures
x.ge_log(y) == (x.cmp_log(y) != core::cmp::Ordering::Less)Source§fn cmp_gt_log(x: Self, y: Self)
fn cmp_gt_log(x: Self, y: Self)
logic(open(pub(self)), law) ⚠
ensures
x.gt_log(y) == (x.cmp_log(y) == core::cmp::Ordering::Greater)Source§fn refl(x: Self)
fn refl(x: Self)
logic(open(pub(self)), law) ⚠
ensures
x.cmp_log(x) == core::cmp::Ordering::EqualSource§fn trans(x: Self, y: Self, z: Self, o: Ordering)
fn trans(x: Self, y: Self, z: Self, o: Ordering)
logic(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)
logic(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == core::cmp::Ordering::Lessensures
y.cmp_log(x) == core::cmp::Ordering::GreaterSource§fn antisym2(x: Self, y: Self)
fn antisym2(x: Self, y: Self)
logic(open(pub(self)), law) ⚠
requires
x.cmp_log(y) == core::cmp::Ordering::Greaterensures
y.cmp_log(x) == core::cmp::Ordering::LessSource§impl Plain for Positive
impl Plain for Positive
Source§fn into_ghost(s: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(s: Snapshot<Self>) -> Ghost<Self>
terminates
ghost
ensures
*result == *sSource§impl RA for Positive
impl RA for Positive
Source§fn factor(self, factor: Self) -> Option<Self>
fn factor(self, factor: Self) -> Option<Self>
logic ⚠
ensures
match result { Some(c) => factor.op(c) == Some(self), None => forall<c: Self> factor.op(c) != Some(self), }
Source§fn commutative(a: Self, b: Self)
fn commutative(a: Self, b: Self)
logic(law) ⚠
ensures
a.op(b) == b.op(a)Source§fn associative(a: Self, b: Self, c: Self)
fn associative(a: Self, b: Self, c: Self)
logic ⚠
ensures
a.op(b).and_then_logic(|ab: Self| ab.op(c)) == b.op(c).and_then_logic(|bc| a.op(bc))
Source§fn core_idemp(self)
fn core_idemp(self)
logic ⚠
requires
self.core() != Noneensures
let c = self.core().unwrap_logic(); c.op(c) == Some(c)
ensures
self.core().unwrap_logic().op(self) == Some(self)Source§fn core_is_maximal_idemp(self, i: Self)
fn core_is_maximal_idemp(self, i: Self)
logic ⚠
requires
i.op(i) == Some(i)requires
i.op(self) == Some(self)ensures
match self.core() { Some(c) => i.incl(c), None => false, }
Source§fn cancelable(self) -> bool
fn cancelable(self) -> bool
logic(open)
let _ = Self::ext_eq; true
ensures
result == (forall<x, y> self.op(x) != None ==> self.op(x) == self.op(y) ==> x == y)
Source§fn eq(self, other: Self) -> bool
fn eq(self, other: Self) -> bool
logic(open, inline) Read more
Source§fn incl_eq(self, other: Self) -> bool
fn incl_eq(self, other: Self) -> bool
logic(open, sealed) Read more
Source§fn incl_eq_op(a: Self, b: Self, x: Self) -> bool
fn incl_eq_op(a: Self, b: Self, x: Self) -> bool
logic(open, sealed) Read more
Source§fn update_nondet(self, s: Set<Self>) -> bool
fn update_nondet(self, s: Set<Self>) -> bool
This is used in
Resource::update_nondet. Read moreSource§fn associative_none(a: Self, b: Self, c: Self, bc: Self)
fn associative_none(a: Self, b: Self, c: Self, bc: Self)
Source§fn associative_some(a: Self, b: Self, c: Self, ab: Self, bc: Self)
fn associative_some(a: Self, b: Self, c: Self, ab: Self, bc: Self)
Specialized version of
Self::associative, in the case where a.op(b) and b.op(c)
are both valid. Read moreSource§fn incl_transitive(a: Self, b: Self, c: Self)
fn incl_transitive(a: Self, b: Self, c: Self)
impl Copy for Positive
Auto Trait Implementations§
impl Freeze for Positive
impl Objective for Positive
impl RefUnwindSafe for Positive
impl Send for Positive
impl Sync for Positive
impl Unpin for Positive
impl UnsafeUnpin for Positive
impl UnwindSafe for Positive
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more