TorahSim

The Compiler

This page records an experiment that changed how this project understands its own materials, and the measurements that came out of it. The standing scope note applies here as everywhere on this site: consistency certified, agency absent. The machines decide nothing the text left undecided, and nothing on this page proves a theological proposition. What is claimed is narrower and checkable: that the law sections of Exodus carry a detectable case structure, that the Talmud's recorded arguments can be replayed by a machine against that structure, and that doing so reproduces the Mishnah's decided-case tables — with every cell's origin labeled.

The working picture

Three bodies of text divide one job three ways. The 24 books of the Hebrew Bible state the law's mechanisms — cases, branches, constants, procedures — in a case syntax described below. The Mishnah (the rabbinic law code, compiled around the year 200) states the resulting tables: situation in, verdict out, reasons omitted. The Talmud records, argument by argument, how to get from the first to the second — which makes its recorded reasoning something a machine can replay. In this project's working vocabulary: the books are the program, the Talmud holds the compile rules, and the Mishnah is the answer sheet the results are graded against.

The word "compile" is meant plainly: to translate material into a runnable form. Nothing here alters the texts; the experiment reads them and checks its readings against the tradition's own records at every step.

The case syntax

The law code of Exodus 21–23 is written in a structure built from two words. The word כִּי ("when") opens a case; the word אִם ("if") opens a branch within it; אוֹ ("or") marks an alternative. A machine scan of the two chapters — knowing nothing but those tokens — recovers the paragraph structure directly: "WHEN you acquire a Hebrew servant..." followed by a ladder of "IF he came alone / IF he was married / IF his master gave him a wife."

Two measurements frame the syntax. First, the boundary: case openers run dense from Exodus 21:2 to 22:15, and chapter 23 contains not one "if"-branch — there the code shifts to command-style law ("you shall not..."), a different form the case parser must not force. Second, the tradition itself documents the keywords: the Talmud records that כִּי ("when/if") carries four distinct senses — if, perhaps, rather, because (Gittin 90a) — and the Mekhilta records that every אִם ("if") in the Torah is optional except three, enumerated (Mekhilta DeRabbi Yishmael, Bachodesh 11). The teaching layer keeps a language manual for the code's own operator words.

The experiment: cold compilation, graded

For each law section, a machine read the verses raw from a word-by-word database of the Hebrew text — no commentary loaded — and parsed the case structure by the syntax above. Where the bare text left gaps, the Talmud's recorded argument for exactly that gap was applied as an explicit, labeled step. The resulting verdict table was then graded against the Mishnah's recorded table. Every search that could report an absence was first proved against a verse known to contain its target (the zero-report rule), and every cell of every output carries its provenance.

Nine functions of the Mishpatim law code (Exodus 21:1–23:19) have run this way:

functioncodeanswer sheetresult
the four guardiansExod 22:6–14Mishnah Shevuot 8:112/12
the slave-release listExod 21:2–6Mishnah Kiddushin 1:23/3
the four damage classesExod 21:28–22:5Mishnah Bava Kamma 1:15/5
the goring-ox state machineExod 21:28–36Mishnah Bava Kamma 1:4, 2:46/6
the five injury indemnitiesExod 21:18–25Mishnah Bava Kamma 8:15/5
the theft multiplesExod 21:37, 22:3Mishnah Bava Kamma 7:14/4
the seducer's fineExod 22:15–16Mishnah Ketubot 3:43/3
the freed slave's limbsExod 21:26–27Kiddushin 24a; Mishnah Negaim 6:73/3
the miscarriage valuationExod 21:22Mishnah Bava Kamma 5:43/3

Forty-four cells, forty-four matches. And the fractions were measured for the first time: 26 cells (59%) come straight from the bare ink — the six-year timer, the four class openers, the half-by-dividing-the-live-ox rule, the thirty shekels, the medical and lost-wages clauses, the double/fourfold/fivefold constants with their scope restriction. 9 cells (20%) are filled by a recorded Talmud argument replayed with its source row. 9 cells (20%) are routed additions or cross-book imports that the tradition itself documents as such.

One worked example

The four guardians. Exodus 22:6–14 is three consecutive "when" paragraphs about custody of another's property — and the machine's keyword scan cuts them at 22:6, 22:9, and 22:13, exactly the three passages the Talmud names (Bava Metzia 94b: the first is the unpaid keeper, the second the paid, the third the borrower). But the text never says which keeper is paid — the parameter is hidden. The Talmud's recorded move: feed both paragraphs the same event, theft, and compare outputs — the first exempts by oath, the second pays; the stricter liability marks the compensated keeper. The word "loss" appears nowhere in the nine verses; the recorded a-fortiori generates that column ("if theft, near to circumstances beyond control, pays — loss, near to negligence, all the more so"). The Mishnah's table lists a fourth role the code never names — the renter — and routes him onto the paid keeper's rules, the routing itself a recorded dispute. The machine replays all of it, cell by cell, and the finished table matches the Mishnah's in all twelve cells: six from ink, three from recorded inference, three routed.

The find that reordered the roadmap

The injury tariff's famous formula — עַיִן תַּחַת עַיִן ("an eye in place of an eye," Exodus 21:24) — occurs in exactly one other place in the entire Hebrew Bible: Leviticus 24:20, in the blasphemer narrative (a whole-canon scan, probe-tested, found the pair and nothing else). And the Talmud's derivation that the tariff means monetary compensation runs on the Leviticus verses — "one who strikes an animal shall pay... you shall have one manner of law" (Bava Kamma 83b–84a on Leviticus 24:21–22). The seat in Exodus cannot be finished from Exodus alone; the teaching layer compiles it through the later restatement. In the project's terms: Leviticus 24 is a measured compile dependency of the book already derived.

The moves

The recurring reasoning forms the Talmud applies — the diff, the a-fortiori, the comparison, the routing, the threshold-parse, the generalization, the cross-book import, the exemplar-generalization, the keyword dictionary, the pointer-fetch — are registered, with their recorded exemplars and their correspondence to the tradition's own thirteen rules of inference, in the move catalog. Roughly half the observed moves are numbered rules of the tradition (the a-fortiori is rule one, exactly); the other half is the Talmud's documented practice beyond the numbered list. The catalog is this page's companion: see the move catalog.

The record, verbatim

The claims measured here are seated in the canonical derivation units with full citations (see the unit record for the ordinances, Exodus 21, and its reading ledger), and the run itself is preserved two ways below: the runner programs, and their frozen transcripts — the exact output of the runs of 2026-09-02, including the probe lines, each teacher move firing with its source, and the graded tables.

What this does and does not claim

It does claim: the case structure is really in the text and a machine can find it; the Talmud's recorded arguments are specific enough to replay; the replayed arguments plus the bare ink reproduce the Mishnah's tables for these nine functions, with measured fractions. It does not claim: that the machine discovered the arguments (they are replayed from the record, hand-encoded and labeled); that the fractions generalize beyond what was measured; or anything about what a reader should believe. Divergences, when they come, will be reported at the same size as confirmations — that is the house rule everywhere on this site.