pub struct AlgebraicSignature {
pub carrier: Sort,
/* private fields */
}Expand description
Backend-agnostic signature for an algebraic structure.
This lets Phase 12 build proof obligations from a reusable semantic model instead of ad-hoc raw strings at each export site.
Fields§
§carrier: SortImplementations§
Source§impl AlgebraicSignature
impl AlgebraicSignature
pub fn new(carrier: Sort) -> AlgebraicSignature
pub fn semigroup( carrier: Sort, combine: impl Into<String>, ) -> AlgebraicSignature
pub fn monoid( carrier: Sort, combine: impl Into<String>, identity: impl Into<String>, ) -> AlgebraicSignature
pub fn group( carrier: Sort, combine: impl Into<String>, identity: impl Into<String>, inverse: impl Into<String>, ) -> AlgebraicSignature
pub fn semiring( carrier: Sort, add: impl Into<String>, mul: impl Into<String>, zero: impl Into<String>, one: impl Into<String>, ) -> AlgebraicSignature
pub fn ring( carrier: Sort, add: impl Into<String>, mul: impl Into<String>, zero: impl Into<String>, one: impl Into<String>, neg: impl Into<String>, ) -> AlgebraicSignature
pub fn lattice( carrier: Sort, meet: impl Into<String>, join: impl Into<String>, ) -> AlgebraicSignature
pub fn with_binary( self, role: impl Into<String>, symbol: impl Into<String>, ) -> AlgebraicSignature
pub fn with_unary( self, role: impl Into<String>, symbol: impl Into<String>, ) -> AlgebraicSignature
pub fn with_constant( self, role: impl Into<String>, symbol: impl Into<String>, ) -> AlgebraicSignature
pub fn binary(&self, role: &str) -> Option<&str>
pub fn unary(&self, role: &str) -> Option<&str>
pub fn constant(&self, role: &str) -> Option<&str>
pub fn require_binary(&self, role: &str) -> &str
pub fn require_unary(&self, role: &str) -> &str
pub fn require_constant(&self, role: &str) -> &str
Trait Implementations§
Source§impl Clone for AlgebraicSignature
impl Clone for AlgebraicSignature
Source§fn clone(&self) -> AlgebraicSignature
fn clone(&self) -> AlgebraicSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlgebraicSignature
impl Debug for AlgebraicSignature
impl Eq for AlgebraicSignature
Source§impl PartialEq for AlgebraicSignature
impl PartialEq for AlgebraicSignature
Source§fn eq(&self, other: &AlgebraicSignature) -> bool
fn eq(&self, other: &AlgebraicSignature) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AlgebraicSignature
Auto Trait Implementations§
impl Freeze for AlgebraicSignature
impl RefUnwindSafe for AlgebraicSignature
impl Send for AlgebraicSignature
impl Sync for AlgebraicSignature
impl Unpin for AlgebraicSignature
impl UnsafeUnpin for AlgebraicSignature
impl UnwindSafe for AlgebraicSignature
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