# 勒讓德底空間綱領 Phase 3
## 算子審計、閉環正典化與歷史阻礙定理
### Operator Audit, Closed-Loop Canonicalization, and the Historical Obstruction Theorem

**版本：** v0.1  
**日期：** 2026-09-30  
**作者：** Neo.K × AI 協作  
**機構：** EveMissLab / 一言諾科技有限公司  
**研究線：** Legendre Base-Space Prime-Fitting Program  
**前置：** Phase 1–2  
**狀態：** Phase 3 formalization + finite computational audit；非勒讓德猜想完成證明

---

# 0. 本階段結論先行

Phase 3 得到兩類結果。

第一類是**負結果／校正**：

> Phase 2 將 $\varepsilon_{\mathrm{full}}$ 單獨積分成 open-loop 無限 rollout 的做法，不等於原始質數擬合器。該簡化版雖在有限測試中保持單調並捕捉到近似正確的增長形狀，但產生約 $0.7904$ 的整體尺度偏移，因此不能作為 canonical prime-fitting operator。

第二類是**精確正結果**：

> 一旦候選整數 $q$ 已被放入第 $n$ 個連續平方胞腔並滿足 $q\equiv\pm1\pmod6$，則若 $q$ 不是質數，其非平凡整除證書必然完全來自尺度 $\le n$ 的「歷史底空間」。

這使質數性在平方胞腔內得到一個完全局部—全域化的判準。

---

# 1. Source Audit：原始 v2.0 是閉環算子

已保存的 $\varepsilon_{\mathrm{full}}$ 論文附錄 A 定義：

$$
\widehat A_{N+1}
=
A_N
\left(
\frac{N+1}{N}
\right)^{1+\varepsilon_{\mathrm{full}}(N)},
$$

以及：

$$
\widehat p_{N+1}
=
(N+1)\widehat A_{N+1}
-
NA_N.
$$

其中輸入 $A_N$ 在原始算法中是目前已知質數歷史的真實累積平均：

$$
A_N
=
\frac1N
\sum_{k=1}^N p_k.
$$

因此原始 v2.0 是：

$$
\boxed{
\text{historical state}
\longrightarrow
\text{one-step fit}
}
$$

的閉環算子，而不是從 $N=2$ 開始後永遠不回授的 open-loop generator。

---

# 2. Phase 2 Open-Loop 簡化版

Phase 2 曾定義：

$$
A_2^{\mathrm{OL}}
=
\frac52,
$$

$$
A_{N+1}^{\mathrm{OL}}
=
A_N^{\mathrm{OL}}
\left(
\frac{N+1}{N}
\right)^{1+\varepsilon_{\mathrm{full}}(N)},
$$

$$
P_{N+1}^{\mathrm{OL}}
=
(N+1)A_{N+1}^{\mathrm{OL}}
-
NA_N^{\mathrm{OL}}.
$$

這個算子在形式上自洽，但它把原始閉環自適應器改成了純積分器。

Phase 3 必須檢查此修改是否保留 prime-fitting identity。

---

# 3. Open-Loop 單調性的精確條件

令：

$$
r_N
=
\left(
\frac{N+1}{N}
\right)^{1+\varepsilon_N}.
$$

則：

$$
A_{N+1}=A_Nr_N.
$$

並有：

$$
P_{N+1}
=
A_N
\left[
(N+1)r_N-N
\right].
$$

另一方面：

$$
P_N
=
A_N
\left[
N-\frac{N-1}{r_{N-1}}
\right].
$$

因此：

$$
\boxed{
P_{N+1}-P_N
=
A_N
\left[
(N+1)r_N
-2N
+
\frac{N-1}{r_{N-1}}
\right].
}
$$

由 $A_N>0$，open-loop 嚴格單調的充要條件是：

$$
\boxed{
(N+1)r_N
+
\frac{N-1}{r_{N-1}}
>
2N.
}
$$

這把單調性問題完全壓到 $\varepsilon_N$ 的相鄰尺度關係。

---

# 4. Open-Loop 無界性

大尺度分支為：

$$
\varepsilon_{\mathrm{asy}}(N)
=
\frac1L
+
\frac{1-\Lambda}{L^2}
+
\frac{\Lambda^2-\Lambda-1}{2L^3},
$$

其中：

$$
L=\ln N,
\qquad
\Lambda=\ln L.
$$

對充分大的 $N$：

$$
\varepsilon_{\mathrm{asy}}(N)>0.
$$

因此 $1+\varepsilon_{\mathrm{asy}}(N)$ 保持正值，乘積遞推不會收斂到有限常數，故：

$$
A_N\to\infty,
$$

並進而：

$$
P_N\to\infty.
$$

所以 open-loop 的主要問題不是無界性，而是 fidelity。

---

# 5. 有限機器審計規格

本輪依保存的附錄 A 實作重建：

- $\varepsilon_{\mathrm{table}}(2\ldots999)$：按原篩法與 finite-difference 規則；
- $\varepsilon_{\mathrm{mid}}$：使用保存係數；
- 測試真實質數：前 $200000$ 個；
- 最大真實質數：

$$
p_{200000}=2750159.
$$

測試：

1. Phase 2 open-loop；
2. 原始 v2.0 one-step closed-loop raw fit；
3. 原始 $6k\pm1$ snapping；
4. square-cell fidelity；
5. candidate primality。

有限計算只作 falsification / diagnostics，不提升為無限域證明。

---

# 6. Open-Loop 審計結果

在：

$$
2\le N\le200000
$$

的有限測試中：

$$
P_N^{\mathrm{OL}}
$$

全部嚴格遞增。

最小觀測增量約為：

$$
1.345866751.
$$

但位置比例為：

| $N$ | $P_N^{\mathrm{OL}}/p_N$ |
|---:|---:|
| $1000$ | 0.790063568 |
| $10000$ | 0.790435160 |
| $100000$ | 0.790450817 |
| $200000$ | 0.790429877 |

可見它快速穩定在約：

$$
\boxed{
0.7904
}
$$

的尺度。

所以它抓到相似的增長形狀，卻失去正確積分常數／尺度校準。

因此：

$$
\boxed{
P^{\mathrm{OL}}
\text{ 不是本文後續採用的 canonical prime-fitting operator。}
}
$$

---

# 7. Open-Loop 失效的原因

$\varepsilon_{\mathrm{full}}(N)$ 原本描述的是：

$$
\log A_N
$$

的有限尺度局部斜率。

把有限尺度斜率直接逐格積分，等價於假設：

$$
\varepsilon_{\mathrm{finite\ difference}}
=
\varepsilon_{\mathrm{exact\ local\ generator}}.
$$

兩者一般不相等。

因此 open-loop 產生：

$$
\text{shape recovery}
+
\text{normalization drift}.
$$

這是 Phase 2 簡化版的根本問題。

---

# 8. 原始 One-Step Closed-Loop 審計

改回保存的原始算法：

$$
A_N
=
\frac1N\sum_{k=1}^Np_k,
$$

$$
\widehat A_{N+1}
=
A_N
\left(
\frac{N+1}{N}
\right)^{1+\varepsilon_{\mathrm{full}}(N)},
$$

$$
\widehat p_{N+1}
=
(N+1)\widehat A_{N+1}
-
NA_N.
$$

在 $1000\le N\le200000$ 對應的預測值上：

| 指標 | 結果 |
|---|---:|
| raw prediction 與真 $p_N$ 位於同一平方胞腔 | 91.0674% |
| $6k\pm1$ snapping 後同平方胞腔 | 91.0684% |
| $\delta_\square(N)<1$ 的比例 | 82.2428% |
| snapped candidate 本身為質數 | 21.7913% |
| snapped candidate 精確等於 $p_N$ | 0.5844% |
| raw absolute error 中位數 | 153.512 |
| raw absolute error P99 | 673.290 |

因此原始 closed-loop fitting 在位置上確實相當準，但：

$$
\text{位置很準}
\not\Rightarrow
\text{輸出本身就是質數}.
$$

單純：

$$
\text{geometric fit}
+
6k\pm1
$$

不能承擔質數性證明。

---

# 9. Phase 2 的 Square-Cell Fidelity 是充分條件，但不是最短路

Phase 2 定義：

$$
\widehat P
\equiv_\square
P
$$

若：

$$
c_\square(\widehat P(N))
=
c_\square(p_N)
$$

對所有 $N$ 成立。

它仍然是一條正確的充分路徑。

但它要求擬合序列和特定第 $N$ 個真質數對齊。

勒讓德其實只需要：

$$
\text{每一個平方胞腔中至少有一個可證明為質數的整數}.
$$

因此接下來改採 fixed-point certificate。

---

# 10. $M6^*$ 精確質數固定點算子

定義：

$$
M6^*
=
\{m>1:
m\equiv\pm1\pmod6\}.
$$

對：

$$
q\in M6^*,
$$

定義：

$$
\boxed{
T_{\mathrm{top}}(q)
=
\min
\{d\in M6^*:d\mid q\}.
}
$$

則：

$$
\boxed{
T_{\mathrm{top}}(q)=q
\iff
q\in\mathbb P\cap M6^*.
}
$$

因此 $T_{\mathrm{top}}$ 可作為非循環 prime certificate operator。

---

# 11. Phase 3 核心新定理：歷史阻礙定理

## 定理 11.1

令：

$$
n\ge2,
$$

且整數 $q$ 滿足：

$$
n^2<q<(n+1)^2
$$

與：

$$
q\in M6^*.
$$

則必有：

$$
\boxed{
T_{\mathrm{top}}(q)=q
}
$$

或：

$$
\boxed{
T_{\mathrm{top}}(q)\le n.
}
$$

## 證明

若 $T_{\mathrm{top}}(q)=q$，第一類成立。

否則 $q$ 具有真因數。令：

$$
d=T_{\mathrm{top}}(q).
$$

則 $d$ 是非平凡因數，因此：

$$
d\le\sqrt q.
$$

由：

$$
q<(n+1)^2
$$

得到：

$$
\sqrt q<n+1.
$$

故：

$$
d<n+1.
$$

因 $d,n$ 為整數：

$$
\boxed{
d\le n.
}
$$

證畢。

---

# 12. 底空間意義

這條定理表示：

$$
\boxed{
\text{local composite failure at scale }n
\Longrightarrow
\text{past obstruction at scale }\le n.
}
$$

也就是第 $n$ 個平方胞腔中的 composite failure，不需要「未來尺度」才能解釋。

它的所有整除證書已經存在於更早的全域歷史底空間。

---

# 13. 歷史阻礙集合

定義：

$$
\mathcal D_n
=
\{
d\in\mathbb Z:
5\le d\le n,\,
d\equiv\pm1\pmod6
\}.
$$

對：

$$
q\in(n^2,(n+1)^2)\cap M6^*,
$$

定義：

$$
\boxed{
\mathcal O_n(q)
=
\{
d\in\mathcal D_n:
d\mid q
\}.
}
$$

由歷史阻礙定理：

$$
\boxed{
q\text{ 為質數}
\iff
\mathcal O_n(q)=\varnothing.
}
$$

---

# 14. 歷史阻礙乘積

定義：

$$
\boxed{
H_n
=
\prod_{\substack{5\le d\le n\\d\equiv\pm1\pmod6}}
d.
}
$$

空乘積定義為：

$$
1.
$$

---

# 15. 歷史互質判準

## 定理 15.1

若：

$$
q\in(n^2,(n+1)^2)\cap M6^*,
$$

則：

$$
\boxed{
q\in\mathbb P
\iff
\gcd(q,H_n)=1.
}
$$

## 證明

若 $q$ 為質數，因 $q>n$，它不可能被任何 $1<d\le n$ 整除，因此：

$$
\gcd(q,H_n)=1.
$$

反之，若 $q$ 為合數，由定理 11.1：

$$
T_{\mathrm{top}}(q)\le n.
$$

且：

$$
T_{\mathrm{top}}(q)\in M6^*.
$$

所以：

$$
T_{\mathrm{top}}(q)\mid H_n
$$

與：

$$
T_{\mathrm{top}}(q)\mid q.
$$

故：

$$
\gcd(q,H_n)>1.
$$

證畢。

---

# 16. 歷史乘積的局部更新律

$H_n$ 具有遞推：

$$
H_2=1,
$$

以及：

$$
\boxed{
H_{n+1}
=
H_n
\cdot
\begin{cases}
n+1,
&
n+1\equiv\pm1\pmod6,
\\[4pt]
1,
&
\text{otherwise}.
\end{cases}
}
$$

因此歷史阻礙本身也是：

$$
\text{global state}
\longrightarrow
\text{local update}.
$$

---

# 17. 正典平方胞腔投影

對每個：

$$
n\ge2,
$$

先讓幾何／歪度／其他擬合模型產生實值中心：

$$
x_n.
$$

再定義確定性胞腔投影：

$$
J_n(x_n)
\in
A_n\cap M6^*.
$$

例如：

$$
J_n(x)
=
\operatorname*{argmin}_{m\in A_n\cap M6^*}
|m-x|,
$$

並固定 deterministic tie-break。

定義：

$$
\boxed{
F_\square(n)
=
J_n(x_n).
}
$$

如此：

$$
\boxed{
F_\square(n)
\in
(n^2,(n+1)^2)\cap M6^*
}
$$

由構造自動成立。

---

# 18. 真正的 Prime-Fitting Operator 判準

此時不需要與第 $N$ 個真質數比較。

只需要證明：

$$
\boxed{
T_{\mathrm{top}}
\circ
F_\square
=
F_\square.
}
$$

亦即：

$$
\boxed{
T_{\mathrm{top}}(F_\square(n))
=
F_\square(n)
\quad
\forall n\ge2.
}
$$

這就是「質數擬合算子就是質數擬合算子」的 fixed-point 版本。

---

# 19. 等價歷史互質版本

由定理 15.1：

$$
T_{\mathrm{top}}(F_\square(n))
=
F_\square(n)
$$

等價於：

$$
\boxed{
\gcd
\left(
F_\square(n),
H_n
\right)
=
1.
}
$$

因此主證明義務變為：

$$
\boxed{
\forall n\ge2,
\qquad
\gcd
\left(
F_\square(n),
H_n
\right)
=
1.
}
$$

---

# 20. Phase 3 主充分定理

## 定理 20.1

若存在：

$$
F_\square:
\mathbb Z_{\ge2}
\to
\mathbb Z
$$

使所有 $n\ge2$ 滿足：

$$
F_\square(n)
\in
(n^2,(n+1)^2)\cap M6^*
$$

與：

$$
\gcd
\left(
F_\square(n),
H_n
\right)=1,
$$

則勒讓德猜想成立。

## 證明

由定理 15.1，$F_\square(n)$ 為質數。

又：

$$
n^2
<
F_\square(n)
<
(n+1)^2.
$$

故對所有 $n\ge2$，平方胞腔中存在質數。

$n=1$ 時：

$$
2,3\in(1,4).
$$

因此：

$$
\forall n\ge1,
\qquad
\exists p\in\mathbb P:
n^2<p<(n+1)^2.
$$

證畢。

---

# 21. Fixed-Point Residual

定義：

$$
\boxed{
R_\square(n)
=
F_\square(n)
-
T_{\mathrm{top}}(F_\square(n)).
}
$$

因：

$$
T_{\mathrm{top}}(q)\le q,
$$

所以：

$$
R_\square(n)\ge0.
$$

且：

$$
\boxed{
R_\square(n)=0
\iff
F_\square(n)\text{ 為質數}.
}
$$

因此整個綱領可以壓縮成：

$$
\boxed{
R_\square(n)\equiv0.
}
$$

---

# 22. Local–Global Reformulation

全域歷史狀態：

$$
H_n
$$

累積所有尺度 $\le n$ 的乘法阻礙。

局部擬合輸出：

$$
F_\square(n)
$$

位於：

$$
(n^2,(n+1)^2).
$$

兩者真正交會於：

$$
\boxed{
\gcd(F_\square(n),H_n).
}
$$

所以問題被改寫為：

$$
\boxed{
\text{global historical obstruction}
\cap
\text{local fitted candidate}.
}
$$

---

# 23. 沒有被消失的核心困難

必須明確保留：

$$
\gcd(F_\square(n),H_n)=1
$$

對所有 $n$ 的證明仍是非平凡全域義務。

本文沒有把勒讓德「定義掉」。

它只是把：

$$
\forall n\,\exists p
$$

轉化成：

$$
\forall n:
\quad
\gcd(F_\square(n),H_n)=1.
$$

這個形式值得研究，因為：

1. $F_\square$ 可由既有 fitting theory 構造；
2. $H_n$ 有單純局部更新律；
3. composite failure 必然由更早尺度見證；
4. 問題變成顯式算子—整除相容性。

---

# 24. Phase 4 入口：Prime-Fit Obstruction Field

下一階段直接研究：

$$
F_\square(n)\bmod d
$$

對：

$$
d\in\mathcal D_n.
$$

定義：

$$
\boxed{
\mathfrak R(n,d)
=
F_\square(n)\bmod d.
}
$$

其定義域：

$$
\boxed{
\mathcal O
=
\{(n,d):
n\ge2,\,
d\in M6^*,\,
5\le d\le n\}.
}
$$

由：

$$
\gcd(F_\square(n),H_n)=1
$$

可知最終目標等價於：

$$
\boxed{
\mathfrak R(n,d)\neq0
\quad
\forall(n,d)\in\mathcal O.
}
$$

如果能從 fitting operator 的全域結構推出這個 nonzero invariant，勒讓德即閉合。

---

# 25. Phase 3 狀態

```text
Legendre Base-Space Program
Phase 3 — Operator Audit and Historical Obstruction

epsilon_full source audit:                 COMPLETE
Phase-2 open-loop rollout:                 FALSIFIED AS CANONICAL FITTER
Open-loop monotonic criterion:             DERIVED
Open-loop finite monotonicity:             PASS to N=200000
Open-loop normalization fidelity:          FAIL
Original closed-loop operator:             RESTORED
Square-cell finite fidelity audit:         COMPLETE
6k±1 alone as prime certificate:           FAIL
T_top exact prime certificate:             ADOPTED
Past-factor obstruction theorem:           PROVED
Historical obstruction set:                DEFINED
Historical product H_n:                    DEFINED
Local coprimality prime criterion:          PROVED
Fixed-point fitting criterion:             PROVED EQUIVALENT
Legendre sufficient theorem:               PROVED
Remaining global obligation:               gcd(F_square(n), H_n)=1
Legendre proof status:                     OPEN
Next phase:                                OBSTRUCTION RESIDUE FIELD
```
