What does A Convergence Criterion for the Self-Evolving Engine conclude, in numbers, about “Halting Conditions: the Halting Size and a Curvature Alarm on Conflicts”?
Answer: Chapter 6 derives the halting size, 2,000 rules under illustrative parameters, and designs a strict curvature alarm that cuts the naive rule's false-alarm rate of 0.785 to 0.030.
Scope of the numbers: Its parameters are illustrative and contain no production information; all calculations are generated by its programs; it is general business analysis, not business advice. Chapter 4 sorts with Kahn's algorithm and finds and repairs cycles with strongly connected components; in a synthetic citation graph of three hundred volumes, 18,828 pairs are comparable, a share of 0.420.
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.030, 0.785
| rule | case | alarm by q20 | alarm by q40 | median q |
| naive | A quadratic | 0.978 | 0.993 | 8 |
| naive | C bounded | 0.443 | 0.785 | 19 |
| strict | A quadratic | 0.853 | 0.917 | 13 |
| strict | C bounded | 0.005 | 0.030 | 26 |
| case C alarms are false alarms; case A alarms are hits |
Show the full program
# Chapter 6. p62: a curvature alarm that halts admissions.
# Model: the open-conflict count X[t] is observed with Poisson-like
# noise, X_obs = mu + sqrt(mu) * z. Means come from the p33 engine:
# case A (pruning capacity below noise inflow, quadratic) and case C
# (bounded noise plus retirement, concave). Each quarter we fit
# X = b0 + b1 s + b2 s^2 on the last w quarters (s centred) and raise
# an alarm when the t-statistic of b2 exceeds a threshold in `run`
# consecutive windows. Naive rule: w 8, t > 2, run 1. Strict rule:
# w 12, t > 3, run 2. 400 runs per case and rule, seeded.
import math
import random
def engine(k, delta, quarters, a=24, eps=0.25, g=0.5):
good, noise, mu = 0.0, 0.0, []
for _ in range(quarters):
good = good + (1 - eps) * a - delta * good
noise = noise + eps * a - min(k, g * noise)
mu.append(0.02 * (noise * good + noise * (noise - 1) / 2)
+ 0.0002 * good * (good - 1) / 2)
return mu
def solve3(m, y):
a = [row[:] + [y[i]] for i, row in enumerate(m)]
for c in range(3):
p = max(range(c, 3), key=lambda r: abs(a[r][c]))
a[c], a[p] = a[p], a[c]
for r in range(3):
if r != c:
f = a[r][c] / a[c][c]
a[r] = [x - f * z for x, z in zip(a[r], a[c])]
return [a[i][3] / a[i][i] for i in range(3)]
def curvature_t(ys):
w = len(ys)
s = [i - (w - 1) / 2 for i in range(w)]
cols = [[1.0] * w, s, [x * x for x in s]]
xtx = [[math.fsum(p * q for p, q in zip(ci, cj)) for cj in cols]
for ci in cols]
xty = [math.fsum(p * q for p, q in zip(ci, ys)) for ci in cols]
b = solve3(xtx, xty)
res = [y - math.fsum([b[0], b[1] * u, b[2] * u * u])
for y, u in zip(ys, s)]
s2 = math.fsum(r * r for r in res) / (w - 3)
inv22 = solve3(xtx, [0.0, 0.0, 1.0])[2]
return b[2] / math.sqrt(s2 * inv22) if s2 > 0 else 0.0
def first_alarm(mu, rng, w, thr, run):
obs = [max(0.0, m + math.sqrt(m) * rng.gauss(0, 1)) for m in mu]
streak = 0
for t in range(w, len(mu) + 1):
streak = streak + 1 if curvature_t(obs[t - w:t]) > thr else 0
if streak >= run:
return t
return None
if __name__ == "__main__":
rng = random.Random(20261113)
print(" rule case alarm by q20 alarm by q40 median q")
for rule, w, thr, run in (("naive", 8, 2.0, 1), ("strict", 12, 3.0, 2)):
for name, k, d in (("A quadratic", 4, 0.0),
("C bounded", 8, 0.02)):
mu = engine(k, d, 40)
hits = [first_alarm(mu, rng, w, thr, run) for _ in range(400)]
got = sorted(h for h in hits if h is not None)
by20 = len([h for h in got if h <= 20]) / 400
med = got[len(got) // 2] if got else 0
print(" {:<6} {:<12} {:>12.3f} {:>12.3f} {:>8}".format(
rule, name, by20, len(got) / 400, med))
print("case C alarms are false alarms; case A alarms are hits")Single source and citation
Fan, Y. (2026). Topological Ordering of the Theorem-Dependency Graph of Three Hundred Volumes and a Convergence Criterion for the Self-Evolving Engine: Halting Conditions between Proposal Noise and Pruning Gain (Version 1.0.0), Chapter 6: Halting Conditions: the Halting Size and a Curvature Alarm on Conflicts. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-332 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026332,
author = {Fan, Yafu},
title = {Topological Ordering of the Theorem-Dependency Graph of Three Hundred Volumes and a Convergence Criterion for the Self-Evolving Engine: Halting Conditions between Proposal Noise and Pruning Gain},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Square Law of Conflict Pairs: n Choose 2, a Fixed Audit Budget and the Backlog
- Chapter 2 · Requisite Variety: When the Information Budget of Pruning Covers the Noise of Proposals
- Chapter 3 · Difference Equations and Stability: Pruning Gain, Audit Delay and Oscillation
- Chapter 4 · The Theorem-Dependency Graph: Kahn's Topological Sort, Cycle Detection and a Synthetic Graph of Three Hundred Volumes
- Chapter 5 · Local Audits and Pruning Gain: How Many Pairs Each New Rule Costs and How Many Conflicts Each Cut Removes
- Chapter 7 · Eastern and Western Sources: "Generation upon Generation" in the Great Commentary and Wiener's Cybernetics
- Chapter 8 · The Quarterly Convergence Check-up: Procedure, the Engine Convergence Criterion Calculator and a Pre-registered Plan of Refutation