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
oo-fores is now oo-resolution (#240)
Fabio Rovaiefa46eb9c722
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex dec837be..2a711c72 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -18,7 +18,7 @@ below, which cover everything since 1.3.0. New in this tag:lexical space as a plain string, so an ill-typed literal cannot slip past `sh:datatype`. (#233)- **`web/try/`, the "try it here" page**: one function running the pinned release binary in batchmode; drop a sheet, read the evidence, edit a cell, re-check. (#233)-- **A verified first-order resolution calculus, `lean/Fo`, and `oo-fores`.** `onto_fol_prove`+- **A verified first-order resolution calculus, `lean/Fo`, and `oo-resolution`.** `onto_fol_prove`sends OWL 2 RL ontologies to the prover as clauses, translates Vampire's refutation into thecertificate format and has it checked: the ninth verdict word `refutation_certified` rests on`Fo.unsat_of_check`. (#224, #225, #226, #227; decision 0005, second addendum)diff --git a/docs/assets/kgcert/prove.json b/docs/assets/kgcert/prove.jsonindex e3f8415b..240af669 100644--- a/docs/assets/kgcert/prove.json+++ b/docs/assets/kgcert/prove.json@@ -9,7 +9,7 @@"problem_form": "cnf","verdict": "refutation_certified","theorem": "Fo.unsat_of_check",- "checker": "oo-fores",+ "checker": "oo-resolution","certificate_steps": 5,"certificate_clauses": 5,"others": {diff --git a/docs/assets/knowledge-graph.py b/docs/assets/knowledge-graph.pyindex c53ec24b..7ffc613f 100644--- a/docs/assets/knowledge-graph.py+++ b/docs/assets/knowledge-graph.py@@ -90,7 +90,7 @@ def main(asserted_path, derivations_path, out_path, prove_path=None, mu_path=Nonderivations = read(derivations_path)# The prover run's report. Which judge earned `certificate` and which only# `opinion` is READ from here, never typed: `refutation_certified` is a- # word only `onto_fol_prove` can mint, from a token only `oo-fores`'s exit+ # word only `onto_fol_prove` can mint, from a token only `oo-resolution`'s exit# 0 can produce (decision 0005, second addendum).import json as _jsonimport re@@ -116,7 +116,7 @@ def main(asserted_path, derivations_path, out_path, prove_path=None, mu_path=Non"typed_not_a_class": f"typed {mu_typed}, never a class","undeclared": "a name the file never uses",}.get(mu_kind, "outside the file's language")- fo_checker = "oo-fores"+ fo_checker = "oo-resolution"# Asserted subclass edges, and the conclusions the fixpoint derived. A# derivation line is: rule, conclusion s p o, then its premises.@@ -162,7 +162,7 @@ def main(asserted_path, derivations_path, out_path, prove_path=None, mu_path=Non# anything in the ontology.LEAN = "Lean 4 · oo-cert"FILES = ["ies-core.ttl", "certificate", "problem.tsv"]- FORES = "oo-fores"+ FORES = "oo-resolution"PROGRAMS = [LEAN, "Isabelle/HOL", "Vampire", "E", "Z3", "Mace4", FORES]TOOLS = FILES + PROGRAMStool_edges = [diff --git a/docs/assets/knowledge-graph.svg b/docs/assets/knowledge-graph.svgindex 267568fa..b03c17f6 100644--- a/docs/assets/knowledge-graph.svg+++ b/docs/assets/knowledge-graph.svg@@ -279,8 +279,8 @@<text x="331.7" y="435.5" font-size="10.5" font-weight="700" fill="#f0abfc">Z3</text><rect x="327.7" y="472.5" width="36.9" height="15" rx="3.5" fill="#020617" opacity="0.88"/><text x="331.7" y="483.5" font-size="10.5" font-weight="700" fill="#f0abfc">Mace4</text>-<rect x="429.7" y="328.5" width="54.2" height="15" rx="3.5" fill="#020617" opacity="0.88"/>-<text x="433.7" y="339.5" font-size="10.5" font-weight="700" fill="#f0abfc">oo-fores</text>+<rect x="429.7" y="328.5" width="83.1" height="15" rx="3.5" fill="#020617" opacity="0.88"/>+<text x="433.7" y="339.5" font-size="10.5" font-weight="700" fill="#f0abfc">oo-resolution</text><rect x="575.3" y="274.4" width="35.5" height="15" rx="3.5" fill="#020617" opacity="0.88"/><text x="579.3" y="285.4" font-size="10" font-weight="400" fill="#cbd5e1">Class</text><rect x="585.8" y="250.5" width="35.5" height="15" rx="3.5" fill="#020617" opacity="0.88"/>@@ -434,7 +434,7 @@<text x="594" y="652" font-size="12" font-weight="800" fill="#94a3b8" letter-spacing="1.4">WHAT A VERDICT IS WORTH</text><circle cx="600" cy="672.0" r="4" fill="#34d399"/><text x="612" y="676" font-size="11" font-weight="700" fill="#34d399">certificate</text>-<text x="690" y="671" font-size="10" fill="#94a3b8">ONE file for all 259: Lean 4 and Isabelle/HOL read the same bytes, oo-fores checks Vampire's.</text>+<text x="690" y="671" font-size="10" fill="#94a3b8">ONE file for all 259: Lean 4 and Isabelle/HOL read the same bytes, oo-resolution checks Vampire's.</text><text x="690" y="683" font-size="10" fill="#64748b">re-runnable. Fo.unsat_of_check: the clause set has no model, over any carrier.</text><circle cx="600" cy="702.0" r="4" fill="#f0abfc"/><text x="612" y="706" font-size="11" font-weight="700" fill="#f0abfc">opinion</text>diff --git a/docs/decisions/0005-a-prover-is-an-oracle-and-a-translation-is-a-theorem.md b/docs/decisions/0005-a-prover-is-an-oracle-and-a-translation-is-a-theorem.mdindex ea281629..ae88e45e 100644--- a/docs/decisions/0005-a-prover-is-an-oracle-and-a-translation-is-a-theorem.md+++ b/docs/decisions/0005-a-prover-is-an-oracle-and-a-translation-is-a-theorem.md@@ -399,7 +399,7 @@ exact deletion put list arithmetic in every proof. And a domain element carriedbecause over an EMPTY carrier there are no environments, the empty clause is vacuously satisfied,and every refutation would prove nothing.-`oo-fores REFUTATION.cert` exits 0, 1, 2 on the usual convention and exit 1 names no theorem.+`oo-resolution REFUTATION.cert` exits 0, 1, 2 on the usual convention and exit 1 names no theorem.`Fo/Demo.lean` runs the textbook refutation of `∀x. P(x) → Q(x)`, `P(a)`, `¬Q(a)`, the smallest onethat actually needs unification, six forgeries that each fail for a different reason, and`no_refutation_of_a_satisfiable_set`, a theorem over EVERY refutation rather than an example.@@ -415,7 +415,7 @@ counted, never skipped, and a certificate that does not reach the empty clause iMeasured, the day it was written, with Vampire 5.1.0 and E 3.2.5:-| input | translated | `oo-fores` |+| input | translated | `oo-resolution` ||---|---|---|| Vampire, pure CNF, modus ponens | 2 of 2 | exit 0 || Vampire, pure CNF, four-link chain | 4 of 4 | exit 0 |@@ -459,7 +459,7 @@ refutation of it is an oracle opinion, and `cnf` will not pretend otherwise.On the fragment, the chain closes. `ies-building-extension.ttl`, 1,423 axioms; goal`Building ⊑ ies:Entity`, two subclass steps deep, so derived and not asserted; `--format cnf`;-Vampire, 5 steps, all resolution; `to_fo_certificate`, 5 of 5; `oo-fores` exit 0,+Vampire, 5 steps, all resolution; `to_fo_certificate`, 5 of 5; `oo-resolution` exit 0,`Fo.unsat_of_check`. The FOF encoding of the SAME goal is 18 steps, 13 of them clausification, andtranslates nothing. Vampire says `Unsatisfiable` of the one and `Theorem` of the other, one verdictin two SZS dialects. `tests/cnf_end_to_end_test.rs` is that run and its control.@@ -470,7 +470,7 @@ Decision 5 above said an ATP verdict is an oracle opinion everywhere it appears.> An ATP verdict is an oracle opinion, **unless** the problem reached the prover as clauses> (`onto_fol_prove` tries `to_cnf` first and falls back to FOF only outside the clausal fragment),-> every step of the derivation translated, and `oo-fores` exited 0. In that case, and only that+> every step of the derivation translated, and `oo-resolution` exited 0. In that case, and only that> case, the verdict is **`refutation_certified`**, resting on `Fo.unsat_of_check`, with the theorem's> name read from the checker's own stdout. Otherwise the verdict is one of the first addendum's> eight words, and the report's `certificate` field says which of five things stopped it:@@ -481,7 +481,7 @@ Decision 5 above said an ATP verdict is an oracle opinion everywhere it appears.`refutation_fully_replayed` is still the strongest word the Rust replayer can earn and is still nota certificate. The ninth word is set only when a `Certified` token exists, and that token is mintedonly by `CheckerRun::accepted_naming`, so it cannot be printed by any path that did not run the-checker and read `Fo.unsat_of_check` back from it. `unsatisfiable`, the word `oo-fores` and+checker and read `Fo.unsat_of_check` back from it. `unsatisfiable`, the word `oo-resolution` and`oo-lrat` print for themselves, joined `CHECKER_OWNED_WORDS`: Rust never says it. `problem_form` inthe run report says whether the prover got `cnf` or `fof`, and no user action selects between them.diff --git a/docs/first-order-export.md b/docs/first-order-export.mdindex eeb18b19..0b72acdd 100644--- a/docs/first-order-export.md+++ b/docs/first-order-export.md@@ -205,7 +205,7 @@ inline inference record and therefore carries no formula.| `refutation_structure_checked` | structure holds, no step replayed || `refutation_partially_replayed` | structure holds, some steps replayed. The normal outcome || `refutation_fully_replayed` | structure holds, EVERY step replayed. Still not unsatisfiability |-| `refutation_certified` | the derivation was translated into `lean/Fo`'s certificate and `oo-fores` accepted it: `Fo.unsat_of_check`. The one word that rests on a theorem; earned by itself for any goal in the clausal fragment, which every OWL 2 RL ontology is |+| `refutation_certified` | the derivation was translated into `lean/Fo`'s certificate and `oo-resolution` accepted it: `Fo.unsat_of_check`. The one word that rests on a theorem; earned by itself for any goal in the clausal fragment, which every OWL 2 RL ontology is || `mu` | returned UNASKED. The goal puts in class position a term the ontology never uses as a class: undeclared, or only an individual, or typed `skos:Concept` and never classified with. No prover is asked; its answer would be about a symbol no axiom mentions. The report names the term, its position and what the file calls it |**An unchecked step prevents the strongest word**, and so does a leaf the prover invented. That isdiff --git a/lean/FoMain.lean b/lean/FoMain.leanindex 818f53cc..8335e7ac 100644--- a/lean/FoMain.lean+++ b/lean/FoMain.lean@@ -1,7 +1,7 @@import Fo/-!-`oo-fores REFUTATION.cert`+`oo-resolution REFUTATION.cert`Reads a clause set and a resolution refutation, replays it, and prints one JSONobject.@@ -169,5 +169,5 @@ def main (args : List String) : IO UInt32 := dowhether the clause set is satisfiable\"}"return 1| _ =>- IO.println "usage: oo-fores REFUTATION.cert"+ IO.println "usage: oo-resolution REFUTATION.cert"return 2diff --git a/lean/lakefile.toml b/lean/lakefile.tomlindex 2f93a080..6be763aa 100644--- a/lean/lakefile.toml+++ b/lean/lakefile.toml@@ -1,6 +1,6 @@name = "oocert"version = "0.1.0"-defaultTargets = ["OOCert", "oo-cert", "oo-horn", "Shacl", "oo-shacl", "oo-refute", "Dl", "oo-dlmodel", "oo-dlrefute", "Fol", "oo-folmodel", "Institution", "Lrat", "oo-lrat", "Fo", "oo-fores"]+defaultTargets = ["OOCert", "oo-cert", "oo-horn", "Shacl", "oo-shacl", "oo-refute", "Dl", "oo-dlmodel", "oo-dlrefute", "Fol", "oo-folmodel", "Institution", "Lrat", "oo-lrat", "Fo", "oo-resolution"]# Every library and executable here is in defaultTargets on purpose. A target# left out of the default set is not built by a bare `lake build`, which is what@@ -119,5 +119,5 @@ root = "LratMain"name = "Fo"[[lean_exe]]-name = "oo-fores"+name = "oo-resolution"root = "FoMain"diff --git a/src/main.rs b/src/main.rsindex 7939eaab..78a36de2 100644--- a/src/main.rs+++ b/src/main.rs@@ -502,7 +502,7 @@ enum Commands {#[arg(long)]out: String,/// `tptp` (FOF, what provers read), `cnf` (the same theory already in clauses, so a- /// prover's refutation can be checked by `oo-fores`; refused outside OWL 2 RL's clausal+ /// prover's refutation can be checked by `oo-resolution`; refused outside OWL 2 RL's clausal/// fragment), `clif` or `cgif` (two of ISO/IEC/// 24707 Common Logic's three dialects, both restricted to the/// first-order-equivalent fragment), `smtlib` (SMT-LIB 2, what Z3diff --git a/src/server.rs b/src/server.rsindex a62e3871..5617729e 100644--- a/src/server.rs+++ b/src/server.rs@@ -2248,7 +2248,7 @@ impl OpenOntologiesServer {.unwrap_or_else(Self::err_json)}- #[tool(name = "onto_fol_export", description = "Export the loaded ontology as first-order logic, so it can be handed to the automated-theorem-proving ecosystem. FOUR syntaxes over ONE translation: `tptp` (FOF, what E, Vampire and every other first-order prover read), `clif` (ISO/IEC 24707 Common Logic Interchange Format, restricted to the first-order-equivalent fragment: no sequence markers, fixed arity, no quantification into a predicate position), `smtlib` (SMT-LIB 2, what Z3 reads) and `ladr` (what Mace4 reads, with every symbol MANGLED and the table written beside it as symbols.tsv, because LADR reads a name beginning with u, v, w, x, y or z as a VARIABLE and has no quoting construct that survives an IRI). The last two are read by MODEL FINDERS, so they assert the NEGATED goal rather than declaring a conjecture: a countermodel to `G |= phi` is a model of `G + {not phi}`. With `smtlib`, omit `smt_domain` for the UNBOUNDED encoding, where `unsat` really is unsatisfiability, or set it to k for an enumeration carrier of exactly k elements, where a `sat` comes with a structure `oo-folmodel` can CHECK and an `unsat` establishes only that no model of size k exists. Every run also writes `problem.tsv`, the checker's own format, with its digest, so a solver result can be handed to `oo-folmodel` without going back through the engine; use onto_fol_model to do all of that in one call. The translation is the one a MACHINE-CHECKED ADEQUACY THEOREM is about: `OwlLean.adequacy` in the sibling owl-lean project, axioms propext + Classical.choice + Quot.sound, no sorry, no Mathlib. That theorem is why the emitted file means what it says. THE CORRESPONDENCE BETWEEN THIS EMITTER AND THAT LEAN IS PINNED BY TESTS AND IS NOT ITSELF PROVED. The output includes the background axioms (the two domains are disjoint, the object domain is non-empty) and the individual typing axioms `thing(a)`, whose ABSENCE REFUTES ADEQUACY OUTRIGHT (OwlLean.Refutations.adequacy_needs_ind_axioms). Constructs outside the fragment are NOT dropped silently: `exports_a_weaker_axiom_set` and `constructs_not_exported` name every one with its count and the reason, and `reduced_to_fragment` names every construct rewritten before translation. Pass `goals_file` (a TSV of triples, e.g. the `derivations.tsv` from onto_reason with certificate_dir, with goals_skip_columns=1) to also write one problem per conjecture. A PROVER'S VERDICT ON THESE FILES IS AN ORACLE OPINION UNLESS onto_fol_prove CERTIFIES IT: a refutation of a problem in the clausal fragment (every OWL 2 RL ontology is) is translated into lean/Fo's certificate format and checked by oo-fores, Fo.unsat_of_check; a refutation that uses equality or falls outside that fragment stays an opinion, because lean/Fo has no equality yet (decision 0005, second addendum). Use tools/fol_differential.py, which reports disagreement between this engine and an ATP and does not adjudicate it.")]+ #[tool(name = "onto_fol_export", description = "Export the loaded ontology as first-order logic, so it can be handed to the automated-theorem-proving ecosystem. FOUR syntaxes over ONE translation: `tptp` (FOF, what E, Vampire and every other first-order prover read), `clif` (ISO/IEC 24707 Common Logic Interchange Format, restricted to the first-order-equivalent fragment: no sequence markers, fixed arity, no quantification into a predicate position), `smtlib` (SMT-LIB 2, what Z3 reads) and `ladr` (what Mace4 reads, with every symbol MANGLED and the table written beside it as symbols.tsv, because LADR reads a name beginning with u, v, w, x, y or z as a VARIABLE and has no quoting construct that survives an IRI). The last two are read by MODEL FINDERS, so they assert the NEGATED goal rather than declaring a conjecture: a countermodel to `G |= phi` is a model of `G + {not phi}`. With `smtlib`, omit `smt_domain` for the UNBOUNDED encoding, where `unsat` really is unsatisfiability, or set it to k for an enumeration carrier of exactly k elements, where a `sat` comes with a structure `oo-folmodel` can CHECK and an `unsat` establishes only that no model of size k exists. Every run also writes `problem.tsv`, the checker's own format, with its digest, so a solver result can be handed to `oo-folmodel` without going back through the engine; use onto_fol_model to do all of that in one call. The translation is the one a MACHINE-CHECKED ADEQUACY THEOREM is about: `OwlLean.adequacy` in the sibling owl-lean project, axioms propext + Classical.choice + Quot.sound, no sorry, no Mathlib. That theorem is why the emitted file means what it says. THE CORRESPONDENCE BETWEEN THIS EMITTER AND THAT LEAN IS PINNED BY TESTS AND IS NOT ITSELF PROVED. The output includes the background axioms (the two domains are disjoint, the object domain is non-empty) and the individual typing axioms `thing(a)`, whose ABSENCE REFUTES ADEQUACY OUTRIGHT (OwlLean.Refutations.adequacy_needs_ind_axioms). Constructs outside the fragment are NOT dropped silently: `exports_a_weaker_axiom_set` and `constructs_not_exported` name every one with its count and the reason, and `reduced_to_fragment` names every construct rewritten before translation. Pass `goals_file` (a TSV of triples, e.g. the `derivations.tsv` from onto_reason with certificate_dir, with goals_skip_columns=1) to also write one problem per conjecture. A PROVER'S VERDICT ON THESE FILES IS AN ORACLE OPINION UNLESS onto_fol_prove CERTIFIES IT: a refutation of a problem in the clausal fragment (every OWL 2 RL ontology is) is translated into lean/Fo's certificate format and checked by oo-resolution, Fo.unsat_of_check; a refutation that uses equality or falls outside that fragment stays an opinion, because lean/Fo has no equality yet (decision 0005, second addendum). Use tools/fol_differential.py, which reports disagreement between this engine and an ATP and does not adjudicate it.")]async fn onto_fol_export(&self, Parameters(input): Parameters<OntoFolExportInput>) -> String {let syntax = match crate::tptp::Syntax::parse(input.format.as_deref().unwrap_or("tptp"),@@ -2305,7 +2305,7 @@ impl OpenOntologiesServer {.unwrap_or_else(Self::err_json)}- #[tool(name = "onto_fol_prove", description = "Run a first-order prover, READ the derivation it prints back, and RE-CHECK what can honestly be re-checked. This moves the boundary decision 0005 drew by exactly one step, its second addendum: a refutation of a problem in the clausal fragment is CERTIFIED when lean/Fo's checker accepts its translation (`refutation_certified`, theorem Fo.unsat_of_check, no user action: OWL 2 RL goes to the prover as clauses by itself), and every other refutation is an ORACLE OPINION, because lean/Fo has no equality yet and the replayer here is ordinary UNVERIFIED Rust with no theorem behind it. What it adds is that the opinion stops being a single word. THREE THINGS ARE EARNED, in increasing cost: (1) THE PROVER REFUTED OUR PROBLEM: every leaf of the derivation is matched, by name AND by parsed formula AND by role, against the problem onto_fol_export emitted, so a prover pointed at a stale file, a different file, or one whose conjecture was smuggled in as an axiom is caught; (2) THE DERIVATION IS A WELL-FOUNDED DAG ENDING IN $false: every parent reference resolves, the parent relation is acyclic, and the node nothing cites is the empty clause; (3) SOME STEPS ARE REPLAYED: binary resolution (which is also exactly what a subsumption-resolution conclusion is), factoring, duplicate literal removal, trivial inequality removal, equality resolution, associative flattening and the negation of the conjecture are recomputed from their premises with a small unifier. EVERYTHING ELSE IS NAMED AND COUNTED AS UNCHECKED: clausification, Skolemisation, AVATAR splitting and every SAT-solver step are not checked and are never claimed to be. FIELDS THAT ARE NEVER COLLAPSED: `szs_status` (what the prover said about itself, echoed and untrusted), `derivation_wellformed`, `leaves_match_problem` with `leaf_match_levels` saying how much normalisation each leaf needed, `steps_checked` / `steps_unchecked` (by rule, with a count and a reason) / `steps_not_reconstructed`, `conjecture_used`, `what_was_refuted` (`axioms_and_the_negated_conjecture` or `axioms_alone`, the second meaning the axioms are inconsistent on their own), and `verdict`. THE VERDICT IS ONE OF TEN WORDS: `derivation_rejected` is THE CHECKER SAYING NO (a dangling parent, a cycle, or a leaf that is not a formula of the problem); `refutation_step_not_reconstructed` means a step whose rule IS implemented did not reconstruct, which is EITHER a defect in the derivation OR a gap in this checker and this tool decides neither; `refutation_structure_checked`, `refutation_partially_replayed` and `refutation_fully_replayed` are the replay ladder, AN UNCHECKED STEP PREVENTS THE STRONGEST WORD, and even the strongest is NOT `unsatisfiable` and NOT a Lean-checked anything; `no_refutation_offered`, `derivation_unparsed` and `problem_unparsed` are the non-answers; `refutation_certified` is the one word that rests on a theorem, set only when a Certified token was minted by oo-fores accepting the translated derivation; and `mu` is a question returned UNASKED, because it puts in class position a term the ontology never uses as a class (undeclared, or only ever an individual, or a skos:Concept), so neither yes nor no would be about anything and no prover is asked. Needs vampire or eprover on PATH; its absence is reported loudly in `skipped` and never worked around. Pass `problem` and `proof` to check a recorded pair with no prover run and no store. The MODEL direction is the one that CAN be certified: see onto_fol_model and decision 0006.")]+ #[tool(name = "onto_fol_prove", description = "Run a first-order prover, READ the derivation it prints back, and RE-CHECK what can honestly be re-checked. This moves the boundary decision 0005 drew by exactly one step, its second addendum: a refutation of a problem in the clausal fragment is CERTIFIED when lean/Fo's checker accepts its translation (`refutation_certified`, theorem Fo.unsat_of_check, no user action: OWL 2 RL goes to the prover as clauses by itself), and every other refutation is an ORACLE OPINION, because lean/Fo has no equality yet and the replayer here is ordinary UNVERIFIED Rust with no theorem behind it. What it adds is that the opinion stops being a single word. THREE THINGS ARE EARNED, in increasing cost: (1) THE PROVER REFUTED OUR PROBLEM: every leaf of the derivation is matched, by name AND by parsed formula AND by role, against the problem onto_fol_export emitted, so a prover pointed at a stale file, a different file, or one whose conjecture was smuggled in as an axiom is caught; (2) THE DERIVATION IS A WELL-FOUNDED DAG ENDING IN $false: every parent reference resolves, the parent relation is acyclic, and the node nothing cites is the empty clause; (3) SOME STEPS ARE REPLAYED: binary resolution (which is also exactly what a subsumption-resolution conclusion is), factoring, duplicate literal removal, trivial inequality removal, equality resolution, associative flattening and the negation of the conjecture are recomputed from their premises with a small unifier. EVERYTHING ELSE IS NAMED AND COUNTED AS UNCHECKED: clausification, Skolemisation, AVATAR splitting and every SAT-solver step are not checked and are never claimed to be. FIELDS THAT ARE NEVER COLLAPSED: `szs_status` (what the prover said about itself, echoed and untrusted), `derivation_wellformed`, `leaves_match_problem` with `leaf_match_levels` saying how much normalisation each leaf needed, `steps_checked` / `steps_unchecked` (by rule, with a count and a reason) / `steps_not_reconstructed`, `conjecture_used`, `what_was_refuted` (`axioms_and_the_negated_conjecture` or `axioms_alone`, the second meaning the axioms are inconsistent on their own), and `verdict`. THE VERDICT IS ONE OF TEN WORDS: `derivation_rejected` is THE CHECKER SAYING NO (a dangling parent, a cycle, or a leaf that is not a formula of the problem); `refutation_step_not_reconstructed` means a step whose rule IS implemented did not reconstruct, which is EITHER a defect in the derivation OR a gap in this checker and this tool decides neither; `refutation_structure_checked`, `refutation_partially_replayed` and `refutation_fully_replayed` are the replay ladder, AN UNCHECKED STEP PREVENTS THE STRONGEST WORD, and even the strongest is NOT `unsatisfiable` and NOT a Lean-checked anything; `no_refutation_offered`, `derivation_unparsed` and `problem_unparsed` are the non-answers; `refutation_certified` is the one word that rests on a theorem, set only when a Certified token was minted by oo-resolution accepting the translated derivation; and `mu` is a question returned UNASKED, because it puts in class position a term the ontology never uses as a class (undeclared, or only ever an individual, or a skos:Concept), so neither yes nor no would be about anything and no prover is asked. Needs vampire or eprover on PATH; its absence is reported loudly in `skipped` and never worked around. Pass `problem` and `proof` to check a recorded pair with no prover run and no store. The MODEL direction is the one that CAN be certified: see onto_fol_model and decision 0006.")]async fn onto_fol_prove(&self, Parameters(input): Parameters<OntoFolProveInput>) -> String {use crate::tstp::{ProveOptions, Prover, check_files, prove_export};if let (Some(p), Some(d)) = (input.problem.as_deref(), input.proof.as_deref()) {diff --git a/src/tptp.rs b/src/tptp.rsindex 0671609e..f9445739 100644--- a/src/tptp.rs+++ b/src/tptp.rs@@ -1050,7 +1050,7 @@ impl FolProblem {let mut s = String::new();s.push_str(&header("%", self.conjecture.is_some(), TPTP_STYLE));s.push_str("% CNF. Every formula is a clause, so a prover's refutation of this file is\n");- s.push_str("% resolution end to end and can be checked by oo-fores (Fo.unsat_of_check).\n");+ s.push_str("% resolution end to end and can be checked by oo-resolution (Fo.unsat_of_check).\n");s.push_str(&format!("% One Skolem constant, '{}', witnesses the non-empty domain (background_2).\n",sym::constant(Self::DOMAIN_WITNESS)@@ -4460,7 +4460,7 @@ pub enum Syntax {Ladr,/// TPTP CNF: the same theory as `Tptp`, already in clauses, so a prover/// never clausifies and its refutation is resolution end to end, which is- /// what `tstp::to_fo_certificate` and `oo-fores` can check. Available ONLY+ /// what `tstp::to_fo_certificate` and `oo-resolution` can check. Available ONLY/// in the clausal fragment; an ontology with a superclass existential is/// refused by name rather than clausified by a Skolemisation nobody/// proved.diff --git a/src/tstp.rs b/src/tstp.rsindex ac08718c..4262bd82 100644--- a/src/tstp.rs+++ b/src/tstp.rs@@ -1531,7 +1531,7 @@ pub struct Report {pub certificate: Option<CertificateOutcome>,}-/// The outcome of offering a derivation to `oo-fores`.+/// The outcome of offering a derivation to `oo-resolution`.////// `Certified` can only be built from a [`crate::verdict::Certified`] token,/// and that token only exists after a checker exited zero naming the theorem,@@ -1540,7 +1540,7 @@ pub struct Report {#[derive(Clone, Debug, serde::Serialize)]#[serde(tag = "status", rename_all = "snake_case")]pub enum CertificateOutcome {- /// `oo-fores` accepted. `theorem` is read from the token, which read it+ /// `oo-resolution` accepted. `theorem` is read from the token, which read it/// from the checker's stdout.Certified { theorem: &'static str, checker: String, steps: usize, certificate: String },/// The problem was exported as FOF because it is outside the clausal@@ -1552,9 +1552,9 @@ pub enum CertificateOutcome {StepsUntranslated { untranslated: Vec<(String, String)>, translated: usize },/// Every step translated but the chain does not reach the empty clause.DoesNotReachFalse { translated: usize },- /// The certificate was written and `oo-fores` is not installed to read it.+ /// The certificate was written and `oo-resolution` is not installed to read it.CheckerAbsent { certificate: String },- /// `oo-fores` REFUSED a certificate this translator produced. Either a+ /// `oo-resolution` REFUSED a certificate this translator produced. Either a/// defect in the translation or in the derivation; both stop the line.CheckerRefused { exit: i32, output: String, certificate: String },}@@ -1594,7 +1594,7 @@ pub fn verdict_means(v: &str) -> &'static str {and counted. This is the normal outcome, because \clausification and AVATAR splitting are not checked","refutation_certified" => "the derivation was translated into lean/Fo's certificate format \- and oo-fores ACCEPTED it, discharging Fo.unsat_of_check: the \+ and oo-resolution ACCEPTED it, discharging Fo.unsat_of_check: the \clause set in the derivation's leaves has no model, over any \carrier. The leaves are the formulas this engine emitted \(leaves_match_problem), so that is a refutation of OUR problem. \@@ -2297,20 +2297,20 @@ fn resolvent_matches(a: &Clause, b: &Clause, c: &Clause) -> Result<bool, &'stati// What does NOT translate is named and counted, never skipped. Clausification,// Skolemisation, AVATAR splitting and every form of equality reasoning are// outside the calculus, and a certificate covering only some steps does not-// reach the empty clause, so `oo-fores` refuses it. That refusal is the+// reach the empty clause, so `oo-resolution` refuses it. That refusal is the// correct answer and the honest one: a partial translation is not a proof./// A certificate in `lean/Fo`'s format, and what had to be left out of it.#[derive(Debug, Clone)]pub struct FoCertificate {- /// The certificate text, ready for `oo-fores`.+ /// The certificate text, ready for `oo-resolution`.pub text: String,/// Steps turned into resolution inferences.pub translated: usize,/// Steps that are not resolution, by name and rule. Never silently dropped.pub untranslated: Vec<(String, String)>,/// Does the certificate reach the empty clause through translated steps- /// alone? Only then can `oo-fores` accept it.+ /// alone? Only then can `oo-resolution` accept it.pub reaches_false: bool,}@@ -2576,7 +2576,7 @@ pub fn report_json(r: &Report) -> serde_json::Value {"verdict_means": verdict_means(r.verdict),"certificate": r.certificate,"checked_by": if matches!(r.certificate, Some(CertificateOutcome::Certified { .. })) {- "lean/Fo via oo-fores, whose acceptance discharges Fo.unsat_of_check (axioms propext, \+ "lean/Fo via oo-resolution, whose acceptance discharges Fo.unsat_of_check (axioms propext, \Classical.choice, Quot.sound; no sorry). The replay in src/tstp.rs ran too and is \reported above, but the verdict rests on the theorem and not on the replay. What is \still Rust: the TSTP parser, the translation into the certificate, and the \@@ -2731,22 +2731,22 @@ fn prove_one(}fn find_fores() -> Option<PathBuf> {- // An explicit OO_FORES is an instruction. If it points nowhere the answer+ // An explicit OO_RESOLUTION is an instruction. If it points nowhere the answer// is "absent", not "fall back to whatever else is lying around": the same// rule `shacl_verified::resolve_checker` applies, for the same reason. A// test that sets it to a missing path is asking to see the absent branch.- if let Ok(p) = std::env::var("OO_FORES") {+ if let Ok(p) = std::env::var("OO_RESOLUTION") {let p = PathBuf::from(p);return p.exists().then_some(p);}- let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-fores");+ let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-resolution");if built.exists() {return Some(built);}- std::env::split_paths(&std::env::var_os("PATH")?).map(|d| d.join("oo-fores")).find(|p| p.is_file())+ std::env::split_paths(&std::env::var_os("PATH")?).map(|d| d.join("oo-resolution")).find(|p| p.is_file())}-/// Offer the derivation to `oo-fores`, and say exactly what happened.+/// Offer the derivation to `oo-resolution`, and say exactly what happened.////// Only when the replay found a well-founded refutation whose leaves are OUR/// formulas. A certificate over some other clause set would be a proof of@@ -2944,12 +2944,12 @@ pub fn prove_export("certified": certified,"certified_means": if certified > 0 {"this many refutations were CHECKED BY A THEOREM: translated into lean/Fo's \- certificate format and accepted by oo-fores (Fo.unsat_of_check). Every other \+ certificate format and accepted by oo-resolution (Fo.unsat_of_check). Every other \refutation in this run is an oracle opinion and its `certificate` field says why"} else {"NOTHING HERE IS CERTIFIED. A refutation is an ORACLE OPINION (decision 0005) \unless it was exported in the clausal fragment, every step translated, and \- oo-fores exited 0. None did; each report's `certificate` field says which of \+ oo-resolution exited 0. None did; each report's `certificate` field says which of \those failed. The MODEL direction is the other one that can be certified; see \decision 0006 and onto_fol_model"},diff --git a/src/verdict.rs b/src/verdict.rsindex 07e4e5ed..0e41bf64 100644--- a/src/verdict.rs+++ b/src/verdict.rs@@ -405,7 +405,7 @@ pub const CHECKER_OWNED_WORDS: &[&str] = &["entailed_under_supplied_rules",// `oo-refute`, lean/OOCert/Refute.lean."unsatisfiable_under_disjointness",- // `oo-fores`, lean/FoMain.lean, and `oo-lrat`, lean/LratMain.lean. Both+ // `oo-resolution`, lean/FoMain.lean, and `oo-lrat`, lean/LratMain.lean. Both// print this for an accepted refutation. The Rust side says// `refutation_certified` and `refuted`, never this."unsatisfiable",diff --git a/tests/cnf_end_to_end_test.rs b/tests/cnf_end_to_end_test.rsindex bbe7ee36..e1df5aef 100644--- a/tests/cnf_end_to_end_test.rs+++ b/tests/cnf_end_to_end_test.rs@@ -2,7 +2,7 @@//!//! `ies-building-extension.ttl` is exported as CNF with a goal that is two//! subclass steps deep, Vampire refutes it, the refutation is translated into-//! `lean/Fo`'s format, and `oo-fores` accepts it, discharging+//! `lean/Fo`'s format, and `oo-resolution` accepts it, discharging//! `Fo.unsat_of_check`. Every link is a real tool on real output; the test//! skips cleanly when a tool is absent and asserts hard when it is present.@@ -31,11 +31,11 @@ fn on_path(name: &str) -> Option<PathBuf> {}fn fores() -> Option<PathBuf> {- if let Ok(p) = std::env::var("OO_FORES") {+ if let Ok(p) = std::env::var("OO_RESOLUTION") {let p = PathBuf::from(p);return p.exists().then_some(p);}- let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-fores");+ let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-resolution");built.exists().then_some(built)}@@ -115,7 +115,7 @@ fn vampires_refutation_of_the_cnf_export_is_checked_by_the_lean_theorem() {std::fs::write(&cert_path, &cert.text).unwrap();let o = Command::new(f).arg(&cert_path).output().unwrap();let out = String::from_utf8_lossy(&o.stdout);- assert_eq!(o.status.code(), Some(0), "oo-fores refused a real refutation:\n{out}\n{}", cert.text);+ assert_eq!(o.status.code(), Some(0), "oo-resolution refused a real refutation:\n{out}\n{}", cert.text);assert!(out.contains(r#""theorem":"Fo.unsat_of_check""#), "{out}");let _ = std::fs::remove_dir_all(&dir);}diff --git a/tests/fol_prove_certified_test.rs b/tests/fol_prove_certified_test.rsindex 0165de75..188c7c0b 100644--- a/tests/fol_prove_certified_test.rs+++ b/tests/fol_prove_certified_test.rs@@ -1,4 +1,4 @@-//! `onto_fol_prove`'s certified path: CNF first, `oo-fores` after the replay,+//! `onto_fol_prove`'s certified path: CNF first, `oo-resolution` after the replay,//! and the word `refutation_certified` only from a minted token.use std::path::PathBuf;@@ -16,8 +16,8 @@ fn scratch() -> PathBuf {}fn tools() -> bool {- let fores = std::env::var("OO_FORES").map(|p| PathBuf::from(p).exists()).unwrap_or(false)- || PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-fores").exists();+ let fores = std::env::var("OO_RESOLUTION").map(|p| PathBuf::from(p).exists()).unwrap_or(false)+ || PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-resolution").exists();fores && Prover::Vampire.available()}@@ -76,15 +76,15 @@ fn a_dl_ontology_stays_an_opinion_and_the_report_names_the_axiom_that_cost_it()#[test]fn the_certified_word_cannot_appear_without_the_checker() {// Same RL goal, checker pointed at a path that does not exist. An explicit- // OO_FORES is an instruction, not a hint, so there is no fallback: the+ // OO_RESOLUTION is an instruction, not a hint, so there is no fallback: the// replay still runs, the certificate field says the checker was absent,- // and the WORD is not printed. This test is the sole writer of OO_FORES in+ // and the WORD is not printed. This test is the sole writer of OO_RESOLUTION in// its process.if !Prover::Vampire.available() { return; }- let had = std::env::var("OO_FORES").ok();- unsafe { std::env::set_var("OO_FORES", "/nonexistent/oo-fores") };+ let had = std::env::var("OO_RESOLUTION").ok();+ unsafe { std::env::set_var("OO_RESOLUTION", "/nonexistent/oo-resolution") };let j = run(RL, RL_GOAL);- match had { Some(v) => unsafe { std::env::set_var("OO_FORES", v) }, None => unsafe { std::env::remove_var("OO_FORES") } }+ match had { Some(v) => unsafe { std::env::set_var("OO_RESOLUTION", v) }, None => unsafe { std::env::remove_var("OO_RESOLUTION") } }let g = &j["goals"][0]["report"];assert_eq!(j["problem_form"], "cnf", "{j}");assert_ne!(g["verdict"], "refutation_certified", "no checker ran, so the word may not appear: {g}");diff --git a/tests/knowledge_graph_asset_test.rs b/tests/knowledge_graph_asset_test.rsindex 4e9640cd..8b97fbfc 100644--- a/tests/knowledge_graph_asset_test.rs+++ b/tests/knowledge_graph_asset_test.rs@@ -552,7 +552,7 @@ fn the_ontology_heading_names_the_predicate_it_drew() {// half the words in the file, so asserting on it would pass for the wrong// reason. It is still counted, because the count below counts it.let pipeline = ["ies-core.ttl", "certificate", "problem.tsv", "Lean 4",- "Isabelle/HOL", "Vampire", "Z3", "Mace4", "oo-fores"];+ "Isabelle/HOL", "Vampire", "Z3", "Mace4", "oo-resolution"];for name in pipeline {assert!(s.contains(name), "the pipeline no longer names {name:?}");}@@ -571,7 +571,7 @@ fn the_ontology_heading_names_the_predicate_it_drew() {////// `docs/assets/kgcert/prove.json` is `onto_fol_prove`'s result on the figure's/// own ontology. If it says `refutation_certified` on a `cnf` problem, the-/// asset must show Vampire with a `certificate` badge, an edge to `oo-fores`,+/// asset must show Vampire with a `certificate` badge, an edge to `oo-resolution`,/// and a legend whose `opinion` row does NOT name Vampire; if it does not, the/// asset must show the older, weaker picture. Either way the asset agrees with/// the run, and a hand edit to one side fails here.@@ -582,7 +582,7 @@ fn the_judges_badges_come_from_the_prover_run() {&std::fs::read_to_string(repo().join("docs/assets/kgcert/prove.json")).expect("prove.json"),).expect("json");let certified = run["verdict"] == "refutation_certified" && run["problem_form"] == "cnf";- assert!(s.contains("oo-fores"), "the checker of Fo certificates must be drawn");+ assert!(s.contains("oo-resolution"), "the checker of Fo certificates must be drawn");if certified {assert!(s.contains("Vampire's refutation is checked"), "beat 4 must say the refutation was checked");assert!(s.contains(run["theorem"].as_str().unwrap()), "the legend names the theorem the run named");diff --git a/tests/lean_fo_resolution_test.rs b/tests/lean_fo_resolution_test.rsindex 811f093f..7dfd5ef6 100644--- a/tests/lean_fo_resolution_test.rs+++ b/tests/lean_fo_resolution_test.rs@@ -1,4 +1,4 @@-//! `oo-fores` end to end.+//! `oo-resolution` end to end.//!//! Decision 0005 names the missing piece: certifying a superposition proof//! "needs a verified first-order calculus with unification that does not exist@@ -14,11 +14,11 @@ use std::sync::atomic::{AtomicU64, Ordering};static NEXT: AtomicU64 = AtomicU64::new(0);fn checker() -> Option<PathBuf> {- if let Ok(p) = std::env::var("OO_FORES") {+ if let Ok(p) = std::env::var("OO_RESOLUTION") {let p = PathBuf::from(p);return p.exists().then_some(p);}- let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-fores");+ let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-resolution");built.exists().then_some(built)}@@ -32,14 +32,14 @@ fn run(cert: &str) -> Option<Run> {// One directory per call. These run in parallel and a shared path makes// two tests read each other's certificate.let dir = std::env::temp_dir().join(format!(- "oo-fores-{}-{}",+ "oo-resolution-{}-{}",std::process::id(),NEXT.fetch_add(1, Ordering::Relaxed)));std::fs::create_dir_all(&dir).unwrap();let f = dir.join("r.cert");std::fs::write(&f, cert).unwrap();- let o = Command::new(bin).arg(&f).output().expect("oo-fores runs");+ let o = Command::new(bin).arg(&f).output().expect("oo-resolution runs");let _ = std::fs::remove_dir_all(&dir);Some(Run {code: o.status.code().unwrap_or(-1),diff --git a/tests/tstp_to_fo_certificate_test.rs b/tests/tstp_to_fo_certificate_test.rsindex 94f316e9..4bb6892c 100644--- a/tests/tstp_to_fo_certificate_test.rs+++ b/tests/tstp_to_fo_certificate_test.rs@@ -1,5 +1,5 @@//! A prover's derivation, translated into `lean/Fo`'s certificate format and-//! checked by `oo-fores`, whose acceptance discharges `Fo.unsat_of_check`.+//! checked by `oo-resolution`, whose acceptance discharges `Fo.unsat_of_check`.//!//! These tests record a MEASURED boundary rather than a hoped-for one. Pure//! CNF without equality translates and checks. Clausification and equality@@ -31,11 +31,11 @@ fn on_path(name: &str) -> Option<PathBuf> {}fn fores() -> Option<PathBuf> {- if let Ok(p) = std::env::var("OO_FORES") {+ if let Ok(p) = std::env::var("OO_RESOLUTION") {let p = PathBuf::from(p);return p.exists().then_some(p);}- let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-fores");+ let built = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lean/.lake/build/bin/oo-resolution");built.exists().then_some(built)}@@ -50,7 +50,7 @@ fn vampire(problem: &str) -> Option<String> {Some(String::from_utf8_lossy(&o.stdout).into_owned())}-/// Hand the certificate to `oo-fores` and return its exit code and output.+/// Hand the certificate to `oo-resolution` and return its exit code and output.fn check(cert: &str) -> Option<(i32, String)> {let bin = fores()?;let d = scratch();@@ -86,7 +86,7 @@ fn a_vampire_refutation_of_pure_cnf_is_checked_by_the_lean_theorem() {);assert!(cert.reaches_false, "the certificate must reach the empty clause");let Some((code, out)) = check(&cert.text) else { return };- assert_eq!(code, 0, "oo-fores refused a real Vampire proof:\n{}\n{out}", cert.text);+ assert_eq!(code, 0, "oo-resolution refused a real Vampire proof:\n{}\n{out}", cert.text);assert!(out.contains(r#""theorem":"Fo.unsat_of_check""#), "{out}");}