What does Four-Pillar Computation conclude, in numbers, about “The Ten Gods Are Z5 × Z2, the Hidden Stems Weight Vectors”?

Answer: 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.

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. printed values that match the answer: 0.1, 0.3, 0.6, 18

branch main element S1-S2 S1-S3 S2-S3 only in S3
zi water0.00 0.00 0.00 -
chou earth0.80 0.80 0.00 -
yin wood0.80 0.93 0.27 -
mao wood0.00 0.00 0.00 -
chen earth0.80 0.80 0.00 -
si fire0.80 0.93 0.40 -
wu fire0.60 0.60 0.00 -
wei earth0.80 0.80 0.00 -
shen metal0.80 0.87 0.47 -
you metal0.00 0.00 0.00 -
xu earth0.80 0.80 0.00 -
hai water0.60 0.80 0.47 earth
mean L1 distance: S1-S2 0.567, S1-S3 0.611, S2-S3 0.133
S3's largest element is the main stem's element in every branch: True
Reading: all three weightings agree on each branch's main
element; they differ in how much weight the other elements get
(up to 0.93 of the total). S2 and S3 coincide in eight branches:
0.6 / 0.3 / 0.1 is 18 / 9 / 3 days out of 30. In one branch the
days-in-command table brings in an element the list lacks.
Show the full program
# Chapter 4. Hidden stems as weight vectors over the five elements.
# Each branch hides one to three stems (main, middle, residual). Three
# weightings of the same list are compared:
#   S1 main stem only;
#   S2 main / middle / residual = 0.6 / 0.3 / 0.1 (two stems: 0.7 / 0.3);
#   S3 the "days in command" of one commonly printed table (30 days
#      per month, shared among stems; see Chapter 7).
# Stems are indexed 0-9 (jia ... gui); element = stem // 2.
BRANCHES = ("zi", "chou", "yin", "mao", "chen", "si", "wu", "wei", "shen",
            "you", "xu", "hai")
ELEMENTS = ("wood", "fire", "earth", "metal", "water")
HIDDEN = ((9,), (5, 9, 7), (0, 2, 4), (1,), (4, 1, 9), (2, 4, 6), (3, 5),
          (5, 3, 1), (6, 8, 4), (7,), (4, 7, 3), (8, 0))
DAYS = (((8, 10), (9, 20)), ((9, 9), (7, 3), (5, 18)),
        ((4, 7), (2, 7), (0, 16)), ((0, 10), (1, 20)),
        ((1, 9), (9, 3), (4, 18)), ((4, 5), (6, 9), (2, 16)),
        ((2, 10), (5, 9), (3, 11)), ((3, 9), (1, 3), (5, 18)),
        ((4, 10), (8, 3), (6, 17)), ((6, 10), (7, 20)),
        ((7, 9), (3, 3), (4, 18)), ((4, 7), (0, 5), (8, 18)))

def vector(pairs):
    v = [0.0] * 5
    for stem, w in pairs:
        v[stem // 2] += w
    return v

def schemes(b):
    h = HIDDEN[b]
    w2 = {1: (1.0,), 2: (0.7, 0.3), 3: (0.6, 0.3, 0.1)}[len(h)]
    return (vector([(h[0], 1.0)]), vector(zip(h, w2)),
            vector([(s, d / 30) for s, d in DAYS[b]]))

def l1(a, b):
    return sum(abs(x - y) for x, y in zip(a, b))

if __name__ == "__main__":
    print("   branch  main element  S1-S2  S1-S3  S2-S3   only in S3")
    tot = [0.0, 0.0, 0.0]
    for b, name in enumerate(BRANCHES):
        v1, v2, v3 = schemes(b)
        d = (l1(v1, v2), l1(v1, v3), l1(v2, v3))
        tot = [t + x for t, x in zip(tot, d)]
        extra = [ELEMENTS[e] for e in range(5) if v3[e] > 0 and v2[e] == 0]
        print("   {:6s}  {:12s}  {:5.2f}  {:5.2f}  {:5.2f}   {}".format(
            name, ELEMENTS[HIDDEN[b][0] // 2], *d, " ".join(extra) or "-"))
    print("   mean L1 distance: S1-S2 {:.3f}, S1-S3 {:.3f}, S2-S3 {:.3f}"
          .format(*[t / 12 for t in tot]))
    same_main = all(max(range(5), key=lambda e: schemes(b)[2][e])
                    == HIDDEN[b][0] // 2 for b in range(12))
    print("   S3's largest element is the main stem's element in every"
          " branch: {}".format(same_main))
    print("\nReading: all three weightings agree on each branch's main")
    print("element; they differ in how much weight the other elements get")
    print("(up to 0.93 of the total). S2 and S3 coincide in eight branches:")
    print("0.6 / 0.3 / 0.1 is 18 / 9 / 3 days out of 30. In one branch the")
    print("days-in-command table brings in an element the list lacks.")

Single source and citation

Fan, Y. (2026). Four-Pillar Calendrical Computation and Formal Rule Engines (Version 1.0.0), Chapter 4: The Ten Gods Are Z5 × Z2, the Hidden Stems Weight Vectors. 5D Library. https://doi.org/10.5281/zenodo.24090180

DOI: 10.5281/zenodo.24090180 · Read the monograph · 5DL-B-066 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026066,
  author    = {Fan, Yafu},
  title     = {Four-Pillar Calendrical Computation and Formal Rule Engines},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090180},
  url       = {https://doi.org/10.5281/zenodo.24090180}
}

Other chapter answers in this book