关于「黄历规则的布尔谓词与消失的纯吉日」,《黄历布尔格、建除同余与卢恩组合》给出的定量结论是什么?
结论:第一章把通书规则写成 2027 年各天上的布尔谓词:建除、黄黑道、岁破、三煞、凶宿与两人冲日七组规则叠加后只剩 33 个纯吉日(0.090),比例大致按单条规则的乘积下降;由相同成分构成的两个流派一致程度只有 kappa 0.050。
数据口径:本书不主张任何一天吉或凶,也不主张卢恩能预示任何事;干支、节气与星宿由公布的天文数据算出,规则的选取与人物参数为示意模型;全部数据由书中程序生成。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.090, 33
| rule sets | bad share | pure days | share | if independent |
|---|---|---|---|---|
| R1..R1 | 0.488 | 187 | 0.512 | 0.512 |
| R1..R2 | 0.501 | 94 | 0.258 | 0.255 |
| R1..R3 | 0.082 | 84 | 0.230 | 0.234 |
| R1..R4 | 0.247 | 69 | 0.189 | 0.177 |
| R1..R5 | 0.466 | 38 | 0.104 | 0.094 |
| R1..R6 | 0.085 | 33 | 0.090 | 0.086 |
| R1..R7 | 0.082 | 33 | 0.090 | 0.079 |
| pure days by month: 2 3 2 4 2 0 5 4 2 6 2 1 | ||||
| 20 further rules marking 8% each: 0.0171 of days pure, 6.2 a year | ||||
| 40 further rules marking 8% each: 0.0032 of days pure, 1.2 a year | ||||
| 60 further rules marking 8% each: 0.0006 of days pure, 0.2 a year |
查看完整验算程序
# Chapter 1. p01: Stacking almanac rules on the days of 2027.
# Each day of 2027 gets its stem-branch, month branch (changing at each
# "jie" solar term, Beijing time) and year branch (changing at Lichun).
# Seven rule sets mark a day bad: R1 the twelve officers (jian, man,
# ping, shou, bi, po bad), R2 the black-road gods, R3 the year breaker,
# R4 the month's three sha, R5 an unlucky lodge (13 of 28, a model list;
# lists differ between almanacs), R6 and R7 a clash with the birth-year
# branch of two people (born in zi and mao years). A "pure" day has no
# bad mark. The share of pure days is compared with the product of the
# single-rule shares, which assumes the rules are independent, and
# extrapolated to almanacs that add many more rules (8% of days each).
import datetime
OFFICERS = ("jian chu man ping ding zhi po wei cheng shou kai bi").split()
# the 12 "jie" of 2027, Beijing time (UTC+8), from NAOJ's 2027 table
JIE = ((1, 5, 22, 10), (2, 4, 9, 46), (3, 6, 3, 40), (4, 5, 8, 17),
(5, 6, 1, 25), (6, 6, 5, 26), (7, 7, 15, 37), (8, 8, 1, 27),
(9, 8, 4, 28), (10, 8, 20, 17), (11, 7, 23, 39), (12, 7, 16, 38))
D0 = datetime.date(2027, 1, 1) # geng-chen day, mansion Gui (22)
def days(offset_h=0):
"""One dict per day of 2027: stem, branch, month and year branch."""
jie = [datetime.datetime(2027, m, d, h, mi) +
datetime.timedelta(hours=offset_h) for m, d, h, mi in JIE]
out = []
for k in range(365):
day = D0 + datetime.timedelta(days=k)
n = sum(1 for j in jie if j.date() <= day) # jie passed
gz = (16 + k) % 60
out.append({"date": day, "gz": gz, "s": gz % 10, "b": gz % 12,
"M": n % 12, "Y": 6 if n < 2 else 7,
"mansion": (22 + k) % 28})
return out
GOOD_OFFICER = {1, 4, 5, 7, 8, 10} # chu ding zhi wei cheng kai
QINGLONG = {2: 0, 8: 0, 3: 2, 9: 2, 4: 4, 10: 4, 5: 6, 11: 6,
0: 8, 6: 8, 1: 10, 7: 10} # month branch -> Azure Dragon day
YELLOW = {0, 1, 4, 5, 7, 10} # the six "yellow road" gods
SANSHA = {8: (5, 6, 7), 0: (5, 6, 7), 4: (5, 6, 7),
2: (11, 0, 1), 6: (11, 0, 1), 10: (11, 0, 1),
5: (2, 3, 4), 9: (2, 3, 4), 1: (2, 3, 4),
11: (8, 9, 10), 3: (8, 9, 10), 7: (8, 9, 10)}
BAD_MANSION = {1, 2, 4, 8, 9, 10, 11, 14, 17, 19, 22, 23, 26} # model
TIANDE = {2: ("s", 3), 3: ("b", 8), 4: ("s", 8), 5: ("s", 7),
6: ("b", 11), 7: ("s", 0), 8: ("s", 9), 9: ("b", 2),
10: ("s", 2), 11: ("s", 1), 0: ("b", 5), 1: ("s", 6)}
YUEDE = {2: 2, 6: 2, 10: 2, 8: 8, 0: 8, 4: 8, 11: 0, 3: 0, 7: 0,
5: 6, 9: 6, 1: 6}
TIANSHE = {2: 14, 3: 14, 4: 14, 5: 30, 6: 30, 7: 30,
8: 44, 9: 44, 10: 44, 11: 0, 0: 0, 1: 0}
def officer(d):
return (d["b"] - d["M"]) % 12
def marks(d, births=(0, 3)):
"""Bad marks (rule sets R1..R7) and good marks of one day."""
bad = {
"R1 officer": officer(d) not in GOOD_OFFICER,
"R2 black road": (d["b"] - QINGLONG[d["M"]]) % 12 not in YELLOW,
"R3 year breaker": d["b"] == (d["Y"] + 6) % 12,
"R4 three sha": d["b"] in SANSHA[d["M"]],
"R5 mansion": d["mansion"] in BAD_MANSION,
"R6 clash A": d["b"] == (births[0] + 6) % 12,
"R7 clash B": d["b"] == (births[1] + 6) % 12,
}
kind, v = TIANDE[d["M"]]
good = {
"tian de": d[kind] == v,
"yue de": d["s"] == YUEDE[d["M"]],
"tian she": d["gz"] == TIANSHE[d["M"]],
}
return bad, good
if __name__ == "__main__":
ds = days()
names = list(marks(ds[0])[0])
alive = list(range(365))
indep = 1.0
print(" rule sets bad share pure days share if independent")
for k, name in enumerate(names, 1):
share = sum(1 for d in ds if marks(d)[0][name]) / 365
indep *= 1 - share
alive = [i for i in alive if not marks(ds[i])[0][name]]
print(" R1..R{} {:8.3f} {:8d} {:6.3f} {:8.3f}".format(
k, share, len(alive), len(alive) / 365, indep))
by_month = [0] * 12
for i in alive:
by_month[ds[i]["date"].month - 1] += 1
print(" pure days by month: {}".format(" ".join(map(str, by_month))))
base = len(alive) / 365
for m in (20, 40, 60):
print(" {} further rules marking 8% each: {:.4f} of days pure,"
" {:.1f} a year".format(m, base * 0.92 ** m,
365 * base * 0.92 ** m))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《黄历择吉布尔格、建除十二直同余与卢恩符文组合学》第 1 章「黄历规则的布尔谓词与消失的纯吉日」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090239
DOI: 10.5281/zenodo.24090239 · 阅读本章所在专著 · 5DL-B-091 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026091,
author = {Fan, Yafu},
title = {Almanac Auspicious Boolean Lattices, Jianchu Twelve-Officer Congruences and Runic Combinatorics},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090239},
url = {https://doi.org/10.5281/zenodo.24090239}
}