What does Almanac Lattices, Jianchu Congruences and Runes conclude, in numbers, about “Auditing an Almanac App and a Pre-Registered Test”?

Answer: Chapter 8 gives an audit of almanac apps and a pre-registered test. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.

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 only

   (a) no repeat days: officer wrong on 336 days
   (b) year from 1 January: 34 days in the wrong year, year
       breaker wrong on 6 days
   (c) year from lunar new year: 2 days in the wrong year,
       year breaker wrong on 0 days
   (d) UTC-8 jie: officer wrong on 8 days
Show the full program
# Chapter 8. p15: Auditing an almanac app against the rules. For 2027,
# the number of days on which a common slip changes the officer or the
# year-breaker mark, against a correct Beijing-time computation:
# (a) a plain 12-day officer cycle with no repeat days; (b) the year
# branch changed on 1 January instead of at Lichun (4 February); (c) the
# year branch changed at the lunar new year (6 February 2027); (d) the
# jie computed for UTC-8 instead of Beijing time.
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

def officer(d):
    return (d["b"] - d["M"]) % 12

def breaker(d, Y):
    return d["b"] == (Y + 6) % 12

if __name__ == "__main__":
    ds = days()
    off = [officer(d) for d in ds]
    plain = [(off[0] + k) % 12 for k in range(365)]
    print("   (a) no repeat days: officer wrong on {} days".format(
        sum(1 for x, y in zip(plain, off) if x != y)))
    jan = sum(1 for d in ds if breaker(d, d["Y"]) != breaker(d, 7))
    moved = sum(1 for d in ds if d["Y"] != 7)
    print("   (b) year from 1 January: {} days in the wrong year, year"
          .format(moved))
    print("       breaker wrong on {} days".format(jan))
    cny = datetime.date(2027, 2, 6)
    lny = sum(1 for d in ds if breaker(d, d["Y"]) !=
              breaker(d, 6 if d["date"] < cny else 7))
    moved = sum(1 for d in ds if d["Y"] != (6 if d["date"] < cny else 7))
    print("   (c) year from lunar new year: {} days in the wrong year,"
          .format(moved))
    print("       year breaker wrong on {} days".format(lny))
    west = [officer(d) for d in days(-16)]
    print("   (d) UTC-8 jie: officer wrong on {} days".format(
        sum(1 for x, y in zip(west, off) if x != y)))

Single source and citation

Fan, Y. (2026). Almanac Auspicious Boolean Lattices, Jianchu Twelve-Officer Congruences and Runic Combinatorics (Version 1.0.0), Chapter 8: Auditing an Almanac App and a Pre-Registered Test. 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