关于「单式流水看不见漏记:守恒只有对着盘点才是检验」,《四柱复式守恒代数》给出的定量结论是什么?

结论:第一、二章在示意日上穷举九类错账,试算平衡只发现 12.9 %,只盘现金的四柱发现 49.1 %,逐账户对外部证据的完整复式对账发现 87.6 %。

数据口径:本书用可运行的程序说明,单式流水本身不含任何检验:在一个示意日上漏记一笔 1,500.00 元的尾款,表格依旧自洽,只有拿银行余额来比才出现差额。 书中参数为示意;全部计算由书中程序生成;本书属于非个人化的会计、税务或法律建议。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。

opening cash (old balance)15,000.00
complete list new in2,850.00 out 3,116.00
list closing14,734.00 | counted 14,734.00 | gap 0.00
list without T08 new in1,350.00 out 3,116.00
list closing13,234.00 | counted 14,734.00 | gap 1,500.00
list without T07 new in2,850.00 out 3,116.00
list closing14,734.00 | counted 14,734.00 | gap 0.00
single-entry list alone: gap is never computed -> no signal
four pillars with a count: T08 gap1,500.00, T07 gap = 0.00
the gap says how much, never which line
查看完整验算程序
# Chapter 1. p11: a single-entry cash list cannot see its own omission.
# Model: one illustrative day of a buying agent, amounts in integer fen
# (1 yuan = 100 fen). A single-entry list only adds its own lines, so
# the closing figure it prints is whatever the lines say. The four-
# pillar test, opening + receipts = payments + closing, becomes a test
# only when "closing" is a physical count (a bank statement or a cash
# count) rather than a number computed from the same list.
# All amounts are illustrative; arithmetic is exact (integers).

OPEN_CASH = 1500000
DAY = (                                   # label, legs (debit +, credit -)
    ("T01 deposit A", (("CASH", 60000), ("DEP", -60000))),
    ("T02 deposit B", (("CASH", 45000), ("DEP", -45000))),
    ("T03 buy for A", (("STOCK", 178560), ("CASH", -178560))),
    ("T04 fx on T03", (("FX", 1240), ("CASH", -1240))),
    ("T05 freight", (("SHIP", 12000), ("CASH", -12000))),
    ("T06 deliver C", (("DEP", 80000), ("AR", 150000),
                       ("REV", -230000))),
    ("T07 cost of C", (("COGS", 170000), ("STOCK", -170000))),
    ("T08 balance C", (("CASH", 150000), ("AR", -150000))),
    ("T09 refund D", (("DEP", 20000), ("CASH", -20000))),
    ("T10 buy for B", (("STOCK", 96300), ("CASH", -96300))),
    ("T11 courier", (("SHIP", 3500), ("CASH", -3500))),
    ("T12 deposit E", (("CASH", 30000), ("DEP", -30000))),
)


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


def pillars(entries):
    """Return (receipts, payments) of the cash account, in fen."""
    rec, pay = 0, 0
    for _, legs in entries:
        for acct, amt in legs:
            if acct == "CASH" and amt > 0:
                rec += amt
            elif acct == "CASH":
                pay += -amt
    return rec, pay


def report(tag, entries, counted):
    rec, pay = pillars(entries)
    computed = OPEN_CASH + rec - pay
    print("{:<24s} new in {:>10s} out {:>10s}".format(
        tag, yuan(rec), yuan(pay)))
    print("  list closing {:>12s} | counted {:>12s} | gap {:>9s}".format(
        yuan(computed), yuan(counted), yuan(counted - computed)))


if __name__ == "__main__":
    rec, pay = pillars(DAY)
    true_cash = OPEN_CASH + rec - pay
    print("opening cash (old balance)  {}".format(yuan(OPEN_CASH)))
    report("complete list", DAY, true_cash)
    no_t08 = tuple(e for e in DAY if not e[0].startswith("T08"))
    report("list without T08", no_t08, true_cash)
    no_t07 = tuple(e for e in DAY if not e[0].startswith("T07"))
    report("list without T07", no_t07, true_cash)
    print("single-entry list alone: gap is never computed -> no signal")
    print("four pillars with a count: T08 gap = {}, T07 gap = 0.00".format(
        yuan(true_cash - (OPEN_CASH + pillars(no_t08)[0]
                          - pillars(no_t08)[1]))))
    print("the gap says how much, never which line")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《四柱结算与复式记账的守恒代数、代购流水零差错对账不变量母典》第 1 章「单式流水看不见漏记:守恒只有对着盘点才是检验」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}

本书其他章节结论