Sanskrit grammar is a machine, and the Aṣṭādhyāyī is its engine. Pāṇini's grammar — composed around the fourth century BCE — reduced the entire language to a system of about four thousand rules, and this manuscript from the Rajasthan Oriental Research Institute preserves the machine in working order.

The engine's first turn

The manuscript opens with homage to Pāṇini, then immediately starts the grammar with its most elegant device: the pratyāhāra-sūtras, a compressed table of the sounds of Sanskrit from which every rule can draw its alphabet.

By whom the entire grammar was taught, having received the science of letters from the great lord — salutations to that Pāṇini. By whom men's words were purified by the pure waters of speech, and by whom the darkness born of ignorance was dispelled — salutations to that Pāṇini. Now the instruction of words: a i u ṇ. ṛ ḷ k. e o ṅ. ai au c. ha ya va ra ṭ. Vṛddhi is ā, ai, au. Guṇa is a, e, o.

— Aṣṭādhyāyī, page 3

In a few lines, the whole phonological alphabet is established — the sounds, the classes, and the two great vowel-strengthening operations, guṇa and vṛddhi.

Rules that generate words

From there the grammar proceeds by rule after rule — which roots take which suffixes, when the augment is elided, which preverbs govern which verbs.

From the remainder, in the agent, parasmaipada. From anu and para, with kṛ. From abhi, prati, and ati, with kṣip. From pra, with vah. From para, with mṛṣ. From vi and āṅ, and from pari, with ram. In case of conflict, the later operation wins.

— Aṣṭādhyāyī, page 8

That last principle — in case of conflict, the later rule applies — is the kind of meta-rule that makes the grammar computable. It is a system that resolves its own ambiguities.

A language generated, not memorized

What made Pāṇini revolutionary was the claim that a finite set of rules could generate an infinite language — every correct Sanskrit word, and only correct ones. This manuscript is a working copy of that claim, copied and studied for centuries, the machine kept oiled by the scholars who depended on it.