关于「六亲、六神与旬空」,《纳甲与奇门的组合计算》给出的定量结论是什么?
结论:第二章计算六亲在 384 爻中的分布,64 卦中有 44 卦缺少至少一种六亲,伏神是常态;六神按日干五行起、土分戊己,不是日干模 6;旬空是每旬十个连续地支之外的两个余数,六旬的空亡恰好分完十二地支。
数据口径:书中以标注框区分证据、16 段可运行的 Python 程序、原典与假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 与结论吻合的打印值: 384, 44, 64
| relative XD ZS QC GG FM | |
| on all 384 lines | 92 58 74 78 82 |
| on the 64 world lines | 14 12 15 13 10 |
| hexagrams lacking it | 6 16 16 8 10 |
| hexagrams with all five relatives | 20 of 64 |
| lacking one or more | 44 |
| number of distinct relatives per hexagram | 3: 12, 4: 32, 5: 20 |
| Reading: the 384 lines are not shared evenly among the five | |
| relatives (offspring 58, brothers 92), and 44 of the 64 | |
| hexagrams lack at least one, so the hidden-spirit rule is not | |
| an exception but the usual case. |
查看完整验算程序
# Chapter 2. Six relatives: the palace element against each line.
# Palaces and najia branches as in p01 and p02 (repeated here, since the
# programs do not import one another). The relative of a line is the
# relation of its branch's element to the palace's element in Z_5
# (wood 0, fire 1, earth 2, metal 3, water 4; "generates" is +1):
# 0 brothers (XD), +1 offspring (ZS), +2 wife-wealth (QC),
# +3 officer-ghost (GG), +4 parents (FM).
# A hexagram that lacks a relative must borrow it as a "hidden spirit"
# (fu shen) from the pure hexagram of its palace.
TRIGRAMS = {"Qian": (1, 1, 1), "Dui": (1, 1, 0), "Li": (1, 0, 1),
"Zhen": (1, 0, 0), "Xun": (0, 1, 1), "Kan": (0, 1, 0),
"Gen": (0, 0, 1), "Kun": (0, 0, 0)}
ELEMENT = {"Qian": 3, "Dui": 3, "Li": 1, "Zhen": 0, "Xun": 0, "Kan": 4,
"Gen": 2, "Kun": 2}
MASKS = ((), (1,), (1, 2), (1, 2, 3), (1, 2, 3, 4), (1, 2, 3, 4, 5),
(1, 2, 3, 5), (5,))
SHI = (6, 1, 2, 3, 4, 5, 4, 3)
START = {"Qian": 0, "Zhen": 0, "Kan": 2, "Gen": 4,
"Kun": 7, "Xun": 1, "Li": 3, "Dui": 5}
YANG = {"Qian", "Zhen", "Kan", "Gen"}
BRANCH_ELEMENT = (4, 2, 0, 0, 2, 1, 1, 2, 3, 3, 2, 4)
CODES = ("XD", "ZS", "QC", "GG", "FM")
NAME = {v: k for k, v in TRIGRAMS.items()}
def branches(lower, upper):
def run(t, base):
step = 2 if t in YANG else -2
return [(base + step * k) % 12 for k in range(3)]
return run(lower, START[lower]) + run(upper, START[upper] + 6)
def all_hexagrams():
for t, bits in TRIGRAMS.items():
for g, m in enumerate(MASKS):
h = tuple(b ^ (i + 1 in m) for i, b in enumerate(bits + bits))
yield h, t, g
def relatives(h, palace):
bs = branches(NAME[h[:3]], NAME[h[3:]])
return [CODES[(BRANCH_ELEMENT[b] - ELEMENT[palace]) % 5] for b in bs]
if __name__ == "__main__":
lines, missing, at_shi, n_kinds = {}, {}, {}, {}
lacking = 0
for h, palace, g in all_hexagrams():
rel = relatives(h, palace)
for r in rel:
lines[r] = lines.get(r, 0) + 1
absent = [c for c in CODES if c not in rel]
lacking += bool(absent)
for c in absent:
missing[c] = missing.get(c, 0) + 1
n_kinds[5 - len(absent)] = n_kinds.get(5 - len(absent), 0) + 1
r = rel[SHI[g] - 1]
at_shi[r] = at_shi.get(r, 0) + 1
print(" {:24s}".format("relative") + "".join("{:>5s}".format(c)
for c in CODES))
for label, d in (("on all 384 lines", lines),
("on the 64 world lines", at_shi),
("hexagrams lacking it", missing)):
print(" {:24s}".format(label) + "".join(
"{:5d}".format(d.get(c, 0)) for c in CODES))
print(" hexagrams with all five relatives: {} of 64".format(
n_kinds.get(5, 0)))
print(" lacking one or more: {}".format(lacking))
print(" number of distinct relatives per hexagram: " + ", ".join(
"{}: {}".format(k, v) for k, v in sorted(n_kinds.items())))
print("\nReading: the 384 lines are not shared evenly among the five")
print("relatives (offspring 58, brothers 92), and 44 of the 64")
print("hexagrams lack at least one, so the hidden-spirit rule is not")
print("an exception but the usual case.")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《纳甲装卦与奇门遁甲排盘的组合计算》第 2 章「六亲、六神与旬空」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090182
DOI: 10.5281/zenodo.24090182 · 阅读本章所在专著 · 5DL-B-067 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026067,
author = {Fan, Yafu},
title = {Najia Hexagram Encoding and Qimen Dunjia Combinatorial Engines},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090182},
url = {https://doi.org/10.5281/zenodo.24090182}
}