Repository navigation
zelph 1.0.0
zelph 1.0.0 is the first release that is complete in the sense the project set out with: everything the engine does with knowledge, it does with rules that live in the same graph as the knowledge. Nothing in this release had to be added to the C++ core to make mathematics work, and that is the claim the version number stands for.
Since most relevant commits are a mathematics stack written entirely in zelph rules, a C ABI with Rust bindings, and a round of correctness work that came out of using the system rather than testing it.
Mathematics, all the way down
The standard library now carries a complete stack, and every layer of it is ordinary zelph rules in files you can open:
- positional arithmetic over interchangeable digit substrates – base 10 from a generated table, base 2 from sixteen full-adder axioms, and base 2 derived from a single NAND axiom plus one negation-as-failure rule;
- signed integers over ℤ as a façade over the naturals;
- multivariate polynomial normal forms over ℤ;
- a terminating term simplifier and symbolic differentiation;
- a compiler from a symbolic term to its canonical polynomial, which decides identities by node identity: both sides compile, and because every node is hash-consed, equality of normal forms is identity of nodes.
Euler's four-square identity – eight indeterminates, degree four on both sides – is proven in about two tenths of a second, cold start included.
The syntax that makes this usable arrived with it: $( … ) term islands with infix notation and precedence, display schemes a script registers for its own operators, the ? result-query prefix, and the : self-fact prefix.
The Jacobian conjecture, and what it cost
The most significant event in this release was not a new feature. In July 2026, a counterexample to the Jacobian conjecture – open since Keller stated it in 1939 – was published, and reproducing it became the test of whether the stack was real: nine symbolic partial derivatives and a 3 × 3 determinant over ℤ, from the digit tables upwards. It runs in under a second.
Getting there found a great many defects, and that is the point of mentioning it. A workload that stacks differentiation on polynomials on integers on digit rules reaches parts of the engine that no unit test had put together: a composite predicate read through its adjacency instead of its structure, a container in a rule consequence that drifted as the rule ran, a set literal leaking out of a rule into the data, a rule with a ground condition that never fired, negation over a guard that silently meant its opposite. Each of those is fixed and pinned by a test.
A C ABI, Rust bindings — and a chess engine
src/lib/capi/ exposes the engine through a plain C interface, and rust/ is a safe Rust layer on top of it. Both exist for a reason worth stating: a chess engine is being written against them, using zelph's neural substrate for evaluation. It is the successor of Aristarch 4.21 from 1999, it plays, and it is not released yet – it will be, and it is open source when it is.
Its demands are why the neural part of this release is faster than the one in 0.9.7. A forward pass now costs the active inputs rather than the width of the layer, a caller can name those inputs by slot, the first layer is held between calls and shifted by what changed, and a compiled network can be evaluated on one thread while another trains it. nn-snapshot / nn-restore keep the best weights of a training run.
The crates are not on crates.io: a project points at a checkout, and zelph-sys builds the library it binds to. What that asks of a consumer – one dependency it would otherwise not name, and three lines of build.rs – is written down, and CI now builds a consumer from outside the workspace and runs it, so a mistake in that contract shows up here instead of in the project that depends on it.
It is also the second piece of evidence for the claim the engine makes about itself: Wikidata, a legal ontology, mathematics and now a chess engine, on one substrate, with no domain knowledge in C++.
Rules that reach further
- Transitive path conditions.
(X P⁺ Y)and(X P∗ Y)ask what the engine can walk, within a rule, evaluated by the native closure engine over a cached adjacency index.:P⁺ Xasks whetherXreaches itself, which is how a cycle is detected. A path condition is scheduled by its cost once one end is bound. - Rules that write rules. A consequence may be a rule, so an ontology's property axioms – sub-property, domain, sub-class – are written once as schemas and every declaration a modeller makes afterwards produces its own rule.
- Quantifying over predicates needs no second condition any more.
- Set constants and collections are separate.
{a b}is defined by its members and cannot be extended;@{a b}is a container with an identity of its own, and it is what a rule gathers results into. - Rule identity. A rule entered twice is recognized up to a renaming of its variables, which is what makes
.loadfollowed by.importfree. - Stratified evaluation was corrected in the corners the NAND substrate found.
Reasoning you can audit
.run-exportwrites what a run derives, and every contradiction it meets, as JSON Lines, in a form that names nodes in every language they carry and leaves the target format to the consumer.- A contradiction is recorded in the graph as the refuted set of the facts that matched, so it is reported once rather than once per derivation path, and the record is deleted when the facts it pertains to are removed.
.run-deltareasons from the facts added since the last run, so a program that alternates between asserting a little and reasoning incurs cost for the addition rather than for the graph.
Wikidata
- The class hierarchy has a page and a file of its own.
culpritsranks the classes that carry a disjointness violation by how much each fix is worth,culprit-pathprints the chain ofP279statements that produced one, and the report states how many affected classes no topmost culprit reaches – because a cycle above them defeats the definition. On the publishedP279slice that is 81 culprits of 18,757 affected classes, in a fifth of a second, on any machine. - Qualifiers.
.wikidata-qualifiersadds Wikidata's statement layer to a loaded network, reified as ordinary facts, so the disjointness definitions can be read from the graph instead of from a CSV file beside it. - Predicate slices.
.save-predicatescuts a network down to the statements of chosen predicates and leaves a complete network behind – which is how a class hierarchy that answers the same questions as the network it was cut from becomes a file of 224 MB. - The published artefacts were rebuilt: the full 2026-03-09 network, one with people and one without, the
P279slice, and one carrying the qualifier layer. - Pruning got usable. The general-purpose commands took four rounds of work – names resolved once per batch instead of once per node, neighbourhoods read without copying, a parallel collection phase – and
.prune-nodes <var> (<conditions>)selects victims by a conjunction rather than by one pattern.
SPARQL
The subset is implemented in Janet on top of the public API, so it is a script you can read and change. This release hardened it where it mattered: property paths, correlated MINUS and OPTIONAL, several ORDER BY keys, subqueries, and refusals that name the construct instead of answering emptily – FILTER NOT EXISTS, ASK, CONSTRUCT and DESCRIBE among them. The keyword scan reads a masked copy of the query, so a literal containing the word "ask" is a literal.
The playground
The whole engine compiles to WebAssembly and runs in a browser with nothing sent to a server. Forty-nine guided demos cover rule-based arithmetic on arbitrarily large numbers, primality by negation as failure, SPARQL over derived facts, neural networks inside the graph, and the NAND-to-EML stack. CI presses every one of them.
Everything else
Roughly half of the commits in this release pertain to one kind: something the engine, a script or the documentation said that was not true. A count that multiplied one contradiction by the number of rule instantiations reaching it. A predicate listing that counted facts about a predicate as uses of it. A printed rule that re-entered as a different rule. A pruning command that created what it was asked to delete. They are unglamorous individually and they are what a 1.0 is made of.
The documentation was proofread page by page against the binary for this release: every transcript replayed, every figure re-measured, and the examples that could not work corrected.
Compatibility
.bin files written by 0.9.x load unchanged. The predicate index sidecar (.pidx) operates at format version 2 and is rebuilt automatically if an older version is found. Scripts depending on {...} as a growable container must use @{...}; all other components in the standard library retain their interface.
The shared library now offers only what the headers mark for export. On Windows, this has always been true; on Linux and macOS, everything was previously visible, so a program that extends beyond the documented surface may now fail to find a symbol. The C ABI is fully marked and remains unchanged, as do the exported classes.