pub struct StatusProvenance {
pub support: ProvenancePoly,
pub refute: ProvenancePoly,
}Expand description
Support and refute provenance polynomials for a single claim-context pair.
The status field is derived, not persisted. Reading
derive_status() computes the Belnap status from the current
support sets, which guarantees Theorem 3 by construction:
status cannot drift out of sync with the polynomials.
Fields§
§support: ProvenancePolyPolynomial of supporting derivations (pi_T(q, c) in the
theory doc).
refute: ProvenancePolyPolynomial of refuting derivations (pi_F(q, c) in the
theory doc).
Implementations§
Source§impl StatusProvenance
impl StatusProvenance
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Empty: no supporting or refuting derivations recorded.
Derives to BelnapStatus::None.
Sourcepub fn new(support: ProvenancePoly, refute: ProvenancePoly) -> Self
pub fn new(support: ProvenancePoly, refute: ProvenancePoly) -> Self
Build with given support and refute polynomials.
Sourcepub fn add_support(&mut self, derivation: &ProvenancePoly)
pub fn add_support(&mut self, derivation: &ProvenancePoly)
Add a supporting derivation polynomial.
Sourcepub fn add_refute(&mut self, derivation: &ProvenancePoly)
pub fn add_refute(&mut self, derivation: &ProvenancePoly)
Add a refuting derivation polynomial.
Sourcepub fn derive_status(&self) -> BelnapStatus
pub fn derive_status(&self) -> BelnapStatus
Derive the Belnap status from the current support sets.
This is the substrate status rule from
docs/THEORY.md Section 7. Status is a function of the
polynomials, not an independently-stored field, so Theorem 3
holds by construction.
Sourcepub fn retract<S: AsRef<str>>(&self, retracted: &BTreeSet<S>) -> Self
pub fn retract<S: AsRef<str>>(&self, retracted: &BTreeSet<S>) -> Self
Retract a set of source/event identifiers from both support and refute polynomials.
Operationally: any derivation path involving a retracted
source is dropped. The remaining polynomials may then yield
a different Belnap status under derive_status().
Sourcepub fn support_contains(&self, var: &str) -> bool
pub fn support_contains(&self, var: &str) -> bool
Whether the support set contains the given variable.
Sourcepub fn refute_contains(&self, var: &str) -> bool
pub fn refute_contains(&self, var: &str) -> bool
Whether the refute set contains the given variable.
Trait Implementations§
Source§impl Clone for StatusProvenance
impl Clone for StatusProvenance
Source§fn clone(&self) -> StatusProvenance
fn clone(&self) -> StatusProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StatusProvenance
impl Debug for StatusProvenance
Source§impl Default for StatusProvenance
impl Default for StatusProvenance
Source§fn default() -> StatusProvenance
fn default() -> StatusProvenance
Source§impl<'de> Deserialize<'de> for StatusProvenance
impl<'de> Deserialize<'de> for StatusProvenance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StatusProvenance
impl PartialEq for StatusProvenance
Source§fn eq(&self, other: &StatusProvenance) -> bool
fn eq(&self, other: &StatusProvenance) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StatusProvenance
impl Serialize for StatusProvenance
impl Eq for StatusProvenance
impl StructuralPartialEq for StatusProvenance
Auto Trait Implementations§
impl Freeze for StatusProvenance
impl RefUnwindSafe for StatusProvenance
impl Send for StatusProvenance
impl Sync for StatusProvenance
impl Unpin for StatusProvenance
impl UnsafeUnpin for StatusProvenance
impl UnwindSafe for StatusProvenance
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§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.