What does Hard Gates and Soft-Prompt Decay conclude, in numbers, about “Exhausting the State Machine: Proving a Dirty Publication Unreachable and Finding the Shortest Counterexamples of Three Faulty Designs”?
Answer: Chapter 5 proves by exhausting a state machine that a dirty publication is unreachable under the right design; with a green light not bound to content, 0.1964 of event sequences of length ten go wrong.
Scope of the numbers: Soft reminders work in proportion; when layers are independent the residual violation rate is the product of their miss rates, and with illustrative parameters four layers still leave 0.0048, not zero. Its parameters are illustrative; all calculations are generated by its programs.
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: 0.1964
| L | all | V1 bad | share | V0 bad |
| 3 | 64 | 1 | 0.0156 | 0 |
| 4 | 256 | 10 | 0.0391 | 0 |
| 6 | 4096 | 379 | 0.0925 | 0 |
| 8 | 65536 | 9556 | 0.1458 | 0 |
| 10 | 1048576 | 205987 | 0.1964 | 0 |
| receipt hash ef3d4a204879; after one edit e267f711f459; match False |
Show the full program
# Chapter 5. p53: a green light must be bound to the content it judged.
# Count every event sequence of length L over four events (edit_clean,
# edit_dirty, run_gate, publish) that publishes a dirty file at least
# once. V1 keeps a green flag that edits do not clear; V0 binds the
# green receipt to a hash of the content, so any change voids it.
# Dynamic programming over (dirty, green, already_bad); exact counts.
# The last lines show the hash binding on two short texts.
import hashlib
EV = ("edit_clean", "edit_dirty", "run_gate", "publish")
def count(L, bind):
st = {(0, 0, 0): 1}
for _ in range(L):
nx = {}
for (d, g, bad), c in st.items():
for ev in EV:
dd, gg, bb = d, g, bad
if ev == "edit_clean":
dd, gg = 0, (0 if bind else g)
elif ev == "edit_dirty":
dd, gg = 1, (0 if bind else g)
elif ev == "run_gate":
gg = 1 if d == 0 else 0
elif ev == "publish" and g and d:
bb = 1
nx[(dd, gg, bb)] = nx.get((dd, gg, bb), 0) + c
st = nx
return [c for (d, g, b), c in sorted(st.items()) if b]
print("%3s %10s %12s %10s %12s" % ("L", "all", "V1 bad", "share",
"V0 bad"))
for L in (3, 4, 6, 8, 10):
v1 = count(L, False)
v0 = count(L, True)
n1, n0 = 0, 0
for c in v1:
n1 += c
for c in v0:
n0 += c
print("%3d %10d %12d %10.4f %12d" % (L, 4 ** L, n1, n1 / 4 ** L,
n0))
a = hashlib.sha256(b"chapter text, version 1").hexdigest()[:12]
b = hashlib.sha256(b"chapter text, version 2").hexdigest()[:12]
print("receipt hash %s; after one edit %s; match %s" % (a, b, a == b))Single source and citation
Fan, Y. (2026). Hard Gates across the Client Lifecycle: the Decay of Soft-Prompt Compliance over Turns and State Machines for Interception before Publication (Version 1.0.0), Chapter 5: Exhausting the State Machine: Proving a Dirty Publication Unreachable and Finding the Shortest Counterexamples of Three Faulty Designs. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-256 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026256,
author = {Fan, Yafu},
title = {Hard Gates across the Client Lifecycle: the Decay of Soft-Prompt Compliance over Turns and State Machines for Interception before Publication},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Product Account: Why Stacked Soft Layers Never Leave a Zero Residual
- Chapter 2 · Holes That Line Up: the Floor That Common-Cause Failure Puts under Stacked Soft Layers
- Chapter 3 · Decay over Turns: an Exponential Model of Soft-Prompt Compliance, Re-Sending Periods and Reading the Log
- Chapter 4 · Where to Intercept: before the Write, after It or before Publication, and Whether a Broken Gate Passes or Refuses
- Chapter 6 · The Price of Hardness: Pattern Width, Wrong Blocks and Gates That Get Switched Off
- Chapter 7 · Classical Sources East and West: Law and the Inked Line in the Han Feizi, and Reason's Classification of Error
- Chapter 8 · Closing the Loop: the Weekly Interception Report, the Residual Calculator and a Pre-Registered Test