5D Library › Books › 5DL-B-067

纳甲装卦与奇门遁甲排盘的组合计算

京房八宫群作用、旬空陪集、拆补置闰分歧率与九宫转盘置换

Najia Hexagram Encoding and Qimen Dunjia Combinatorial Engines: Eight-Palace Group Actions, Sexagenary Void Cosets, Split-Supplement versus Intercalation Divergences and Nine-Palace Rotor Permutations

  • 范雅福 Fan Yafu
  • Version 1.0.0 · 2026-11-08
  • CC-BY-NC-ND-4.0
  • 5DL-B-067
DOI10.5281/zenodo.24090182

摘要

纳甲六爻与奇门遁甲是两套在有限集合上运算的确定性算法:前者给六十四卦装上天干、地支、六亲、六神与旬空,后者把一个时辰变成三层转盘上的一个排列。本书把两者完整地写成程序,研究规则内部的群、陪集与置换结构,并计算不同历法与流派约定让同一时刻得到不同排盘的比例。本书不主张、也不检验任何占断是否应验;全部数据为程序生成。

第一章把京房八宫写成纯卦与八个固定掩码的异或:上卦异或下卦决定一卦的世代与世爻,前六代构成格雷码;纳甲表由每卦一个起支、一个方向与一个天干生成。第二章计算六亲在 384 爻中的分布,64 卦中有 44 卦缺少至少一种六亲,伏神是常态;六神按日干五行起、土分戊己,不是日干模 6;旬空是每旬十个连续地支之外的两个余数,六旬的空亡恰好分完十二地支。第三章证明奇门 72 个节气局数由八个起宫与两条步长规则生成,1,080 是 18 局乘 60 时辰;逐时比较 2000 年到 2029 年的拆补法与置闰法,两者在 0.3067 的时辰给出不同的局,0.0219 连阴阳遁都不同。

第四章证明地盘是二面体群,天盘是外圈八宫的旋转,伏吟占全部局时的 0.2222,是甲时所占 0.1000 的两倍多,反吟占 0.1111。第五章加上人盘与神盘:1,080 个局时只给出 727 种不同的三盘组合;转盘运算复合起来生成整个对称群 S9,共 362,880 个排列,但排盘只用到其中 72 种,因为每个阴遁地盘都是某个阳遁地盘转半圈。第六章计算格局:天盘击刑出现在 0.5296 的局时中,三种通行的入墓规则对同一张盘两两意见不一的比例在 0.1944 与 0.4046 之间;五不遇时的歌诀漏列了己日与庚日的第二个解;相邻时辰之间,伏吟、击刑、入墓的标记有四成到五成半会改变。第八章给出一份约定预算(两个取法不同的引擎在上海对 0.4800 的时辰意见不一)与一项预注册的配对检验(447 名参与者)。书中以标注框区分证据、16 段可运行的 Python 程序、原典与假说。

关键词:纳甲;六爻;京房;八宫;布尔立方体;异或;格雷码;六亲;伏神;六神;旬空;六十甲子;陪集;奇门遁甲;二十四节气;拆补法;置闰法;局数;洛书;二面体群;外圈旋转;对称群;置换;伏吟;反吟;组合计数;约定敏感度;配对检验;预注册

Abstract

Najia six-line divination and Qimen Dunjia are deterministic algorithms on finite sets: the first dresses the sixty-four hexagrams with stems, branches, six relatives, six spirits and void branches; the second turns a double-hour into an arrangement on three turning plates. This book writes both in full as programs, studies the groups, cosets and permutations inside their rules, and computes how often different calendar and school conventions give the same moment different charts. It neither claims nor tests that any reading comes true; all data are generated by its programs.

Chapter 1 writes Jing Fang's eight palaces as pure hexagrams XOR eight fixed masks: upper XOR lower tells a hexagram's generation and world line, and the first six generations form a Gray code; the najia table is generated by one starting branch, one direction and one stem per trigram. Chapter 2 computes how the six relatives fall on the 384 lines: 44 of the 64 hexagrams lack at least one relative, so hidden spirits are routine; the six spirits start by the day stem's element, with earth split between wu and ji, not by the stem modulo 6; the void branches are the two residues outside a decade's ten consecutive branches, and the six decades' void pairs share out all twelve branches. Chapter 3 shows that the 72 bureau numbers of the solar terms come from eight starting palaces and two step rules, and that 1,080 is 18 bureaus times 60 double-hours; compared double-hour by double-hour from 2000 to 2029, the split-supplement and intercalation calendars give different bureaus for 0.3067 of double-hours and different duns for 0.0219.

Chapter 4 shows that the earth plate is a dihedral group and the heaven plate a rotation of the eight outer palaces; fu yin takes 0.2222 of all bureau-hours, more than twice the 0.1000 of jia hours, and fan yin 0.1111. Chapter 5 adds the human and spirit plates: the 1,080 bureau-hours give only 727 distinct combinations of the three plates; composed freely, the plate moves generate the whole symmetric group S9 of 362,880 permutations, yet charts use only 72 of them, because every yin earth plate is a yang plate turned half way round. Chapter 6 computes the patterns: a punishment is on the heaven plate in 0.5296 of bureau-hours, and three common tomb rules disagree about the same chart, pair by pair, in 0.1944 to 0.4046 of cases; the verse of the five non-meeting hours omits the second solution on ji and geng days; between neighbouring double-hours the fu yin, punishment and tomb flags change in two fifths to more than half of all pairs. Chapter 8 gives a budget of conventions (two engines with different choices disagree on 0.4800 of double-hours in Shanghai) and a pre-registered matching test (447 participants). Marked boxes separate evidence, 16 runnable Python programs, classical sources and hypotheses.

Keywords: najia; six-line divination; Jing Fang; eight palaces; Boolean cube; XOR; Gray code; six relatives; hidden spirits; six spirits; void branches; sexagenary cycle; cosets; Qimen Dunjia; solar terms; split-supplement; intercalation; bureau numbers; Luoshu; dihedral group; ring rotation; symmetric group; permutation; fu yin; fan yin; combinatorics; convention sensitivity; matching test; pre-registration

目录 · Contents

  • 序:两套术数引擎的组合结构English 中文Preface: The Combinatorics of Two Divination Engines
  • 第一章 京房八宫与纳甲:异或掩码与闭式English 中文Chapter 1. Jing Fang's Eight Palaces and the Najia: XOR Masks and a Closed Form
  • 第二章 六亲、六神与旬空English 中文Chapter 2. Six Relatives, Six Spirits and the Void Branches
  • 第三章 七十二个局数与两种定局历法English 中文Chapter 3. The Seventy-Two Bureau Numbers and Two Calendars
  • 第四章 地盘与天盘:二面体群与外圈旋转English 中文Chapter 4. Earth Plate and Heaven Plate: a Dihedral Group and a Ring Rotation
  • 第五章 人盘、神盘与转盘生成的置换群English 中文Chapter 5. The Human and Spirit Plates, and the Group the Plates Generate
  • 第六章 格局的频率、约定的分歧与相邻时辰English 中文Chapter 6. How Often the Patterns Occur, How Conventions Disagree, and Neighbouring Hours
  • 第七章 《京氏易传》与《烟波钓叟赋》English 中文Chapter 7. The Jing shi yizhuan and the Rhapsody of the Old Fisherman
  • 第八章 约定预算与一项预注册的配对检验English 中文Chapter 8. A Budget of Conventions and a Pre-Registered Matching Test

How to cite · 引用

Fan, Y. (2026). Najia Hexagram Encoding and Qimen Dunjia Combinatorial Engines: Eight-Palace Group Actions, Sexagenary Void Cosets, Split-Supplement versus Intercalation Divergences and Nine-Palace Rotor Permutations [纳甲装卦与奇门遁甲排盘的组合计算] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090182

BibTeX
@book{fan2026najia,
  title = {{Najia Hexagram Encoding and Qimen Dunjia Combinatorial Engines}: Eight-Palace Group Actions, Sexagenary Void Cosets, Split-Supplement versus Intercalation Divergences and Nine-Palace Rotor Permutations},
  author = {Fan, Yafu},
  year = {2026},
  publisher = {5D Library},
  edition = {Version 1.0.0},
  doi = {10.5281/zenodo.24090182},
  url = {https://doi.org/10.5281/zenodo.24090182},
  note = {Chinese title: 纳甲装卦与奇门遁甲排盘的组合计算}
}
DOIhttps://doi.org/10.5281/zenodo.24090182
DOI(全部版本 all versions)https://doi.org/10.5281/zenodo.24090181
ORCIDhttps://orcid.org/0009-0004-3519-1203
5D Library ID5DL-B-067
版本 Version1.0.0 · 中英双语版 Bilingual edition
出版日期 Date2026-11-08
网址 Onlinehttps://5dlibrary.com/books/najia-hexagram-encoding-qimen-combinatorial-engines/
SHA-256 · najia-hexagram-encoding-qimen-combinatorial-engines_bilingual_v1.0.0.pdf0b4a528ed9f9c006b2338dbe40486e606856172aff0606887091dd8641fa18dc
SHA-256 · najia-hexagram-encoding-qimen-combinatorial-engines_en_v1.0.0.pdf19c8223799ac9d6459c63d1134a973012a2f481c61948ca908d2ed4375ef0ce4
SHA-256 · najia-hexagram-encoding-qimen-combinatorial-engines_zh_v1.0.0.pdf4d146bf795f81548648793e2dceab362171caf2db07a5087d3f6d50a495c3ebf
Licence · 许可Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). https://creativecommons.org/licenses/by-nc-nd/4.0/

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 (najia six-line divination, Qimen Dunjia charts, four pillars, 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 that any reading comes true and no advice on timing or any other 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.