A fifth-century Sanskrit treatise argues that reality is made of language. For fifteen centuries, deciding what its verses mean has been an art. This is the story of turning one book of it into theorems: a translation of the complete Brahmakāṇḍa that a proof assistant holds to its own commentary, verse by verse, with every rival misreading refuted by a compiled theorem.
One line of Sanskrit. Three defensible translations. Three incompatible philosophies.
The Vākyapadīya opens with a single verse that carries the whole system:
अनादिनिधनं ब्रह्म शब्दतत्त्वं यदक्षरम् ।
विवर्ततेऽर्थभावेन प्रक्रिया जगतो यतः ॥
anādinidhanaṃ brahma śabdatattvaṃ yad akṣaram /
vivartate 'rthabhāvena prakriyā jagato yataḥ //
Every word is a decision. Is śabdatattva (“word-essence”) a property of language, or the Absolute itself? Does vivartate mean the world is a transformation of Brahman, or its appearance without transformation? Does akṣara mean “imperishable”, “phoneme”, or, as the grammarians insist, deliberately both? Each choice yields a grammatical English sentence. The choices differ as much as materialism differs from idealism.
What settles them is not syntax. It is the commentary: the vṛtti tradition that fixes, verse by verse, which reading the text licenses. Those constraints are real. They have simply always lived in the philologist's head.
Click a rendering to see what the machine proved about it.
accepted_adequate, closed by decide.
Every claim it asserts is entailed by axioms that quote the commentary verbatim.receipts: lean/VakyaVallari/Verses/V1_1.lean · data/contracts/1.1.json · proof page for 1.1
Compiler verification has a trick for exactly this problem. It is thirty years old.
Compiler engineers gave up on proving whole compilers correct long before they gave up on correctness. The workaround, translation validation, checks each individual run: the optimizer is untrusted, a semantic reference says what the output must preserve, and a validator checks the pair after the fact.
Transplant the pattern. The translator is the untrusted optimizer. The commentary, compiled into a per-verse semantic contract, is the reference. Lean 4 is the validator. A contract declares the verse's entities with ontological sorts, its axioms and explicit denials, the claims the accepted translation makes, and, crucially, a set of plausible mistranslations that must provably fail.
Sorts: {absolute, power, manifestation, linguisticItem, property, cognition}.
Claims: identity, relation, predication over sorted entities. A reading is
adequate iff every claim is entailed by the axioms and none is denied.
Rejected readings carry a registered failure mode, contradicted
(asserts a denial) or unlicensed (no axiom entails), and the
validator requires the registered mode to hold mechanically. The kernel makes
relations first-class relata (paramparā-sambandha), types absence with its
counterpositive and locus (abhāva), and proves the Navya-Nyāya involution as a
definitional fact. Adequacy is decidable; every theorem closes by
decide.
receipts: docs/specs/2026-07-16-vakya-vallari-design.md · lean/VakyaVallari/Ontology.lean · Adequacy.lean
The contracts were written by a swarm of language-model agents. That is exactly why every layer has a gate.
One agent per verse, each given the verse record, the schema, an exemplar, and
the validator as its exit gate; rounds of 9 to 30 agents with an adjudication
pass between rounds; an append-only ledger recording every draft, rejection,
repair, and acceptance. Acceptance is never a judgment call. A verse is done
when its contract passes the validator, its Lean module compiles with zero
sorry, and its entity sorts survive the corpus-wide consistency gate.
receipts: research/ledger.jsonl (99 events) · CI: pytest + lake build + zero-sorry sweep
The interesting evidence is the failures. Every class of agent error that occurred is now a mechanical gate.
Early agents wrote “mistranslations” that secretly restated the axioms. The inadequacy theorems would have been false. The Lean build failed; the validator was hardened to require provable failure.
An API limit killed 20 of 30 agents mid-round, leaving 9 unreviewed drafts. Five failed the verbatim-citation gate with paraphrased or invented quotes. Degraded output, caught by string match, quarantined, re-authored.
Independent agents gave the same term different sorts. The consistency gate surfaced every conflict; adjudication resolved each as correction or as documented polysemy.
Lean's parser rejected IAST diacritics that Python's
isidentifier() accepts. An argument for keeping the end-to-end
kernel gate even when a faster mirror exists.
receipts: research/ledger.jsonl · paper §7, Table 2
144 of 144 verses. And a machine-checked map of how Book I goes wrong in translation.
Of the 361 refuted mistranslations, 156 assert something the commentary explicitly denies and 205 assert what no axiom licenses. Together they form a negative image of the doctrine, in theorem form: pariṇāma for vivarta (1.1), grammar demoted from discipline to convention (1.11–1.14), inference granted an autonomy the text denies it (1.30–1.42), sphoṭa temporalized (1.75–1.77), the corrupt form elevated to equal standing with the correct (1.147–1.155).
receipts: Brahmakāṇḍa edition pages · per-verse proof pages · lake build in CI
The consistency gate demands one sort per term, everywhere, unless the exact partition of uses is registered as polysemy with a textual justification. The registry is where mechanical discipline meets philology.
The imperishable Absolute in 1.9; the phoneme in 1.18–22. The tradition treats the pun as the opening verse's argument in miniature. A same-sort rule would have flattened it.
A linguistic item canonically, but the Absolute in the fire-in-wood verse (1.46), where the inner word is śabdatattva itself.
Bhartṛhari's meaning-bearer in his own doctrine; but 1.102–1.106 report a rival phonetician usage naming the first-produced sound. Registering the doxographic span as a separate sense keeps the report from contaminating the doctrine.
receipts: data/ontology/homonyms.json · 41 terms, 91 senses, one justification each
Read this act before you believe the others.
Lean verifies the internal coherence of the formalization: the accepted reading satisfies the contract, and the rivals provably do not. Whether the contract is faithful to Bhartṛhari is not a theorem and cannot be one. That link is kept auditable by construction: every axiom carries the exact commentary sentence it derives from, so checking a contract against the commentary is a lookup, not a reconstruction. The prover keeps commitments; the philologist judges them.
A GPU embedding pass ranks every verse by translation–commentary similarity, as a review queue. At Book-I scale the contested flag does not separate: contested verses average 0.567 against 0.550 for uncontested ones, and the lowest tail is not enriched. The queue's head is still useful (its lowest-ranked verse, 1.74, is a contested verse whose commentary is dominated by a doxographic dispute), but the instrument is a screen, not a measure of fidelity. The paper reports the null alongside the queue.
receipts: research/audit/similarities.json · scripts/semantic_audit.py · paper §10
The translation and commentary themselves carry the interpretive standpoint of one primary source, K. A. Subramania Iyer's edition and translation of Book I with the Vṛtti (Deccan College, 1965), and the contracts inherit it. Contracts keyed to rival commentaries would turn inter-commentarial disagreement into diffable, checkable data. That is the open vine.
Six independent reviewers, each with a fresh context and a hostile lens
(logical triviality, fabrication, kernel soundness, completeness, philology,
paper-versus-reality), were told to break the method, not admire it; every
serious finding was then reproduced by a separate verifier. Most attacks
failed — and a failed attack is evidence for the defense: no
sorry, no fabricated citations, relations correctly directional,
verse namespaces isolated, and a swap test that licensed zero of one
verse's readings by another's contract (0 of 20,592 ordered pairs).
Three critiques landed, and each became a fix. The strongest was
philological: a verbatim-citation gate cannot tell “we hold X” from
“some say X”, so a handful of doxographic verses (1.102–1.113,
1.68–69, 1.70, 1.81) had encoded reported rival views as if endorsed. Those
axioms now carry a reported stance held in a separate
Contract.reported field, the verse wears a doxographic badge, and the proof page shows
endorsed and reported axioms in separate sections. The other two: a
“tautology” objection (accepted readings are subsets of the author's axioms by
design — true, and now made falsifiable by the corpus-wide discriminativity
gate above), and hygiene (a contract may no longer both license and deny the
same claim; every contract now carries at least two refuted misreadings).
receipts: research/ledger.jsonl (review, upgrade events) · tests/test_stance_and_hygiene.py · src/vallari/discriminativity.py · paper §Adversarial evaluation
Every number above has a receipt. Follow any of them.
“Machine-Checked Translation Adequacy for the Brahmakāṇḍa of Bhartṛhari's Vākyapadīya” — method, kernel, loop, registry, results.
All 1,796 verses: Devanagari, IAST, translation, commentary, contested notes, and per-verse proof status.
144 verified verse modules; each proof page shows the contract, its verbatim citations, and the generated Lean.
Corpus, contracts, kernel, generator, gates, and the append-only research ledger. CI reproduces every claim from a clean checkout.
| Term | In the text | In the system |
|---|---|---|
| vṛtti | the commentary that fixes the reading | the semantic reference compiled into contracts |
| vivarta | appearance without transformation | a relation axiom; its rival pariṇāma is a denial |
| paramparā-sambandha | relation mediated by relation | nested Node: relations as first-class relata |
| abhāva | absence, with counterpositive and locus | typed Abhava structure; involution proved |
| akṣara | imperishable / phoneme, deliberately both | registered polysemy in the homonym registry |
| vallarī | a vine | the edition: it grows verse by verse, gate by gate |