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
readme: restructure around the product, with a diagram and a with-and-without table
FABIOTESSe3b553374276
diff --git a/README.md b/README.mdindex 21ad5148..ba988e66 100644--- a/README.md+++ b/README.md@@ -29,12 +29,70 @@<strong>English</strong> · <a href="README.zh-CN.md">简体中文</a></p>+<p align="center">+ <a href="https://tesseractsemantics.com"><b>Building this into a platform → tesseractsemantics.com</b></a><br>+ <sub>The engine is MIT and stays that way. The platform is the hosted, governed version of it.</sub>+</p>+----Ask a reasoner why it believes something and it will tell you to trust it.+**Ask a reasoner why it believes something and it will tell you to trust it.** This one hands you a+proof, and refuses a forged one.++Open Ontologies builds, changes and operates ontologies and knowledge graphs with Terraform-style+lifecycle management, and reasons over them with proof-carrying inference. Every conclusion comes+with a certificate that a separate checker, written in Lean 4 and proved sound, will either accept+or reject. Written in Rust, ships as a single binary, speaks MCP to Claude, Cursor and anything else+that talks to it.++## See it in action++<p align="center">+ <img src="docs/assets/certified-inference.svg" alt="A supplier ontology with asserted and derived edges, and the certificate the run produced" width="100%">+</p>++Four triples in, three out. `ex:Northwind` was only ever asserted to be in a sanctioned+jurisdiction; that it needs enhanced due diligence was *derived*, and the derivation is checkable by+someone who does not trust you, your engine, or the model that wrote the ontology.++## With a proof, and without one-This one hands you the proof, and refuses a fake one. Run it yourself; the three files are in-the repository and the output below is what the checker printed, trimmed to the fields that matter.+The same query, answered by an ordinary reasoner and by this one.++| | An ordinary reasoner | Open Ontologies |+| --- | --- | --- |+| The answer | `Northwind needs enhanced due diligence` | the same answer |+| Why it holds | "the reasoner said so" | a certificate naming every rule and premise |+| Who can check it | nobody, short of rerunning the same engine | anyone, with a checker that shares no code with the engine |+| If the engine has a bug | you get a wrong answer, confidently | the checker rejects it, exit 1 |+| If someone edits the output | undetectable | rejected, with the line and rule named |+| If a rule was yours, not the standard's | reported identically | a different verdict word, enforced by a test |+| What an auditor receives | a screenshot | a file they can re-verify themselves |+| Guarantee on an unsatisfiability answer | asserted | **none, and it says so** |++That last row is the point of the whole project. Where something is measured rather than proved, the+tool says measured; where a prover's opinion is an opinion, it never borrows the checker's+vocabulary. [What is proved, and what is not](#what-is-actually-proved).++## What it does++| Capability | What you get |+| --- | --- |+| Reason over OWL and RDFS | Materialised inferences **and** a derivation certificate a proved checker accepts |+| Bring your own rules | SWRL, RIF Core or a Horn table, evaluated, with a verdict word that says they were yours |+| Validate against SHACL | A report from an evaluator measured against the W3C suite, not just asserted to pass |+| Ask if something is satisfiable | A finite model, replayed and checked, rather than a yes |+| Ask if something is inconsistent | A refutation where one is certifiable, and an honest engine opinion where it is not |+| Retrieve a slice for RAG | Per-claim entailment preservation, because 99% coverage can still drop the one triple that mattered |+| Change an ontology in production | Plan, blast radius, risk score, locked IRIs, apply, monitor, drift, rollback |+| Load real data | CSV, JSON, XML, YAML, XLSX, Parquet, PostgreSQL and DuckDB into RDF |+| Hand it to a prover | TPTP, CLIF, SMT-LIB and LADR from one translation, with what it cannot export named and counted |+| Work from an assistant | An MCP server, so Claude or Cursor drives all of it in conversation |++## Try the checker itself++The three files are in the repository, and the output below is what the checker printed, trimmed to+the fields that matter.```bash$ cd lean && lake build # builds the checkers, core Lean 4, no Mathlib@@ -235,6 +293,7 @@ is written down rather than left implied.The reasoning behind each of those rules is in [docs/decisions/](docs/decisions/), one file perrule, each naming the failure it exists to prevent.+## Install```bash@@ -328,6 +387,20 @@ a Protégé-style inspector. No JVM. No Protégé.| Windows | [docs/windows.md](docs/windows.md) || Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |+## Open Ontologies for teams++The engine in this repository is MIT licensed and will stay that way. What it does not give you is+somewhere to put the evidence: a place where certificates are kept, where a change to an ontology is+reviewed before it ships, and where an auditor can re-verify an answer months later without+installing anything.++That is what [**tesseractsemantics.com**](https://tesseractsemantics.com) is being built for. If you+are running ontologies where a wrong answer costs something, it is worth a conversation.++<p align="center">+ <a href="https://tesseractsemantics.com"><b>tesseractsemantics.com →</b></a>+</p>+## StackRust edition 2024, single binary, no JVM. Oxigraph 0.5 for RDF and SPARQL 1.1. `rmcp` for MCP overdiff --git a/docs/assets/certified-inference.svg b/docs/assets/certified-inference.svgnew file mode 100644index 00000000..8c90a558--- /dev/null+++ b/docs/assets/certified-inference.svg@@ -0,0 +1,78 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 520" width="760" height="520" font-family="ui-sans-serif,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif">+ <style>+ .bg { fill: #0b1020; }+ .card { fill: #111827; stroke: #1f2937; stroke-width: 1; }+ .cls { fill: #1e293b; stroke: #475569; stroke-width: 1.5; }+ .ind { fill: #172554; stroke: #3b82f6; stroke-width: 1.5; }+ .lbl { fill: #e5e7eb; font-size: 13px; }+ .lblb { fill: #f8fafc; font-size: 13px; font-weight: 600; }+ .asserted { stroke: #64748b; stroke-width: 2; fill: none; }+ .derived { stroke: #22c55e; stroke-width: 2; fill: none; stroke-dasharray: 6 4; }+ .edgelbl { fill: #94a3b8; font-size: 11px; }+ .rulelbl { fill: #22c55e; font-size: 11px; font-weight: 700; }+ .title { fill: #f8fafc; font-size: 15px; font-weight: 700; }+ .sub { fill: #94a3b8; font-size: 11.5px; }+ .ok { fill: #22c55e; font-size: 12.5px; font-weight: 700; }+ .mono { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 11px; fill: #cbd5e1; }+ .key { fill: #94a3b8; font-size: 11px; }+ </style>++ <rect class="bg" x="0" y="0" width="760" height="520" rx="10"/>++ <text class="title" x="28" y="34">Which suppliers need enhanced due diligence?</text>+ <text class="sub" x="28" y="54">Grey edges you asserted. Green edges the engine derived.</text>++ <!-- ── class chain ── -->+ <rect class="cls" x="150" y="88" width="196" height="38" rx="8"/>+ <text class="lbl" x="166" y="112">ex:SanctionedJurisdiction</text>++ <rect class="cls" x="150" y="188" width="196" height="38" rx="8"/>+ <text class="lbl" x="166" y="212">ex:HighRiskSupplier</text>++ <rect class="cls" x="126" y="288" width="244" height="38" rx="8"/>+ <text class="lblb" x="142" y="312">ex:NeedsEnhancedDueDiligence</text>++ <!-- ── individual ── -->+ <rect class="ind" x="470" y="88" width="136" height="38" rx="8"/>+ <text class="lblb" x="488" y="112">ex:Northwind</text>++ <!-- ── asserted ── -->+ <path class="asserted" d="M248,126 L248,188" marker-end="url(#grey)"/>+ <text class="edgelbl" x="256" y="161">rdfs:subClassOf</text>++ <path class="asserted" d="M248,226 L248,288" marker-end="url(#grey)"/>+ <text class="edgelbl" x="256" y="261">rdfs:subClassOf</text>++ <path class="asserted" d="M470,107 L346,107" marker-end="url(#grey)"/>+ <text class="edgelbl" x="380" y="99">rdf:type</text>++ <!-- ── derived ── -->+ <path class="derived" d="M506,126 C506,160 430,198 350,205" marker-end="url(#green)"/>+ <text class="rulelbl" x="418" y="152">rdfs9</text>++ <path class="derived" d="M556,126 C592,230 500,306 376,307" marker-end="url(#green)"/>+ <text class="rulelbl" x="494" y="230">rdfs9</text>++ <path class="derived" d="M150,110 C88,142 88,268 122,302" marker-end="url(#green)"/>+ <text class="rulelbl" x="36" y="210">rdfs11</text>++ <!-- ── verdict strip ── -->+ <rect class="card" x="28" y="362" width="704" height="128" rx="10"/>+ <text class="ok" x="50" y="390">✓ certificate accepted</text>+ <text class="sub" x="214" y="390">by a Lean 4 proof, not by the engine that produced it</text>++ <text class="mono" x="50" y="420">$ lake exe oo-cert cert/asserted.tsv cert/derivations.tsv</text>+ <text class="mono" x="50" y="442">{"ok": true, "asserted": 4, "derivations": 3,</text>+ <text class="mono" x="50" y="460"> "theorem": "OOCert.certificate_sound"}</text>++ <text class="key" x="50" y="482">Forge one line and it exits 1, naming the rule that failed and printing its premises.</text>++ <defs>+ <marker id="grey" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#64748b"/>+ </marker>+ <marker id="green" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">+ <path d="M 0 0 L 10 5 L 0 10 z" fill="#22c55e"/>+ </marker>+ </defs>+</svg>