关于「规则即区间:阈值冲突的机械判定」,《冲突多半是冗余》给出的定量结论是什么?
结论:第二章说明一维阈值一次扫描即可判定,两量约束须做负环检测,浮点会在 0.1151 的边界配对上造出假冲突。
数据口径:书中规则库与数值均为示意;全部计算由书中程序生成;本书属非个人化经营方法,不构成法律、合规或经营决策意见,规则的增删须由主事者人工放行。 第一章正面陈述并量化命题:一千条示意规则里,标红配对中真矛盾只占 0.0392,裁决后 971 条是冗余,只剩 18 条约束性规则;越界规则占一成时真矛盾比例也只有 0.2667,但无解指标已遍及全部。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.1151
| A. lower bound a + b against upper bound c = a + b, 9801 pairs | |
| float says conflict (false) | 1128 share 0.1151 |
| float says slack below c | 978 share 0.0998 |
| exact Fraction says conflict | 0 |
| B. percent / 100 differs from the written decimal | 261 of 999 |
| C. three-term bounds 0.01 to 0.49, 117649 triples | |
| naive float addition disagrees | 31633 share 0.2689 |
| math.fsum of the floats | 19085 share 0.1622 |
查看完整验算程序
# Chapter 2. p23: binary floating point invents and hides conflicts
# Model: two rules meet exactly on a boundary, "x >= a + b" (a bound
# computed from two written decimals) and "x <= c" with c = a + b in
# decimal. Exact arithmetic says the pair is feasible (a single
# point). Binary floats may say a + b > c (a false conflict). Part A
# enumerates every pair a, b of two-decimal values from 0.01 to 0.99.
# Part B converts one-decimal percentages 0.1 to 99.9 by dividing by
# 100 and compares with the decimal written directly, the way two
# kits write the same threshold. Part C: three-term bounds a + b + c
# on a coarse grid, naive left-to-right float addition against
# math.fsum of the same three floats. Exhaustive, no randomness;
# Fraction is the judge.
import math
from fractions import Fraction as F
false_conf = 0
false_slack = 0
total = 0
for i in range(1, 100):
for j in range(1, 100):
total += 1
a, b = "0.%02d" % i, "0.%02d" % j
c = F(i + j, 100)
fa = float(a) + float(b)
fc = float(c)
if fa > fc:
false_conf += 1
elif fa < fc:
false_slack += 1
print("A. lower bound a + b against upper bound c = a + b, %d pairs"
% total)
print(" float says conflict (false) %5d share %.4f"
% (false_conf, false_conf / total))
print(" float says slack below c %5d share %.4f"
% (false_slack, false_slack / total))
print(" exact Fraction says conflict 0")
diff = 0
for k in range(1, 1000):
pct = "%d.%d" % divmod(k, 10)
via_pct = float(pct) / 100
direct = float(F(k, 1000))
if via_pct != direct:
diff += 1
print("B. percent / 100 differs from the written decimal: %d of 999"
% diff)
bad3 = 0
badf = 0
n3 = 0
for i in range(1, 50):
for j in range(1, 50):
for k in range(1, 50):
n3 += 1
t = [float(F(i, 100)), float(F(j, 100)), float(F(k, 100))]
want = float(F(i + j + k, 100))
if (t[0] + t[1]) + t[2] != want:
bad3 += 1
if math.fsum(t) != want:
badf += 1
print("C. three-term bounds 0.01 to 0.49, %d triples" % n3)
print(" naive float addition disagrees %6d share %.4f"
% (bad3, bad3 / n3))
print(" math.fsum of the floats %6d share %.4f"
% (badf, badf / n3))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《跨卷规则消解与公理归约、千条机器规则阈值冲突检测与最小原语集母典》第 2 章「规则即区间:阈值冲突的机械判定」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-258 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026258,
author = {Fan, Yafu},
title = {Cross-Volume Rule Resolution and Axiom Reduction: Detecting Threshold Conflicts among a Thousand Machine Rules and Finding a Minimal Primitive Set},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}