pub enum AgreementRA<T> {
Agree(T),
Invalid,
}Expand description
The Agreement resource algebra
This resource algebra allows one to express that multiple parties can agree on a chosen value
This is mainly useful to show that if two resources are Agree then they must point to the
same value (see lemma_agree):
Variants§
Implementations§
Source§impl<T> AgreementRA<T>
impl<T> AgreementRA<T>
pub fn arrow_0(self) -> T
pub fn arrow_Agree_0(self) -> T
Source§impl<T> AgreementRA<T>
impl<T> AgreementRA<T>
Trait Implementations§
Source§impl<T> ResourceAlgebra for AgreementRA<T>
impl<T> ResourceAlgebra for AgreementRA<T>
Source§open spec fn op(a: Self, b: Self) -> Self
open spec fn op(a: Self, b: Self) -> Self
{
match (a, b) {
(AgreementRA::Agree(a), AgreementRA::Agree(b)) if a == b => AgreementRA::Agree(a),
_ => AgreementRA::Invalid,
}
}Source§proof fn associative(a: Self, b: Self, c: Self)
proof fn associative(a: Self, b: Self, c: Self)
Source§proof fn commutative(a: Self, b: Self)
proof fn commutative(a: Self, b: Self)
Auto Trait Implementations§
impl<T> Freeze for AgreementRA<T>where
T: Freeze,
impl<T> RefUnwindSafe for AgreementRA<T>where
T: RefUnwindSafe,
impl<T> Send for AgreementRA<T>where
T: Send,
impl<T> Sync for AgreementRA<T>where
T: Sync,
impl<T> Unpin for AgreementRA<T>where
T: Unpin,
impl<T> UnsafeUnpin for AgreementRA<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AgreementRA<T>where
T: UnwindSafe,
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
Source§impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
Source§impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
Source§exec fn obeys_try_from_spec() -> bool
exec fn obeys_try_from_spec() -> bool
Source§impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
Source§exec fn obeys_try_into_spec() -> bool
exec fn obeys_try_into_spec() -> bool
Source§impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
Source§open spec fn obeys_try_into_spec() -> bool
open spec fn obeys_try_into_spec() -> bool
{ <U as TryFromSpec<Self>>::obeys_try_from_spec() }