What does Four Pillars and Double Entry conclude, in numbers, about “Eastern and Western Sources: the Song Four-Pillar Settlement and Pacioli's Three Books”?

Answer: Chapter 7 examines the Song four-pillar settlement and the double-entry treatise Pacioli printed in 1494, testing with programs what the four-pillar chain and the cross-checks among three books can each find.

Scope of the numbers: With runnable programs this book shows that a single-entry list contains no test of itself: on an illustrative day, leave out a balance payment of 1,500.00 yuan and the spreadsheet stays perfectly consistent; a gap appears only against the bank balance. Parameters are illustrative; all calculations are generated by the book's programs; the book is general analysis, not individualised accounting, tax or legal advice.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it.

present balance computed:
pergoodoldrecvissuenowgap
1grain8602403107900
2grain7903002808100
3grain8101802607300
4grain7304203508000
5grain8002603007600
6grain7603302908000
present balance counted:
pergoodoldrecvissuenowgap
1grain8602403107900
2grain7903002808100
3grain8101802607300
4grain730420350920120
5grain9202603008800
6grain8803302909200
coin: old 5200 + recv 12100 - issue 12000 = 5300; counted end 5300
grain: old 860 + recv 1730 - issue 1790 = 800; counted end 920
Show the full program
# Chapter 7. p71: the four-pillar account as a chain, and when it tests.
# Model: a granary-style account kept in two goods (coin in strings,
# grain in shi), as four-pillar statements are usually described:
# old balance (jiu guan) + new receipts (xin shou) = issues (kai chu)
# + present balance (shi zai), each period's present balance carried
# as the next period's old balance. Six periods, illustrative numbers.
# Case 1: present balance computed from the other three (identity
#         holds by construction, nothing is tested).
# Case 2: present balance counted; a receipt of grain in period 4 was
#         never written. The gap appears in period 4 only, and the
#         chain carries the counted figure forward.
# Integer units; exact.

GOODS = ("coin", "grain")
OLD = {"coin": 5200, "grain": 860}
FLOWS = (                          # (receipts, issues) per good
    {"coin": (1800, 2100), "grain": (240, 310)},
    {"coin": (2600, 1900), "grain": (300, 280)},
    {"coin": (1500, 1700), "grain": (180, 260)},
    {"coin": (2200, 2400), "grain": (420, 350)},
    {"coin": (1900, 1600), "grain": (260, 300)},
    {"coin": (2100, 2300), "grain": (330, 290)},
)
LOST = (3, "grain", 120)           # period index, good, unrecorded receipt


def run(counted):
    old = dict(OLD)
    true_old = dict(OLD)
    rows = []
    for t, fl in enumerate(FLOWS):
        row = []
        for g in GOODS:
            rec, iss = fl[g]
            extra = LOST[2] if (t, g) == LOST[:2] else 0
            true_now = true_old[g] + rec + extra - iss
            now = true_now if counted else old[g] + rec - iss
            gap = now - (old[g] + rec - iss)
            row.append((g, old[g], rec, iss, now, gap))
            old[g] = now
            true_old[g] = true_now
        rows.append(row)
    return rows


if __name__ == "__main__":
    for counted in (False, True):
        tag = "counted" if counted else "computed"
        print("present balance {}:".format(tag))
        print("  per   good    old   recv  issue    now   gap")
        for t, row in enumerate(run(counted)):
            for g, old, rec, iss, now, gap in row:
                if g == "grain" or gap:
                    print("  {:3d}   {:5s} {:6d} {:6d} {:6d} {:6d} {:5d}"
                          .format(t + 1, g, old, rec, iss, now, gap))
    rows = run(True)
    tot = {g: [0, 0] for g in GOODS}
    for row in rows:
        for g, old, rec, iss, now, gap in row:
            tot[g][0] += rec
            tot[g][1] += iss
    for g in GOODS:
        end = rows[-1][GOODS.index(g)][4]
        print("{}: old {} + recv {} - issue {} = {}; counted end {}".format(
            g, OLD[g], tot[g][0], tot[g][1],
            OLD[g] + tot[g][0] - tot[g][1], end))

Single source and citation

Fan, Y. (2026). The Conservation Algebra of Four-Pillar Settlement and Double-Entry Bookkeeping: Invariants for Error-Free Reconciliation of Buying-Agent Ledgers (Version 1.0.0), Chapter 7: Eastern and Western Sources: the Song Four-Pillar Settlement and Pacioli's Three Books. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-318 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026318,
  author    = {Fan, Yafu},
  title     = {The Conservation Algebra of Four-Pillar Settlement and Double-Entry Bookkeeping: Invariants for Error-Free Reconciliation of Buying-Agent Ledgers},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book