#condensedDetachment

2025-11-21

#CondensedDetachment example

Axiom 1: ⊢ (𝜑 → (𝜓 → 𝜑))
Axiom 2: ⊢ ((𝜑 → (𝜓 → 𝜒)) → ((𝜑 → 𝜓) → (𝜑 → 𝜒)))
Rule of Modus Ponens:
• Major hypothesis: ⊢ (𝜓 → 𝜑)
• Minor hypothesis: ⊢ 𝜓
• Resulting Assertion: ⊢ 𝜑
——
D<major><minor> applies the Rule of Modus Ponens treating the two given tautologies as having metavariables living in different namespaces and returning the normalized result. We extend by using underscore as a placeholder, so D__ recovers the rule of modus ponens.
——
"D2_" is proof of the rule:
• Hypothesis: ⊢ (𝜑 → (𝜓 → 𝜒))
• Resulting assertion: ⊢ ((𝜑 → 𝜓) → (𝜑 → 𝜒))
——
"D21" is a proof which unifies "1" ⊢ (𝜑′ → (𝜓′ → 𝜑′)) with the hypothesis of "D2_" giving the substitution map 𝜎: {𝜑′ ↦ 𝜑, 𝜓′ ↦ 𝜓, 𝜒 ↦ 𝜑} resulting in the tautology: ⊢ ((𝜑 → 𝜓) → (𝜑 → 𝜑))

(Note that unification can map variables from either side, but when faced with a variable matching a term has to match the variable to that term.)
——
"DD21_" is proof of the rule:
• Hypothesis: ⊢ (𝜑 → 𝜓)
• Resulting assertion: ⊢ ((𝜑 → 𝜑)
——
"DD211" is a proof which unifies "1" ⊢ (𝜑″ → (𝜓″ → 𝜑″)) with the hypothesis of "DD21_" giving the substitution map 𝜎: {𝜑″ ↦ 𝜑, 𝜓 ↦ (𝜓″ → 𝜑)} resulting in the tautology: ⊢ (𝜑 → 𝜑)

This has been adapted and expanded from a run of my symbolic-mgu pre-release crate. crates.io/crates/symbolic-mgu

cargo run -r --bin compact -- --wide D__ 1 2 D2_ D21 DD21_ DD211

#math #logic #theoremProving #rust #mostGeneralUnifier #mgu

Cartoon sketch of a computer screen with gears, a partial line of predicate calculus symbols, and the logo for the Rust programming language announcing the pre-release availability of the "symbolic-mgu" crate for symbolic logic unification using Most General Unifiers (MGU).
2025-11-21

An abbreviated run for examining sub-proofs of propositional logic from Russell and Whitehead, and proving that they are all tautologies:

```
% cargo test --features serde,bigint -r --test pmproofs_validation -- --include-ignored --no-capture

running 1 test
Validating PM subproofs...
Variable limit: unlimited (bigint feature enabled)
Total subproofs in database: 2997
Processed 100/2997 subproofs...
Processed 200/2997 subproofs...

...

Processed 2800/2997 subproofs...
Processed 2900/2997 subproofs...

========================================
PM SUBPROOF VALIDATION RESULTS
========================================
Total subproofs: 2997
Parse failures: 0
Skipped (too many variables): 0
Validation errors: 0
Not tautologies: 0
Successfully validated: 2997

✓ Successfully validated 2997 subproofs!
test all_pm_subproofs_are_tautologies ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.60s

```

#Rust #logic #math #theoremProving #condensedDetachment #mostGeneralUnifier #mgu

2025-11-21

I'm writing an open source math library in #Rust to do symbolic unification. (following Meredith, Robinson, Megill) It's in pre-release (v0.1.0-alpha.13) now but I'm nearly feature-complete and I'm beginning to write interesting demonstrations with it.

I thought now would be a time to solicit feedback before the API stabilizes as per semantic versioning best practices.

Like many compilers built on top of the LLVM architecture, un-optimized Rust is about 10 times slower than the optimized code produced with the --release flag. You can really notice this with the test that sets out to exhaustively produce all expressions on sets of limited operators until all 16 Boolean functions are produced. docs.rs/crate/symbolic-mgu/lat

Also I run through Norm Megill's archive of shortest known proofs of propositional logic statements from Whitehead and Russell's Prinicipia Mathematica and test that they and all subproofs produce tautologies. docs.rs/crate/symbolic-mgu/lat

Documentation: docs.rs/symbolic-mgu/latest/sy
Distribution: crates.io/crates/symbolic-mgu
Repository: github.com/arpie-steele/symbol

#logic #theoremProving #condensedDetachment #mostGeneralUnifier #mgu #math

2023-01-02

If D2D13 ⊢((𝜑→(¬𝜓→¬𝜒))→(𝜑→(𝜒→𝜓))) is the major premise and 1 ⊢(𝜑→(𝜓→𝜑)) is the minor premise how does #CondensedDetachment work?

1. Rewrite to have distinct metavariables
M′ ⊢((a→(¬b→¬c))→(a→(c→b)))
m′ ⊢(d→(e→d))

2. Walk the trees of the antecedent to major premise and the minor premise and build the substitutions required to map to a common unification
• a with d
• ¬b with e
• ¬c with d (and therefore with a)

M″ ⊢((¬c→(¬b→¬c))→(¬c→(c→b)))
m″ ⊢(¬c→(¬b→¬c))

3. Apply modus ponens and relabel

2023-01-02

#CondensedDetachment examples in #Logic

Axioms:
1 ⊢(𝜑→(𝜓→𝜑))
2 ⊢((𝜑→(𝜓→𝜒))→((𝜑→𝜓)→(𝜑→𝜒)))
3 ⊢((¬𝜑→¬𝜓)→(𝜓→𝜑))

Theorems:

Here, the notation DMm means we applied Condensed Detachment to M as the major premise and m as the minor premise.

D12 ⊢(𝜑→((𝜓→(𝜒→𝜃))→((𝜓→𝜒)→(𝜓→𝜃))))
D13 ⊢(𝜑→((¬𝜓→¬𝜒)→(𝜒→𝜓)))
D21 ⊢((𝜑→𝜓)→(𝜑→𝜑))
DD211 ⊢(𝜑→𝜑) ; identity
D2D12 ⊢((𝜑→(𝜓→(𝜒→𝜃)))→(𝜑→((𝜓→𝜒)→(𝜓→𝜃))))
D2D13 ⊢((𝜑→(¬𝜓→¬𝜒))→(𝜑→(𝜒→𝜓)))
DD2D121 ⊢((𝜑→𝜓)→((𝜒→𝜑)→(𝜒→𝜓))) ; syllogism
DD2D131 ⊢(¬𝜑→(𝜑→𝜓)) ; explosion

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst