pub enum InferenceRule {
Show 25 variants
PremiseMatch,
ModusPonens,
ModusTollens,
ConjunctionIntro,
ConjunctionElim,
DisjunctionIntro,
DisjunctionElim,
DoubleNegation,
UniversalInst(String),
UniversalIntro {
variable: String,
var_type: String,
},
ExistentialIntro {
witness: String,
witness_type: String,
},
ModalAccess,
ModalGeneralization,
TemporalTransitivity,
StructuralInduction {
variable: String,
ind_type: String,
step_var: String,
},
Rewrite {
from: ProofTerm,
to: ProofTerm,
},
EqualitySymmetry,
EqualityTransitivity,
Reflexivity,
Axiom,
OracleVerification(String),
ReductioAdAbsurdum,
Contradiction,
ExistentialElim {
witness: String,
},
CaseAnalysis {
case_formula: String,
},
}Expand description
The “Lever” - The specific logical move made at each proof step.
This enum captures HOW we moved from premises to conclusion. Each variant corresponds to a different proof strategy or logical rule.
§See Also
DerivationTree- Each node contains anInferenceRulecertifier::certify- Maps inference rules to kernel termshints::suggest_hint- Suggests applicable rules when stuckBackwardChainer- The engine that selects and applies rules
Variants§
PremiseMatch
Direct match with a known fact in the Context/KnowledgeBase. Logic: Γ, P ⊢ P
ModusPonens
Logic: P → Q, P ⊢ Q
ModusTollens
Logic: ¬Q, P → Q ⊢ ¬P
ConjunctionIntro
Logic: P, Q ⊢ P ∧ Q
ConjunctionElim
Logic: P ∧ Q ⊢ P (or Q)
DisjunctionIntro
Logic: P ⊢ P ∨ Q
DisjunctionElim
Logic: P ∨ Q, P → R, Q → R ⊢ R
DoubleNegation
Logic: ¬¬P ⊢ P (and P ⊢ ¬¬P)
UniversalInst(String)
Logic: ∀x P(x) ⊢ P(c) Stores the specific term ‘c’ used to instantiate the universal.
UniversalIntro
Logic: Γ, x:T ⊢ P(x) implies Γ ⊢ ∀x:T. P(x) Stores variable name and type name for Lambda construction.
ExistentialIntro
Logic: P(w) ⊢ ∃x.P(x) Carries the witness and its type for kernel certification.
ModalAccess
Logic: □P (in w0), Accessible(w0, w1) ⊢ P (in w1) “Necessity Elimination” / “Distribution”
ModalGeneralization
Logic: If P is true in ALL accessible worlds ⊢ □P “Necessity Introduction”
TemporalTransitivity
Logic: t1 < t2, t2 < t3 ⊢ t1 < t3
StructuralInduction
Logic: P(0), ∀k(P(k) → P(S(k))) ⊢ ∀n P(n) Stores the variable name, its inductive type, and the step variable used.
Rewrite
Leibniz’s Law / Substitution of Equals
Logic: a = b, P(a) ⊢ P(b)
The equality proof is in premise\[0\], the P(a) proof is in premise\[1\].
Carries the original term and replacement term for certification.
EqualitySymmetry
Symmetry of Equality: a = b ⊢ b = a
EqualityTransitivity
Transitivity of Equality: a = b, b = c ⊢ a = c
Reflexivity
Reflexivity of Equality: a = a (after normalization) Used when both sides of an identity reduce to the same normal form.
Axiom
“The User Said So.” Used for top-level axioms.
OracleVerification(String)
“The Machine Said So.” (Z3 Oracle) The string contains the solver’s justification.
ReductioAdAbsurdum
Proof by Contradiction (Reductio ad Absurdum) Logic: Assume ¬C, derive P ∧ ¬P (contradiction), conclude C Or: Assume P, derive Q ∧ ¬Q, conclude ¬P
Contradiction
Contradiction detected in premises: P and ¬P both hold Logic: P, ¬P ⊢ ⊥ (ex falso quodlibet)
ExistentialElim
Existential Elimination (Skolemization in a proof context) Logic: ∃x.P(x), [c fresh] P(c) ⊢ Goal implies ∃x.P(x) ⊢ Goal The witness c must be fresh (not appearing in Goal).
CaseAnalysis
Case Analysis (Tertium Non Datur / Law of Excluded Middle) Logic: (P → ⊥), (¬P → ⊥) ⊢ ⊥ Used for self-referential paradoxes like the Barber Paradox.
Trait Implementations§
Source§impl Clone for InferenceRule
impl Clone for InferenceRule
Source§fn clone(&self) -> InferenceRule
fn clone(&self) -> InferenceRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more