Skip to main content

Obligation

Struct Obligation 

Source
pub struct Obligation {
    pub name: String,
    pub property: &'static str,
    pub declarations: Vec<Declaration>,
    pub assumptions: Vec<Term>,
    pub conclusion: Term,
    pub origin: Origin,
    pub tier: VerificationTier,
}
Expand description

A backend-agnostic proof obligation.

Fields§

§name: String§property: &'static str§declarations: Vec<Declaration>§assumptions: Vec<Term>§conclusion: Term§origin: Origin§tier: VerificationTier

Implementations§

Source§

impl Obligation

Source

pub fn for_property<P>( name: impl Into<String>, origin: Origin, tier: VerificationTier, conclusion: Term, ) -> Obligation
where P: Property,

Create a new obligation for property P.

Source

pub fn with_decl(self, name: impl Into<String>, sort: Sort) -> Obligation

Source

pub fn with_assumption(self, term: Term) -> Obligation

Source

pub fn associativity( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, ) -> Obligation

Build an associativity obligation for a binary operator symbol.

Source

pub fn associativity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, role: &str, ) -> Obligation

Source

pub fn commutativity( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, ) -> Obligation

Build a commutativity obligation for a binary operator symbol.

Source

pub fn commutativity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, role: &str, ) -> Obligation

Source

pub fn additive_commutativity( name: impl Into<String>, origin: Origin, carrier: Sort, add: impl Into<String>, ) -> Obligation

Source

pub fn additive_commutativity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn monoid_identity( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, identity: impl Into<String>, ) -> Obligation

Build a two-sided identity obligation for a binary operator symbol.

Source

pub fn monoid_identity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn left_identity( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, identity: impl Into<String>, ) -> Obligation

Source

pub fn left_identity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, op_role: &str, identity_role: &str, ) -> Obligation

Source

pub fn right_identity( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, identity: impl Into<String>, ) -> Obligation

Source

pub fn right_identity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, op_role: &str, identity_role: &str, ) -> Obligation

Source

pub fn left_inverse( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, inverse: impl Into<String>, identity: impl Into<String>, ) -> Obligation

Source

pub fn left_inverse_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn right_inverse( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, inverse: impl Into<String>, identity: impl Into<String>, ) -> Obligation

Source

pub fn right_inverse_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn left_distributivity( name: impl Into<String>, origin: Origin, carrier: Sort, add: impl Into<String>, mul: impl Into<String>, ) -> Obligation

Source

pub fn left_distributivity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn right_distributivity( name: impl Into<String>, origin: Origin, carrier: Sort, add: impl Into<String>, mul: impl Into<String>, ) -> Obligation

Source

pub fn right_distributivity_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn idempotency( name: impl Into<String>, origin: Origin, carrier: Sort, op: impl Into<String>, ) -> Obligation

Source

pub fn idempotency_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, role: &str, ) -> Obligation

Source

pub fn absorption( name: impl Into<String>, origin: Origin, carrier: Sort, meet: impl Into<String>, join: impl Into<String>, ) -> Obligation

Source

pub fn absorption_in( name: impl Into<String>, origin: Origin, signature: &AlgebraicSignature, ) -> Obligation

Source

pub fn summary(&self) -> String

Human-readable summary used in debugging and certificate generation.

Trait Implementations§

Source§

impl Clone for Obligation

Source§

fn clone(&self) -> Obligation

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Obligation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&Obligation> for LeanTheorem

Source§

fn from(obligation: &Obligation) -> LeanTheorem

Converts to this type from the input type.
Source§

impl PartialEq for Obligation

Source§

fn eq(&self, other: &Obligation) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Obligation

Source§

impl StructuralPartialEq for Obligation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.