Hongfan huangji neipian 洪範皇極內篇 is a book on divination written during the Southern Song period 南宋 (1127-1279) by Cai Shen 蔡沈 (1167–1230), courtesy name Zhongfu 仲默, style Jiufeng Xiansheng 九峰先生, from Jianyang 建陽 in the prefecture of Jianzhou 建州 (in today's Fujian province). Cai was the youngest son of the Yijing 易經 philosopher and geomancer Cai Yuanding 蔡元定 (1135–1198), who was himself a disciple of Zhu Xi 朱熹 (1130-1200).
The book of 5 juan length is inspired by the numerology expounded in the Shangshu 尚書 chapter Hongfan 洪範, but does not use the cosmological philosophy embedded in this chapter. Despite the usual title, the book consists not just of "inner chapters" (neipian 內篇), but also of "outer chapters" (waipian 外篇).
The first part imitates the 81 hexagrams of the Classic Yijing "Book of Changes", while the second one emulates the meaning of the hexagrams and explains them, just as the Xici 系辭 and Shuoguo 說卦 chapter of the Yijing elucidate the application of hexagrams. The book touches on Liu Xin's 劉歆 (d. 23 CE) interpretations of the Yijing, where he correlates the Hetu 河圖 "Yellow River Chart" and Luoshu 洛書 "Inscription of River Luo" diagrams as a way to understand and integrate natural principles, with the eight trigrams (bagua 八卦) and nine chapters (jiuzhang 九章; i.e., methods of arithmetics) creating a structural or symbolic grid. Using numerology and the Nine-Palaces layout (jiugong tu 九宮圖), Cai explores cosmological principles and patterns of the nine divisions (jiuchou 九疇) explained in the ancient text Hongfan.
By viewing the Luoshu as the origin of numbers, Cai proposes the theory of the symbols of the River Chart as even numbers (ou 偶) and the symbols of the Luo Inscription as odd numbers (qi 奇), further attributing the origins of all things in heaven and earth to numbers. The Yellow River's even numbers represent the "form or substance of numbers" (shu zhi ti 數之體) manifesting as the shapes of objects, while the Luo Inscription's odd numbers represent the "application of numbers" (shu zhi yong 數之用) indicating the principles of creation and transformation. Attributing the world's changes to the interaction of even and odd numbers was the foundational principle and ultimate focus of divination numerology, though it was not particularly novel.
Since Cai Shen, a new school within numerology has emerged focused on the Hongfan, with many followers adopting this approach, which has had a considerable influence on the history of Yijing studies.
The text is included in the imperial series Siku quanshu 四庫全書, as a copy from the Ming-period 明 (1368-1644) encyclopaedia Yongle dadian 永樂大典.