An interactive essay · Vākya-Vallarī · वाक्यवल्लरी, “the vine of the sentence”

The Translation That Proves Itself

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.

by Dr. Sharath Sathish · a guided tour for the curious and the technical alike

Act I

The Underdetermined Verse

One line of Sanskrit. Three defensible translations. Three incompatible philosophies.

01 · The problem

Grammar will not save you

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.

The idea Once a scholar's interpretive commitments are written down as data, a proof assistant can hold the translation to them. Exhaustively. Publicly. Forever.
02 · Try it

Three renderings, one verdict each

Click a rendering to see what the machine proved about it.

“That beginningless and endless One, Brahman, whose essence is the Word, imperishable, appears in the mode of objects…”
✓ Adequate — theorem accepted_adequate, closed by decide. Every claim it asserts is entailed by axioms that quote the commentary verbatim.
“The imperishable linguistic structure underlying words has no beginning or end.”
✗ Unlicensed — sort error. It demotes śabdatattva from the Absolute to a property of language; the identity with Brahman then crosses ontological sorts and no axiom entails it. Refuted by two compiled theorems.
“Brahman transforms itself into the world of objects.”
✗ Contradicted — it asserts exactly the pariṇāma relation the commentary denies. The vṛtti says appearance without loss of unity (vivarta), not transformation. Refuted by a compiled theorem.

receipts: lean/VakyaVallari/Verses/V1_1.lean · data/contracts/1.1.json · proof page for 1.1

Act II

A Rulebook from the Commentary

Compiler verification has a trick for exactly this problem. It is thirty years old.

03 · The borrowed trick

Translation validation, transplanted

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.

The anti-fabrication gate Every axiom must quote the commentary verbatim, and every accepted-reading claim must quote the translation verbatim. An axiom that cannot point to the sentence that licenses it is rejected by string match, before any proof is attempted.
For researchers: the contract, precisely

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

Act III

A Lab That Cannot Fool Itself

The contracts were written by a swarm of language-model agents. That is exactly why every layer has a gate.

04 · The loop

Agents propose. Gates dispose.

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.

1,796verses in the corpus
144Book-I units verified
566Lean theorems
0sorry

receipts: research/ledger.jsonl (99 events) · CI: pytest + lake build + zero-sorry sweep

05 · On the record

What the gates caught

The interesting evidence is the failures. Every class of agent error that occurred is now a mechanical gate.

Lazy counterexamples · 3

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.

Fabricated citations · 5

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.

Sort drift · 95 conflicts

Independent agents gave the same term different sorts. The consistency gate surfaced every conflict; adjudication resolved each as correction or as documented polysemy.

Identifier hygiene · 2

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

Act IV

The Verdict

144 of 144 verses. And a machine-checked map of how Book I goes wrong in translation.

06 · The numbers

The verified Brahmakāṇḍa

144adequacy theorems
361refutation theorems
624axioms, all verbatim-cited
181denials
41 / 91homonym terms / senses
190pytest gates

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

07 · Where the method earns its keep

The pun the gate refused to flatten

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.

akṣara

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.

śabda

A linguistic item canonically, but the Absolute in the fire-in-wood verse (1.46), where the inner word is śabdatattva itself.

sphoṭa

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

Act V

What Is Not Proved

Read this act before you believe the others.

08 · The boundary

What Lean checks, and what it cannot

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.

09 · A negative result, kept

The audit that did not discriminate

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.

10 · Stress-tested against itself

What an adversarial team could and could not break

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

Act VI

Go Deeper

Every number above has a receipt. Follow any of them.

The paper

“Machine-Checked Translation Adequacy for the Brahmakāṇḍa of Bhartṛhari's Vākyapadīya” — method, kernel, loop, registry, results.

Read the paper →

The edition

All 1,796 verses: Devanagari, IAST, translation, commentary, contested notes, and per-verse proof status.

Browse the edition →

The proofs

144 verified verse modules; each proof page shows the contract, its verbatim citations, and the generated Lean.

Start at Verse 1.1 →

The repository

Corpus, contracts, kernel, generator, gates, and the append-only research ledger. CI reproduces every claim from a clean checkout.

Code & data →

Glossary: Sanskrit → engineering
TermIn the textIn the system
vṛttithe commentary that fixes the readingthe semantic reference compiled into contracts
vivartaappearance without transformationa relation axiom; its rival pariṇāma is a denial
paramparā-sambandharelation mediated by relationnested Node: relations as first-class relata
abhāvaabsence, with counterpositive and locustyped Abhava structure; involution proved
akṣaraimperishable / phoneme, deliberately bothregistered polysemy in the homonym registry
vallarīa vinethe edition: it grows verse by verse, gate by gate