关于「合十、三般卦与替卦的约定」,《飞星置换、罗盘离散与骨相计量》给出的定量结论是什么?

结论:第二章计算合十(向星、山星各 12 个)与三般卦(16 个,全在上山下水之中),并显示两种替卦约定各改变 182 个盘,彼此只在一半的盘上一致。

数据口径:罗盘误差、磁偏角、面部尺寸与标点误差都是示意参数;排盘规则按书中写明的约定执行。 书中以标注框区分证据、可运行的 Python 程序、原典与假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 12, 16

pattern charts share of 216
he shi, facing side12 0.0556
he shi, mountain side12 0.0556
san ban gua16 0.0741
lian zhu16 0.0741
pattern by class (only non-zero cells):
he shi, facing side shuang xing hui xiang8
he shi, facing side wang shan wang xiang4
he shi, mountain side shuang xing hui zuo8
he shi, mountain side wang shan wang xiang4
lian zhu shang shan xia shui16
san ban gua shang shan xia shui16
Reading: each pattern is rare and confined to particular
classes: he shi needs two charts flying in opposite
directions with matching centres, and san ban gua and lian
zhu occur only among the shang shan xia shui charts. These
are facts about a permutation table, not evidence about
houses.
查看完整验算程序
# Chapter 2. p03: He shi and san ban gua among the 216 charts.
# Same chart rules as p02. In each of the nine palaces a chart shows
# three numbers: period star, mountain star, facing star. Patterns:
#   he shi (sum to ten), facing side: period + facing = 10 everywhere;
#   he shi, mountain side: period + mountain = 10 everywhere;
#   san ban gua (father and mother): in every palace the three numbers
#     form one of the sets {1, 4, 7}, {2, 5, 8}, {3, 6, 9};
#   lian zhu (string of pearls): in every palace the three numbers are
#     consecutive, such as 3, 4, 5 (9 counts as next to 1).
# Algebra: a sum is constant over the palaces only if the two charts
# fly in opposite directions; then it equals 10 exactly when the two
# centre numbers sum to 1 mod 9.
import collections

LOSHU = {"SE": 4, "S": 9, "SW": 2, "E": 3, "C": 5, "W": 7,
         "NE": 8, "N": 1, "NW": 6}
PALACE_OF = {v: k for k, v in LOSHU.items()}
PATH = ["C", "NW", "W", "NE", "S", "N", "SW", "E", "SE"]
OPP = {"N": "S", "S": "N", "E": "W", "W": "E", "NE": "SW", "SW": "NE",
       "NW": "SE", "SE": "NW"}
PAL_ORDER = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"]
MOUNTAINS = ("ren zi gui chou gen yin jia mao yi chen xun si bing wu "
             "ding wei kun shen geng you xin xu qian hai").split()

def norm(x):
    return (x - 1) % 9 + 1

def fly(c, sign):
    return {p: norm(c + sign * k) for k, p in enumerate(PATH)}

def polarity(number, pos):
    cardinal = number in (1, 3, 7, 9)
    return (1, -1, -1)[pos] if cardinal else (-1, 1, 1)[pos]

def side(base, pal, pos):
    n = base[pal]
    ref = LOSHU[pal] if n == 5 else n
    return fly(n, polarity(ref, pos))

def chart(period, i):
    base = fly(period, 1)
    sit = PAL_ORDER[i // 3]
    face = OPP[sit]
    return base, side(base, sit, i % 3), side(base, face, i % 3), sit, face

def category(period, i):
    base, m, f, sit, face = chart(period, i)
    if m[sit] == period and f[face] == period:
        return "wang shan wang xiang"
    if m[face] == period and f[sit] == period:
        return "shang shan xia shui"
    if m[face] == period and f[face] == period:
        return "shuang xing hui xiang"
    return "shuang xing hui zuo"

def palaces(ch):
    base, m, f, sit, face = ch
    return [(base[p], m[p], f[p]) for p in PATH]

def he_shi(trip, k):
    return all(t[0] + t[k] == 10 for t in trip)

def san_ban(trip):
    return all(len({x % 3 for x in t}) == 1 and len(set(t)) == 3
               for t in trip)

def lian_zhu(trip):
    for t in trip:
        s = sorted(t)
        if not any({norm(a), norm(a + 1), norm(a + 2)} == set(s)
                   for a in range(1, 10)):
            return False
    return True

if __name__ == "__main__":
    cnt = collections.Counter()
    by_cat = collections.Counter()
    for p in range(1, 10):
        for i in range(24):
            trip = palaces(chart(p, i))
            for name, ok in (("he shi, facing side", he_shi(trip, 2)),
                             ("he shi, mountain side", he_shi(trip, 1)),
                             ("san ban gua", san_ban(trip)),
                             ("lian zhu", lian_zhu(trip))):
                if ok:
                    cnt[name] += 1
                    by_cat[(name, category(p, i))] += 1
    print("   pattern                  charts   share of 216")
    for name in ("he shi, facing side", "he shi, mountain side",
                 "san ban gua", "lian zhu"):
        print("   {:22s} {:8d} {:14.4f}".format(name, cnt[name],
                                               cnt[name] / 216))
    print("\n   pattern by class (only non-zero cells):")
    for (name, cat), n in sorted(by_cat.items()):
        print("     {:22s} {:22s} {:3d}".format(name, cat, n))
    print("\nReading: each pattern is rare and confined to particular")
    print("classes: he shi needs two charts flying in opposite")
    print("directions with matching centres, and san ban gua and lian")
    print("zhu occur only among the shang shan xia shui charts. These")
    print("are facts about a permutation table, not evidence about")
    print("houses.")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《玄空飞星置换代数、二十四山罗盘离散化与骨相比例计量》第 2 章「合十、三般卦与替卦的约定」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090215

DOI: 10.5281/zenodo.24090215 · 阅读本章所在专著 · 5DL-B-082 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026082,
  author    = {Fan, Yafu},
  title     = {Xuankong Flying-Star Permutations, Twenty-Four-Mountain Compass Discretization and Craniofacial Ratio Metrology},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090215},
  url       = {https://doi.org/10.5281/zenodo.24090215}
}

本书其他章节结论