InferenceRule

Enum InferenceRule 

Source
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

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.

Fields

§variable: String
§var_type: String
§

ExistentialIntro

Logic: P(w) ⊢ ∃x.P(x) Carries the witness and its type for kernel certification.

Fields

§witness: String
§witness_type: String
§

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.

Fields

§variable: String
§ind_type: String
§step_var: String
§

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.

Fields

§

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).

Fields

§witness: String
§

CaseAnalysis

Case Analysis (Tertium Non Datur / Law of Excluded Middle) Logic: (P → ⊥), (¬P → ⊥) ⊢ ⊥ Used for self-referential paradoxes like the Barber Paradox.

Fields

§case_formula: String

Trait Implementations§

Source§

impl Clone for InferenceRule

Source§

fn clone(&self) -> InferenceRule

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for InferenceRule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for InferenceRule

Source§

fn eq(&self, other: &InferenceRule) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for InferenceRule

Auto Trait Implementations§

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> 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.