Before grammar, there is the alphabet — and before the alphabet, there is the conviction that letters are not neutral symbols but living powers. The Lipiviveka, the 'discrimination of letters' by Kṣemendra, the great Kashmiri polymath of the eleventh century, is a primer composed for children, and it teaches the alphabet as a system of powers: each letter mapped to a deity, a part of the body, a state of mind. Its stated purpose is wonderfully plain — to teach children to distinguish letters — but its method turns the Sanskrit alphabet into a cosmology.

A primer with a cosmic alphabet

The opening invokes Gaṇeśa, the guru, and Māṭṛkādevī — the goddess of letters — and then declares the work's humble goal.

Victory to the lotus-feet of the Guru. Salutations to Śrī Māṭṛkādevī. Having bowed to the lotus-feet of the Lord, the sole abode of all human goals, I compose the discrimination of letters for the knowledge of letters for children.
— Lipiviveka, page 3

The goddess of letters is not ornament here — she is the subject. A later page makes the equation explicit: the Mātṛkā, the Mother of Letters, is 'another form' of the Gāyatrī, the great Vedic mantra, and is proclaimed 'bestower of the fourfold fruits.'

This Gāyatrī in another form is called Mātṛkā (the Mother of Letters). This great knowledge is proclaimed as bestower of the fourfold fruits. Where the Vedic Praṇava (Om) is present, where there is the rule of the anusvāra (nasalization), that itself is in the form of a mantra; therefore it is destructive of ignorance for those who do not know.
— Lipiviveka, page 9

The alphabet is not a neutral inventory; it is a mantra-system, and learning the letters is a form of knowing the divine.

Each letter, a deity and a body part

Then comes the mapping that gives the text its character. The letters are assigned one by one — a in Viṣṇu, ā in memory, i in Kāmadeva, u in Śaṅkara — and the consonants are located in the body.

a in Viṣṇu. ā in memory. i in Kāmadeva. ī in illusion. u in Śaṅkara. ū in protection. ṛ in the mother of the gods. ṝ in the creator. ḷ in the lord of the gods. ḹ in Vārāhī. e in Hara. ai in the bull-marked one. o in invocation. au in calling. aṃ in Brahman. aḥ in Śiva. ka in the head. kha in the sense organ. ga in Gaṇeśa. gha in the pot. ṅa in Bhairava.
— Lipiviveka, page 19

The same page goes on to place ca in the moon, ṭa in the earth, ta in the side, da in giving, dha in wealth — the alphabet as a map of the cosmos and the body at once. This is the 'knowledge of the place of letters' (varṇa-sthāna), and the text makes its purpose explicit: 'When the body is serene, the mind becomes serene. Through knowledge of the place of letters, the mind becomes serene.'

Guru and laghu: the physics of syllables

The primer also teaches the metrical physics on which all Sanskrit verse depends — the distinction between heavy (guru) and light (laghu) syllables.

The anusvāra and visarga, denoted by aṃ and aḥ, are thus declared. The anusvāra and visarga are designated as guru. A syllable with anusvāra or visarga, combined with a long vowel, is guru. A letter combined with a short vowel is called laghu. A conjunct at the end of a pāda is also considered guru. One mātra is known as laghu, two mātras are called guru.
— Lipiviveka, page 24

Here the primer is scaffolding for poetry: any child who masters guru and laghu can scan a śloka, and from there the eight gaṇas, and from there every meter in the canon. The text even supplies the anusvāra's full drill — aṃ, āṃ, iṃ, īṃ, uṃ, ūṃ, ṛṃ, ṝṃ, ḷṃ, ḹṃ, eṃ, aiṃ, oṃ, auṃ — the nasalization chanted through every vowel of the alphabet.

The four levels of speech

Beneath the drill is a theory of language. The Lipiviveka invokes the four levels of speech — parā, paśyantī, madhyamā, vaikharī — the tradition's map of how sound descends from the subtle to the spoken.

Yā sā mitrāvaruṇasadanāduccarantī triṣaṣṭīṃ varṇānamitaḥ prakaṭakaraṇaiḥ prāṇasaṅgātprasūte — tāṃ paśyantīṃ prathamamuditāṃ madhyamāṃ buddhisaṃsthāṃ vācaṃ vaktre karaṇavi[mṛṣṭāṃ] vaikharīṃ ca prapadye. That speech which, rising from the abode of Mitra and Varuṇa, gives birth to the sixty-three letters through the manifesting instruments, joined with the breath — I take refuge in that paśyantī, first arisen, and in madhyamā, abiding in the intellect, and in vaikharī, refined in the mouth by the organ.
— Lipiviveka, page 43

The sixty-three letters — twenty-one vowels, twenty-five sparśas, and the rest — are the audible tip of a hidden hierarchy. What the child learns as a sequence of shapes is, in the tradition's own account, the last stage of a descent that begins in silence.

Who may learn the letters

The Lipiviveka is equally explicit about who may be taught. The Mātṛkā text 'should never be given into the hands of a Śūdra,' and the work's closing pages rehearse the restrictions of its age.

Through hearing verses, people become knowers of dharma. Others, accomplished in study, are still inferior. Those desiring to become teachers, through disrespecting brahmins, become inhabitants of hell. The state of making the unknown known is called ācāryatva (teachership).
— Lipiviveka, page 54

The same pages prescribe the social order of instruction — the brāhmaṇa as the guru of the varṇas, the kṣatriya and others barred from the study of the treatise — and they contain one of the harshest passages in the work, a warning that a brāhmaṇa teacher who goes abroad and becomes an outcaste should have his tongue cut with instruments of tin and lead and his ears filled with molten metal. It is a jarring reminder that this elegant primer of letters was produced in a society with strict boundaries around who could touch them.

The author's signature

The work closes with its author's self-portrait, naming him 'the illustrious Bhaṭṭa Śrī Kṣemendra, born of the Ṣaṭpraśnāgara family' and praying to the Goddess of Letters herself.

May this complete Goddess of Letters grant knowledge, the wealth of wealths; may she grant a beautiful body, abundant long life, and brilliant fame.
— Lipiviveka, page 58

The Lipiviveka sits at the bottom of the educational ladder, and that is precisely its importance. Before Pāṇini, before poetry, before the śāstras, there is the letter — and a tradition that wrote textbooks to teach it to children is a tradition that took literacy as the door to all learning. This manuscript, from the Bhandarkar collection, preserves that textbook — and with it, a whole worldview in which every character of the alphabet had a god behind it, a place in the body, and a weight measured in mātrās.