5D Library › 四柱排盘的历法计算与规则引擎 · English
第七章 《渊海子平》《三命通会》与《滴天髓》
为什么在这里读这些原典
前六章的规则都有文本来源:以日干为主、十神与藏干来自宋代以后的子平书,起运「三日为一岁」与人元司令的天数见于明代的汇编,旺衰的判断在《滴天髓》中被推为全部命理的关键。本章回到这些文本,核对前面的模型所依据的说法,并标明何处由阅读变成了诠释。
《渊海子平》与以日为主
《渊海子平》题宋徐升编,托名徐子平之法,以日干为「我」,看年、月、时的干支与我的关系 (Xu, n.d.)。第四章的十神就是这一「以日为主」的形式化:一旦确定日干,其余九个天干各对应一个十神,这正是 上以日干为原点的坐标。原书的十神名目与推法今天各本大体一致,本书只用它们的结构,不涉及其中的断语。
《三命通会》:人元司令与起运
明万民英的《三命通会》是子平术的大型汇编 (Wan, n.d.)。它与《渊海子平》都载有各月「人元司令」的天数,把一个月的三十天分给几个天干。第四章的权重 S3 用的是其中一种通行版本。
推导
# Chapter 7. Two classical tables read as data.
# (1) "Days in command" (one commonly printed version, as in p09): each
# month's 30 days are shared among stems. We check the sums, compare the
# stems with the hidden-stem list, and look at the proportions.
# (2) The luck-cycle rule "three days make one year": its usual glosses,
# one day = four months and one double-hour = ten days, assume a year of
# 360 days (12 months of 30). We check them against 360 and 365.2422.
BRANCHES = ("zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen",
"you", "xu", "hai")
STEMS = ("jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren",
"gui")
HIDDEN = ((9,), (5, 9, 7), (0, 2, 4), (1,), (4, 1, 9), (2, 4, 6), (3, 5),
(5, 3, 1), (6, 8, 4), (7,), (4, 7, 3), (8, 0))
DAYS = (((8, 10), (9, 20)), ((9, 9), (7, 3), (5, 18)),
((4, 7), (2, 7), (0, 16)), ((0, 10), (1, 20)),
((1, 9), (9, 3), (4, 18)), ((4, 5), (6, 9), (2, 16)),
((2, 10), (5, 9), (3, 11)), ((3, 9), (1, 3), (5, 18)),
((4, 10), (8, 3), (6, 17)), ((6, 10), (7, 20)),
((7, 9), (3, 3), (4, 18)), ((4, 7), (0, 5), (8, 18)))
if __name__ == "__main__":
print(" branch days (stem:days) only in days"
" only in list")
for b, name in enumerate(BRANCHES):
stems = [s for s, _ in DAYS[b]]
extra = [STEMS[s] for s in stems if s not in HIDDEN[b]]
miss = [STEMS[s] for s in HIDDEN[b] if s not in stems]
cells = " ".join("{}:{}".format(STEMS[s], d) for s, d in DAYS[b])
print(" {:6s} {:28s} {:12s} {}".format(
name, cells, " ".join(extra) or "-", " ".join(miss) or "-"))
print(" every month sums to 30 days: {}".format(
all(sum(d for _, d in row) == 30 for row in DAYS)))
tomb = [sorted(d for _, d in DAYS[b]) for b in (1, 4, 7, 10)]
print(" the four storage branches (chou chen wei xu) split 30 as {}"
.format(tomb[0]))
print(" in all four: {}".format(all(t == [3, 9, 18] for t in tomb)))
for year in (360, 365.2422):
print(" year of {:8.4f} days: 1 day -> {:6.2f} days of age,"
.format(year, year / 3))
print(" 1 double-hour -> {:5.2f}".format(
year / 3 / 12))
print("\nReading: the days-in-command table sums correctly but does not")
print("match the hidden-stem list in five branches; the storage branches")
print("split their 30 days 18 / 9 / 3, the same 0.6 / 0.3 / 0.1 as S2.")
print("The age glosses of the luck-cycle rule assume a 360-day year.")
# branch days (stem:days) only in days only in list
# zi ren:10 gui:20 ren -
# chou gui:9 xin:3 ji:18 - -
# yin wu:7 bing:7 jia:16 - -
# mao jia:10 yi:20 jia -
# chen yi:9 gui:3 wu:18 - -
# si wu:5 geng:9 bing:16 - -
# wu bing:10 ji:9 ding:11 bing -
# wei ding:9 yi:3 ji:18 - -
# shen wu:10 ren:3 geng:17 - -
# you geng:10 xin:20 geng -
# xu xin:9 ding:3 wu:18 - -
# hai wu:7 jia:5 ren:18 wu -
# every month sums to 30 days: True
# the four storage branches (chou chen wei xu) split 30 as [3, 9, 18]
# in all four: True
# year of 360.0000 days: 1 day -> 120.00 days of age,
# 1 double-hour -> 10.00
# year of 365.2422 days: 1 day -> 121.75 days of age,
# 1 double-hour -> 10.15
#
# Reading: the days-in-command table sums correctly but does not
# match the hidden-stem list in five branches; the storage branches
# split their 30 days 18 / 9 / 3, the same 0.6 / 0.3 / 0.1 as S2.
# The age glosses of the luck-cycle rule assume a 360-day year.这张表每个月都恰好分足三十天,但它列出的天干与通行的藏干表在五个地支上不一致:子、卯、午、酉、亥。四个墓库之支(丑、辰、未、戌)都按 18、9、3 天分配,正是 S2 的 0.6、0.3、0.1;这说明后来软件常用的比例,很可能是从人元司令天数折算来的。
起运的规则是三天折一岁;通行的推算口诀又说一天折四个月、一个时辰折十天。程序说明这两条注解以一年 360 天(十二个月、每月三十天)为前提:按 360 天,一天折 120 天、一个时辰折 10.00 天;按回归年 365.2422 天,则分别为 121.75 天与 10.15 天。差别很小,但它说明口诀是按传统的整月计算的,而不是按天文年。
注
版本核对。 上面的人元司令天数是一种常见的版本,各本在申、亥等月的分配上不尽相同;起运的折算口诀也以通行的转述为准。本书采用这一版本;依其他版本时,只需替换程序中对应的表格。
《滴天髓》:衰旺之真机
《滴天髓》旧题京图撰、刘基注,清代任铁樵增注为《滴天髓阐微》,是子平术中最受推重的理论书之一。它把衰旺放在全部判断的中心。第五章的结果从另一面印证了这句话的分量:旺衰确实是整个判断中最关键、也最难统一的一步;三套说得通的参数两两只有中等的一致。
假说 · 尚未验证
作者的诠释(尚未验证): 《滴天髓》强调「真机」,而不给出数值的规则,可以读作对旺衰不能被一组固定参数完全刻画的承认。什么会证明这一读法不当:若能找到《滴天髓》或其注本中明确给出数值权重与阈值的段落,并且历代注家对这些数值一致,这一读法就不成立。
小结
《渊海子平》以日为主,十神是以日干为原点的 坐标。《三命通会》等书的人元司令天数每月分足三十天,但与藏干表在五个地支上不一致;墓库之支的 18、9、3 天就是软件常用的 0.6、0.3、0.1。起运口诀以 360 日为一年。《滴天髓》把衰旺视为命理的关键,而第五章显示它也正是最依赖约定的一步。
参考文献
Fan, Y. (2026). Four-Pillar Calendrical Computation and Formal Rule Engines: Julian-Day Sexagenary Cycles, Midnight-Boundary Disagreements, Birth-Time Sensitivity Bounds and Weighted-Graph Strength Scoring [四柱排盘的历法计算与规则引擎] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090180 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).