5D Library › 多模态历法张量融合、模九十谐波拨盘与跨系统共振诊断 · English
第二章 子平调候:寒暖燥湿的二维向量
把「调候」写成向量
子平法中的「调候」,是按出生月令的寒暖燥湿,为日主选择能使之平衡的五行:冬月寒冷,先取火;夏月炎热,先取水。通行的《穷通宝鉴》即按日干与出生月份分论 (Anonymous, n.d.)。本章把这一思想写成最简单的几何模型。
每个月支 (子为 0,亥为 11)得到一个二维的气候向量 :暖度 ,子月最冷、午月最热;湿度 ,丑月最湿、未月最燥。每个日干也有一个固定的向量。命局的气候是两者的加权和,月支占 0.7、日干占 0.3(作者提纲中的 70/30 加权): 调候之神取与 方向最相反的五行,即与 的内积最小者。
一百二十格的调候表
推导
# Chapter 2. [p03] Ziping climate balance as two-dimensional vectors.
# Each month branch (zi = 0 .. hai = 11) gets a climate vector
# (warmth, moisture): warmth = -cos(2 pi k / 12) (coldest at zi, hottest
# at wu); moisture = cos(2 pi (k - 1) / 12) (wettest at chou, driest at
# wei). Each day stem gets a fixed vector (below). The chart climate is
# 0.7 x branch + 0.3 x stem (the 70/30 weighting). The corrective
# element is the one whose vector points most against the chart climate
# (largest negative dot product). Elements: mu wood, huo fire, tu
# earth, jin metal, shui water. Over the 10 x 12 = 120 day-stem by
# month cells: the corrective element in cold and hot months.
import math
STEMS = ("jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren",
"gui")
STEM_V = ((0.2, 0.3), (0.1, 0.4), (0.9, -0.3), (0.7, -0.2), (0.3, -0.6),
(0.0, 0.5), (-0.3, -0.4), (-0.4, -0.2), (-0.6, 0.7), (-0.5, 0.8))
ELEM = {"mu": (0.2, 0.4), "huo": (1.0, -0.4), "tu": (0.1, -0.2),
"jin": (-0.4, -0.3), "shui": (-0.7, 0.8)}
BRANCH = ("zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen",
"you", "xu", "hai")
def branch_v(k):
return (-math.cos(2 * math.pi * k / 12),
math.cos(2 * math.pi * (k - 1) / 12))
def climate(s, k, w=0.7):
b = branch_v(k)
return tuple(w * b[i] + (1 - w) * STEM_V[s][i] for i in range(2))
def corrective(v):
return min(ELEM, key=lambda e: ELEM[e][0] * v[0] + ELEM[e][1] * v[1])
if __name__ == "__main__":
table = {(s, k): corrective(climate(s, k)) for s in range(10)
for k in range(12)}
print(" corrective element by month branch (day stems jia .. gui;")
print(" M mu, H huo, T tu, J jin, S shui)")
for k in range(12):
row = [{"mu": "M", "huo": "H", "tu": "T", "jin": "J",
"shui": "S"}[table[s, k]] for s in range(10)]
print(" {:5s} {}".format(BRANCH[k], " ".join(row)))
cold = [k for k in (11, 0, 1)]
hot = [k for k in (5, 6, 7)]
fire = sum(table[s, k] == "huo" for s in range(10) for k in cold)
water = sum(table[s, k] == "shui" for s in range(10) for k in hot)
print(" winter months (hai, zi, chou): huo in {} of 30 cells".format(
fire))
print(" summer months (si, wu, wei): shui in {} of 30 cells".format(
water))
count = {e: sum(v == e for v in table.values()) for e in ELEM}
print(" cells per element: " + " ".join(
"{} {}".format(e, n) for e, n in count.items()))
print("\nReading: with any vectors of this shape the familiar rule")
print("follows from geometry: huo against winter cold, shui against")
print("summer heat. The interest lies in the spring and autumn rows,")
print("where the answer depends on the weights.")
# corrective element by month branch (day stems jia .. gui;
# M mu, H huo, T tu, J jin, S shui)
# zi H H H H H H H H H H
# chou H H H H H H H H H H
# yin H H H H H H H H H H
# mao J H J J J H H H H H
# chen S J S S S J S S J J
# si S S S S S S S S S S
# wu S S S S S S S S S S
# wei S S S S S S S S S S
# shen S S S S S S S S S S
# you S S S S S S S S H H
# xu H H M H H H H H H H
# hai H H H H H H H H H H
# winter months (hai, zi, chou): huo in 30 of 30 cells
# summer months (si, wu, wei): shui in 30 of 30 cells
# cells per element: mu 1 huo 57 tu 0 jin 8 shui 54
#
# Reading: with any vectors of this shape the familiar rule
# follows from geometry: huo against winter cold, shui against
# summer heat. The interest lies in the spring and autumn rows,
# where the answer depends on the weights.冬三月(亥、子、丑)的 30 格全部取火,夏三月(巳、午、未)的 30 格全部取水。这正是「冬用火、夏用水」的通行规则,但在这个模型中它不是经验,而是几何:只要月支向量在冬季指向「寒」、在夏季指向「热」,而火、水两个向量分别指向「热」「寒」,结论就必然如此。120 格中,火占 57 格、水占 54 格,金 8 格,木 1 格,土 0 格。真正需要判断的是春、秋的格子:卯、辰、酉、戌各行里,日干开始起作用。
70/30 是约定,不是常数
推导
# Chapter 2. [p04] How much of the climate table is set by the 70/30
# weighting? The model of p03 (same vectors) is recomputed with branch
# weights w = 1.0, 0.8, 0.6, 0.5 and 0.4 and compared cell by cell with
# w = 0.7. Also the tension |climate| (length of the chart vector):
# its mean and the share of cells below 0.3 ("already balanced").
import math
STEM_V = ((0.2, 0.3), (0.1, 0.4), (0.9, -0.3), (0.7, -0.2), (0.3, -0.6),
(0.0, 0.5), (-0.3, -0.4), (-0.4, -0.2), (-0.6, 0.7), (-0.5, 0.8))
ELEM = {"mu": (0.2, 0.4), "huo": (1.0, -0.4), "tu": (0.1, -0.2),
"jin": (-0.4, -0.3), "shui": (-0.7, 0.8)}
def climate(s, k, w):
b = (-math.cos(2 * math.pi * k / 12),
math.cos(2 * math.pi * (k - 1) / 12))
return tuple(w * b[i] + (1 - w) * STEM_V[s][i] for i in range(2))
def table(w):
out = {}
for s in range(10):
for k in range(12):
v = climate(s, k, w)
out[s, k] = (min(ELEM, key=lambda e: ELEM[e][0] * v[0]
+ ELEM[e][1] * v[1]), math.hypot(*v))
return out
if __name__ == "__main__":
base = table(0.7)
print(" w cells changed vs 0.7 mean tension share < 0.3")
for w in (1.0, 0.8, 0.7, 0.6, 0.5, 0.4):
t = table(w)
ch = sum(t[c][0] != base[c][0] for c in t) / 120
mt = sum(x[1] for x in t.values()) / 120
low = sum(x[1] < 0.3 for x in t.values()) / 120
print(" {:3.1f} {:22.4f} {:14.3f} {:12.4f}".format(w, ch, mt, low))
print("\nReading: between 0.6 and 0.8 only a few spring and autumn")
print("cells change; at equal weights the day stem starts to decide.")
print("The weighting is a convention to state, not a constant.")
# w cells changed vs 0.7 mean tension share < 0.3
# 1.0 0.0917 0.941 0.0000
# 0.8 0.0417 0.759 0.0417
# 0.7 0.0000 0.674 0.1000
# 0.6 0.0500 0.599 0.1500
# 0.5 0.1333 0.537 0.2167
# 0.4 0.2500 0.505 0.2583
#
# Reading: between 0.6 and 0.8 only a few spring and autumn
# cells change; at equal weights the day stem starts to decide.
# The weighting is a convention to state, not a constant.把月支的权重从 0.7 改为 0.6,0.0500 的格子改变调候之神;改为 0.8,改变 0.0417;改为 0.5,改变 0.1333;改为 0.4,改变 0.2500。命局的「紧张度」(气候向量的长度)也随权重下降:月支权重越小,日干越能抵消月令,看起来「已经平衡」(长度小于 0.3)的格子从 0.1000 增加到 0.2583。换句话说,「这个命局需不需要调候」本身就取决于加权约定。
假说 · 尚未验证
作者的诠释(尚未验证): 子平调候中经验性的部分,集中在春秋两季与日干的相互作用上;冬夏两季的结论由向量几何决定,与具体参数无关。什么会证明这一判断错:若把《穷通宝鉴》一百二十节中每节首取之神逐一编码,与本章的表比较,冬夏两季出现大量不取火、水的格子(例如超过三成),说明通行文本的调候并不是以寒暖为主轴的几何关系。
小结
把调候写成二维向量后,「冬用火、夏用水」由几何直接推出;120 格中依赖约定的是春秋的格子。月支与日干的 70/30 加权是一项需要说明的约定:改为 0.6 或 0.8 会改变约二十分之一的格子,改为一半一半则改变 0.1333。
参考文献
Fan, Y. (2026). Multimodal Calendrical Tensor Fusion, Modulo-90 Harmonic Dials and Cross-System Resonance Diagnostics: Climate-Balance Vectors, Flying-Transformation Matrices and Solar-Arc Midpoint Trees [多模态历法张量融合、模九十谐波拨盘与跨系统共振诊断] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090189 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).