vstd::pcm

Trait PCM

Source
pub trait PCM: Sized {
    // Required methods
    spec fn valid(self) -> bool;
    spec fn op(self, other: Self) -> Self;
    spec fn unit() -> Self;
    proof fn closed_under_incl(a: Self, b: Self);
    proof fn commutative(a: Self, b: Self);
    proof fn associative(a: Self, b: Self, c: Self);
    proof fn op_unit(a: Self);
    proof fn unit_valid();
}
Expand description

See Resource for more information.

Required Methods§

Source

spec fn valid(self) -> bool

Source

spec fn op(self, other: Self) -> Self

Source

spec fn unit() -> Self

Source

proof fn closed_under_incl(a: Self, b: Self)

requires
Self::op(a, b).valid(),
ensures
a.valid(),
Source

proof fn commutative(a: Self, b: Self)

ensures
Self::op(a, b) == Self::op(b, a),
Source

proof fn associative(a: Self, b: Self, c: Self)

ensures
Self::op(a, Self::op(b, c)) == Self::op(Self::op(a, b), c),
Source

proof fn op_unit(a: Self)

ensures
Self::op(a, Self::unit()) == a,
Source

proof fn unit_valid()

ensures
Self::valid(Self::unit()),

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.

Implementors§