pub struct PowerSetHeyting {
pub universe: u64,
}Expand description
Finite Heyting algebra as a power-set lattice over n atoms. Elements are represented as bitmasks of subsets of {0, …, n-1}.
Fields§
§universe: u64Implementations§
Source§impl PowerSetHeyting
impl PowerSetHeyting
pub fn new(n: u32) -> Self
pub fn meet(&self, a: u64, b: u64) -> u64
pub fn join(&self, a: u64, b: u64) -> u64
pub fn top(&self) -> u64
pub fn bot(&self) -> u64
pub fn neg(&self, a: u64) -> u64
Sourcepub fn implication(&self, a: u64, b: u64) -> u64
pub fn implication(&self, a: u64, b: u64) -> u64
Heyting implication: a → b = ⋁{x | x ∧ a ≤ b}.
pub fn le(&self, a: u64, b: u64) -> bool
Sourcepub fn double_neg(&self, a: u64) -> u64
pub fn double_neg(&self, a: u64) -> u64
Double negation: ¬¬a in a Boolean algebra equals a.
Trait Implementations§
Source§impl Clone for PowerSetHeyting
impl Clone for PowerSetHeyting
Source§fn clone(&self) -> PowerSetHeyting
fn clone(&self) -> PowerSetHeyting
Returns a duplicate of the value. Read more
1.0.0 · 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 PowerSetHeyting
impl Debug for PowerSetHeyting
Source§impl PartialEq for PowerSetHeyting
impl PartialEq for PowerSetHeyting
impl Copy for PowerSetHeyting
impl Eq for PowerSetHeyting
impl StructuralPartialEq for PowerSetHeyting
Auto Trait Implementations§
impl Freeze for PowerSetHeyting
impl RefUnwindSafe for PowerSetHeyting
impl Send for PowerSetHeyting
impl Sync for PowerSetHeyting
impl Unpin for PowerSetHeyting
impl UnsafeUnpin for PowerSetHeyting
impl UnwindSafe for PowerSetHeyting
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