What does Almanac Lattices, Jianchu Congruences and Runes conclude, in numbers, about “The Shuihudi Daybooks, the Qing Imperial Compilation on Day Selection, and the Runes of Havamal”?

Answer: Chapter 7 reads the Shuihudi daybooks, the Qing imperial compilation on day selection and the Havamal, noting that the daybook already holds two officer systems and that any ranking of marks fixes the verdict on only 113 days.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 113

check on 2027-01-02: enumerated 0.400, formula 0.400
verdict the same under every ranking113 days
called good by 25% to 75% of rankings249 days
'virtues first' and 'breakers first' disagree25 days
Show the full program
# Chapter 7. p14: When the verdict depends on the order of the rules.
# Ten kinds of mark: five good (tian de, yue de, tian she, good officer,
# yellow road) and five bad (bad officer, black road, year breaker,
# three sha, unlucky lodge). A school ranks the ten kinds; a day's
# verdict is the sign of its highest-ranked mark. Over all 10! = 3,628,800
# rankings, a day with g good and b bad marks is called good in g/(g+b)
# of them (each present mark is equally likely to rank first; checked by
# enumeration on one day). Counted for 2027: days whose verdict is fixed,
# and days that two rankings ("virtues first", "breakers first") split.
from itertools import permutations
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

def day_marks(d):
    bad, good = marks(d)
    g = [k for k, v in good.items() if v]
    g += ["good officer"] if not bad["R1 officer"] else []
    g += ["yellow road"] if not bad["R2 black road"] else []
    b = [k for k, v in bad.items() if v and k[:2] in
         ("R1", "R2", "R3", "R4", "R5")]
    return g, b

if __name__ == "__main__":
    ds = days()
    shares = []
    split = 0
    for d in ds:
        g, b = day_marks(d)
        shares.append(len(g) / (len(g) + len(b)))
        virtues = any(m in g for m in ("tian de", "yue de", "tian she"))
        breakers = any(m[:2] in ("R3", "R4") for m in b)
        if virtues and breakers:
            split += 1
    g, b = day_marks(ds[1])
    top = [p[0] in g for p in permutations(g + b)]
    print("   check on {}: enumerated {:.3f}, formula {:.3f}".format(
        ds[1]["date"].isoformat(), sum(top) / len(top),
        len(g) / (len(g) + len(b))))
    fixed = sum(1 for s in shares if s in (0.0, 1.0))
    open_ = sum(1 for s in shares if 0.25 <= s <= 0.75)
    print("   verdict the same under every ranking: {} days".format(fixed))
    print("   called good by 25% to 75% of rankings: {} days".format(open_))
    print("   'virtues first' and 'breakers first' disagree: {} days"
          .format(split))

Single source and citation

Fan, Y. (2026). Almanac Auspicious Boolean Lattices, Jianchu Twelve-Officer Congruences and Runic Combinatorics (Version 1.0.0), Chapter 7: The Shuihudi Daybooks, the Qing Imperial Compilation on Day Selection, and the Runes of Havamal. 5D Library. https://doi.org/10.5281/zenodo.24090239

DOI: 10.5281/zenodo.24090239 · Read the monograph · 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}
}

Other chapter answers in this book