# DMSD Phase 3E — Residual Structure Audit
## PNT → Wheel-Corrected Baselines → Resolution/Source Matching

**日期：** 2026-09-30  
**狀態：** COMPLETE  
**Exact prime bound：** \(10^7\)  
**主尺度：** decimal \(L_3\)–\(L_6\)  
**Wheel family：**
\[
W\in\{1,2,6,30,210,2310,30030\}.
\]

---

# 1. 本輪目的

Phase 3D 已經把原始 prime histogram 拆成：

\[
\text{Observed}
=
\text{PNT/li baseline}
+
\text{Residual}.
\]

並發現高尺度 normalized left-bias 幾乎全部可以由：

\[
\frac1{\log x}
\]

的一階 density gradient 解釋。

但即使扣掉 density gradient，prime residual 仍然包含已知 arithmetic structure：

- 偶數排除；
- mod 3 排除；
- mod 5 排除；
- 更高小質數 wheel。

因此本輪繼續問：

> 若 baseline 同時知道 \(1/\log x\) density gradient 與「不能被登記小質數整除」的候選空間，residual 還會下降多少？

---

# 2. Wheel-Corrected Baseline

對 wheel：

\[
W,
\]

定義 candidate indicator：

\[
c_W(n)
=
\mathbf 1_{\gcd(n,W)=1}.
\]

對第 \(j\) 個 bin：

\[
B_j=[x_j,x_{j+1}),
\]

計算 exact candidate count：

\[
N_W(B_j)
=
\#\{n\in B_j:\gcd(n,W)=1\}.
\]

再與 PNT/li density 結合：

\[
M_j^{(W)}
=
\frac{N_W(B_j)}{|B_j|}
\int_{x_j}^{x_{j+1}}
\frac{dt}{\log t}.
\]

最後正規化：

\[
Q_j^{(W)}
=
\frac{M_j^{(W)}}{\sum_rM_r^{(W)}}.
\]

當：

\[
W=1
\]

時就退化成 Phase 3D 的 PNT/li baseline。

---

# 3. Baseline 不偷看 prime labels

\(Q^{(W)}\) 的構造只使用：

1. block / bin 邊界；
2. \(1/\log x\)；
3. \(\gcd(n,W)=1\) 的 periodic candidate structure。

它不使用：

```text
哪些 n 真的是 prime
prime histogram shape
prime gaps
target label
```

所以它是一個 legitimate known-structure baseline，而不是把 target 偷塞回 predictor。

---

# 4. Candidate-count 驗證

本輪對 wheel candidate-count formula 做：

```text
3,500
```

組獨立小區間 brute-force gcd oracle。

結果：

```text
3,500 / 3,500 PASS
```

因此 periodic prefix counting 與直接逐元素 gcd enumeration 一致。

---

# 5. 第一個結果：粗解析度下 wheel 幾乎消失

在 \(L_6=[10^6,10^7)\)：

### 100 bins

bin width：

\[
90,000.
\]

PNT residual JS：

\[
4.9365\times10^{-6}.
\]

加入 \(W_{30030}\)：

\[
4.9264\times10^{-6}.
\]

只改善約：

\[
0.20\%.
\]

### 1000 bins

bin width：

\[
9,000.
\]

最佳約為 \(W_{210}\)，改善：

\[
0.13\%.
\]

也就是：

\[
\boxed{
\text{在 coarse bins 中，小質數 periodic structure 幾乎被平均掉。}
}
\]

---

# 6. Resolution–Period Averaging Lemma

這個現象可以給一個簡單的一般性理由。

令：

\[
c_W(n)=\mathbf 1_{\gcd(n,W)=1}
\]

是一個週期為 \(W\) 的 0/1 sequence。

一個完整 period 中：

\[
\sum_{n=0}^{W-1}c_W(n)=\varphi(W).
\]

設任意 interval 長度：

\[
h=qW+r,\qquad0\le r<W.
\]

則其中 \(q\) 個完整 periods 恰好貢獻：

\[
q\varphi(W).
\]

只有剩餘長度 \(r\) 的 partial period 可能偏離平均。

因此：

\[
\boxed{
\left|
N_W([a,a+h))
-
h\frac{\varphi(W)}{W}
\right|
\le W.
}
\]

所以 candidate density 的 deviation 滿足：

\[
\boxed{
\left|
\frac{N_W}{h}
-
\frac{\varphi(W)}{W}
\right|
\le
\frac{W}{h}.
}
\]

當：

\[
h\gg W
\]

時，wheel candidate fraction 在不同 bins 間趨近常數。

而 baseline 最後還會再做 normalization，因此近似常數的 wheel factor 會大部分抵消。

---

# 7. 這帶來新的 DMSD 原則

可以暫稱：

# Resolution–Source Matching Principle

> **一個具有 characteristic period / scale 的 information source，只有在 observation resolution 足夠接近或細於該 scale 時，其非平凡結構才容易在 projection 中顯現。**

粗略說：

\[
\boxed{
\text{Source scale}
\leftrightarrow
\text{Observation resolution}
}
\]

不能分開看。

這不是 prime-specific theorem；
它來自 periodic observation source 的 coarse-graining 性質。

---

# 8. 解析度提高後 wheel 結構重新出現

## \(L_4=[10^4,10^5)\)

### 90,000 bins

此時：

\[
\text{bin width}=1.
\]

也就是幾乎 element-level。

PNT baseline：

\[
JS=0.77027.
\]

加入 wheel：

\[
W_2:
\quad
JS=0.62800
\]

\[
W_6:
\quad
0.51561
\]

\[
W_{30}:
\quad
0.44345
\]

\[
W_{210}:
\quad
0.38916
\]

\[
W_{2310}:
\quad
0.35374
\]

\[
W_{30030}:
\quad
\boxed{0.32291}
\]

相對 PNT-only baseline：

\[
\boxed{
58.08\%
}
\]

的 JS residual 被 \(W_{30030}\) candidate structure 消除。

這是一個非常直接的效果。

因為 element-level resolution 可以看見：

> 很多位置根本不可能是大於 13 的 prime。

---

# 9. 同樣 90,000 bins，在不同 scale 的效果不同

### \(L_4\)

bin width：

\[
1
\]

\(W_{30030}\) reduction：

\[
58.08\%.
\]

### \(L_5\)

bin width：

\[
10
\]

reduction：

\[
20.78\%.
\]

### \(L_6\)

bin width：

\[
100
\]

reduction：

\[
4.84\%.
\]

因此即使 bin 數相同：

\[
90,000,
\]

實際 observation resolution 並不相同。

這再次證明 DMSD 不能只記：

```text
number of bins
```

還必須記：

\[
\boxed{
\text{physical / arithmetic width per bin}.
}
\]

---

# 10. Resolution 是數學語義，不只是 UI

過去「解析度」容易被理解成：

> 圖畫得多細。

本輪顯示它其實具有數學語義。

例如：

\[
L_4
\]

element-level 可以直接看到 wheel exclusions；

但把同一區間聚合成大 bins 後：

\[
\text{candidate exclusions}
\]

被 coarse average 壓成近似固定比例。

所以：

\[
\boxed{
\text{coarse-graining can erase arithmetic information}.
}
\]

這正好符合 DMSD 原先的 multiscale 設計初衷。

---

# 11. 並不是 wheel 越大永遠越好

在某些 coarse resolution：

\[
W_{30030}
\]

不是 JS 最佳 baseline。

例如 \(L_6\) / 1000 bins：

\[
W_{210}
\]

略優於更大的 wheels。

原因是：

- baseline 只是有限 bin projection；
- wheel refinement 與 bin boundaries 有 phase interaction；
- 更大的 candidate ontology 不保證某個 coarse metric 單調改善；
- JS 本身是在 aggregate histogram 上量測，不是 ontology completeness。

所以：

\[
\boxed{
\text{Source refinement}
\neq
\text{metric improvement at every resolution}.
}
\]

這和先前 SDRPC 的：

\[
\text{Information Gain}
\neq
\text{Task Gain}
\]

有相似精神。

---

# 12. Residual Center Bias 幾乎不受 wheel 影響

Phase 3D 的 PNT baseline 已經把 high-scale center bias 解釋掉約 99%。

加入 wheels 後，center residual 只有非常小變化。

這表示：

\[
\boxed{
\text{center bias}
}
\]

主要屬於 smooth density gradient，

而 wheel structure 更像：

\[
\boxed{
\text{high-frequency / local arithmetic structure}.
}
\]

所以不同 source 可能作用於不同 scale-frequency band。

---

# 13. DMSD 開始出現 Frequency-Like 分解

目前至少可以粗分：

### Low-frequency scale structure

例如：

\[
1/\log x
\]

造成的平滑 density gradient。

### Mid/high-frequency arithmetic structure

例如：

\[
\gcd(n,W)=1
\]

造成的 periodic candidate exclusions。

### Remaining residual

扣除兩者後仍未解釋的部分。

這使 DMSD 的多尺度模型開始像：

\[
\boxed{
\text{Smooth Baseline}
+
\text{Arithmetic Texture}
+
\text{Residual}.
}
\]

---

# 14. 重要：這仍然不是 prime generator

即使 \(W_{30030}\) 在 element-level 排除大量 composite positions，

仍然存在大量：

\[
\gcd(n,30030)=1
\]

但 composite 的整數。

所以：

\[
\boxed{
\text{Wheel correction}
\neq
\text{Primality solution}.
}
\]

它只是從 residual 中拿走已知小質數 divisibility structure。

這與 SDRPC 先前得到的 fixed-wheel insufficiency 完全相容。

---

# 15. 本輪真正得到的結構

目前 DMSD prime observation 可以寫成：

\[
\boxed{
H_{\mathbb P}
=
H_{\mathrm{smooth}}
+
H_{\mathrm{wheel}}
+
H_{\mathrm{residual}}
}
\]

其中：

- \(H_{\mathrm{smooth}}\)：\(1/\log x\) density gradient；
- \(H_{\mathrm{wheel}}\)：small-prime periodic candidate structure；
- \(H_{\mathrm{residual}}\)：目前尚未被這兩種 source 解釋的部分。

但這個「+」是 conceptual decomposition，
並不宣稱三者為線性獨立 stochastic components。

---

# 16. Resolution-Aware Provenance

從本輪開始，一個 residual claim 至少應記錄：

```text
domain
scale grammar
block
bin count
bin width
smooth baseline
wheel W
normalization
metric
exact prime-data bound
```

否則單獨說：

> 「這個 residual 很小」

沒有足夠語義。

同一 source 在不同 resolution 下會得到完全不同的可見度。

---

# 17. 驗證

本輪：

```text
candidate-count oracle:       3,500 / 3,500 PASS
period-averaging bound:       3,500 / 3,500 PASS
exact prime data:             n < 10^7
wheel baseline target leak:   none
```

另外完成：

- 100 / 1000 / 10000-bin resolution audit；
- 90,000-bin high-resolution audit；
- \(L_4,L_5,L_6\) 跨實際 bin-width 比較。

---

# 18. 下一步

現在不適合繼續無限增加 wheel。

下一輪比較值得做：

# DMSD Phase 3F — Residual Stability / Null Audit

問：

> 扣掉 PNT + wheel 後剩下的 residual，到底是不是穩定結構？

可以做：

- neighboring scale reproducibility；
- split-half stability；
- shifted-bin-origin audit；
- randomized null comparison；
- cross-base residual persistence；
- resolution transfer。

如果 residual 只要 shift bins 就完全改樣，
那就不值得命名。

如果某種 residual feature 能跨：

```text
scale
base
resolution
bin origin
```

持續存在，才有資格成為下一個候選命題。

---

# 19. 結論

Phase 3E 最重要的結果不是「wheel 可以解釋多少 prime」。

而是：

\[
\boxed{
\text{information source 的可見性本身也是 scale-dependent。}
}
\]

PNT gradient 在 coarse scale 就很清楚；

small-prime wheel 則需要更細 resolution 才重新顯現。

因此 DMSD 從：

\[
\text{multiscale representation}
\]

進一步走到：

\[
\boxed{
\text{multiscale source separation}.
}
\]

而最值得保留的新原則是：

\[
\boxed{
\text{Resolution–Source Matching}.
}
\]

---

```text
DMSD Phase 3E: COMPLETE
Validation: PASS

Next:
DMSD Phase 3F — Residual Stability / Null Audit
```
