Pingala writes the Chandaḥśāstra ('Science of Meters') as a treatise on Sanskrit prosody, classifying all possible meters through combinations of long (guru, G) and short (laghu, L) syllables. In systematically enumerating these combinations he introduces a binary representation system: the prastāra algorithm recursively generates all combinations of n syllables, equivalent to modern binary enumeration. Halayudha's commentary (10th century) makes explicit Pascal's triangle (meru-prastāra), implicitly contained in the text. The Chandaḥśāstra also contains the first explicit reference to zero as a marker (śūnya). Leibniz independently develops the binary system c. 1679 without knowing of Pingala; the independence is complete and both traditions are valid.