Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
ci: fix both failures from the first run on main, and stop two documents contradicting the tree
FABIOTESS510841b1c0bd
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 444e2410..09601c59 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -362,7 +362,21 @@ jobs:# are uncheckable and by decision 0005 an oracle opinion for ever, but# Mace4 is a FINITE MODEL FINDER and a finite model is exactly what# this layer certifies. The dead toolchain has a live half.- run: sudo apt-get update && sudo apt-get install -y z3 prover9+ # `prover9` has no installation candidate on Ubuntu noble, which is what+ # broke this job the first time it ran on main. LADR is built from the+ # maintained fork instead, pinned to a commit, with -std=gnu89 because+ # the source is K&R C and a current compiler otherwise rejects its+ # implicit-int parameters as errors. The recipe was run locally before+ # it was committed here. Only mace4 is installed: Prover9 itself is not+ # used anywhere, by decision 0005.+ run: |+ set -euo pipefail+ sudo apt-get update && sudo apt-get install -y z3+ git clone -q https://github.com/laitep/ladr.git /tmp/ladr+ git -C /tmp/ladr checkout -q 8317cb2dea069cd57723f76bdee7d6bd818103a7+ make -C /tmp/ladr all XFLAGS="-std=gnu89" > /tmp/ladr-build.log 2>&1 || { tail -30 /tmp/ladr-build.log; exit 1; }+ sudo install -m 755 /tmp/ladr/bin/mace4 /usr/local/bin/mace4+ command -v z3 mace4- name: Check the first-order model certificates end to end# `lake build` already compiles these proofs, because `Fol` and# `oo-folmodel` are both in defaultTargets. What this leg adds is thediff --git a/Cargo.lock b/Cargo.lockindex 161cc321..f51cf8bd 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3899,9 +3899,9 @@ dependencies = [[[package]]name = "rustls"-version = "0.23.41"+version = "0.23.45"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f"+checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"dependencies = ["once_cell","ring",@@ -3923,9 +3923,9 @@ dependencies = [[[package]]name = "rustls-webpki"-version = "0.103.13"+version = "0.103.15"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"+checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"dependencies = ["ring","rustls-pki-types",diff --git a/README.md b/README.mdindex faf625d0..8e440849 100644--- a/README.md+++ b/README.md@@ -64,6 +64,12 @@ is a proxy that rises as the slice grows, so a retriever tuned on it learns to fthan the right thing. Entailment preservation is the property, it is decidable here, and itcarries a certificate per claim. See [decision 0007](docs/decisions/0007-a-slice-preserves-a-conclusion-or-it-does-not.md).+The Lean is not the only checker. An independent formalisation of the same certificate checker+in Isabelle/HOL, written from the W3C specifications with the Lean deliberately unread, lives in+[isabelle/](isabelle/) and is run over the same bytes. On its first run it disagreed with the Lean+on 47 of 1,718 certificates, all in the safe direction, and the cause was a gap in the certificate+format that neither proof could see. A second kernel exists to catch what one cannot, and it did.+The discipline matters more than the machinery, and it runs through all of it.A rule **you** supplied is an assumption the certificate carries, never a fact it establishes, sodiff --git a/docs/reasoning-systems-inventory.md b/docs/reasoning-systems-inventory.mdindex 68f8276b..964fd3a5 100644--- a/docs/reasoning-systems-inventory.md+++ b/docs/reasoning-systems-inventory.md@@ -21,7 +21,7 @@ perverse.| Mace4 | Finite model finder | Same. Its output is checkable; Prover9's is not. || Prover9 | First-order prover | Declined. Unmaintained since 2011, refutations uncheckable. || cvc5 | SMT solver | Not installed. Same role as Z3 when it is. |-| Isabelle/HOL | Proof assistant | Declined for now. Reasons below. |+| Isabelle/HOL | Proof assistant | Built, as an independent second kernel. It disagreed with the Lean. Below. || Dedukti | Logical framework | Declined. Reasons below. || Duper, lean-smt | Lean automation | Declined. Both require Mathlib. || Aeneas with Charon | Rust to Lean | Declined. Subset does not contain this codebase. |@@ -69,26 +69,47 @@ merely corroborated.Its unsat answers stay oracle answers. An unsat core is not a proof object we can replay, and theproof logs Z3 can emit would need the same mechanised calculus that the first-order case lacks.-## Isabelle, and why not yet--Isabelle/HOL is the obvious comparison, because Sledgehammer does exactly what we cannot: it calls-external provers and then reconstructs their findings through the Isabelle kernel, so an external-prover's answer becomes a proof. That is the capability this project lacks and would most like.--It is declined for now, and not because Isabelle is unsuitable. Adopting it-means a second proof assistant, a second build, a second set of proofs and a second trust surface,-for a codebase whose entire pitch is that the trust surface is small enough to read in an afternoon.-Reconstruction would have to be redone for our translation rather than inherited. And the specific-thing we would gain, kernel-checked refutations, we can already approximate where it matters by-checking models instead.--The version that would pay, and that remains open, is narrower: use Isabelle as an INDEPENDENT SECOND-KERNEL for the statements we already prove in Lean, so that a bug in one kernel or in one-formalisation does not go unnoticed. That is a replication exercise rather than an integration, and it-should be judged on its own when the Lean side is stable.--Nitpick, Isabelle's counterexample finder, belongs to the model-finder family above and would slot-into the certified path the same way Mace4 does.+## Isabelle, and what the second kernel found++This section said "declined for now" until 14 September 2026, and it was stale for several hours+after the work had merged. That is recorded here rather than silently overwritten, because a+document that says a thing was not built when it was is the same defect as one that claims a+proof it does not have.++Isabelle/HOL is not used the way Sledgehammer uses it, reconstructing external provers' answers+through a kernel. It is used for something narrower and, for this project, more valuable: an+INDEPENDENT SECOND FORMALISATION of the Horn certificate checker, written from the W3C+specifications and the fixture data with the Lean deliberately unread, so that a definitional+mistake shared by nobody could be caught. A machine-checked proof rules out a bad argument and+does nothing about a bad definition, and a bad definition is invisible from inside a single+formalisation by construction. The formalisation lives in `isabelle/`, builds with no `sorry`+and no `oops`, and its checker is exported to executable code so it can be run over the same+bytes the Lean reads.++Then both verified checkers were run over 1,718 certificates. They disagreed on 47, all in the+same direction, with none unexplained, and the cause was neither proof. Isabelle validates the+binding list as a data structure; Lean turned any binding list into a total function with a+silent default. On a certificate that binds one variable twice, first to a value that makes the+step check and then to one that does not, Lean returned the absolute verdict and Isabelle+refused. The defect was in the FORMAT, which never said what a repeated key means, and only a+second implementation could have surfaced it. That gap is being closed by making the Lean refuse+the shape, not by editing the Isabelle, since its independence is the asset.++The adversarial review of that comparison established four things about the Lean layer that the+Lean's own build could never have shown, and they are the current work rather than a footnote:+eight of the twenty-seven rules were assumed as primitive semantic conditions rather than+derived, so the machine-checked content for those arms was close to nothing, and the Isabelle+derives them; the Lean's model class is larger than the specification's, so non-entailment does+not transfer outward to a conforming interpretation; the two checkers print the same verdict word+for theorems over model classes nobody has ordered; and both sides' non-vacuity witnesses were+vacuous exactly where their conditions are strongest. Each of those is a case of the layer+claiming more than it had earned, which by this project's standards is the same category as a+soundness bug.++What remains declined is the wider use. Reconstructing Vampire or E refutations through+Isabelle's kernel would give this project kernel-checked refutations, which it lacks, at the cost+of a second proof assistant in the trust surface for every user rather than for a cross-check.+That trade is still not being made, and the reasoning has not changed.## Dedukti, and why not