Published November 8, 2026 | Version 1.0.0
Book Open

四柱排盘的历法计算与规则引擎:儒略日干支同余、早晚子时分歧、出生时间误差敏感度与旺衰加权图 | Four-Pillar Calendrical Computation and Formal Rule Engines: Julian-Day Sexagenary Cycles, Midnight-Boundary Disagreements, Birth-Time Sensitivity Bounds and Weighted-Graph Strength Scoring

Authors/Creators

  • 1. 5D Library

Description

A four-pillar chart first does calendar work and then judges. The first half is astronomy and calendar calculation, with a single answer once the conventions are stated; the second half is a rule engine whose results depend on parameters. This book writes both halves as programs and asks three questions. Do different programs give the same birth different charts? Does a birth time a few minutes off change the chart? Do different parameters give the same chart opposite judgements? It neither claims nor tests that any reading comes true; all data are generated by its programs.

Chapter 1 writes the day pillar as the residue of the Julian day plus 49 modulo 60, continuous across the reform of 1582, and the five-tigers and five-rats rules as affine maps modulo 10 that agree with the verses line by line; only four of the eight characters are free, giving 518,400 possible charts. Chapter 2 compares three conventions for the zi hour, which differ only between 23:00 and 24:00 and affect 0.0417 of births; the gap between clock time and true solar time changes the hour branch for 0.069 of births in Shanghai and 0.610 in Kuala Lumpur. Chapter 3 follows errors through: a quarter of an hour of error makes the hour pillar wrong with probability 0.06250 to 0.09974, the day, month and year pillars one to three orders of magnitude less often; it gives the conditional probabilities a "boundary check" needs; and the starting age of the luck cycles is a straight line of one year per three days between solar terms that jumps by as much as 10.48 years at a term.

Chapter 4 proves that the ten gods are the ten elements of Z5 × Z2, their table a Latin square and not a function of distance along the order of the stems; three common weightings of the hidden stems agree on the main element, and 0.6, 0.3 and 0.1 share their origin with the 18, 9 and 3 days in command. Chapter 5 writes the judgement of strength as scoring on a weighted graph: over all charts, three defensible parameter sets reach a pairwise Cohen's kappa of only 0.553 to 0.622, all three agree on 0.684 of charts, and the share of "follow" charts lies between 0.022 and 0.121; one double-hour of difference changes the verdict for 0.127 of charts. Chapter 6 compares two chart engines, clock time with the day changing at 23:00 against true solar time with the day changing at midnight: at least one pillar differs for 0.1043 of births in Shanghai and 0.6463 in Kuala Lumpur; it also gives test vectors and a fingerprint. Chapter 7 reads the Yuanhai ziping, the Sanming tonghui and the Ditian sui. Chapter 8 gives a four-step check, the sample size of an agreement study (255 charts fix kappa to within 0.100) and a pre-registered matching test (359 analysed participants). Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

四柱排盘先做历法,再做判断。前一半是天文与历法的计算,约定说清楚后有唯一的答案;后一半是一套规则引擎,结果取决于参数。本书把两半都写成程序,问三个问题:同一个出生,不同的软件会不会排出不同的盘?出生时间差几分钟,盘会不会变?同一张盘,不同的参数会不会给出相反的判断?本书不主张、也不检验任何断语是否应验;全部数据为程序生成。

第一章用儒略日把日柱写成(儒略日 + 49)模 60 的余数,跨越 1582 年改历仍然连续,并把五虎遁、五鼠遁写成模 10 的仿射映射,与歌诀逐条相符;八个字中只有四个自由,可能的四柱共 518,400 种。第二章比较子时的三种约定,它们只在 23 点到 24 点之间不同,影响 0.0417 的出生;钟表时间与真太阳时之差使时支在上海对 0.069 的出生不同,在吉隆坡对 0.610 的出生不同。第三章计算误差的传播:一刻钟的误差让时柱出错的概率为 0.06250 到 0.09974,日柱、月柱、年柱小一到三个数量级;给出「时辰边界校准」的条件概率表;起运岁数在节气之间是三天一岁的直线,在节气处跳变可达 10.48 年。

第四章证明十神是 Z5 × Z2 的十个元素,十神表是拉丁方,而不是天干次序距离的函数;藏干的三种通行权重在主五行上一致,0.6、0.3、0.1 与人元司令的 18、9、3 天同源。第五章把旺衰判断写成加权图上的打分,三套说得通的参数对全部四柱两两的 Cohen's kappa 只有 0.553 到 0.622,三者一致的盘占 0.684,从格的比例在 0.022 与 0.121 之间;时支差一格,判定对 0.127 的盘改变。第六章比较两个排盘引擎:钟表时间与 23 点换日对真太阳时与零点换日,在上海对 0.1043 的出生、在吉隆坡对 0.6463 的出生至少一柱不同,并给出一套测试向量与指纹。第七章与《渊海子平》《三命通会》《滴天髓》并读。第八章给出四步核查、一致性研究的样本量(255 张盘把 kappa 定在 0.100 之内)与一项预注册的配对检验(359 名纳入分析的参与者)。书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。

Disclosure. The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and develops and runs paid online reading software and services built on traditional divinatory symbol systems (four-pillar charts, six-line hexagram casting, Zi Wei Dou Shu, chart matching and date selection); the models of this book are the mathematical basis of those programs' algorithms, so he has a direct commercial interest in its subject. The book promotes no software, course, card deck or service, uses no user data from the author's businesses, and accepts no sponsorship. All its models are offered for mathematical study and teaching only and constitute no promise of divinatory prediction and no advice on any decision. The test in Chapter 8 must be carried out with pre-registered code by an independent analyst who has no financial relationship with the author and does not know where the readings came from, and its results will be published whether positive or negative.

Note on writing. The text, boxes and code were drafted with an AI writing tool from the author's title, framework and notes; the author is responsible for reviewing and revising them and for checking every source.

SHA-256 checksums

  • four-pillar-calendrical-computation-rule-engine_bilingual_v1.0.0.pdf: d49e7171d03ad74857116cd20a01d428dc810581e46ffc3f30435187f8921993
  • four-pillar-calendrical-computation-rule-engine_en_v1.0.0.pdf: 03a4b4863598c3b4659d7838fe1a28548fa18f810598875d52359063a461e471
  • four-pillar-calendrical-computation-rule-engine_zh_v1.0.0.pdf: 26a88d606e757c6f8f99b0e7a37f6a62ae570d093de581655f77c89d02510a88
  • four-pillar-calendrical-computation-rule-engine_bilingual_v1.0.0.epub: 65115e83932886f84160a1e6479a57d9b8ab61ff325b9c4f87cabb1070aeecd1
  • four-pillar-calendrical-computation-rule-engine_en_v1.0.0.epub: 90718e5f01b95a1e56fc180d95533e2d6213c7a910fe8371221ac34ea1422564
  • four-pillar-calendrical-computation-rule-engine_zh_v1.0.0.epub: a9bd5a66c2591b0f51c440df6c89e4cb794bdbecf24ae90c6129aff8540d99ec

Notes

Bilingual (Chinese / English). Chinese title: 四柱排盘的历法计算与规则引擎. Online edition: https://5dlibrary.com/books/four-pillar-calendrical-computation-rule-engine/

Files

four-pillar-calendrical-computation-rule-engine_bilingual_v1.0.0.pdf

Additional details