# 韵律学

**韵律学**（Chandaḥśāstra，梵文：छन्दःशास्त्र，意为“韵律之学”）是已知最早的梵语诗律学论著，归于古代学者平伽拉（Piṅgala）名下，由八卷简练的经句组成。<sup>[1](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_480588701674)</sup> 该书系统描述了梵语诗律，其末章包含一套形式化的诗律数学理论，其中列举、排序与计数的程序如今被作为早期组合数学和类二进制算术来研究。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 主题 | 梵语诗律学（chandas），六吠陀支之一，即辅助正确诵习吠陀的附属学科<sup>[3](https://www.ms.uky.edu/~sohum/ma330/files/chennai_talks/Emch_Sridharan_Srinivas%20-%20Contributions%20ot%20the%20History%20of%20Indian%20Mathematics%20%282005%29.pdf)</sup> |
| 作者 | 平伽拉（पिङ्गल），其生平事迹一无所知；传统上认为他是波你尼（Pāṇini）或波颠阇利（Patañjali）的兄弟<sup>[1](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_480588701674)</sup> |
| 年代 | 不确定；通常定在公元前200年前后，学界的估计从公元前最后几个世纪到公元一、二世纪不等<sup>[4](https://doi.org/10.1137/25m180634x)</sup><sup> • </sup><sup>[5](https://www.prakrit.info/vrddhi/meter/)</sup> |
| 结构 | 八卷经句，若无注疏则不能完全理解<sup>[1](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_480588701674)</sup> |
| 数学内容 | 列举、索引和计数音节模式的递归算法；二项式系数；2的幂；等比级数求和<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> |
| 主要注疏 | 哈拉尤达（Halāyudha）的《甘露生命》（Mṛtasañjīvanī，10世纪）<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> |
| 现代版本 | 阿尔布雷希特·韦伯（Albrecht Weber）的校勘本及译本（1863年）；毗湿瓦纳塔·夏斯特里（Viśvanātha Śāstrī）附哈拉尤达注疏的加尔各答版（1874年）<sup>[6](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_10155615448061675)</sup> |

## 在梵语学术中的地位

梵语写作分为散文（gadya）与韵文（padya），而研究韵文格律的韵律学（chandas-śāstra）发端于[吠陀时期](https://www.edgepedia.org/zh/vedic-period)，当时作为吠陀支之一备受尊崇。<sup>[3](https://www.ms.uky.edu/~sohum/ma330/files/chennai_talks/Emch_Sridharan_Srinivas%20-%20Contributions%20ot%20the%20History%20of%20Indian%20Mathematics%20%282005%29.pdf)</sup> 《韵律学》是该领域最早也最重要的著作，后来的论著如《火神往世书》的诗律部分、《闻所成》（Śrutabodha）、《诗律宝珠》（Vṛttaratnākara）和《诗律花簇》（Chandomañjarī）或在此基础上发展，或与之并行。<sup>[7](https://www.sanskrit-lexicon.uni-koeln.de/scans/csldev/csldoc/build/dictionaries/prefaces/ap90app1.html)</sup> 沙巴罗（Śabara）——可能写作于五世纪——以及大致不晚于公元500年的吐鲁番残卷作者都知晓此书。<sup>[5](https://www.prakrit.info/vrddhi/meter/)</sup>

## 音节轻重与诗律类型

整个体系建立在逐音节应用的二元区分之上：轻音（laghu，轻或短）与重音（guru，重或长）。短音节计为一摩陀罗（mātrā，时间单位），长音节计为二。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

该书承认两大诗律类别。音节诗律（akṣarachandaḥ）按音节数来规定；吠陀类仅以音节数目定义，而后世的节奏诗律（vṛttachandaḥ）则由四音步（pāda）组成，每步有规定的长短音节序列。以摩陀罗计量的诗律分两种：步诗律（gaṇachandaḥ），规定每步的摩陀罗数；摩陀罗诗律（mātrāchandaḥ），只规定总数。平伽拉自己的算法只处理节奏诗律，他将其分为等步（sama，四步全同）、半等步（ardhasama，奇偶步不同但两两相配）和不等步（viṣama，各步不等）。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

由于每个音节取两值之一，n个音节的诗律有2<sup>n</sup>种可能模式；因此诗律学家需要系统的方法来分类它们。<sup>[8](https://api.pageplace.de/preview/DT0400.9780191630620_A23590107/preview-9780191630620_A23590107.pdf)</sup>

## 程序：组合算法

梵语诗律学传统上归纳出六个形式问题及其解法，称为程序（pratyayas）；平伽拉本人并未给它们命名。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> 用现代术语说，naṣṭa是反排名：平伽拉解释了如何从给定的序号k重构长短音节模式；而uddiṣṭa是排名：如何确定给定模式的序号。<sup>[8](https://api.pageplace.de/preview/DT0400.9780191630620_A23590107/preview-9780191630620_A23590107.pdf)</sup>

## 末章的数学

在详尽论述梵语诗律之后，平伽拉以一套纯数学的形式理论收尾，显然是为数学而数学；与波你尼的语法不同，它在诗律学中没有实际用途。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> 其内容包括：

- **递归列举。** 列举n音节诗律一切可能形式并为列表编索引的程序。平伽拉一贯使用递归，他的递归算法是[印度数学](https://www.edgepedia.org/zh/indian-mathematics)中递归的第一个例子，这一传统从波你尼经阿耶波多（Āryabhaṭa）一直延续到摩陀婆（Mādhava）。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>
- **二项式系数。** 确定有多少个n音节模式包含指定数目短音节的算法，即计算\( \binom{n}{k} \)。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>
- **2的幂。** 一种基于计算机科学家如今所称分治法的计算\( 2^{n} \)的高效递归算法。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>
- **等比级数。** 公比为2的等比级数求和公式，后来被室利陀罗（Śridhara，约公元750年）推广到任意公比。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

其计数结构在数学上等价于列举二进制串，这就是为什么史家将该体系描述为“类二进制”或“二进制结构”。但它并不是使用数字0和1的现代位值二进制记数系统，也不应将平伽拉的方法说成是该系统的发明。<sup>[9](https://hinduresearch.com/pingala-prosody-binary-combinatorics.html)</sup>

## 须弥图之争

争议最大的段落是平伽拉的最后一则经句“pare pūrṇam iti”。根据哈拉尤达十世纪注疏的权威，几乎普遍认为它意味着构造须弥图（meru-prastāra，“山岳表”），即如今所称的[帕斯卡三角形](https://www.edgepedia.org/zh/pascals-triangle)，用以计算二项式系数。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> 阿尔布雷希特·韦伯在十九世纪的评论中宣称，平伽拉的话中没有任何内容支持这一读法；路德维希·阿尔斯多夫（Ludwig Alsdorf）在1933年否定了韦伯的批评，但在没有证据的情况下推测该经句是后人窜入的。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

一个复杂化的事实是，哈拉尤达之前没有任何作者——从婆罗多（Bharata，公元1世纪）以降——描述过这样的构造，甚至不使用须弥图这一名称，唯有毗罗杭迦（Virahāṅka）例外。从婆罗多以降的作者确实描述了一种产生同一三角形的构造，但填充方向是从左到右斜向而非自上而下，这是一种算法上不同的方法，毗罗杭迦称之为针图（sūci，“针”）构造。[东北大学](https://www.edgepedia.org/zh/northeastern-university)数学家贾扬特·沙阿（Jayant Shah）追溯了平伽拉的算法在十五个世纪的印度文献中的流传，他找不到证据支持哈拉尤达对最后一则经句的解释，但仍将二项式系数的计算追溯到平伽拉本人。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup>

## 后世影响

平伽拉对二项式系数的计算、对重复部分和的运用以及他的等比级数公式，成为印度数学不可分割的一部分。他的算法被沙楞伽提婆（Śārṅgadeva，《乐宝》（Saṅgītaratnākara），约公元1225年）推广到具有时值1、2、4、6四种节拍类型的节奏；纳罗衍那（Nārāyaṇa）的《算海》（Gaṇitakaumudī，公元1356年）几乎逐字复述了平伽拉的等比级数算法。<sup>[2](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)</sup> 第八章引起了十一世纪波斯学者比鲁尼（al-Bīrūnī）的注意，直到晚近，他的注疏一直是了解该书的重要窗口。<sup>[4](https://doi.org/10.1137/25m180634x)</sup>

该书的生命史也体现在物质层面：一份注明塞迦历1632年（公元1710年）的《韵律学》抄本，以天城体文字书写，藏于钦马亚国际基金会（Chinmaya International Foundation）藏品中，已由[大英图书馆](https://www.edgepedia.org/zh/british-library)濒危档案计划数字化。<sup>[10](https://searcharchives.bl.uk/catalog/040-003321482)</sup>

## References

1. [Chandah Sutra of Pingala Acharya with the Commentary of Halayudha, ed. Viśvanātha Śāstrī, Calcutta 1874, Rare Books Society of India](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_480588701674)
2. [Jayant Shah, "A History of Piṅgala's Combinatorics" (2021), Northeastern University](https://sanskrit.uohyd.ac.in/Algorithms_in_Ancient_India/Material/Pingala.pdf)
3. [R. Sridharan, "Sanskrit Prosody, Piṅgala Sūtras and Binary Arithmetic," in Emch, Sridharan & Srinivas (eds.), Contributions to the History of Indian Mathematics (2005)](https://www.ms.uky.edu/~sohum/ma330/files/chennai_talks/Emch_Sridharan_Srinivas%20-%20Contributions%20ot%20the%20History%20of%20Indian%20Mathematics%20%282005%29.pdf)
4. [Clemency Montelle, "Counting on the Past: The Birth of Combinatorics in Classical India," ICM 2026 Proceedings, Vol. 7](https://doi.org/10.1137/25m180634x)
5. [Vr̥ddhiḥ: Meters, Piṅgala's Chandaḥsūtram](https://www.prakrit.info/vrddhi/meter/)
6. [Chhandah Sutra of Pingala Acharya, 1874 edition notice, Rare Books Society of India](https://rarebooksocietyofindia.org/postDetail.php?id=196174216674_10155615448061675)
7. [Appendix I: Sanskrit Prosody, Cologne Sanskrit Lexicon (csldoc)](https://www.sanskrit-lexicon.uni-koeln.de/scans/csldev/csldoc/build/dictionaries/prefaces/ap90app1.html)
8. [Combinatorics: Ancient and Modern, Oxford University Press (preview)](https://api.pageplace.de/preview/DT0400.9780191630620_A23590107/preview-9780191630620_A23590107.pdf)
9. [Pingala: Prosody, Binary-like Enumeration & Combinatorics, Hindu Research Portal](https://hinduresearch.com/pingala-prosody-binary-combinatorics.html)
10. [British Library Archives and Manuscripts Catalogue, EAP729/1/2/723, Chandaśāstra [Saka 1632]](https://searcharchives.bl.uk/catalog/040-003321482)

---
*Initially written Oct 22, 2026*

Topic: 艺术与文化 › 文学与文字作品 › 诗歌形式与格律 › Sanskrit and Indian prosody

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/chhandahshastra

English original: https://www.edgepedia.org/chhandahshastra
