pub struct Sequent {
pub antecedent: Vec<NnfFormula>,
pub succedent: Vec<NnfFormula>,
}Expand description
A sequent in propositional sequent calculus (LK/LJ).
A sequent Γ ⊢ Δ consists of a context (antecedent) and a conclusion (succedent).
For LJ (intuitionistic), Δ has at most one formula.
Fields§
§antecedent: Vec<NnfFormula>Antecedent: list of assumption formulas.
succedent: Vec<NnfFormula>Succedent: list of conclusion formulas (at most one for intuitionistic).
Implementations§
Source§impl Sequent
impl Sequent
Sourcepub fn new(antecedent: Vec<NnfFormula>, succedent: Vec<NnfFormula>) -> Self
pub fn new(antecedent: Vec<NnfFormula>, succedent: Vec<NnfFormula>) -> Self
Create a sequent from antecedent and succedent.
Sourcepub fn axiom(p: NnfFormula) -> Self
pub fn axiom(p: NnfFormula) -> Self
Create an axiom sequent: p ⊢ p.
Sourcepub fn is_initial(&self) -> bool
pub fn is_initial(&self) -> bool
Check if this is an initial sequent (antecedent and succedent share a formula).
Sourcepub fn is_classically_valid(&self, num_vars: usize) -> bool
pub fn is_classically_valid(&self, num_vars: usize) -> bool
Check if this sequent is classically valid (all atoms satisfied under any assignment).
Sourcepub fn with_assumption(self, f: NnfFormula) -> Self
pub fn with_assumption(self, f: NnfFormula) -> Self
Add a formula to the antecedent.
Sourcepub fn with_conclusion(self, f: NnfFormula) -> Self
pub fn with_conclusion(self, f: NnfFormula) -> Self
Add a formula to the succedent.
Sourcepub fn has_false_in_antecedent(&self) -> bool
pub fn has_false_in_antecedent(&self) -> bool
Check if the antecedent contains Bot (False), making the sequent trivially valid.
Sourcepub fn has_true_in_succedent(&self) -> bool
pub fn has_true_in_succedent(&self) -> bool
Check if the succedent contains Top (True), making the sequent trivially valid.