# 從浮點近似到精確有理閉合

## From Floating-Point Approximation to Exact Rational Closure

**系列：完美長方體的全域閉合理論（Global Closure Theory of the Perfect Cuboid）**  
**篇次：05 / 08**  
**狀態：研究前導稿 / Phase 0 — Conceptual Closure**  
**日期：2026-09-28**

---

## 摘要

前四篇依序建立了 Perfect Cuboid 的問題重述、連續 shape space、共同初態與約束誘導分化，以及 Radix–Carry Global Closure。這些結構允許我們在連續空間與多進位表示中產生大量低 residual 候選，但仍留下最關鍵的一道界線：

$$
\text{numerically close}
\neq
\text{mathematically exact}.
$$

本文建立一條從浮點近似到精確有理閉合的正式轉換流程。首先區分 machine floating point、arbitrary-precision floating point、interval enclosure、exact rational arithmetic 與 symbolic identity。接著利用尺度商空間，把候選狀態轉為穩定的 shape ratios，再依候選複雜度、分母高度與誤差界進行 continued-fraction reconstruction、simultaneous rational reconstruction、lattice-assisted reconstruction 或 radix-supported reconstruction。

本文強調：任何近似候選，即使滿足

$$
\|F(X)\|<10^{-N}
$$

也不能被宣稱為 Perfect Cuboid。正式接受條件必須是存在

$$
Q\in\mathbb Q_{>0}^{7}
$$

使：

$$
F(Q)=0
$$

以 exact arithmetic 精確成立。若此條件成立，清分母即可得到整數 Perfect Cuboid。

本文因此提出一個分層 certification pipeline：

$$
\text{Numerical Candidate}
\rightarrow
\text{Conditioning Check}
\rightarrow
\text{Interval Isolation}
\rightarrow
\text{Rational Reconstruction}
\rightarrow
\text{Exact Closure Verification}
\rightarrow
\text{Primitive Integer Certificate}.
$$

在此框架中，浮點運算只負責「發現」，有理重建負責「提出候選」，而 exact arithmetic 才負責「證明」。本文同時建立 false-positive rejection、height-aware search、cross-radix confirmation 與 canonical certificate format，作為後續第一顯現問題的直接前置條件。

---

## 1. 近似不是答案

設：

$$
X=
(a,b,c,d,e,f,g).
$$

Perfect Cuboid 的四個 exact constraints 為：

$$
a^2+b^2-d^2=0,
$$

$$
a^2+c^2-e^2=0,
$$

$$
b^2+c^2-f^2=0,
$$

$$
a^2+b^2+c^2-g^2=0.
$$

定義：

$$
F(X)=
\begin{pmatrix}
a^2+b^2-d^2\\
a^2+c^2-e^2\\
b^2+c^2-f^2\\
a^2+b^2+c^2-g^2
\end{pmatrix}.
$$

在數值計算中，常見結果可能是：

$$
\|F(X)\|_2
=
10^{-20},
$$

或：

$$
10^{-100},
$$

甚至：

$$
10^{-1000}.
$$

但只要：

$$
F(X)\neq0,
$$

它就不是 Perfect Cuboid。

所以本系列採用最嚴格的界線：

$$
\boxed{
\text{approximate closure}
\neq
\text{exact closure}
}
$$

---

## 2. 五種數值層級

後續實驗必須明確標註候選目前位於哪個數值層。

### Level N0：Machine Floating Point

例如 IEEE-754 binary64。

可抽象寫成：

$$
x_{\mathrm{fl}}
=
m2^e,
$$

其中 mantissa 長度有限。

其特性是：

- 快；
- 有 rounding；
- 每一步運算可能累積誤差；
- 所有有限 machine values 都是二進位有理數；
- 不能將 machine representation 誤認為 underlying mathematical value。

### Level N1：Arbitrary-Precision Floating Point

例如使用：

$$
p
$$

bits 或：

$$
D
$$

decimal digits 的高精度數值。

其優點是可以控制 precision：

$$
p\rightarrow2p\rightarrow4p.
$$

但仍然只是近似。

所以：

$$
\boxed{
\text{high precision}
\neq
\text{exactness}
}
$$

### Level N2：Interval / Ball Arithmetic

不只保存中心值：

$$
\hat x,
$$

還保存誤差界：

$$
x\in[\hat x-r,\hat x+r].
$$

或使用 ball：

$$
x\in B(\hat x,r).
$$

這允許我們證明：

$$
x
$$

一定落在某範圍，

而不是只相信打印出的 digits。

### Level N3：Exact Rational Arithmetic

將：

$$
x
$$

表示為：

$$
x=\frac pq,
$$

其中：

$$
p,q\in\mathbb Z,
$$

$$
q>0,
$$

且通常要求：

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

此時加減乘除都可以 exact 執行。

### Level N4：Exact Algebraic / Symbolic Identity

某些中間量也可能以代數數形式表示，例如：

$$
x=\sqrt2.
$$

但 Perfect Cuboid 最終需要的是：

$$
X\in\mathbb Q^7
$$

或其整數縮放。

所以 algebraic exactness 雖然比 float 強，但仍不等於 rational closure。

---

## 3. 浮點數天然是有理數，但這不代表問題被解掉

一個 binary floating-point number 本身確實可以精確寫成：

$$
x_{\mathrm{fl}}=m2^e.
$$

所以它屬於：

$$
\mathbb Z[1/2].
$$

但是：

$$
x_{\mathrm{fl}}
$$

通常只是某個理想實數：

$$
x
$$

的近似。

例如：

$$
\operatorname{fl}(\sqrt2)
$$

本身是有理數，

但：

$$
\sqrt2
$$

不是有理數。

因此：

$$
\boxed{
\operatorname{fl}(x)\in\mathbb Q
}
$$

不能推出：

$$
\boxed{
x\in\mathbb Q
}
$$

這一點對本系列尤其重要。

因為若 constraint dynamics 以 float 執行，

最後得到的每一個數字表面上都可以被寫成有限二進位有理數，

但那只說明電腦資料型別是有限的。

---

## 4. 殘差在縮放下如何變化

由於：

$$
F(\lambda X)=\lambda^2F(X),
$$

所以若：

$$
F(X)=\varepsilon,
$$

則：

$$
F(\lambda X)=\lambda^2\varepsilon.
$$

因此把近似 shape 放大：

$$
X\mapsto\lambda X
$$

不會讓 residual 自動消失。

相反地，它通常會被放大。

這說明：

$$
\boxed{
\text{scale-up cannot exactify an approximate solution}
}
$$

只有在：

$$
F(X)=0
$$

精確成立時，

縮放才保持 exact closure。

---

## 5. 尺度商空間應先於有理重建

若直接對：

$$
(a,b,c,d,e,f,g)
$$

做 rational reconstruction，

整體尺度可能造成巨大且無意義的分母。

例如：

$$
X
$$

與：

$$
10^{100}X
$$

代表同一 shape，

但 numerically 看起來完全不同。

所以應先固定 gauge。

例如：

$$
g=1.
$$

定義：

$$
x=\frac ag,
$$

$$
y=\frac bg,
$$

$$
z=\frac cg,
$$

$$
u=\frac dg,
$$

$$
v=\frac eg,
$$

$$
w=\frac fg.
$$

此時：

$$
x^2+y^2+z^2=1.
$$

真正要重建的是：

$$
Q=
(x,y,z,u,v,w)\in\mathbb Q^6.
$$

如果成功，

再統一清分母得到整數解。

因此：

$$
\boxed{
\text{reconstruct shape first}
\rightarrow
\text{scale later}
}
$$

比直接重建七個任意尺度數值更穩定。

---

## 6. 最小候選資料

一個 numerical candidate 至少應保存：

$$
\hat X,
$$

precision：

$$
P,
$$

residual：

$$
R=\|F(\hat X)\|,
$$

normalization：

$$
\mathcal N,
$$

以及計算誤差界：

$$
\delta.
$$

因此候選紀錄應至少是：

$$
C=
(\hat X,P,R,\mathcal N,\delta).
$$

若缺少：

$$
\delta,
$$

則很多 printed digits 可能沒有可信度。

如果只知道：

$$
\hat x=0.123456789\ldots
$$

卻不知道：

$$
|\hat x-x|
$$

的上界，

就很難做可靠 rational reconstruction。

---

## 7. Precision ladder

任何高品質候選都應先經過 precision ladder。

例如：

$$
P_1=128,
$$

$$
P_2=256,
$$

$$
P_3=512,
$$

$$
P_4=1024
$$

bits。

分別得到：

$$
\hat X^{(P_1)},
\hat X^{(P_2)},
\hat X^{(P_3)},
\hat X^{(P_4)}.
$$

若候選是真正接近一個固定 mathematical state，

則前：

$$
k
$$

個可信 digits 應隨 precision 增加而穩定。

例如：

$$
\hat x^{(128)}
=
0.12345678901234\ldots
$$

$$
\hat x^{(256)}
=
0.12345678901234\ldots
$$

$$
\hat x^{(512)}
=
0.12345678901234\ldots
$$

但如果 digits 隨 precision 大幅漂移，

就可能是：

- 數值不穩定；
- ill-conditioned；
- 多重近鄰解；
- 優化器尚未收斂；
- 或假候選。

---

## 8. Residual ladder

除了 value stability，

還需要觀察：

$$
R(P)
=
\|F(\hat X^{(P)})\|.
$$

理想情況下，

precision 增加時：

$$
R(P)
$$

應同步下降。

如果：

$$
P
$$

增加很多，

但 residual 停在：

$$
10^{-20}
$$

附近不再下降，

那更像是 optimizer floor，

而不是某個 exact root 的高精度 approximation。

因此：

$$
\boxed{
\text{digit stability}
+
\text{residual scaling}
}
$$

應一起看。

---

## 9. Conditioning

即使：

$$
F(\hat X)
$$

很小，

如果 Jacobian：

$$
J_F(\hat X)
$$

非常病態，

則小 residual 可能對應很大的 state error。

在線性近似下：

$$
F(X+\Delta X)
\approx
F(X)
+
J_F(X)\Delta X.
$$

若：

$$
J_F
$$

在 relevant subspace 的最小奇異值很小，

則：

$$
\Delta X
$$

可能很大，

但：

$$
F
$$

只改變很少。

因此應計算某種 condition indicator：

$$
\kappa.
$$

在已移除尺度 gauge 後，

可以研究 constrained Jacobian：

$$
J_{\mathrm{shape}}.
$$

若：

$$
\sigma_{\min}(J_{\mathrm{shape}})
$$

接近零，

則候選需要更高 precision 與更嚴格 interval isolation。

---

## 10. 為什麼 shape coordinate 更適合 conditioning

在七維原始空間中，

scale direction：

$$
X
$$

本身是天然冗餘方向。

所以：

$$
J_F
$$

包含與齊次性相關的結構，

直接用其 condition number 可能混入 gauge artifact。

因此更合理的是：

1. 先固定：
   $$
   g=1;
   $$
2. 或限制：
   $$
   a^2+b^2+c^2=1;
   $$
3. 再研究 tangent space 上的 Jacobian。

這樣得到的 conditioning 才反映 shape closure，

而不是整體尺度。

---

## 11. Interval arithmetic 的角色

假設我們得到高精度 approximation：

$$
\hat x.
$$

建立 enclosure：

$$
x\in I_x.
$$

例如：

$$
I_x
=
[\hat x-r,\hat x+r].
$$

對所有變數建立 interval vector：

$$
I_X.
$$

再用 interval arithmetic 評估：

$$
F(I_X).
$$

如果某一 component interval 完全不包含：

$$
0,
$$

則可以立即排除候選。

也就是：

$$
0\notin F_i(I_X)
\Rightarrow
\text{candidate invalid}.
$$

如果所有 component 都包含：

$$
0,
$$

則只能說：

$$
\text{not yet excluded}.
$$

不能直接說存在 exact root。

---

## 12. Interval isolation

更強的目標是建立一個小 box：

$$
I=
I_1\times\cdots\times I_n
$$

並使用 interval Newton、Krawczyk operator 或其他 certified root-isolation 方法，

證明：

$$
I
$$

中存在唯一 root。

若成功，

就得到：

$$
X^\ast\in I
$$

且：

$$
F(X^\ast)=0.
$$

這仍只證明：

$$
X^\ast\in\mathbb R^n.
$$

下一步才是：

> 這個唯一 root 是否其實是有理點？

所以：

$$
\boxed{
\text{certified real root}
\neq
\text{certified rational root}
}
$$

---

## 13. Rational reconstruction 的核心問題

給定一個高精度近似：

$$
\hat x,
$$

希望找到：

$$
\frac pq
$$

使：

$$
\left|
\hat x-\frac pq
\right|
$$

非常小，

且：

$$
q
$$

不太大。

這本質上是一個：

$$
\boxed{
\text{approximation quality}
\quad\text{vs}\quad
\text{height}
}
$$

的平衡問題。

定義：

$$
H\left(\frac pq\right)
=
\max(|p|,q).
$$

那 rational reconstruction 可以描述為：

$$
\min_{p,q}
\left|
\hat x-\frac pq
\right|
$$

subject to：

$$
H\left(\frac pq\right)\le H_{\max}.
$$

---

## 14. Continued fractions

對單一實數：

$$
x,
$$

continued fraction 是最自然的低分母有理逼近工具之一。

寫：

$$
x=[a_0;a_1,a_2,\ldots].
$$

其 convergents：

$$
\frac{p_n}{q_n}
$$

具有很強的最佳逼近性。

一個經典充分條件是：

如果：

$$
\left|
x-\frac pq
\right|
<
\frac{1}{2q^2},
$$

且：

$$
\gcd(p,q)=1,
$$

則：

$$
\frac pq
$$

必然是：

$$
x
$$

continued fraction 的某個 convergent。

因此如果我們已有誤差界：

$$
|x-\hat x|\le\delta,
$$

又發現：

$$
\frac pq
$$

滿足足夠強的 separation condition，

就可以大幅提高 reconstruction 的可信度。

---

## 15. 只有近似值還不夠，需要 uniqueness margin

假設：

$$
\frac pq
$$

是候選 reconstruction。

我們真正需要知道的是：

> 在允許高度範圍內，是否還有另一個不同有理數同樣落在誤差區間中？

如果：

$$
\frac{p_1}{q_1}
\neq
\frac{p_2}{q_2},
$$

且：

$$
q_1,q_2\le Q,
$$

則：

$$
\left|
\frac{p_1}{q_1}
-
\frac{p_2}{q_2}
\right|
\ge
\frac{1}{q_1q_2}
\ge
\frac{1}{Q^2}.
$$

因此若 interval width 小於：

$$
\frac{1}{Q^2},
$$

就能在 bounded denominator class 中得到 uniqueness。

更保守地，

若 radius：

$$
r<
\frac{1}{2Q^2},
$$

則一個 interval：

$$
[\hat x-r,\hat x+r]
$$

最多包含一個 denominator：

$$
q\le Q
$$

的 reduced rational。

這是非常實用的 certification principle。

---

## 16. Height-aware rational isolation

因此對每個候選分量，

可以設定：

$$
Q_{\max}.
$$

若 interval：

$$
I_x
$$

的寬度足夠小，

即可確保：

$$
I_x
$$

中至多存在一個：

$$
q\le Q_{\max}
$$

的有理數。

如果 continued fraction 又找到：

$$
\frac pq\in I_x,
$$

則：

$$
\frac pq
$$

就是該高度範圍內唯一候選。

這不證明：

$$
x=\frac pq
$$

除非我們另有理由知道 exact root 必須具有：

$$
q\le Q_{\max}.
$$

所以 denominator bound 是 certification 的關鍵之一。

---

## 17. 沒有先驗分母上界時，reconstruction 只能提出候選

如果不知道真正解的 denominator：

$$
q
$$

有多大，

即使：

$$
\hat x
$$

有一千位小數，

也可能存在一個超大分母有理數極其接近它。

因此：

$$
\boxed{
\text{high-precision rational fit}
}
$$

本身不能證明 underlying exact root 是那個 rational。

真正可接受的方法是：

1. 從 approximation 猜出 rational candidate；
2. 直接把 candidate 帶回 exact equations；
3. 若 exact equations 成立，立即完成；
4. 若不成立，candidate 丟棄。

這樣就不需要證明 numerical root 本身等於 rational candidate。

---

## 18. Exact verification 是最終裁判

假設 reconstruction 得到：

$$
Q=
\left(
\frac{p_a}{q_a},
\frac{p_b}{q_b},
\frac{p_c}{q_c},
\frac{p_d}{q_d},
\frac{p_e}{q_e},
\frac{p_f}{q_f},
\frac{p_g}{q_g}
\right).
$$

使用 exact integer arithmetic 計算：

$$
a^2+b^2-d^2,
$$

$$
a^2+c^2-e^2,
$$

$$
b^2+c^2-f^2,
$$

$$
a^2+b^2+c^2-g^2.
$$

若四項全部精確為：

$$
0,
$$

則：

$$
Q
$$

就是 exact rational Perfect Cuboid。

沒有 tolerance。

沒有：

$$
10^{-100}
$$

門檻。

只有：

$$
\boxed{
0
}
$$

與：

$$
\boxed{
\neq0
}
$$

---

## 19. 清分母

令：

$$
L=
\operatorname{lcm}
(q_a,q_b,q_c,q_d,q_e,q_f,q_g).
$$

定義：

$$
A=La,
$$

$$
B=Lb,
$$

$$
C=Lc,
$$

$$
D=Ld,
$$

$$
E=Le,
$$

$$
F=Lf,
$$

$$
G=Lg.
$$

則：

$$
A,B,C,D,E,F,G\in\mathbb Z_{>0}.
$$

又因齊次性：

$$
A^2+B^2=D^2,
$$

$$
A^2+C^2=E^2,
$$

$$
B^2+C^2=F^2,
$$

$$
A^2+B^2+C^2=G^2.
$$

所以：

$$
\boxed{
\text{exact rational closure}
\Rightarrow
\text{exact integer closure}
}
$$

---

## 20. Primitive reduction

取得整數解後，

令：

$$
h=
\gcd(A,B,C,D,E,F,G).
$$

定義：

$$
P=
\left(
\frac Ah,
\frac Bh,
\frac Ch,
\frac Dh,
\frac Eh,
\frac Fh,
\frac Gh
\right).
$$

則：

$$
\gcd(P)=1.
$$

因此：

$$
P
$$

為 primitive representative。

這是後續第 6 篇「第一顯現」的正式輸入。

---

## 21. 為什麼只重建三條邊可能更好

在 normalized shape 中，

其餘量由：

$$
x,y,z
$$

決定。

如果先 reconstruct：

$$
x,y,z\in\mathbb Q,
$$

則可以 exact 計算：

$$
x^2+y^2,
$$

$$
x^2+z^2,
$$

$$
y^2+z^2.
$$

接著直接檢查它們是否為 rational squares。

也就是問：

$$
x^2+y^2=r_1^2,
$$

$$
x^2+z^2=r_2^2,
$$

$$
y^2+z^2=r_3^2
$$

是否存在：

$$
r_1,r_2,r_3\in\mathbb Q.
$$

因此可以減少 reconstruction 維度。

這給出兩種策略：

### Strategy A：Full-vector reconstruction

直接 reconstruct：

$$
(x,y,z,u,v,w).
$$

### Strategy B：Minimal-shape reconstruction

只 reconstruct：

$$
(x,y,z),
$$

再 exact 檢查三個 square conditions。

Strategy B 通常更乾淨。

---

## 22. Rational square test

對：

$$
r=\frac pq
$$

且：

$$
\gcd(p,q)=1,
$$

要判斷：

$$
r
$$

是否為：

$$
\mathbb Q
$$

中的平方，

等價於檢查：

$$
p
$$

與：

$$
q
$$

是否都是整數平方。

也就是：

$$
r\in\mathbb Q^2
$$

當且僅當存在：

$$
m,n\in\mathbb Z
$$

使：

$$
p=m^2,
$$

$$
q=n^2.
$$

所以對 reconstructed：

$$
x,y,z\in\mathbb Q,
$$

三個 pairwise square checks 可以完全用整數算術完成。

---

## 23. 利用空間對角線正規化

若：

$$
g=1,
$$

則還要求：

$$
x^2+y^2+z^2=1.
$$

所以最小 exact certificate 可以只保存：

$$
x,y,z\in\mathbb Q_{>0},
$$

並驗證：

$$
x^2+y^2+z^2=1,
$$

$$
x^2+y^2\in\mathbb Q^2,
$$

$$
x^2+z^2\in\mathbb Q^2,
$$

$$
y^2+z^2\in\mathbb Q^2.
$$

其餘：

$$
u,v,w
$$

由平方根 exact 取得。

因此第 5 篇以後，

最小 rational target 可以定義為：

$$
\boxed{
Q_{\min}=(x,y,z)
}
$$

而不是七維向量。

---

## 24. Simultaneous rational reconstruction

如果：

$$
x,y,z
$$

可能共享某個共同 denominator：

$$
q,
$$

則可以寫：

$$
x\approx\frac{p_1}{q},
$$

$$
y\approx\frac{p_2}{q},
$$

$$
z\approx\frac{p_3}{q}.
$$

這比三個完全獨立的 denominators 更有結構。

問題變成：

$$
q\hat x\approx p_1,
$$

$$
q\hat y\approx p_2,
$$

$$
q\hat z\approx p_3.
$$

因此可搜尋：

$$
q
$$

使：

$$
(q\hat x,q\hat y,q\hat z)
$$

同時接近整數格點。

這是一個 simultaneous Diophantine approximation problem。

---

## 25. Lattice-assisted reconstruction

對高維 simultaneous approximation，

可以建立格點問題。

例如希望找到：

$$
(q,p_1,p_2,p_3)
$$

使：

$$
q\hat x-p_1,
$$

$$
q\hat y-p_2,
$$

$$
q\hat z-p_3
$$

都很小。

這類問題可以轉化為 lattice basis reduction。

LLL 類方法可以作為候選生成器。

但仍必須遵守：

$$
\boxed{
\text{LLL candidate}
\neq
\text{proof}
}
$$

最終仍然是：

$$
F(Q)=0
$$

的 exact test 決定真假。

---

## 26. Relation reconstruction

另一種路徑不是直接 reconstruct：

$$
x,y,z
$$

而是找近似整數關係。

例如對某個近似向量：

$$
(1,x,y,z)
$$

尋找：

$$
n_0+n_1x+n_2y+n_3z\approx0.
$$

PSLQ 類方法可以探索是否存在低高度 algebraic / linear relation。

這可能幫助發現：

- hidden rational ratio；
- low-degree algebraic structure；
- shared denominator；
- parameterization。

但如果最終目標仍是 rational closure，

PSLQ 只是結構發現工具。

---

## 27. Radix-supported reconstruction

由第 4 篇，如果 candidate 在 base：

$$
B
$$

中疑似具有有限 representation，

可嘗試：

$$
x=\frac{m}{B^k}.
$$

給定：

$$
k\le K,
$$

只需搜尋：

$$
m\approx B^k\hat x.
$$

如果：

$$
B^k\hat x
$$

極接近整數，

則候選為：

$$
\frac{m}{B^k}.
$$

這比一般 continued fraction 更窄，

因為 denominator 被限制在：

$$
B^k.
$$

所以 radix observation 可以提供 reconstruction prior。

---

## 28. Cross-radix reconstruction

假設同一 candidate 同時在：

$$
B_1
$$

與：

$$
B_2
$$

下顯示低 complexity。

如果：

$$
\gcd(B_1,B_2)=1,
$$

又能 exact reconstruct：

$$
x\in\mathbb Z[1/B_1]
$$

以及：

$$
x\in\mathbb Z[1/B_2],
$$

則：

$$
x\in\mathbb Z.
$$

這可以用來做強力 denominator elimination。

對 shape ratios 而言，

它不一定直接要求：

$$
x
$$

本身為整數，

因為：

$$
g=1
$$

的 gauge 已固定尺度。

因此 cross-radix intersection 更適合用在某個共同 scale 後的 state。

例如選：

$$
\lambda
$$

後研究：

$$
\lambda X.
$$

---

## 29. Scale search 與 rational reconstruction 耦合

一個 rational shape：

$$
X
$$

可以有很多不同 scale。

某些 scale 下 denominator 很複雜，

另一些 scale 下則非常簡單。

因此 reconstruction 不應只問：

$$
X\in\mathbb Q^n?
$$

也可問：

> 是否存在一個簡單尺度 $\lambda$，使 $\lambda X$ 具有低高度有理表示？

形式上：

$$
C(X)
=
\min_{\lambda>0}
H(\lambda X).
$$

若限制：

$$
\lambda\in\mathbb Q_{>0},
$$

則：

$$
C
$$

可以視為 shape 的 arithmetic complexity。

primitive integer representative 其實就是這種 minimization 的 canonical endpoint。

---

## 30. Ratio-first reconstruction

由於 scale 無關，

一種自然策略是直接 reconstruct ratios：

$$
r=\frac ba,
$$

$$
s=\frac ca.
$$

若：

$$
r,s\in\mathbb Q,
$$

則可令：

$$
a=1,
$$

$$
b=r,
$$

$$
c=s.
$$

接著檢查：

$$
1+r^2,
$$

$$
1+s^2,
$$

$$
r^2+s^2,
$$

$$
1+r^2+s^2
$$

是否全部為 rational squares。

因此原問題可以進一步縮成：

$$
\boxed{
(r,s)\in\mathbb Q_{>0}^{2}
}
$$

滿足：

$$
1+r^2\in\mathbb Q^2,
$$

$$
1+s^2\in\mathbb Q^2,
$$

$$
r^2+s^2\in\mathbb Q^2,
$$

$$
1+r^2+s^2\in\mathbb Q^2.
$$

這是非常適合 numerical-to-rational reconstruction 的二維表示。

---

## 31. 比值表示與第一篇的等價性

若：

$$
r=\frac ba,
$$

$$
s=\frac ca,
$$

並找到 exact rational solution，

設：

$$
r=\frac pq,
$$

$$
s=\frac uv.
$$

取：

$$
a=qv
$$

即可使：

$$
b=pv,
$$

$$
c=uq.
$$

全部為整數。

若四個平方條件也成立，

則所有對角線可再清分母得到整數。

所以 ratio-space reconstruction 是 fully equivalent 的，

不是近似替代品。

---

## 32. False Positive Type I：optimizer illusion

某些 optimizer 會將 residual 壓得非常小，

但實際收斂到：

$$
X_P
$$

隨 precision：

$$
P
$$

而漂移。

判斷方式：

$$
X_{128},
X_{256},
X_{512},
X_{1024}
$$

若沒有穩定到同一 limiting state，

則不能進入 rational reconstruction。

---

## 33. False Positive Type II：floating cancellation

例如：

$$
a^2+b^2
$$

與：

$$
d^2
$$

都是巨大數，

但兩者相減後因 rounding 顯示：

$$
0.
$$

這是 catastrophic cancellation。

因此 residual evaluation 應至少使用：

- higher precision；
- compensated methods；
- interval arithmetic；
- 或直接 exact arithmetic 對候選重驗。

---

## 34. False Positive Type III：overfitted rational approximation

任何實數都可以被有理數任意逼近。

因此若允許：

$$
q
$$

任意大，

一定可以找到極好的：

$$
\frac pq.
$$

所以：

$$
\left|
x-\frac pq
\right|
\ll1
$$

不是特殊證據。

真正重要的是：

$$
\boxed{
\text{error relative to denominator height}
}
$$

例如比較：

$$
q^2\left|x-\frac pq\right|.
$$

若沒有 height penalty，

rational reconstruction 幾乎沒有辨識力。

---

## 35. False Positive Type IV：independent reconstruction inconsistency

假設分別 reconstruct：

$$
a,b,c,d,e,f,g.
$$

每一個單獨看都很接近某個低分母有理數，

但共同代回後：

$$
F(Q)\neq0.
$$

那就全部拒絕。

因此不能：

> 每個數字看起來都很漂亮，所以整體大概對。

全域一致性必須 exact 驗證。

---

## 36. False Positive Type V：square-root branch confusion

如果：

$$
d^2=a^2+b^2
$$

exact 成立，

還需要：

$$
d>0.
$$

雖然幾何上取正根是自然的，

但 symbolic pipeline 應明確記錄 positivity。

因此 certificate 必須包含：

$$
a,b,c,d,e,f,g>0.
$$

不能只保存平方等式。

---

## 37. False Positive Type VI：degenerate zero solution

$$
X=0
$$

精確滿足四個方程。

所以 exact verification 還必須檢查：

$$
abc>0.
$$

更嚴格地：

$$
a,b,c,d,e,f,g\in\mathbb Q_{>0}.
$$

避免把 degenerate algebraic solution 誤認為 cuboid。

---

## 38. False Positive Type VII：duplicate scale orbit

若已找到：

$$
P,
$$

則：

$$
2P,
3P,
100P
$$

不應被記成新的 primitive solution。

所以每個 exact integer candidate 都要：

1. 取：
   $$
   h=\gcd(P);
   $$
2. 除以：
   $$
   h;
   $$
3. 依：
   $$
   a\le b\le c
   $$
   做 canonical permutation。

最後再 hash canonical tuple。

---

## 39. Exact certificate format

若找到 candidate，

正式證書至少應包含：

### 39.1 Primitive edges

$$
(a,b,c).
$$

### 39.2 Face diagonals

$$
(d,e,f).
$$

### 39.3 Space diagonal

$$
g.
$$

### 39.4 Primitive condition

$$
\gcd(a,b,c,d,e,f,g)=1.
$$

### 39.5 Ordering

例如：

$$
a\le b\le c.
$$

### 39.6 Exact identities

$$
a^2+b^2=d^2,
$$

$$
a^2+c^2=e^2,
$$

$$
b^2+c^2=f^2,
$$

$$
a^2+b^2+c^2=g^2.
$$

### 39.7 Independent recomputation

最好由至少兩個獨立 exact implementations 驗證。

---

## 40. Minimal certificate

其實最小證書甚至只需要：

$$
(a,b,c).
$$

因為可以 exact 計算：

$$
d^2=a^2+b^2,
$$

$$
e^2=a^2+c^2,
$$

$$
f^2=b^2+c^2,
$$

$$
g^2=a^2+b^2+c^2.
$$

然後檢查四個右側是否為 perfect squares。

所以真正最精簡的 integer certificate 是：

$$
\boxed{
(a,b,c)
}
$$

加上四個 perfect-square verification。

其餘量只是方便閱讀。

---

## 41. Perfect-square test

對正整數：

$$
N,
$$

計算 integer square root：

$$
r=\lfloor\sqrt N\rfloor.
$$

然後 exact 檢查：

$$
r^2=N.
$$

如果成立，

則：

$$
N
$$

為平方。

不需要浮點：

$$
\sqrt N.
$$

所以最終整數 certificate 可以完全避免浮點。

---

## 42. Rational certificate 也可以完全整數化

假設：

$$
x=\frac{p_x}{q},
$$

$$
y=\frac{p_y}{q},
$$

$$
z=\frac{p_z}{q}.
$$

則：

$$
x^2+y^2+z^2=1
$$

等價於：

$$
p_x^2+p_y^2+p_z^2=q^2.
$$

而：

$$
x^2+y^2\in\mathbb Q^2
$$

等價於存在整數：

$$
r_{xy}
$$

使：

$$
p_x^2+p_y^2=r_{xy}^2.
$$

因此 common-denominator rational certificate 可以直接轉成：

$$
\boxed{
\text{integer polynomial identities}
}
$$

這再次說明：

> numerical discovery 可以很自由，但最終證書應盡可能回到整數算術。

---

## 43. Candidate ranking

在正式搜尋中，

可能一次得到大量 numerical candidates。

可定義 heuristic ranking：

$$
S(C)
=
w_1S_{\mathrm{residual}}
+
w_2S_{\mathrm{stability}}
+
w_3S_{\mathrm{height}}
+
w_4S_{\mathrm{radix}}
+
w_5S_{\mathrm{conditioning}}.
$$

其中：

- residual 越小越好；
- precision ladder 越穩定越好；
- rational height 越低越好；
- cross-radix structure 越一致越好；
- conditioning 越健康越好。

但是：

$$
S(C)
$$

只決定「先驗證誰」。

它不能決定真假。

---

## 44. Acceptance rule 必須是離散的

無論 candidate score 多高，

正式 acceptance function 都應是：

$$
\operatorname{Accept}(Q)
=
\begin{cases}
1,
&
Q\in\mathbb Q_{>0}^{7}
\text{ and }
F(Q)=0,
\\
0,
&
\text{otherwise}.
\end{cases}
$$

也就是：

$$
\boxed{
\text{no confidence score at the final gate}
}
$$

只有 exact pass / fail。

---

## 45. Discovery 與 certification 分離

本文正式採用兩層架構。

### Discovery Layer

允許：

- float；
- arbitrary precision；
- gradient methods；
- evolutionary search；
- neural proposal；
- radix heuristic；
- lattice reduction；
- stochastic perturbation。

目標：

$$
\text{produce promising candidates}.
$$

### Certification Layer

只允許：

- exact rationals；
- exact integers；
- exact symbolic identities；
- rigorous intervals；
- reproducible deterministic verification。

目標：

$$
\text{decide validity}.
$$

所以：

$$
\boxed{
\text{discovery can be heuristic}
}
$$

但：

$$
\boxed{
\text{certification must be exact}
}
$$

---

## 46. 多實作驗證

若真的找到第一個候選，

由於其重要性極高，

不應只依賴單一程式。

至少可建立：

### Verifier A

Python big integers / fractions。

### Verifier B

Rust big integer / rational implementation。

### Verifier C

CAS symbolic verification。

### Verifier D

Lean / Coq / Isabelle 等 proof assistant certificate。

前三者可快速交叉驗證，

最後一個可作為更高級別形式證書。

---

## 47. 不需要信任搜尋器

一個很重要的架構原則是：

> verifier 不需要信任 discovery system。

搜尋器即使是：

- 黑盒 AI；
- GPU optimizer；
- evolutionary agent；
- 外部服務；
- 未形式驗證程式；

只要它最後輸出：

$$
(a,b,c,d,e,f,g),
$$

exact verifier 就能獨立判斷。

所以 architecture 可以設計為：

$$
\boxed{
\text{untrusted proposer}
\rightarrow
\text{trusted verifier}
}
$$

這對未來自動化研究非常重要。

---

## 48. Candidate packet

每一個 numerical candidate 都可以輸出一個 packet：

```text
candidate_id
normalization
precision
approximate_values
residual_vector
interval_bounds
condition_metrics
radix_signatures
reconstruction_candidates
exact_verification_status
```

正式 canonical mathematics 則另存：

```text
exact_rational_tuple
integer_scaled_tuple
primitive_tuple
verification_identities
```

也就是：

$$
\boxed{
\text{search metadata}
\neq
\text{mathematical certificate}
}
$$

---

## 49. Reproducibility rule

任何聲稱 candidate 接近 rational closure 的實驗，

至少應記錄：

$$
P
$$

precision，

$$
\eta
$$

或 solver parameters，

initial seed：

$$
X_0,
$$

normalization：

$$
\mathcal N,
$$

以及 reconstruction height：

$$
H_{\max}.
$$

否則：

$$
\text{near hit}
$$

無法被其他系統重現。

---

## 50. 第一個正式 pipeline

本文提出以下標準流程。

### Stage 0：Generate

產生：

$$
\hat X.
$$

### Stage 1：Normalize

固定：

$$
g=1
$$

或其他 gauge。

### Stage 2：Refine

增加 precision：

$$
P\rightarrow2P.
$$

### Stage 3：Stability Test

確認 candidate coordinates 穩定。

### Stage 4：Residual Test

確認：

$$
\|F(\hat X)\|
$$

隨 precision 下降。

### Stage 5：Conditioning Test

排除嚴重 ill-conditioned fake closure。

### Stage 6：Interval Enclosure

建立：

$$
I_X.
$$

### Stage 7：Rational Reconstruction

使用：

- continued fractions；
- common denominator search；
- lattice reduction；
- radix-supported reconstruction。

### Stage 8：Exact Verification

對：

$$
Q
$$

計算：

$$
F(Q).
$$

### Stage 9：Integer Scaling

清分母。

### Stage 10：Primitive Reduction

除：

$$
\gcd.
$$

### Stage 11：Independent Verification

第二實作重驗。

### Stage 12：Certificate Commit

保存 canonical exact source。

---

## 51. Fail-fast 原則

若在任何階段出現：

$$
F(Q)\neq0,
$$

立即拒絕。

不應因為：

$$
F(Q)
$$

非常小而保留「可能為真」。

例如：

$$
F(Q)=\frac1{10^{1000}}
$$

仍然是：

$$
\neq0.
$$

所以：

$$
\boxed{
\text{exact rational candidate}
+
\text{nonzero residual}
=
\text{false candidate}
}
$$

沒有灰色地帶。

---

## 52. Exact near-miss 仍然有研究價值

雖然 near-miss 不能被當成解，

但可以保存其結構。

例如某個：

$$
Q\in\mathbb Q^7
$$

滿足前三條：

$$
a^2+b^2=d^2,
$$

$$
a^2+c^2=e^2,
$$

$$
b^2+c^2=f^2
$$

全部 exact，

只有：

$$
a^2+b^2+c^2-g^2\neq0.
$$

這就是 Euler-brick-type exact near-miss。

可以研究最後 residual：

$$
\Delta
=
a^2+b^2+c^2-g^2.
$$

其 factorization、valuation、radix pattern 可能提供資訊。

所以：

$$
\boxed{
\text{reject as solution}
\neq
\text{discard as data}
}
$$

---

## 53. Constraint deficit vector

對 exact rational near-miss：

$$
Q,
$$

定義：

$$
D(Q)=F(Q).
$$

因為：

$$
Q\in\mathbb Q^7,
$$

所以：

$$
D(Q)\in\mathbb Q^4
$$

也是 exact。

可進一步 normalize：

$$
\widehat D(Q)
=
\frac{D(Q)}{H(Q)^2}
$$

或使用 scale-invariant ratio。

這允許比較不同高度 candidate 的真正 closure deficit。

---

## 54. Rational neighborhood

假設 candidate：

$$
Q
$$

只差一條 relation。

可以搜尋其附近：

$$
Q+\Delta Q
$$

其中：

$$
\Delta Q
$$

限制為低高度 rational perturbation。

這比純 float gradient 更適合最後一公里。

也就是：

$$
\boxed{
\text{continuous search}
\rightarrow
\text{rational local search}
}
$$

的 hybrid 方法。

---

## 55. Rational local graph

建立節點：

$$
Q\in\mathbb Q^n
$$

並以小分母 perturbation 連邊：

$$
Q\rightarrow Q'.
$$

edge cost 可由：

$$
H(Q'),
$$

$$
\|F(Q')\|,
$$

radix complexity 等組成。

這形成：

$$
G_{\mathbb Q}.
$$

對 numerical candidate 先 reconstruct 到一個：

$$
Q_0,
$$

再在：

$$
G_{\mathbb Q}
$$

做離散探索。

這是從浮點世界切換到 exact arithmetic world 的自然方式。

---

## 56. Denominator lattice

對 common denominator：

$$
q,
$$

考慮：

$$
x=\frac{p_x}{q},
$$

$$
y=\frac{p_y}{q},
$$

$$
z=\frac{p_z}{q}.
$$

normalized condition：

$$
x^2+y^2+z^2=1
$$

變成：

$$
p_x^2+p_y^2+p_z^2=q^2.
$$

所以 reconstruction 後並不是任意：

$$
(p_x,p_y,p_z,q).
$$

它們已落在整數 sphere：

$$
p_x^2+p_y^2+p_z^2=q^2.
$$

再加：

$$
p_x^2+p_y^2=r_1^2,
$$

$$
p_x^2+p_z^2=r_2^2,
$$

$$
p_y^2+p_z^2=r_3^2.
$$

這其實把 rational reconstruction 最終又送回一個 exact integer lattice problem。

---

## 57. 所以 numerical search 的真正工作是什麼？

不是直接證明存在。

而是幫我們找到：

$$
\boxed{
\text{值得檢查的 lattice neighborhood}
}
$$

也就是將一個巨大離散搜尋空間縮到少數候選 ratio、denominator、radix pattern 與 carry pattern。

因此 numerical method 的價值在於：

$$
\text{proposal compression}.
$$

---

## 58. Rational reconstruction 與第一顯現

如果第一個 primitive solution 高度非常大，

直接 brute force 很困難。

但如果它的 normalized shape：

$$
(x,y,z)
$$

位於一個 numerically stable attractor 附近，

則可以先找到：

$$
\hat x,\hat y,\hat z
$$

再 reconstruct 其巨大 denominator。

這是本系列認為 constraint-driven 方法可能優於純枚舉的主要原因之一。

但是否真的存在這種 attractor，

仍是待驗證假說。

---

## 59. Error budget

整條 pipeline 應建立明確 error budget。

例如：

$$
\delta_{\mathrm{solver}},
$$

$$
\delta_{\mathrm{round}},
$$

$$
\delta_{\mathrm{projection}},
$$

$$
\delta_{\mathrm{reconstruction}}.
$$

總體：

$$
\delta_{\mathrm{total}}
$$

可由 rigorous bound 包含：

$$
\delta_{\mathrm{total}}
\ge
\delta_{\mathrm{solver}}
+
\delta_{\mathrm{round}}
+
\delta_{\mathrm{projection}}
+\cdots.
$$

如果沒有 error budget，

就無法判斷 reconstruction candidate 是否真的位於可信區間內。

---

## 60. Exact source 與 rendering 分離

正式研究輸出應區分：

### Rendering layer

供人閱讀的 decimal approximation：

$$
0.123456789\ldots
$$

### Canonical source layer

保存 exact：

$$
\frac{p}{q}.
$$

任何正式 certificate 不應從螢幕上顯示的 decimal digits 反向抄寫。

應直接從 exact numerator / denominator 產生。

這避免：

- copy rounding；
- digit truncation；
- locale formatting；
- Unicode replacement；
- scientific notation ambiguity。

---

## 61. Canonical rational serialization

可定義：

```text
numerator/denominator
```

其中：

- numerator 為十進位整數字串；
- denominator 為正十進位整數字串；
- 必須最簡；
- 不允許 scientific notation；
- 不允許浮點；
- 不允許 Unicode fraction symbols。

例如：

```text
123456789/987654321
```

必須先約分為 canonical form。

這樣不同 verifier 才能一致讀取。

---

## 62. Certificate hashing

若未來真的找到第一個解，

可以對 canonical primitive tuple：

$$
P=(a,b,c,d,e,f,g)
$$

做 deterministic serialization，

再計算 hash。

例如：

```text
a|b|c|d|e|f|g
```

其中：

$$
a\le b\le c.
$$

hash 只用於識別與版本控制，

不代替數學證明。

---

## 63. Independent derivation 與 independent verification

需要區分：

### independent verification

不同程式對同一 tuple 重算等式。

### independent derivation

不同方法各自找到同一 tuple。

後者證據更強，

但前者已足以驗證 exact correctness。

所以若第一個解出現，

最低標準是：

$$
\boxed{
\text{independent verification}
}
$$

不必等待第二個 discovery method 才承認。

---

## 64. Formal proof object 的可能性

因為最終 theorem 只需證明幾個整數平方等式，

如果 candidate 存在，

形式化其 existence proof 其實非常直接。

例如 theorem：

$$
\exists a,b,c,d,e,f,g\in\mathbb Z_{>0}
$$

使四條等式成立。

proof assistant 中只需提供 witness：

$$
(a,b,c,d,e,f,g)
$$

並讓 kernel 驗證四個 numeral identities。

所以真正困難的是 discovery，

不是 certificate checking。

---

## 65. 這是「搜尋難、驗證易」的典型結構

如果 Perfect Cuboid 存在，

給定一個 candidate：

$$
P,
$$

驗證時間只需要做固定數量的大整數乘法與比較。

所以 witness verification 是可行的。

真正難的是：

$$
\boxed{
\text{find }P.
}
$$

因此本系列的策略完全合理地將資源放在：

- constraint generation；
- radix observation；
- numerical proposal；
- rational reconstruction。

而把最後驗證保持極簡。

---

## 66. Candidate confidence 不應污染 theorem status

可以有：

$$
\operatorname{Confidence}(C)=0.999999
$$

這類 heuristic 指標。

但 theorem status 只能是：

$$
\operatorname{Certified}(C)\in\{0,1\}.
$$

所以研究資料庫中應分欄：

```text
heuristic_score
certified_status
```

不可用第一個取代第二個。

---

## 67. 第一輪 Exactification MVP

本文可以直接導出一個 MVP。

### Input

一個高精度 normalized candidate：

$$
(\hat x,\hat y,\hat z).
$$

### Step 1

用：

$$
P=256,512,1024,2048
$$

bits 重算。

### Step 2

確認 digits 穩定。

### Step 3

建立 interval：

$$
I_x,I_y,I_z.
$$

### Step 4

對每個分量跑 continued fraction，

限制：

$$
q\le Q_{\max}.
$$

### Step 5

組合：

$$
(x_r,y_r,z_r)\in\mathbb Q^3.
$$

### Step 6

exact 驗證：

$$
x_r^2+y_r^2+z_r^2=1.
$$

### Step 7

exact square tests：

$$
x_r^2+y_r^2,
$$

$$
x_r^2+z_r^2,
$$

$$
y_r^2+z_r^2.
$$

### Step 8

若全部 PASS，

清分母產生 primitive integer certificate。

---

## 68. 第二輪 MVP：共同分母搜尋

若獨立 continued fractions 沒有成功，

搜尋共同：

$$
q.
$$

對：

$$
1\le q\le Q_{\max},
$$

計算：

$$
p_x=\operatorname{round}(q\hat x),
$$

$$
p_y=\operatorname{round}(q\hat y),
$$

$$
p_z=\operatorname{round}(q\hat z).
$$

先檢查：

$$
p_x^2+p_y^2+p_z^2=q^2.
$$

若不成立，

立即跳過。

若成立，

再檢查三個 pairwise squares。

這完全可以用整數 arithmetic 做。

它其實是一個由 numerical shape 引導的 denominator scan。

---

## 69. 第三輪 MVP：lattice reconstruction

當：

$$
Q_{\max}
$$

太大，

逐一掃：

$$
q
$$

不實際。

此時使用 lattice reduction 找：

$$
(q,p_x,p_y,p_z)
$$

的低高度近似關係。

候選一旦產生，

仍走同一 exact verification。

所以不同 reconstruction engine 可以共用同一 verifier。

---

## 70. 第四輪 MVP：radix-conditioned reconstruction

如果第 4 篇的 observation 顯示 candidate 在某個：

$$
B
$$

附近產生 finite-complexity collapse，

則優先測：

$$
q=B^k
$$

或其 prime-support compatible denominators。

這是把：

$$
\mathcal O_B
$$

真正送進 exactification pipeline。

---

## 71. 第五輪 MVP：near-miss mining

如果無 exact PASS，

保存最低：

$$
H(Q)
$$

下的 near-miss。

例如定義：

$$
M(Q)
=
\#\{i:F_i(Q)=0\}.
$$

其中：

$$
M(Q)\in\{0,1,2,3,4\}.
$$

對：

$$
M(Q)=3
$$

的 candidate，

進一步研究剩餘 deficit。

這可能形成一個專門的 near-miss corpus。

---

## 72. Near-miss corpus 的價值

記錄：

- exact rational tuple；
- 哪三條已 closure；
- 剩餘 deficit；
- denominator factorization；
- radix signatures；
- valuation profile；
- distance to nearby reconstructed shapes。

長期可能看出：

$$
\text{last-obstruction geometry}.
$$

如果 Perfect Cuboid 不存在，

這類資料也可能幫助發現 universal obstruction。

所以本 pipeline 對「存在」與「不存在」兩種可能都保留價值。

---

## 73. Exactification 與 constraint dynamics 的閉環

第 3 篇的 flow：

$$
X_{n+1}=\Phi(X_n)
$$

可以得到 candidate。

第 5 篇 exactification 後，

若 reconstruction 失敗，

可以把資訊回送：

$$
\text{which coordinates require huge denominator},
$$

$$
\text{which square condition fails},
$$

$$
\text{which radix pattern is unstable}.
$$

因此形成：

$$
\boxed{
\text{Generate}
\rightarrow
\text{Reconstruct}
\rightarrow
\text{Verify}
\rightarrow
\text{Feedback}
\rightarrow
\text{Generate}
}
$$

而不是一次性搜尋。

---

## 74. Verification-guided generation

可以定義 exact deficit feedback：

$$
D(Q)=F(Q).
$$

將：

$$
D(Q)
$$

映射回 continuous candidate：

$$
\hat X.
$$

更新：

$$
\Phi
$$

的方向或權重。

例如若三條面對角線都 exact，

只有空間對角線失敗，

就增加：

$$
a^2+b^2+c^2-g^2
$$

相關的 arithmetic pressure。

這就是：

$$
\boxed{
\text{verification-guided constraint generation}
}
$$

---

## 75. 但 verifier 不應被 optimizer 修改

架構上，

verifier 必須保持 immutable。

不能因為 optimizer 一直失敗，

就放寬：

$$
F(Q)=0
$$

成：

$$
|F(Q)|<\varepsilon.
$$

所以：

$$
\boxed{
\text{generator adapts}
}
$$

但：

$$
\boxed{
\text{truth condition does not adapt}
}
$$

這是整個研究可信度的核心。

---

## 76. Rational closure gate

本文正式定義 Rational Closure Gate：

$$
\operatorname{RCG}(Q)=\mathrm{PASS}
$$

當且僅當：

$$
Q\in\mathbb Q_{>0}^{7},
$$

且：

$$
F(Q)=0.
$$

若使用最小 normalized certificate：

$$
Q=(x,y,z),
$$

則：

$$
\operatorname{RCG}_{\min}(Q)=\mathrm{PASS}
$$

當且僅當：

$$
x,y,z\in\mathbb Q_{>0},
$$

$$
x^2+y^2+z^2=1,
$$

且：

$$
x^2+y^2,
$$

$$
x^2+z^2,
$$

$$
y^2+z^2
$$

皆為：

$$
\mathbb Q
$$

中的平方。

---

## 77. Integer Manifestation Gate

若：

$$
\operatorname{RCG}(Q)=\mathrm{PASS},
$$

清分母得到：

$$
P\in\mathbb Z_{>0}^{7}.
$$

再做 primitive reduction。

定義：

$$
\operatorname{IMG}(P)=\mathrm{PASS}
$$

當且僅當：

$$
\gcd(P)=1,
$$

且四條 integer identities exact 成立。

所以：

$$
\boxed{
\operatorname{RCG}
\rightarrow
\operatorname{IMG}
}
$$

是 deterministic transformation。

---

## 78. 第一顯現的 formal handoff

第 6 篇不需要再處理 float。

它只接收：

$$
\operatorname{IMG}(P)=\mathrm{PASS}
$$

的 primitive solution，

或研究：

$$
\operatorname{IMG}
$$

若存在時其高度 ordering。

所以第 5 篇就是整個前導系列中：

$$
\boxed{
\text{numerical world}
\rightarrow
\text{exact arithmetic world}
}
$$

的邊界。

---

## 79. 本文方法論總結

### 原則 1

$$
\text{float}
$$

只用於 discovery。

### 原則 2

$$
\text{arbitrary precision}
$$

提高可信度，但不等於 exactness。

### 原則 3

interval arithmetic 提供 error enclosure。

### 原則 4

rational reconstruction 只提出 candidate。

### 原則 5

exact arithmetic 決定真假。

### 原則 6

scale quotient 應先於 reconstruction。

### 原則 7

height / denominator complexity 必須納入。

### 原則 8

cross-radix structure 可以提供 reconstruction prior。

### 原則 9

near-miss 不可冒充解，但值得保存。

### 原則 10

formal certificate 與 numerical log 應分離。

---

## 80. 結論

Perfect Cuboid 的 constraint dynamics、radix observation 與 numerical search 可以產生非常接近閉合的候選。

但：

$$
\boxed{
\text{close is not equal}
}
$$

因此本文建立一條嚴格的 exactification pipeline：

$$
\boxed{
\text{Numerical Candidate}
\rightarrow
\text{Precision Refinement}
\rightarrow
\text{Conditioning Analysis}
\rightarrow
\text{Interval Enclosure}
\rightarrow
\text{Rational Reconstruction}
\rightarrow
\text{Exact Verification}
\rightarrow
\text{Primitive Integer Certificate}
}
$$

其中最重要的邏輯界線是：

$$
\boxed{
\|F(\hat X)\|\ll1
}
$$

永遠不能取代：

$$
\boxed{
F(Q)=0.
}
$$

一旦找到：

$$
Q\in\mathbb Q_{>0}^{7}
$$

且：

$$
F(Q)=0,
$$

Perfect Cuboid 的存在性立即完成。

之後清分母：

$$
Q\rightarrow P\in\mathbb Z_{>0}^{7}
$$

並 primitive reduction，

即可得到正式整數 witness。

所以第 5 篇完成的是：

$$
\boxed{
\text{Approximation}
\rightarrow
\text{Candidate}
\rightarrow
\text{Certificate}
}
$$

這三者的嚴格分離。

下一篇將不再問「如何把 candidate 變成 exact」。

而是進入：

# 第一顯現問題：從有理解到最小 Primitive Cuboid

研究如果：

$$
\mathcal S_{\mathbb Q}\neq\varnothing,
$$

那麼：

- 何謂第一個；
- 高度如何定義；
- primitive representative 如何唯一化；
- 不同 ordering 是否給出不同「最小」；
- 第一顯現與搜尋下界如何區分；
- 一旦找到第一個 witness，哪些問題立即結束，哪些問題才剛開始。

---

## 系列目錄

1. **重新表述完美長方體：它不是首先一個整數搜尋問題**
2. **連續世界與尺度商空間：Perfect Cuboid 的拓樸起點**
3. **共同初態與約束誘導分化**
4. **進位制是觀察算子：Radix–Carry Global Closure**
5. **從浮點近似到精確有理閉合**
6. **第一顯現問題：從有理解到最小 Primitive Cuboid**
7. **第一個解之後：Perfect Cuboid 的算術自由度**
8. **解空間的上下界與第二次展開**

---

**End of Paper 05**
