LeanRDF

Roadmap

LeanRDF will not become a second database. oxilite already stores RDF in SQLite, answers SPARQL through an Oxigraph-compatible API, and reasons with RDFS, OWL 2 RL, Datalog and SHACL. LeanRDF is its proof layer: oxilite finds and stores, LeanRDF proves.

Each phase below is an OpenSpec change, implemented, archived (openspec/changes/archive/) and committed in order. The seven phases of v0.1, the three RDF 1.2 changes of v0.2 and statement graphs (v0.3) are done. A phase started only when the phases it needs were done. New layers are separate Lake packages in this repository, so the core stays free of dependencies.

Roadmap: P0 release, P1 core additions, P2 certify oxilite's RDFS answers, P3 SPARQL in Lean, P4 OWL 2 RL, P5 SHACL Core, P6 OWL EL, RDF 1.2 and statement graphs, with their dependencies
Nine phases in four lanes. An arrow means the later phase needs the earlier one.

Who does what

Concernoxilite: fast, not trustedLeanRDF: the proof
Storage and SPARQLSQLite, D1 and Turso backends; SPARQL compiled to SQLSPARQL semantics and a reference evaluator proven to compute it
RDFSQuery rewriting against a schema closureA certificate per answer, checked against the 80 proven rules
Explanationswhy proof trees over OWL 2 RL and RDFS templatesEach tree translated to a certificate and checked
OWL 2 RLMaterialized inferences, tagged with their producerOWL 2 RL rules proven sound; each inference certified
SHACLValidation through the rudof validatorsSHACL Core semantics and a validator proven against it

Phases

PhaseOpenSpec changePackageDone whenResult
P0 Release v0.1release-v0-1allMIT or Apache-2.0 licence; CI builds and tests both packages; v0.1.0 tagged; the repository is publicDone: dual licence, CI for every package, v0.1.0, public repository
P1 Datasetsadd-datasetsleanrdfDataset, N-Quads and TriG; the W3C N-Quads and TriG suites passDone: both W3C suites pass
P1 XSD valuesadd-xsd-valuesleanrdfValue spaces for integer, decimal, boolean, string and dateTime; canonical forms parse back to the same value, by proofDone: canonical forms proven to read back
P2 Certify oxiliteadd-oxilite-certifyleanrdf-elpiEach RDFS answer oxilite gives is certified, either from oxilite's own why tree or by Elpi; a wrong answer is never acceptedDone: every recorded answer certified, tampered ones rejected
P3 SPARQL algebraadd-sparql-algebraleanrdf-sparqlThe SPARQL 1.1 algebra semantics in Lean, and an evaluator proven to return exactly its solution multisets for the core operatorsDone: evalN_perm, runQuery_answer
P3 SPARQL syntaxadd-sparql-syntaxleanrdf-sparqlSPARQL 1.1 queries parsed and translated to the algebra; W3C syntax tests pass; evaluation tests pass for the supported fragment; a CLI with oxilite's flags, and a differential run against oxiliteDone: 97/97 syntax and 257 evaluation tests, a differential report
P4 OWL 2 RLadd-owl-rlleanrdf-owlThe fixed-arity OWL 2 RL rules proven sound against the OWL 2 RDF-Based semantics; oxilite's OWL why trees and materialized inferences certifiedDone: 49 rules proven sound; 18 of 31 oxilite inferences certified, the rest have no OWL 2 RL rule
P5 SHACL Coreadd-shacl-coreleanrdf-shaclSHACL Core semantics; a validator proven to compute it; W3C core tests pass for the supported componentsDone: validate_conforms, validate_sound; 98/98 W3C tests; agrees with oxilite
P6 OWL ELadd-owl-elleanrdf-owlEL classification rules proven sound; subsumptions of a small ontology certifiedDone: 10 rules proven sound; the example hierarchy certified
R1 RDF 1.2 coreadd-rdf12-coreallTriple terms and base directions in the model, IT in the semantics, N-Triples and N-Quads 1.2; every package accepts the new termsDone: W3C RDF 1.2 N-Triples and N-Quads suites pass, canonicalization included
R2 RDF 1.2 syntaxadd-rdf12-syntaxleanrdfTurtle and TriG 1.2: triple terms, reified triples, annotationsDone: W3C RDF 1.2 Turtle and TriG suites pass
R3 RDF 1.2 semanticsadd-rdf12-semanticsleanrdf, leanrdf-elpirdf:dirLangString, rdfs:Proposition, rdfs14 proven sound; simple and RDF regimes; v0.2.0Done: 80 RDFS rules; 20 W3C RDF 1.2 semantics tests run (16 certified, 4 not derived), 9 listed as needing other datatypes
S1 Statement graphsadd-statement-graphsleanrdf-statementstiramemsu's bitemporal records, an exact RDF 1.2 export, the export criterion and kernel proven; v0.3.0Done: decode_toRDF, toRDF_decode, criterion, kernel_greatest; 406,901 small graphs checked exhaustively
S2 tiramemsu alignmentalign-sg-with-tiramemsuleanrdf-statementstiramemsu's tm export --format sg-nt12 checked byte for byte; valid time as tm:validFromMs; v0.3.1Done: 8 recorded tiramemsu exports decode and re-export exactly
F1 Certificate checkadd-certificate-checkleanrdf-checkA standalone checker with no search; five regimes under one theorem; a fixed verdict vocabulary with exit codes and JSONDone: checkRegime_sound; a 21-certificate corpus
F2 Certificate envelopeadd-certificate-envelopeleanrdf, leanrdf-checkRDFC-1.0 and graph digests; certificate version 2 with an envelope that the checker verifies; v0.4.0Done: the W3C rdf-canon suite passes (86 tests); canonical_iso
F4 Inconsistency certificatesadd-inconsistency-certificatesleanrdf, leanrdf-owl, leanrdf-elpi, leanrdf-checkClash rules proven sound; INCONSISTENT (exit 4) before any entailmentDone: 12 OWL 2 RL clash rules; 27 W3C OWL 2 inconsistency tests decided
F5 Countermodelsadd-countermodelsleanrdf, leanrdf-elpi, leanrdf-checkFinite presentations, a verified model checker, REFUTED (exit 5) for simple, RDF and RDFS; v0.5.0Done: checkCountermodel_sound_rdfs; no W3C positive test refuted

Proven, not just certified

A certificate proves that a found answer is right. It cannot prove that nothing is missing. SPARQL needs both, because OPTIONAL, MINUS, FILTER NOT EXISTS and aggregates depend on what is absent. So LeanRDF's SPARQL evaluator is proven against the semantics, while reasoning answers are certified one at a time. Under RDFS or OWL reasoning a certified answer is proven sound, not complete.

Next

The agentic roadmap (docs/ROADMAP.md) continues with:

Each is an OpenSpec change in openspec/changes/.

Later

Certificates for oxilite's Datalog programs, SHACL-SPARQL, a SPARQL HTTP endpoint, certifying oxilite's SPARQL-to-SQL translation itself, an ALC tableau, and lean-elpi's LF proof terms as a second certificate backend.