What does Utility, Truth and the Dual Ledger conclude, in numbers, about “Field Tools and Checker Specifications: the Dual-Ledger Records, Red-Flag Rules and a Pre-Registered Test”?
Answer: Chapter 8 gives field tools and checker specifications, ledger fields and a pre-registered test. Marked boxes separate published evidence, runnable calculations (22 programs), classical sources and the author's hypotheses.
Scope of the numbers: Its parameters and data are illustrative or synthetic, and every calculation is generated by its programs. The book is not medical advice, offers no clinical psychological service, is not personal investment advice and makes no promise of returns; functional beliefs are for one's own action frame and never for deceiving others.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only
| history 60, calibration gap +0.0850, Brier 0.2165, ledger AMBER | ||||||
| id | p_cal | Kelly cap | stake/cap | ruin | grade | rules |
| D1 | 0.515 | 0.1917 | 0.10 | 0.0000 | GREEN | - |
| D2 | 0.615 | 0.3583 | 0.08 | 0.0000 | RED | R1 |
| D3 | 0.465 | 0.1975 | 0.10 | 0.0000 | RED | R4 |
| D4 | 0.535 | 0.0700 | 3.57 | 0.4136 | RED | R2 R5 |
| D5 | 0.495 | 0.1583 | 0.19 | 0.0000 | RED | R3 |
| D6 | 0.415 | 0.1225 | 0.41 | 0.0025 | AMBER | R3 |
| D7 | 0.575 | 0.2917 | 0.55 | 0.0114 | AMBER | R2 R5 |
| D8 | 0.535 | 0.2250 | 0.09 | 0.0000 | GREEN | - |
Show the full program
# Chapter 8. p81: the dual-ledger and hard-boundary checker, demo run
# Same core as distill/tool.py; its no-argument demo prints these lines.
# History: 60 resolved forecasts from a synthetic ledger that states
# probabilities 0.06 above what happens (fixed seed). Calibration gap =
# mean stated minus observed frequency; Brier score of the history.
# Each open decision is checked:
# R1 frame rewrote the ledger: p raised over p_before, no new evidence
# R2 stake against the Kelly cap on the CALIBRATED p (p minus the gap)
# R3 a hard boundary broken (feasibility, runway, single loss) while
# the decision is marked to execute; on hold it is only flagged
# R4 a forecast with no due date
# R5 ruin chance of repeating the stake with the calibrated p: the
# chance that wealth hits 0.2 of its start before it doubles, by
# the drift-diffusion barrier formula on log wealth
# Grades: RED if any red rule fires, else AMBER if any amber, else GREEN.
import math
import random
GAP_AMBER, RUIN_RED, RUIN_AMBER, FLOOR = 0.05, 0.05, 0.01, 0.2
DEMO = [ # id, p_before, p, evidence, due, stake, odds,
# feasible, runway, min_runway, loss_share, loss_cap, execute
("D1", 0.60, 0.60, 0, 30, 0.02, 1.5, 1, 240, 90, 0.02, 0.10, 1),
("D2", 0.45, 0.70, 0, 45, 0.03, 1.5, 1, 240, 90, 0.03, 0.10, 1),
("D3", 0.55, 0.55, 0, 0, 0.02, 2.0, 1, 240, 90, 0.02, 0.10, 1),
("D4", 0.62, 0.62, 0, 60, 0.25, 1.0, 1, 240, 90, 0.25, 0.30, 1),
("D5", 0.58, 0.58, 0, 30, 0.03, 1.5, 1, 60, 90, 0.03, 0.10, 1),
("D6", 0.50, 0.50, 0, 90, 0.05, 2.0, 0, 240, 90, 0.05, 0.10, 0),
("D7", 0.66, 0.66, 0, 30, 0.16, 1.5, 1, 240, 90, 0.16, 0.20, 1),
("D8", 0.50, 0.62, 1, 30, 0.02, 1.5, 1, 240, 90, 0.02, 0.10, 1),
]
def demo_history():
rng = random.Random(42781)
hist = []
for _ in range(60):
p = rng.choice((0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9))
hist.append((p, 1 if rng.random() < p - 0.06 else 0))
return hist
def calibration(hist):
gap = (math.fsum(p for p, _ in hist)
- len([1 for _, o in hist if o])) / len(hist)
brier = math.fsum((p - o) ** 2 for p, o in hist) / len(hist)
return gap, brier
def kelly(p, odds):
return max(0.0, (p * (odds + 1) - 1) / odds)
def ruin(p, stake, odds):
up, down = math.log(1 + odds * stake), math.log(1 - stake)
mu = p * up + (1 - p) * down
var = p * (1 - p) * (up - down) ** 2
lo, hi = math.log(FLOOR), math.log(2.0)
if abs(mu) < 1e-12:
return hi / (hi - lo)
th = 2 * mu / var
return (1 - math.exp(-th * hi)) / (math.exp(-th * lo)
- math.exp(-th * hi))
def check(d, gap):
(did, p0, p, ev, due, stake, odds, feas, run, minrun,
loss, cap, exe) = d
red, amber = [], []
if p > p0 and not ev:
red.append("R1")
pc = min(0.99, max(0.01, p - gap))
k = kelly(pc, odds)
ratio = stake / k if k > 0 else float("inf")
if ratio > 1:
red.append("R2")
elif ratio > 0.5:
amber.append("R2")
bound = (not feas) or run < minrun or loss > cap
if bound and exe:
red.append("R3")
elif bound:
amber.append("R3")
if due <= 0:
red.append("R4")
r = ruin(pc, stake, odds)
if r > RUIN_RED:
red.append("R5")
elif r > RUIN_AMBER:
amber.append("R5")
grade = "RED" if red else ("AMBER" if amber else "GREEN")
return did, pc, k, ratio, r, grade, red + amber
def report(decisions, hist):
gap, brier = calibration(hist)
lines = ["history %d, calibration gap %+.4f, Brier %.4f, ledger %s" % (
len(hist), gap, brier, "AMBER" if abs(gap) > GAP_AMBER else "GREEN")]
lines.append("id p_cal Kelly cap stake/cap ruin grade rules")
for d in decisions:
did, pc, k, ratio, r, grade, rules = check(d, gap)
lines.append("%-3s %5.3f %9.4f %9.2f %6.4f %-5s %s" % (
did, pc, k, min(ratio, 99.99), r, grade,
" ".join(rules) or "-"))
return lines
for line in report(DEMO, demo_history()):
print(line)Single source and citation
Fan, Y. (2026). When Utility Outperforms Literal Truth: Evolutionary Fitness-Payoff Games, Functional Belief Engineering and Physical Guardrails (Version 1.0.0), Chapter 8: Field Tools and Checker Specifications: the Dual-Ledger Records, Red-Flag Rules and a Pre-Registered Test. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-427 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026427,
author = {Fan, Yafu},
title = {When Utility Outperforms Literal Truth: Evolutionary Fitness-Payoff Games, Functional Belief Engineering and Physical Guardrails},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Fitness Beats Truth: a Replicator Contest between One-Bit Perceptions
- Chapter 2 · Truth Strikes Back: Shifting Goals, Wrong Models and Cliff-Edge Costs
- Chapter 3 · When Overconfidence Evolves: the Value-to-Cost Ratio and Noisy Reading of Rivals
- Chapter 4 · The Ceiling on Self-Fulfilment: How Far Confidence Can Lift the Odds
- Chapter 5 · Overconfidence Meets the Kelly Criterion: the Growth Cost of an Inflated Win Rate and the Probability of Ruin
- Chapter 6 · The Dual Ledger: the Brier Score, Its Calibration Decomposition and Boundaries That Do Not Yield
- Chapter 7 · Classical Sources: the Constant Course of Heaven, the Hare and the Stump, the Expedient and Obedience to Nature