5D Library › 古典卜卦尊贵度积分、恒星二十七宿岁差与维姆肖塔里运限链 · English

第二章 互溶、定位星映射与截夺的首达竞争

定位星映射

每颗行星落在某个星座,那个星座的庙主就是它的「定位星」。于是七颗行星构成一个映射 ff:行星 ↦\mapsto 其所在星座的庙主。这是一个七元集合到自身的映射,它的函数图由若干个环和挂在环上的树组成。

  • 行星在自己的庙宫,就是 ff 的不动点(长度为 1 的环);
  • 两颗行星互在对方的庙宫,即「互溶」(mutual reception),就是 ff 的 2-循环,也就是交换两者的对换;
  • 若 ff 唯一的环是一个不动点,那颗行星就是全盘的「最终定位星」。

推导

# Chapter 2. p03: Mutual reception as 2-cycles of the dispositor map.
# Each planet is "disposed" by the domicile ruler of the sign it is in:
# f(planet) = ruler(sign(planet)), a map of the 7 planets to themselves.
# A mutual reception (by domicile) is a 2-cycle of f; a planet in its own
# domicile is a fixed point; a "final dispositor" exists when the only
# cycle of f is one fixed point. Exact pair rates for uniform independent
# signs, then the real sky (p02), where Mercury and Venus hug the Sun.
import importlib.util
import random
from fractions import Fraction

def load(name):
    spec = importlib.util.spec_from_file_location(name, name + ".py")
    m = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(m)
    return m

dig = load("p01_dignity_tables")
eph = load("p02_ephemeris")
RULER = {s: p for p, ss in dig.DOM.items() for s in ss}

def cycles(signs):
    f = {p: RULER[signs[p]] for p in dig.PL}
    mutual = sum(1 for i, a in enumerate(dig.PL) for b in dig.PL[i + 1:]
                 if f[a] == b and f[b] == a)
    fixed = [p for p in dig.PL if f[p] == p]
    seen, cyc = set(), []
    for p in dig.PL:
        path, x = [], p
        while x not in seen and x not in path:
            path.append(x)
            x = f[x]
        if x in path:
            cyc.append(path[path.index(x):])
        seen |= set(path)
    final = len(cyc) == 1 and len(cyc[0]) == 1
    return mutual, len(fixed), final

def rates(samples):
    n = len(samples)
    return (sum(m > 0 for m, _, _ in samples) / n,
            sum(m for m, _, _ in samples) / n,
            sum(f > 0 for _, f, _ in samples) / n,
            sum(fd for _, _, fd in samples) / n)

if __name__ == "__main__":
    n = {p: len(dig.DOM[p]) for p in dig.PL}
    exp = sum(Fraction(n[a] * n[b], 144) for i, a in enumerate(dig.PL)
              for b in dig.PL[i + 1:])
    print("   uniform signs: expected mutual receptions {} = {:.4f}".format(
        exp, float(exp)))
    rng = random.Random(73003)
    uni = [cycles({p: rng.randrange(12) for p in dig.PL})
           for _ in range(100000)]
    sky = []
    for _ in range(40000):
        q = eph.positions(rng.uniform(2415020.5, 2469807.5))
        sky.append(cycles({p: int(q[p] // 30) for p in dig.PL}))
    print("   model     P(>=1 mutual)  E[mutual]  P(own domicile)"
          "  P(final disp.)")
    for name, s in (("uniform", uni), ("sky", sky)):
        print("   {:8s}  {:13.4f}  {:9.4f}  {:15.4f}  {:14.4f}".format(
            name, *rates(s)))
#    uniform signs: expected mutual receptions 61/144 = 0.4236
#    model     P(>=1 mutual)  E[mutual]  P(own domicile)  P(final disp.)
#    uniform          0.3815     0.4218           0.6610          0.1542
#    sky              0.3596     0.3859           0.6669          0.1942

互溶的基率

若七颗行星的星座独立均匀,一对行星 AA、BB 互溶的概率是 nAnB/144n_A n_B / 144,其中 nn 为各自的庙宫数(太阳、月亮各 1,其余各 2)。于是互溶对数的期望为 61/144,约 0.4236。模拟给出:至少有一对互溶的概率为 0.3815,至少一颗行星入庙的概率为 0.6610,存在最终定位星的概率为 0.1542。

用 1900 到 2049 年的真实位置计算,至少一对互溶的概率为 0.3596,入庙 0.6669,最终定位星 0.1942。真实天空中水星、金星与太阳靠得很近,它们之间(例如水星在狮子座、太阳在双子座或处女座)的互溶更难出现,所以互溶略少;最终定位星则略多。

注

「互溶」并不罕见。 大约每三张盘就有一张至少有一对庙宫互溶。若再把旺、三分、界、面的互容也算进来,比例会更高。互溶本身不是一张盘的特别之处。

入相位与截夺:首达竞争

两颗行星的黄经为 λ1\lambda_1、λ2\lambda_2,日行速度为 ω1\omega_1、ω2\omega_2。若它们按直线运动,形成角度 aa(0、60、90、120、180 度)的精确相位所需的时间是方程

(λ1−λ2)+(ω1−ω2)t≡±a(mod⁡360)(\lambda_1 – \lambda_2) + (\omega_1 – \omega_2)\,t \equiv \pm a \pmod{360}

的最小正根;只要这个根为正,相位就是「入相位」(applying)。卜卦占星里,若月亮正入相位于某颗主星 XX,而在它完成之前,第三颗行星先与 XX 成相位,就叫「截夺」(prohibition)。这是一个首达时间的竞争:谁先到达自己的目标角度。

推导

# Chapter 2. p04: Applying aspects as a first-passage race.
# Two bodies with longitudes l1, l2 and daily motions w1, w2 form an
# aspect of angle a (0, 60, 90, 120, 180) when l1 - l2 = +/- a (mod 360).
# Moving linearly, the time to the next exact aspect is the smallest
# positive t with (l1 - l2) + (w1 - w2) t = +/- a (mod 360); the aspect is
# "applying" while that t is positive and the separation is closing.
# Question: the Moon applies to a significator X; before it perfects,
# does a third planet Y perfect an aspect to X first (prohibition)?
import importlib.util
import random

def load(name):
    spec = importlib.util.spec_from_file_location(name, name + ".py")
    m = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(m)
    return m

eph = load("p02_ephemeris")
ASPECTS = (0, 60, 90, 120, 180)
BODIES = ("Sun", "Mercury", "Venus", "Mars", "Jupiter", "Saturn")

def next_perfection(l1, w1, l2, w2, horizon):
    dw = w1 - w2
    if abs(dw) < 1e-9:
        return None
    d = l1 - l2
    best = None
    for a in ASPECTS:
        for target in {a, -a}:
            t = ((target - d) % 360) / dw if dw > 0 else \
                -((d - target) % 360) / dw
            if 0 < t <= horizon and (best is None or t < best):
                best = t
    return best

if __name__ == "__main__":
    rng = random.Random(73004)
    N = 20000
    stats = {x: [0, 0, 0.0] for x in BODIES}
    for _ in range(N):
        jd = rng.uniform(2415020.5, 2469807.5)
        pos = eph.positions(jd)
        w = {b: eph.speed(jd, b) for b in BODIES + ("Moon",)}
        for x in BODIES:
            tm = next_perfection(pos["Moon"], w["Moon"], pos[x], w[x], 30)
            first = min((t for y in BODIES if y != x for t in [
                next_perfection(pos[y], w[y], pos[x], w[x], tm)]
                if t is not None), default=None)
            stats[x][0] += 1
            stats[x][1] += first is not None
            stats[x][2] += tm
    print("   significator  Moon perfects in (days)  prohibited first")
    for x in BODIES:
        n, k, t = stats[x]
        print("   {:12s}  {:23.2f}  {:16.4f}".format(x, t / n, k / n))
    print("   (third bodies: the other five of Sun, Mercury ... Saturn)")
#    significator  Moon perfects in (days)  prohibited first
#    Sun                              2.04            0.1330
#    Mercury                          2.06            0.1886
#    Venus                            2.06            0.1409
#    Mars                             1.98            0.1283
#    Jupiter                          1.93            0.1442
#    Saturn                           1.92            0.1515
#    (third bodies: the other five of Sun, Mercury ... Saturn)

在 1900 到 2049 年的随机时刻,月亮完成下一个对某颗行星的托勒密相位平均需要 1.92 到 2.06 天。在这段时间里,被其他五颗行星(太阳、水星至土星中除 XX 以外的)之一抢先与 XX 成相位的比例,从火星作主星时的 0.1283 到水星作主星时的 0.1886 不等。水星最容易被截夺,因为它自身运动快、又常与太阳、金星同处一区,与它们的相对运动使精确相位频繁出现。

假说 · 尚未验证

作者的假说(尚未验证): 截夺在卜卦判断中的出现频率主要由上述运动学基率决定,与问题的内容无关。什么会证明它错: 若在同一批时刻上,不同类别问题的星盘中截夺出现的比例有显著差异,这一假说就不成立(因为星盘只由时刻决定,这一差异只能来自选择问题的时刻)。

小结

互溶是定位星映射的 2-循环,在均匀模型下互溶对数的期望为 61/144,至少一对的概率为 0.3815,真实天空中为 0.3596。截夺是首达竞争:月亮入相位期间被第三颗行星抢先的比例约为一成三到一成九。

Fan, Y. (2026). Horary Dignity Scoring, Sidereal Nakshatra Precession and Vimshottari Dasha Chains: Reception Matrix Algebra, Ayanamsha Drift Kinetics and Non-Uniform Planetary Period Partitions [古典卜卦尊贵度积分、恒星二十七宿岁差与维姆肖塔里运限链] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090195 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).