What does A Screenshot Is Not a Payment conclude, in numbers, about “The Buying Agent's Reconciliation Loop and a Protocol for Refutation”?
Answer: Chapter 8 gives the reconciliation loop, the distilled tool, the Payment Receipt Reconciler, and a pre-registered protocol. Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.
Scope of the numbers: Orders, account tails, amounts, screenshots and hashes are synthesised from fixed seeds, parameters are illustrative, and every calculation is generated by the book's programs. Marked boxes separate published evidence, runnable Python calculations (20 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 onlyprinted values that match the answer: 20
| (1) copies needed: miss rate >= m0 rejected at 0.05 | |
| m0 k | 0 k=1 k=2 |
| 0.05 | 59 93 124 |
| 0.02 | 149 236 313 |
| 0.01 | 299 473 628 |
| (2) key ties AMT+L5+W30 at 1,000 orders a day, lam | 0.01065 |
| days expected refute if ties >= P(tail) at that count | |
| 30 | 0.320 3 0.00429 |
| 90 | 0.959 5 0.00306 |
| 180 | 1.917 7 0.00362 |
| 365 | 3.887 10 0.00674 |
| (3) registered daily pairs of equal amounts, s | 0.051690 |
| n | 20: 9.82 pairs a day |
| n | 50: 63.32 pairs a day |
| n | 200: 1028.63 pairs a day |
Show the full program
# Chapter 8. p82: sample sizes and refutation lines for the protocol
# Model, three registered tests, all exact:
# (1) Duplicate detector. Known returned copies are fed in; if the
# miss rate were at least m0, how many copies are needed so that
# seeing at most k misses has probability <= 0.05 (binomial)?
# (2) Key ties. Chapter 2 predicts lam ties per day on the key
# amount + last five + 30-minute window at 1,000 orders a day
# (0.01065 from p21, with the p12 law). Over D days the count is
# Poisson(D * lam); the smallest count c with P(N >= c) <= 0.01
# refutes the model (more ties than the model allows).
# (3) Amount-only ties. The model also predicts C(n,2) * s pairs of
# equal amounts a day; if the shop's own law is flatter or
# steeper the observed mean will say so. We print the expected
# daily pairs for the shop sizes of Chapter 1 as the registered
# prediction (s = 0.051690 from p12).
import math
def binom_cdf(k, n, p):
terms = [math.comb(n, i) * p ** i * (1 - p) ** (n - i)
for i in range(k + 1)]
return math.fsum(terms)
def poisson_tail(c, mu):
head = [math.exp(-mu + i * math.log(mu) - math.lgamma(i + 1))
for i in range(c)]
return 1.0 - math.fsum(head)
print("(1) copies needed: miss rate >= m0 rejected at 0.05")
print(" m0 k=0 k=1 k=2")
for m0 in (0.05, 0.02, 0.01):
row = "%8.2f" % m0
for k in (0, 1, 2):
n = k + 1
while binom_cdf(k, n, m0) > 0.05:
n += 1
row += " %4d" % n
print(row)
LAM = 0.01065
print("(2) key ties AMT+L5+W30 at 1,000 orders a day, lam = %.5f" % LAM)
print(" days expected refute if ties >= P(tail) at that count")
for d in (30, 90, 180, 365):
mu = d * LAM
c = 1
while poisson_tail(c, mu) > 0.01:
c += 1
print("%8d %9.3f %18d %22.5f" % (d, mu, c, poisson_tail(c, mu)))
S = 0.051690
print("(3) registered daily pairs of equal amounts, s = %.6f" % S)
for n in (20, 50, 200):
print(" n = %4d: %10.2f pairs a day" % (n, n * (n - 1) / 2 * S))Single source and citation
Fan, Y. (2026). Fault-Tolerant Parsing of Payment Receipts and Spoken Orders: Last-Five-Digit Write-Off Automata and Blocking Duplicate-Screenshot Fraud (Version 1.0.0), Chapter 8: The Buying Agent's Reconciliation Loop and a Protocol for Refutation. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-267 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026267,
author = {Fan, Yafu},
title = {Fault-Tolerant Parsing of Payment Receipts and Spoken Orders: Last-Five-Digit Write-Off Automata and Blocking Duplicate-Screenshot Fraud},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Matching on Amount Alone Must Collide: the Birthday Problem of Same-Day, Same-Amount Payments
- Chapter 2 · The Last Five Digits and a Time Window: How Far Collisions Fall, and What Will Not Fall
- Chapter 3 · A Finite Automaton for Spoken and Written Chinese Amounts, Simplified and Traditional
- Chapter 4 · The Write-Off Automaton: a Screenshot Is a Claim, a Credit Is a Fact
- Chapter 5 · Average Hash and Hamming Distance: Detecting Repeated Screenshots, and Where Detection Is Blind
- Chapter 6 · The Receipt Fingerprint Library: the Birthday Problem Among Hashes, and Pigeonhole Search
- Chapter 7 · Classics East and West: Half-Seal Tallies in the Collected Statutes of the Ming and Galton's Finger Prints