Skip to content

Phase 8: SMT-LIB translation and the Z3 auto-prover - #10

Merged
JFrusher merged 1 commit into
phase-7-analysisfrom
phase-8-z3
Oct 24, 2026
Merged

JFrusher merged 1 commit into
phase-7-analysisfrom
phase-8-z3

Conversation

@JFrusher

Copy link
Copy Markdown
Owner

Stacked on #9. Implements Phase 8 of ROADMAP.md.

  • M8.1 SMT-LIB translation (src/core/smt.cpp, spec in docs/spec/smt.md): individuals; worlds when formulas are modal (S5 as universal quantification over worlds, constant domains, rigid identity); properties with an application predicate and one comprehension axiom per λ (Henkin semantics, the standard embedding for Gödel's argument). theosc export --format smtlib prints the scripts.
  • M8.2 Z3 runs as an external program ($THEOS_Z3 or z3 on the PATH) with a 20 s limit, so nothing links against it and MinGW builds are unaffected. The browser build reports that Z3 isn't available. Adds by z3 as a justification and theosc prove for a second opinion on every inference.

Results on the library: Z3 independently confirms every inference except Gödel's T3, which Z3 4.8 can't decide within 20 s. T3 stands on its natural-deduction proof, and the docs say so.

Tests check that Z3 also rejects invalid inferences, including ones with λ, property quantification and modality, so the encoding isn't trivially inconsistent. Z3 tests are skipped when Z3 is missing; CI installs it on Linux and in MSYS2.


Generated by Claude Code

- Translation to SMT-LIB 2: individuals, worlds for modal formulas (S5 as
  universal quantification over worlds, constant domains, rigid identity),
  properties with an application predicate and a comprehension axiom per
  lambda (Henkin semantics)
- Z3 runs as an external program ( or z3 on the PATH), with a
  time limit; no link dependency, so MinGW builds are unaffected; the
  browser build reports that Z3 is unavailable
- 'by z3' justification, theosc prove, theosc export --format smtlib
- Z3 confirms every inference in the library except Goedel's T3, which it
  cannot decide in 20 s and which stands on its natural-deduction proof
- Tests: script structure, valid and invalid inferences (so the encoding is
  not trivially inconsistent), 'by z3'; skipped when Z3 is absent
- CI installs Z3 on Linux and in MSYS2
- docs/spec/smt.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019WEmxyo9CRKSbjbEdCuJTG
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aae337d5-ba10-4a5e-b049-605257c3c1f4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JFrusher JFrusher mentioned this pull request Oct 24, 2026
@JFrusher
JFrusher marked this pull request as ready for review October 24, 2026 23:23
@JFrusher
JFrusher merged commit 134fbc1 into phase-7-analysis Oct 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants