pub enum AlgTag {
Comm,
Assoc,
AssocLeft,
AssocRight,
Idempotent,
Nilpotent(Option<u8>),
Identity(Term),
Cancellative,
Inverse(String),
}Expand description
A single composable algebraic-property tag on a function declaration. Tags combine freely
at the surface (:assoc :comm :idempotent); the sortcheck resolver maps a tag set to a
concrete OpKind and validates the combination (see doc/design/ac-algebraic-properties.md
Facet A). The old pre-combined :assoc-comm / :assoc-comm-idem are accepted as aliases
that the parser expands into these basic tags.
Variants§
Comm
Assoc
AssocLeft
AssocRight
Idempotent
x∘x = x (idempotent, set representation, dedup).
Nilpotent(Option<u8>)
x∘x = e (nilpotent); optional order n (default 2). Requires Identity.
Identity(Term)
Identity/unit element e (x∘e = x), given as a ground surface term (:identity 0,
:identity (zero)). Parsed here, sort-checked and stored deferred at registration.
Cancellative
Cancellativity (x∘z = y∘z ⟹ x = y); an equation-level inference, no element.
Inverse(String)
Group inverse: names the unary inverse op (:inverse neg). Requires Identity.
Trait Implementations§
impl Eq for AlgTag
impl StructuralPartialEq for AlgTag
Auto Trait Implementations§
impl Freeze for AlgTag
impl RefUnwindSafe for AlgTag
impl Send for AlgTag
impl Sync for AlgTag
impl Unpin for AlgTag
impl UnsafeUnpin for AlgTag
impl UnwindSafe for AlgTag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.