Skip to main content

Set

Struct Set 

Source
pub struct Set {
    pub any: u64,
    pub uniq: u64,
    pub fin_many: u64,
    pub inf_many: u64,
}
Expand description

Conditions that holds for a set in general.

Fields§

§any: u64

All types, including those who are not defined.

§uniq: u64

A unique value.

§fin_many: u64

Many but finite number of values.

§inf_many: u64

Many but infinite number of values.

Implementations§

Source§

impl Set

Source

pub fn rules(&self) -> u64

Rules for sets.

Source

pub fn none(&self) -> u64

Returns whether the set is empty.

Source

pub fn some(&self) -> u64

Returns whether the set is non-empty.

Source

pub fn undefined(&self) -> u64

Returns whether the set is undefined. This can be a set of higher cardinality.

Source

pub fn multiple(&self) -> u64

Returns whether the set contains more than one. The set must be well defined.

Source

pub fn count<F: Fn(Set) -> u64>(f: F) -> u64

Counts the number of true cases.

Trait Implementations§

Source§

impl Clone for Set

Source§

fn clone(&self) -> Set

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Construct for Set

Source§

fn construct(vs: &[u64]) -> Self

Creates a logical system out of proof arguments.
Source§

fn n() -> usize

Gets the number of bits in logical system.
Source§

impl CoreRules for Set

Source§

fn core_rules(&self) -> u64

The core rules of the logical system.
Source§

impl ExtendRules for Set

Source§

type Inner = ()

The inner logical system.
Source§

fn inner(&self) -> &()

Gets the inner logical system.
Source§

fn extend_rules(&self, _: &Self::Inner) -> u64

Rules used to integrate with inner logical system.
Source§

fn full_rules(&self) -> u64

The full rules of the entire logical system.
Source§

impl Copy for Set

Auto Trait Implementations§

§

impl Freeze for Set

§

impl RefUnwindSafe for Set

§

impl Send for Set

§

impl Sync for Set

§

impl Unpin for Set

§

impl UnsafeUnpin for Set

§

impl UnwindSafe for Set

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> Prove for T
where T: Copy + Construct + ExtendRules,

Source§

fn count<F>(f: F) -> u64
where F: Fn(T) -> u64,

A method to count true statements. Read more
Source§

fn prove<F>(f: F) -> bool
where F: Fn(T) -> u64,

A method to prove a statement according to the rules. Read more
Source§

fn does_not_mean<F, G>(assumption: F, conclusion: G) -> bool
where F: Fn(Self) -> u64, G: Fn(Self) -> u64,

According to the rules, the assumption does not lead to the conclusion, but neither does it lead to the opposite conclusion.
Source§

fn means<F, G>(assumption: F, conclusion: G) -> bool
where F: Fn(Self) -> u64, G: Fn(Self) -> u64,

According to the rules, the conclusion follows from the assumptions, but the assumptions can not be used to get the opposite conclusion.
Source§

fn eq<F, G>(a: F, b: G) -> bool
where F: Fn(Self) -> u64, G: Fn(Self) -> u64,

Proves that according to the rules, two statements are equivalent.
Source§

fn exc<F, G>(a: F, b: G) -> bool
where F: Fn(Self) -> u64, G: Fn(Self) -> u64,

Proves that according to the rules, two statements are exclusive.
Source§

fn imply<F, G>(a: F, b: G) -> bool
where F: Fn(Self) -> u64, G: Fn(Self) -> u64,

Proves that according to the rules, the first statement implies the other.
Source§

fn prob<F>(f: F) -> Option<f64>
where F: Fn(Self) -> u64,

Computes the logical probability P(f | rules).
Source§

fn prob_imply<A, B>(a: A, b: B) -> Option<f64>
where A: Fn(Self) -> u64 + Copy, B: Fn(Self) -> u64,

Computes the logical probability P(b | a ∧ rules).
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V