| Crates.io | symbolic-mgu |
| lib.rs | symbolic-mgu |
| version | 0.1.0-alpha.15 |
| created_at | 2025-10-25 09:42:00.328839+00 |
| updated_at | 2026-01-06 21:37:14.099344+00 |
| description | Symbolic logic unification using Most General Unifiers (MGU). Implements Meredith's condensed detachment for exploring automated proof discovery. |
| homepage | |
| repository | https://github.com/arpie-steele/symbolic-mgu |
| max_upload_size | |
| id | 1900022 |
| size | 2,961,691 |
A Rust library for symbolic logic unification using Most General Unifiers (MGU).
symbolic-mgu provides a framework for representing logical formulas as structured objects and exploring symbolic logic through unification and automated proof discovery. The implementation follows Robinson's unification algorithm and supports Meredith's condensed detachment principle.
Academic Context: This crate implements typed symbolic unification based on Robinson (1965) and Meredith's condensed detachment (1953). For detailed mathematical background, references, and citation information, see docs/SCHOLARLY_CONTEXT.md.
Core Unification:
Theorem Proving:
Boolean Expression Evaluation:
bigint feature)# Build the library
cargo build
# Run all tests
cargo test
# Build with all features (including `bigint` for up to 20 variables)
cargo build --all-features
# Build and view documentation
cargo doc --open
The library provides trait-based abstractions for terms, substitutions, and unification:
use symbolic_mgu::{unify, Substitution, EnumTerm, MetaByte, NodeByte, SimpleType};
// Create terms representing logical formulas
// Unify terms to find most general unifiers
// Apply substitutions to derive new theorems
See the full API documentation for detailed usage.
cargo docsrc/FormalSpec.md for formal definitionssrc/SystemOverview.md for architecturesrc/NodeBytesLogicTable.md for operation referencebigint: Support for Boolean logic with up to 20 variables (requires num-bigint)serde: JSON serialization support for terms and statements# Build with all features
cargo build --all-features
# Build with specific features
cargo build --features bigint,serde
Process and verify compact proof strings using standard propositional calculus axioms:
# Process a compact proof (uses MetaByte by default)
cargo run --bin compact -- "DD211"
# Process multiple proofs
cargo run --bin compact -- "D__" "DD211" "DD2D111"
# Verify that a theorem is a tautology
cargo run --bin compact -- --verify "DD211"
# Use WideMetavariable for unlimited variables (with Unicode subscripts)
cargo run --bin compact -- --wide "DD211"
# Force MetaByte (32 variable limit, compact ASCII)
cargo run --bin compact -- --byte "DD211"
Options:
--verify, -v: Verify that theorems are tautologies or inferences are valid--wide, -w, --no-byte: Use WideMetavariable (unlimited variables)--byte, -b, --no-wide: Use MetaByte (32 variables, default)--help, -h: Show usage informationDictionary:
D = Modus Ponens1 = Simp: φ → (ψ → φ)2 = Frege: (φ → (ψ → χ)) → ((φ → ψ) → (φ → χ))3 = Transp: (¬φ → ¬ψ) → (ψ → φ)_ = Placeholder (unsatisfied hypothesis)This crate requires Rust 1.77 or later and uses edition 2018 for maximum compatibility.
If you use symbolic-mgu in published research, please cite it as:
symbolic-mgu (v0.1.x) — a Rust library for typed symbolic unification and condensed detachment. Available at crates.io/crates/symbolic-mgu.
For foundational references (Robinson 1965, Meredith 1953, etc.), see docs/SCHOLARLY_CONTEXT.md.