Acharya Hemachandra was an Indian Jain scholar, poet, mathematician and polymath who wrote on grammar, philosophy, prosody, mathematics and contemporary history. Noted as a prodigy by his contemporaries, he gained the title kalikālasarvajña, "the knower of all knowledge in his times".

Hemachandra was born in Dhandhuka, in present-day Gujarat, on Kartika Sud Purnima (the full moon day of Kartika month). His date of birth differs according to sources but 1088 is generally accepted.[note 1][1] His father, Chachiga-deva was a Modh Bania Vaishnava. His mother, Pahini, was a Jain.[2][3] Hemchandra's original given name was Changadeva. In his childhood, the Jain monk Devachandra Suri visited Dhandhuka and was impressed by the young Hemachandra's intellect. His mother and maternal uncle concurred with Devachandra, in opposition to his father, that Hemachandra be a disciple of his. Devachandra took Hemachandra to Khambhat, where Hemachandra was placed under the care of the local governor Udayana. Chachiga came to Udayana's place to take his son back, but was so overwhelmed by the kind treatment he received, that he decided to willingly leave his son with Devachandra.[4]

Some years later, Hemachandra was initiated a Jain monk on Magha Sud Chauth (4th day of the bright half of Magha month) and was given a new name, Somchandra. Udayana helped Devchandra Suri in the ceremony.[2][3] He was trained in religious discourse, philosophy, logic and grammar and became well versed in Jain and non–Jain scriptures. At the age of 21, he was ordained an acharya of the Śvētāmbara school of Jainism at Nagaur in present-day Rajasthan. At this time, he was named Hemachandra Suri.[2][3][5][6]

At the time, Gujarat was ruled by the Chaulukya dynasty from Anhilavada (Patan). It is not certain when Hemachandra visited Patan for the first time. As Jain monks are mendicants for eight months and stay at one place during Chaturmas, the four monsoon months, he started living at Patan during these periods and produced the majority of his works there.[2][3]

Probably around 1125, he was introduced to the Jayasimha Siddharaja (fl. 1092–1141) and soon rose to prominence in the Chaulukya royal court.[3] According to the Prabhavakacarita of Prabhācandra, the earliest biography of Hemachandra, Jayasimha spotted Hemachandra while passing through the streets of his capital. The king was impressed with an impromptu verse uttered by the young monk.[7]

In 1135, when the Siddharaja conquered Malwa, he brought the works of Bhoja from Dhar along with other things. One day Siddhraja came across the manuscript of Sarasvati-Kanthabharana (also known as the Lakshana Prakash), a treatise on Sanskrit grammar. He was so impressed by it that he told the scholars in his court to produce a grammar that was as easy and lucid. Hemachandra requested Siddharaja to find the eight best grammatical treatises from Kashmir. He studied them and produced a new grammar work in the style of Pāṇini's Aṣṭādhyāyī.[2][3] He named his work Siddha-Hema-Śabdanuśāśana after himself and the king. Siddharaja was so pleased with the work that he ordered it to be placed on the back of an elephant and paraded through the streets of Anhilwad Patan.[8] Hemachandra also composed the Dvyashraya Kavya, an epic on the history of the Chaulukya dynasty, to illustrate his grammar.[3]

According to the Prabhachandra, there was an incident where Siddharaja wanted to kill his nephew Kumarapala because it was prophesied that the kingdom would meet its demise at Kumarapala's hands. Hemachandra hid Kumarapala under a pile of manuscripts to save him.[2] However, such motifs are common in Indian folk literature, so it is unlikely it was an actual historical event. Also, many sources differ on Siddharaja's motives.[2]

Hemachandra became the advisor to Kumarapala.[2][3] During Kumarapala's reign, Gujarat became a center of culture. Using the Jain approach of Anekantavada, Hemchandra is said to have displayed a broad-minded attitude, which pleased Kumarapala.[5] Kumarapala was a Shaiva and ordered the rebuilding of Somnath at Prabhas Patan. Some people who were jealous of Hemachandra's rising popularity with the Kumarapala complained that Hemachandra was a very arrogant person, that he did not respect the devas and that he refused to bow down to Shiva. When called upon to visit the temple on the inauguration with Kumarapala, Hemachandra readily bowed before the lingam but said:

I bow down to him who has destroyed the passions like attachment and malice which are the cause of the cycle of birth and death; whether he is Brahma, Vishnu, Shiva or Jina.[5][9]

Bhava Bijankaura-janana Ragadyam Kshayamupagata Yasya, Brahma va Vishnu va Haro Jino va Namastasmai.

Ultimately, the king became a devoted follower of Hemachandra and a champion of Jainism.[2][5]

Starting in 1121, Hemachandra was involved in the construction of the Jain temple at Taranga. His influence on Kumarapala resulted in Jainism becoming the official religion of Gujarat and animal slaughter was banned in the state. The tradition of animal sacrifice in the name of religion was completely uprooted in Gujarat. As a result, even almost 900 years after Hemchandra, Gujarat still continues to be a predominantly lacto-vegetarian state, despite having an extensive coastline.[2][3]

He announced about his death six months in advance and fasted in his last days, a Jain practice called sallekhana. He died at Anhilavad Patan. The year of death differs according to sources but 1173 is generally accepted.[1]

A prodigious writer, Hemachandra wrote grammars of Sanskrit and Prakrit, poetry, prosody, lexicons, texts on science and logic and many branches of Indian philosophy. It is said that Hemachandra composed 3.5 crore verses in total, many of which are now lost.[citation needed]

A 12th-century manuscript of Hemachandra's Yogasastra in Sanskrit. The text is notable for using 1 mm miniaturized Devanagari script.

His systematic exposition of the Jain path in the Yogaśāstra and its auto-commentary is a very influential text in Jain thought. According to Olle Quarnström it is "the most comprehensive treatise on Svetambara Jainism known to us".[10]

This Sanskrit grammar was written in the style of Pāṇini. It has seven chapters with each chapter having four sections, similar to that of the grammar of Bhoja. The Siddha-Hema-Śabdanuśāśana also includes six Prakrit languages: the "standard" Prakrit (virtually Maharashtri Prakrit), Shauraseni, Magahi, Paiśācī, the otherwise-unattested Cūlikāpaiśācī and Apabhraṃśa (virtually Gurjar Apabhraṃśa, prevalent in the area of Gujarat and Rajasthan at that time and the precursor of Gujarati language). He gave a detailed grammar of Apabhraṃśa and also illustrated it with the folk literature of the time for better understanding. It is the only known Apabhraṃśa grammar.[3]

To illustrate the grammar, he produced the epic poetry Dvyashraya Kavya on the history of Chaulukya dynasty. It is an important source of history of region of the time.[3] The epic poem Trīṣaṣṭiśalākāpuruṣacharitra or "Lives of Sixty-Three Great Men" is a hagiographical treatment of the twenty four tirthankaras and other important persons instrumental in defining the Jain philosophical position, collectively called the "śalākāpuruṣa", their asceticism and eventual liberation from the cycle of death and rebirth, as well as the legendary spread of the Jain influence. It still serves as the standard synthesis of source material for the early history of Jainism.[3] The appendix to this work, the Pariśiṣṭaparvan or Sthavirāvalīcarita,[11] contains his own commentary and is in itself a treatise of considerable depth[3] It has been translated into English as The Lives of the Jain Elders.[12] In the test, Hemchandra accepts the polyandry of Draupadi and further suggests that Draupadi was Nagasri in one of his previous lives and had poisoned a Jain monk. Therefore she had to suffer in hell and animal incarnations for several lives before being born as woman who later became a Jain nun. After her death, she was reborn as Draupadi and was married to five pandavas.[13] His Kavyanuprakasha follows the model of Kashmiri rhetorician Mammata's Kavya-prakasha. He quoted other scholars like Anandavardhana and Abhinavagupta in his works.[3]

Abhidhan-Chintamani (IAST abhidhāna-cintāmaṇi-kośa) is a lexicon while Anekarth Kosha is a lexicon of words bearing multiple meanings. Deshi-Shabda-Sangraho or Desi-nama-mala is the lexicon of local or non-Sanskrit origin. Niganthu Sesa is a botanical lexicon.[3]

Thirteen ways of arranging long and short syllables in a cadence of length six, here shown with Cuisenaire rods of length 1cm and 2cm

Hemachandra, following the earlier Gopala, described the Fibonacci sequence in around 1150, about fifty years before Fibonacci (1202). He was considering the number of cadences of length n, and showed that these could be formed by adding a short syllable to a cadence of length n − 1, or a long syllable to one of n − 2. This recursion relation F(n) = F(n − 1) + F(n − 2) is what defines the Fibonacci sequence.[14][15]

He (c. 1150 AD) studied the rhythms of Sanskrit poetry. Syllables in Sanskrit are either long or short. Long syllables have twice the length of short syllables. The question he asked is How many rhythm patterns with a given total length can be formed from short and long syllables? For example, how many patterns have the length of five short syllables (i.e. five “beats”)? There are eight: SSSSS, SSSL, SSLS, SLSS, LSSS, SLL, LSL, LLS As rhythm patterns, these are xxxxx, xxxx., xxx.x, xx.xx, x.xxx, xx.x., x.xx., x.x.x [16]

His other works are a commentary in rhetoric work Alankara Chudamani, Abhidhana-chintamani,[2][17] Pramana-mimansa (logic), Vitaraga-Stotra (prayers).[3]