关于「十神是 Z5 × Z2,藏干是权重向量」,《四柱排盘的计算》给出的定量结论是什么?
结论:第四章证明十神是 Z5 × Z2 的十个元素,十神表是拉丁方,而不是天干次序距离的函数;藏干的三种通行权重在主五行上一致,0.6、0.3、0.1 与人元司令的 18、9、3 天同源。
数据口径:书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 与结论吻合的打印值: 0.1, 0.3, 0.6, 18
| branch main element S1-S2 S1-S3 S2-S3 only in S3 | |
| zi water | 0.00 0.00 0.00 - |
| chou earth | 0.80 0.80 0.00 - |
| yin wood | 0.80 0.93 0.27 - |
| mao wood | 0.00 0.00 0.00 - |
| chen earth | 0.80 0.80 0.00 - |
| si fire | 0.80 0.93 0.40 - |
| wu fire | 0.60 0.60 0.00 - |
| wei earth | 0.80 0.80 0.00 - |
| shen metal | 0.80 0.87 0.47 - |
| you metal | 0.00 0.00 0.00 - |
| xu earth | 0.80 0.80 0.00 - |
| hai water | 0.60 0.80 0.47 earth |
| mean L1 distance: S1-S2 0.567, S1-S3 0.611, S2-S3 0.133 | |
| S3's largest element is the main stem's element in every branch: True | |
| Reading: all three weightings agree on each branch's main | |
| element; they differ in how much weight the other elements get | |
| (up to 0.93 of the total). S2 and S3 coincide in eight branches: | |
| 0.6 / 0.3 / 0.1 is 18 / 9 / 3 days out of 30. In one branch the | |
| days-in-command table brings in an element the list lacks. |
查看完整验算程序
# Chapter 4. Hidden stems as weight vectors over the five elements.
# Each branch hides one to three stems (main, middle, residual). Three
# weightings of the same list are compared:
# S1 main stem only;
# S2 main / middle / residual = 0.6 / 0.3 / 0.1 (two stems: 0.7 / 0.3);
# S3 the "days in command" of one commonly printed table (30 days
# per month, shared among stems; see Chapter 7).
# Stems are indexed 0-9 (jia ... gui); element = stem // 2.
BRANCHES = ("zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen",
"you", "xu", "hai")
ELEMENTS = ("wood", "fire", "earth", "metal", "water")
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)))
def vector(pairs):
v = [0.0] * 5
for stem, w in pairs:
v[stem // 2] += w
return v
def schemes(b):
h = HIDDEN[b]
w2 = {1: (1.0,), 2: (0.7, 0.3), 3: (0.6, 0.3, 0.1)}[len(h)]
return (vector([(h[0], 1.0)]), vector(zip(h, w2)),
vector([(s, d / 30) for s, d in DAYS[b]]))
def l1(a, b):
return sum(abs(x - y) for x, y in zip(a, b))
if __name__ == "__main__":
print(" branch main element S1-S2 S1-S3 S2-S3 only in S3")
tot = [0.0, 0.0, 0.0]
for b, name in enumerate(BRANCHES):
v1, v2, v3 = schemes(b)
d = (l1(v1, v2), l1(v1, v3), l1(v2, v3))
tot = [t + x for t, x in zip(tot, d)]
extra = [ELEMENTS[e] for e in range(5) if v3[e] > 0 and v2[e] == 0]
print(" {:6s} {:12s} {:5.2f} {:5.2f} {:5.2f} {}".format(
name, ELEMENTS[HIDDEN[b][0] // 2], *d, " ".join(extra) or "-"))
print(" mean L1 distance: S1-S2 {:.3f}, S1-S3 {:.3f}, S2-S3 {:.3f}"
.format(*[t / 12 for t in tot]))
same_main = all(max(range(5), key=lambda e: schemes(b)[2][e])
== HIDDEN[b][0] // 2 for b in range(12))
print(" S3's largest element is the main stem's element in every"
" branch: {}".format(same_main))
print("\nReading: all three weightings agree on each branch's main")
print("element; they differ in how much weight the other elements get")
print("(up to 0.93 of the total). S2 and S3 coincide in eight branches:")
print("0.6 / 0.3 / 0.1 is 18 / 9 / 3 days out of 30. In one branch the")
print("days-in-command table brings in an element the list lacks.")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《四柱排盘的历法计算与规则引擎》第 4 章「十神是 Z5 × Z2,藏干是权重向量」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090180
DOI: 10.5281/zenodo.24090180 · 阅读本章所在专著 · 5DL-B-066 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026066,
author = {Fan, Yafu},
title = {Four-Pillar Calendrical Computation and Formal Rule Engines},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090180},
url = {https://doi.org/10.5281/zenodo.24090180}
}