# X4-DMSD P12：Adaptive Exact-Cell Scheduler

**An Autonomous Controller for Choosing Shape, Prime, and Root Refinement**

版本：v0.1  
系列：X4-DMSD  
階段：P12  
性質：adaptive scheduler／exact-cell controller／bounded autonomous replay／zero-materialization huge-cell replay  
Canonical source：UTF-8 Markdown

---

## 摘要

P11 已證明：

$$
\boxed{
\operatorname{RefineShape}
}
$$

與：

$$
\boxed{
\operatorname{AddPrime}
}
$$

是兩種可交換的 exactness resources。

P12 拿掉人工決策，建立第一版 autonomous exact-cell scheduler：

$$
\boxed{
\operatorname{Choose}
(
\operatorname{AddPrime},
\operatorname{RefineShape},
\operatorname{RefineRoot}
).
}
$$

scheduler 不读取 exact ground truth。

它只能查看当前 symbolic summaries，并对候选 action做 bounded look-ahead：

$$
\boxed{
\operatorname{Score}
=
\frac{
\text{该 action 可 sound resolve 的 unresolved cells}
}{
\text{summary evaluations}
}.
}
$$

ground truth只在整个 run结束后用于 correctness audit。

bounded face replay从：

$$
m\le60,
$$

CRT primes：

$$
5,7,11,13,17,19
$$

以及 shape resolution：

$$
R=20
$$

开始。

初始：

$$
6198
$$

个 modular survivors中：

$$
48
$$

已 EXACT，

$$
4663
$$

已 IMPOSSIBLE，

尚有：

$$
873\ \mathrm{POSSIBLE}
+
614\ \mathrm{UNKNOWN}
=
\boxed{
1487
}
$$

unresolved。

controller自动选择：

$$
\boxed{
+\;23
\rightarrow
+\;29
\rightarrow
R:20\rightarrow50
\rightarrow
R:50\rightarrow100.
}
$$

最终：

$$
\boxed{
192\ \mathrm{EXACT}
+
6006\ \mathrm{IMPOSSIBLE}
+
0\ \mathrm{UNRESOLVED}.
}
$$

post-run exact audit得到：

$$
\boxed{
0\text{ false EXACT}
}
$$

以及：

$$
\boxed{
0\text{ false IMPOSSIBLE}.
}
$$

所以 controller确实可以不使用答案 oracle，自主在 arithmetic refinement与 geometric refinement之间切换，并完整闭合 bounded face problem。

P12 也建立 body scheduler。

throughput-first policy并没有照人工预期选择 $17$ 作为第三个 prime。

它实际根据即时 rejection gain选择：

$$
\boxed{
19\rightarrow7\rightarrow31\rightarrow23.
}
$$

这点被保留为真实 scheduler 行为。

另一条 prime-capped policy禁止使用 $>19$ 的新 rejection prime。

它走：

$$
19\rightarrow7\rightarrow17
$$

后剩最后一个 Euler world，再执行：

$$
\boxed{
\operatorname{RefineRoot}
}
$$

使用 helper primes：

$$
3,5,11,13
$$

扩张 body-root lattice，最终在不使用 $23$ 的情况下 exact 关闭最后一个 world。

---

# 1. Scheduler State

face state：

$$
\boxed{
S_F
=
(
\mathcal P,
R,
\mathcal U
).
}
$$

其中：

- $\mathcal P$ = 当前 prime ladder；
- $R$ = shape resolution；
- $\mathcal U$ = unresolved cells。

---

# 2. Face Action：AddPrime

加入新 prime：

$$
p.
$$

更新：

$$
Q\mapsto Qp.
$$

然后对 unresolved cells重新做：

- modular signature；
- interval-CRT intersection。

---

# 3. Face Action：RefineShape

保持：

$$
Q
$$

不变。

将：

$$
R
$$

提升到更细 resolution，

缩小：

$$
[L_D,U_D].
$$

---

# 4. Body Action：RefineRoot

不只保存：

$$
\text{quadratic-residue boolean}.
$$

而是组合：

$$
g^2\equiv S\pmod Q
$$

的 root residue classes，再与合法：

$$
[G_-,G_+]
$$

求交。

---

# 5. Oracle Separation

scheduler选择 action 时禁止读取：

$$
D=0?
$$

或：

$$
S=g^2?
$$

这些 exact ground truths。

只有 symbolic gates提供 resolved counts。

---

# 6. Audit Separation

run结束后才允许 exact audit。

如果 cell 被标：

$$
\mathrm{EXACT},
$$

验证：

$$
D=0.
$$

如果标：

$$
\mathrm{IMPOSSIBLE},
$$

验证：

$$
D\neq0.
$$

---

# 7. Cost Model v0.1

第一版：

$$
\boxed{
\operatorname{Cost}
=
N_{\mathrm{summary\ evaluations}}.
}
$$

所以：

$$
\boxed{
\operatorname{Score}
=
\frac{
N_{\mathrm{resolved}}
}{
N_{\mathrm{evaluated}}
}.
}
$$

P12 目标是验证 action switching，不宣称此 cost model hardware-optimal。

---

# 8. Tie-Break

若 score相同：

$$
\boxed{
\operatorname{RefineShape}
}
$$

优先。

原因是避免在没有收益优势时扩大 arithmetic-state dimension。

这是 policy，不是 theorem。

---

# 9. Initial Face State

$$
Q_{19}
=
5\cdot7\cdot11\cdot13\cdot17\cdot19.
$$

$$
R=20.
$$

unresolved：

$$
1487.
$$

---

# 10. Step 1

候选：

### Add $23$

resolve：

$$
1360/1487.
$$

score：

$$
\boxed{
0.914593.
}
$$

### Refine $R:20\rightarrow50$

resolve：

$$
947/1487.
$$

score：

$$
0.636853.
$$

选择：

$$
\boxed{
+\;23.
}
$$

---

# 11. Step 1 Result

unresolved：

$$
127.
$$

---

# 12. Step 2

### Add $29$

resolve：

$$
99/127.
$$

score：

$$
\boxed{
0.779528.
}
$$

### Refine $20\rightarrow50$

resolve：

$$
63/127.
$$

score：

$$
0.496063.
$$

选择：

$$
\boxed{
+\;29.
}
$$

---

# 13. Step 2 Result

unresolved：

$$
28.
$$

---

# 14. Step 3：资源切换

### Add $31$

resolve：

$$
14/28.
$$

score：

$$
0.5.
$$

### Refine $20\rightarrow50$

resolve：

$$
16/28.
$$

score：

$$
\boxed{
0.571429.
}
$$

所以 scheduler自动从：

$$
\text{arithmetic refinement}
$$

切换到：

$$
\boxed{
\text{geometric refinement}.
}
$$

---

# 15. Step 3 Result

$$
R=50.
$$

unresolved：

$$
12.
$$

---

# 16. Step 4

Add $31$ 与：

$$
R:50\rightarrow100
$$

都可以：

$$
12/12
$$

resolve。

tie-break选择 shape：

$$
\boxed{
R=100.
}
$$

---

# 17. Final Face State

$$
\boxed{
192\ \mathrm{EXACT}
}
$$

$$
\boxed{
6006\ \mathrm{IMPOSSIBLE}
}
$$

$$
\boxed{
0\ \mathrm{UNRESOLVED}.
}
$$

---

# 18. Face Audit

exact truth：

$$
D=0
$$

共：

$$
192.
$$

controller EXACT也是：

$$
192.
$$

全部 IMPOSSIBLE的 cells都有：

$$
D\neq0.
$$

所以：

$$
\boxed{
\mathrm{FalseNegative}=0,
\qquad
\mathrm{FalseExact}=0.
}
$$

---

# 19. Body Workload

$m\le80$ exact face coupling产生：

$$
48
$$

个 unique Euler worlds。

全部 body-open。

---

# 20. Throughput-First Body Scheduler

每一步评估可用 body QR primes的即时 rejection fraction。

第一次：

$$
p=19
$$

把：

$$
48\rightarrow8.
$$

所以先选：

$$
19.
$$

---

# 21. 第二步

在剩余 $8$ worlds：

$$
p=7
$$

把：

$$
8\rightarrow2.
$$

选择：

$$
7.
$$

---

# 22. 第三步出现真实自主差异

剩余 $2$ worlds时：

$$
p=17,23,29,31
$$

有并列／不同即时 gain。

实际 greedy ordering在当前 tie rule下选择：

$$
\boxed{
31.
}
$$

并留下：

$$
1
$$

个 world。

这与原人工预期：

$$
17
$$

不同。

P12 保留真实输出，不事后修改 scheduler结果。

---

# 23. 第四步

最后：

$$
p=23
$$

关闭剩余 world。

所以 throughput path：

$$
\boxed{
19\rightarrow7\rightarrow31\rightarrow23.
}
$$

---

# 24. Prime-Capped Root Policy

另一 policy规定：

$$
p_{\mathrm{new}}\le19.
$$

因此使用：

$$
19\rightarrow7\rightarrow17.
$$

剩：

$$
1
$$

个 world：

$$
(1575,1672,9120).
$$

---

# 25. RefineRoot

加入 helper primes：

$$
3,5,11,13
$$

并不是为了做新的 QR rejection。

这些 primes用于扩大 modular root lattice。

组合：

$$
3,5,7,11,13,17,19.
$$

---

# 26. Root Closure

root lattice与合法：

$$
g
$$

interval不相交。

所以：

$$
\boxed{
\operatorname{RefineRoot}
\Rightarrow
\mathrm{IMPOSSIBLE}.
}
$$

不需要：

$$
23.
$$

---

# 27. Huge Replay H1

尺度：

$$
10^{100},
10^{250},
10^{1000}.
$$

shape required interval与 target interval不交。

controller在 geometry gate直接关闭。

huge integer materialization：

$$
0.
$$

---

# 28. Huge Replay H2

geometry有 overlap。

但 mod $5$：

$$
\{2,3\}/\{2,3\}
=
\{1,4\}
$$

与 target：

$$
\{2,3\}
$$

不交。

controller在 arithmetic gate关闭。

---

# 29. Huge Replay H3

shape与 face residue都通过。

mod $7$ body：

$$
a^2+b^2+c^2
\equiv3\pmod7
$$

non-square。

controller在 body gate关闭。

---

# 30. Unified Gate Vocabulary

P12 runtime现在使用：

$$
\boxed{
G,V,F,B,R,E.
}
$$

- $G$：geometry interval；
- $V$：valuation；
- $F$：face coupling；
- $B$：body residue；
- $R$：root lattice；
- $E$：final exact arithmetic。

---

# 31. Short-Circuit

任一 cheap gate已得到：

$$
\mathrm{IMPOSSIBLE},
$$

后续 expensive action全部跳过。

这才是 huge-scale runtime真正节省工作的地方。

---

# 32. Scheduler Correctness Contract

action order只能改变：

$$
\boxed{
\text{cost}.
}
$$

不能改变：

$$
\boxed{
\text{truth set}.
}
$$

因为所有 resolver必须保持 theorem-sound。

---

# 33. Confluence Goal

理想 runtime中：

$$
\text{prime-first}
$$

与：

$$
\text{shape-first}
$$

若 refinement充分，

最终应收敛到同一 exact partition。

P10–P12 bounded replays支持这个设计目标。

---

# 34. P12 核心结果

### P12-R1

建立第一版 autonomous exact-cell scheduler。

### P12-R2

action selection不读取 exact ground truth。

### P12-R3

face controller自动选择：

$$
\boxed{
+\;23
\rightarrow
+\;29
\rightarrow
R=50
\rightarrow
R=100.
}
$$

### P12-R4

最终：

$$
\boxed{
192\ \mathrm{EXACT}
+
6006\ \mathrm{IMPOSSIBLE}.
}
$$

### P12-R5

post-run audit：

$$
\boxed{
0\text{ false negative},
\quad
0\text{ false exact}.
}
$$

### P12-R6

body throughput controller真实选择：

$$
\boxed{
19\rightarrow7\rightarrow31\rightarrow23.
}
$$

### P12-R7

prime-capped policy以：

$$
19\rightarrow7\rightarrow17
\rightarrow
\operatorname{RefineRoot}
$$

在不使用 $23$ 的情况下关闭最后一个 world。

### P12-R8

三类 huge certificates统一进入同一 scheduler gate model，huge seed materialization皆为：

$$
0.
$$

---

# 35. Claim Boundary

P12 不宣称：

- 当前 cost model最优；
- bounded optimal action order可直接外推到 huge scale；
- 完整无限 domain已经自动跑完；
- Perfect Cuboid存在；
- Perfect Cuboid不存在。

---

# 36. 下一阶段

**X4-DMSD P13 — Distributed Exact-Cell Runtime and Persistent Search Ledger**

下一步把 controller从一次性实验变成长程 runtime：

1. canonical cell ID；
2. deterministic state hash；
3. parent / child lineage；
4. persistent ledger；
5. checkpoint / resume；
6. distributed work queue；
7. prime automata cache；
8. shape summary cache；
9. certificate deduplication；
10. 将：
   $$
   k=10,100,1000
   $$
   的 symbolic world cells持续推进。

P13 的目标，是让 X4-DMSD 从「已经会自己决定下一步」变成「可以真正长期运行、分布式推进、随时重播证明链」的 exact-world search system。
