pub enum AgreeR<A> {
Unit,
Agree(A),
AgreeInvalid,
}Expand description
Agreement PCM
In modern Iris, it uses CMRA instead of PCM, which uses a core for every element instead of a unit element. Here we add a unit element to stick to the PCM definition.
Variants§
Implementations§
Trait Implementations§
Source§impl<A: PartialEq> PCM for AgreeR<A>
impl<A: PartialEq> PCM for AgreeR<A>
Source§open spec fn op(self, other: Self) -> Self
open spec fn op(self, other: Self) -> Self
{
match (self, other) {
(AgreeR::Unit, x) => x,
(x, AgreeR::Unit) => x,
(AgreeR::Agree(a), AgreeR::Agree(b)) => {
if a == b { AgreeR::Agree(a) } else { AgreeR::AgreeInvalid }
}
_ => AgreeR::AgreeInvalid,
}
}Composition: two agreeing values must be equal.
Source§proof fn closed_under_incl(a: Self, b: Self)
proof fn closed_under_incl(a: Self, b: Self)
Source§proof fn commutative(a: Self, b: Self)
proof fn commutative(a: Self, b: Self)
Source§proof fn associative(a: Self, b: Self, c: Self)
proof fn associative(a: Self, b: Self, c: Self)
Source§proof fn unit_valid()
proof fn unit_valid()
Auto Trait Implementations§
impl<A> Freeze for AgreeR<A>where
A: Freeze,
impl<A> RefUnwindSafe for AgreeR<A>where
A: RefUnwindSafe,
impl<A> Send for AgreeR<A>where
A: Send,
impl<A> Sync for AgreeR<A>where
A: Sync,
impl<A> Unpin for AgreeR<A>where
A: Unpin,
impl<A> UnwindSafe for AgreeR<A>where
A: 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