pub struct ProofNet {
pub formulas: Vec<LinearFormula>,
pub links: Vec<(usize, usize)>,
}Expand description
A proof net: a list of formulas (formula occurrences) with axiom/cut links.
Fields§
§formulas: Vec<LinearFormula>The formulas (conclusions) of the proof net.
links: Vec<(usize, usize)>Links: pairs of formula occurrence indices connected by axiom or cut.
Implementations§
Source§impl ProofNet
impl ProofNet
Sourcepub fn new(formulas: Vec<LinearFormula>) -> Self
pub fn new(formulas: Vec<LinearFormula>) -> Self
Create a new proof net with the given formulas and no links.
Sourcepub fn is_well_typed(&self) -> bool
pub fn is_well_typed(&self) -> bool
Check if the proof net is well-typed: every formula occurrence appears in exactly one link.
Sourcepub fn correctness_criterion_danos_regnier(&self) -> bool
pub fn correctness_criterion_danos_regnier(&self) -> bool
Danos-Regnier correctness criterion: removing any subset of par-links leaves a connected acyclic graph.
This is a simplified check: we verify the axiom links form a perfect matching and the graph is connected (full DR requires switching).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofNet
impl RefUnwindSafe for ProofNet
impl Send for ProofNet
impl Sync for ProofNet
impl Unpin for ProofNet
impl UnsafeUnpin for ProofNet
impl UnwindSafe for ProofNet
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