What does Four Pillars and Double Entry conclude, in numbers, about “Accounts for a Buying Agent: Four Pillars for Every Account and Seven Daily Invariants”?

Answer: The table lays out the illustrative day of Chapter 1 account by account. Every row is a set of four pillars: old balance, debits (new receipts), credits (issues) and present balance. For cash the old balance is 15,000.00 yuan, debits 2,850.00 yuan, credits 3,116.00 yuan and the present balance 14,734.00 yuan, exactly the cash pillars of Chapter 1. Stock starts at 4,200.00 yuan, takes in purchases of 2,748.60 yuan, sends out 1,700.00 yuan on delivery and ends at 5,248.60 yuan.

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. printed values that match the answer: 14734.00, 15000.00, 1700.00, 2748.60, 2850.00, 3116.00

accountolddebit(in)credit(out)now
CASH15,000.002,850.003,116.0014,734.00
STOCK4,200.002,748.601,700.005,248.60
AR0.001,500.001,500.000.00
DEP-3,800.001,000.001,350.00-4,150.00
REV0.000.002,300.00-2,300.00
COGS0.001,700.000.001,700.00
FX0.0012.400.0012.40
SHIP0.00155.000.00155.00
CAP-15,400.000.000.00-15,400.00
total0.009,966.009,966.000.00
every row: old + in = out + now; debits = credits = 9,966.00
closing balances add to 0.00 (trial balance)
Show the full program
# Chapter 5. p51: double entry is four pillars kept for every account.
# Model: the buying agent's day of p12 (deposits, a delivery with its
# balance payment, purchases abroad with an exchange difference,
# freight and a refund). For each account the four pillars are
# opening (old), debits (new in), credits (out) and closing (now):
# old + debits = credits + now holds row by row. Summed over accounts,
# the closing column adds to zero: that is the trial balance. Amounts
# are illustrative integer fen, printed in yuan; arithmetic is exact.

ACCTS = ("CASH", "STOCK", "AR", "DEP", "REV", "COGS", "FX", "SHIP",
         "CAP")
OPEN = {"CASH": 1500000, "STOCK": 420000, "AR": 0, "DEP": -380000,
        "REV": 0, "COGS": 0, "FX": 0, "SHIP": 0, "CAP": -1540000}
DAY = (
    (("CASH", 60000), ("DEP", -60000)),
    (("CASH", 45000), ("DEP", -45000)),
    (("STOCK", 178560), ("CASH", -178560)),
    (("FX", 1240), ("CASH", -1240)),
    (("SHIP", 12000), ("CASH", -12000)),
    (("DEP", 80000), ("AR", 150000), ("REV", -230000)),
    (("COGS", 170000), ("STOCK", -170000)),
    (("CASH", 150000), ("AR", -150000)),
    (("DEP", 20000), ("CASH", -20000)),
    (("STOCK", 96300), ("CASH", -96300)),
    (("SHIP", 3500), ("CASH", -3500)),
    (("CASH", 30000), ("DEP", -30000)),
)


def yuan(fen):
    sign = "-" if fen < 0 else ""
    fen = abs(fen)
    return "{}{:,}.{:02d}".format(sign, fen // 100, fen % 100)


def four_pillars():
    dr = dict.fromkeys(ACCTS, 0)
    cr = dict.fromkeys(ACCTS, 0)
    for legs in DAY:
        for a, m in legs:
            if m > 0:
                dr[a] += m
            else:
                cr[a] += -m
    rows = []
    for a in ACCTS:
        now = OPEN[a] + dr[a] - cr[a]
        rows.append((a, OPEN[a], dr[a], cr[a], now))
    return rows


if __name__ == "__main__":
    rows = four_pillars()
    print("account        old     debit(in)   credit(out)           now")
    tot = [0, 0, 0, 0]
    for a, old, d, c, now in rows:
        assert old + d == c + now
        for k, v in enumerate((old, d, c, now)):
            tot[k] += v
        print("{:6s} {:>12s} {:>12s} {:>12s} {:>13s}".format(
            a, yuan(old), yuan(d), yuan(c), yuan(now)))
    print("{:6s} {:>12s} {:>12s} {:>12s} {:>13s}".format(
        "total", yuan(tot[0]), yuan(tot[1]), yuan(tot[2]), yuan(tot[3])))
    print("every row: old + in = out + now; debits = credits = {}".format(
        yuan(tot[1])))
    print("closing balances add to {} (trial balance)".format(yuan(tot[3])))

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 5: Accounts for a Buying Agent: Four Pillars for Every Account and Seven Daily Invariants. 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