# GERES P3：合成有理世界重建

**Synthetic Rational Recovery for Global Equivalence Reconstruction**

版本：v0.1  
系列：GERES — Global Equivalence Reconstruction and Scaling  
階段：P3  
性質：逆問題方法論／合成控制實驗／算術重建規格  
主要 benchmark：Rational Triangle、Partial Cuboid、Euler Brick、Perfect-Cuboid-like Worlds  
Canonical source：UTF-8 Markdown

---

## 摘要

GERES P2 已建立 forward direction：

$$
W^\ast
\overset{S_\lambda}{\longrightarrow}
W_\lambda,
$$

也就是在已知世界上執行合法、可逆、可驗證的全域縮放。

P3 開始第一次反轉方向：

$$
\widetilde W
\overset{\mathrm{GER}}{\longrightarrow}
W^\ast.
$$

但由於真正的 Perfect Cuboid 尚無已知 exact positive witness，P3 不使用「人工假造的已知 Perfect Cuboid」作控制組。相反地，本文建立一套分層 synthetic benchmark protocol：

1. 已知 exact rational triangle；
2. 已知 partial rational cuboid；
3. 已知 Euler brick；
4. 已知 rational normalized worlds；
5. deliberately irrational worlds；
6. near-rational false positives；
7. ambiguity controls；
8. precision-threshold controls。

核心原則是：

> 在 known-answer worlds 上無法穩定恢復 exact source 以前，不得把未知 Perfect Cuboid floating candidate 的任何近似對齊解讀成數學證據。

P3 的目標不是證明 Perfect Cuboid，而是驗證以下 inverse methodology：

$$
\boxed{
\text{Exact Source}
\rightarrow
\text{Finite-Precision Observation}
\rightarrow
\text{Bounded Arithmetic Search}
\rightarrow
\text{Global Constraint Gate}
\rightarrow
\text{Exact Recovery Certificate}
}
$$

本文並提出 scalar rational uniqueness bound、joint-world candidate reduction、constraint-coupled recovery、quotient-aware uniqueness、false-positive rejection 與 precision sufficiency 等可計算命題，作為後續 P4 Irrational / False-Positive Gate 以及真正 Perfect Cuboid floating candidate 實驗的基礎。

---

# 1. P3 的核心問題

假設存在一個 exact arithmetic world：

$$
W^\ast.
$$

我們不直接把 $W^\ast$ 交給 reconstruction engine。

而是經過 representation map：

$$
\rho_p
$$

以及可控制 perturbation：

$$
\varepsilon
$$

產生 observation：

$$
\widetilde W
=
\rho_p(W^\ast)+\varepsilon.
$$

P3 問：

$$
\boxed{
\mathrm{GER}
(
\widetilde W,
\Phi,
\mathbb A,
\mathcal B
)
\stackrel{?}{=}
W^\ast
}
$$

其中：

- $\Phi$：world constraints；
- $\mathbb A$：目標 arithmetic domain；
- $\mathcal B$：height、precision、region 等 bounds。

---

# 2. 為什麼先做 Synthetic Recovery

未知問題最危險的情況，是演算法對任意近似資料都能產生一個「看起來合理」的 exact answer。

這種演算法可能只是：

$$
\text{approximation generator},
$$

而不是：

$$
\text{source recovery engine}.
$$

因此 P3 必須使用 known-answer protocol。

只有當我們知道：

$$
W^\ast
$$

的真實值時，才能判斷：

$$
\mathrm{Recovered}(W)
=
W^\ast
$$

是否真的成立。

---

# 3. Recovery 與 Approximation 的分界

局部 approximation：

$$
x
\approx
\frac pq
$$

只表示某個 rational number 靠近 $x$。

GERES recovery 則要求：

$$
W^\ast
\in
\mathcal V(\mathbb A),
$$

並且：

$$
\mathrm{ObsCompatible}(W^\ast)=\mathrm{True}.
$$

此外若輸出 Unique，還要求：

$$
\forall W'
\in
\mathcal V(\mathbb A)\cap\Omega,
$$

在指定 complexity bound 下：

$$
W'
\sim W^\ast
$$

或根本不存在其他 admissible solution。

---

# 4. Synthetic Source Generator

定義 source generator：

$$
\mathcal G:
\Theta
\longrightarrow
W^\ast,
$$

其中 $\Theta$ 是 exact seed space。

要求：

$$
W^\ast
$$

在生成時就以 exact arithmetic 建立。

禁止流程：

$$
\text{float generate}
\rightarrow
\text{round}
\rightarrow
\text{declare exact}.
$$

允許流程：

$$
\text{integer / rational parameters}
\rightarrow
\text{exact symbolic construction}
\rightarrow
W^\ast.
$$

---

# 5. Observation Generator

定義：

$$
\mathcal O_{p,\varepsilon}
:
W^\ast
\longrightarrow
\widetilde W.
$$

可以包含：

1. fixed decimal truncation；
2. IEEE-754 conversion；
3. random bounded perturbation；
4. interval widening；
5. coordinate noise；
6. derived-quantity noise；
7. mixed-precision projection。

因此同一個 $W^\ast$ 可以產生很多 observations：

$$
\widetilde W_1,
\ldots,
\widetilde W_N.
$$

---

# 6. Observation 必須保存誤差模型

不能只保存：

$$
\tilde q.
$$

至少需要：

$$
(\tilde q,\delta_q)
$$

或：

$$
I_q
=
[\underline q,\overline q].
$$

若 source generator 已知真值，可檢查：

$$
q^\ast\in I_q.
$$

若連 source 都沒有落在 declared interval 中，recovery failure 可能來自 observation model，而不是 GER。

---

# 7. Scalar Rational Recovery 的基本界

設兩個不同 reduced rationals：

$$
\frac pq
\neq
\frac rs,
$$

且：

$$
1\le q,s\le Q.
$$

則：

$$
\left|
\frac pq-\frac rs
\right|
=
\frac{|ps-rq|}{qs}
\ge
\frac1{Q^2}.
$$

因此任何長度小於：

$$
\frac1{Q^2}
$$

的 interval，最多包含一個 denominator 不超過 $Q$ 的 reduced rational。

---

# 8. 命題 P3-A：Bounded-Denominator Local Uniqueness

若 observation interval：

$$
I
=
[\tilde x-\delta,\tilde x+\delta]
$$

滿足：

$$
2\delta
<
\frac1{Q^2},
$$

則 $I$ 中最多存在一個 reduced rational：

$$
\frac pq
$$

滿足：

$$
1\le q\le Q.
$$

這提供第一個非常直接的 precision sufficiency criterion。

---

# 9. Continued Fraction Recovery Condition

經典 continued-fraction criterion 給出：

若：

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

且：

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

則：

$$
\frac pq
$$

是 $x$ 的 continued-fraction convergent。

P3 可以把它當成 local proposal generator 的充分條件之一。

但即使某 coordinate 成功重建，也不能直接接受整個 world。

---

# 10. Height Bound

對：

$$
r=\frac pq,
$$

定義：

$$
H(r)
=
\max(|p|,|q|).
$$

對 world：

$$
W=(r_1,\ldots,r_n),
$$

P3 暫定：

$$
H_\infty(W)
=
\max_iH(r_i).
$$

實驗必須顯式記錄：

$$
H_{\max}.
$$

沒有 height bound 的 rational search 幾乎永遠可以找到更複雜的近似。

---

# 11. Local Candidate Set

對 observation：

$$
\tilde q_i,
$$

定義：

$$
C_i
=
\left\{
r\in\mathbb Q:
r\in I_i,
H(r)\le H_{\max}
\right\}.
$$

naive joint search 是：

$$
C_1\times\cdots\times C_n.
$$

其大小：

$$
N_{\mathrm{naive}}
=
\prod_i|C_i|.
$$

這通常很快爆炸。

---

# 12. Global Constraint Filter

真正 GER 不直接展開整個 Cartesian product。

而是用：

$$
\Phi
=
\{\phi_1,\ldots,\phi_m\}
$$

逐步剪枝。

如果 partial assignment 已經不可能滿足某個 exact constraint，就立即刪除。

因此：

$$
N_{\mathrm{global}}
\ll
N_{\mathrm{naive}}
$$

是 P3 要測量的重要指標。

---

# 13. 命題 P3-B：Global Constraint Monotonic Pruning

若某 partial assignment：

$$
A_k
$$

已與 exact constraint system 的必要條件矛盾，則任何 extension：

$$
A_k\subset A_n
$$

都不能成為 admissible exact world。

因此 constraint-based pruning 是 proof-safe 的：

$$
\text{reject early}
$$

不會刪除真正 solution，只要必要條件本身正確。

---

# 14. World-Level Recovery

定義：

$$
\mathcal R_{\mathrm{world}}
:
(\widetilde W,\Phi,\mathcal B)
\longrightarrow
\mathcal S.
$$

其中：

$$
\mathcal S
=
\{
W^\ast_1,\ldots,W^\ast_k
\}
$$

是所有通過：

1. arithmetic bound；
2. observation compatibility；
3. exact constraints；
4. admissibility；
5. symmetry quotient；

的 exact worlds。

最終 status：

$$
|\mathcal S|=0
\Rightarrow
\mathrm{NoCertifiedRecovery},
$$

$$
|\mathcal S|=1
\Rightarrow
\mathrm{Unique},
$$

$$
|\mathcal S|>1
\Rightarrow
\mathrm{Ambiguous}.
$$

---

# 15. Quotient-Aware Uniqueness

如果：

$$
W_1
$$

與：

$$
W_2
$$

只是：

- scale-equivalent；
- edge permutation equivalent；
- orientation mirror equivalent；

那麼不應因 serialization 不同而算成兩個獨立 solutions。

因此唯一性真正判定：

$$
|\mathcal S/\!\sim|=1.
$$

這是 GERES 與普通 brute-force rational fitting 的重要差異。

---

# 16. Benchmark Family A：Pythagorean Triangle

使用 Euclid parametrization：

$$
a=m^2-n^2,
$$

$$
b=2mn,
$$

$$
c=m^2+n^2,
$$

其中：

$$
m>n>0.
$$

若：

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

則：

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

exact 成立。

normalized world：

$$
W^\ast
=
\left(
\frac ac,
\frac bc,
1
\right).
$$

全部位於：

$$
\mathbb Q^3.
$$

這是 P3 最乾淨的 positive control。

---

# 17. Triangle Recovery Example

取：

$$
(m,n)=(2,1).
$$

得到：

$$
(3,4,5).
$$

normalized：

$$
W^\ast
=
\left(
\frac35,
\frac45,
1
\right).
$$

產生 observation：

$$
\widetilde W
=
(
0.6000000001,
0.7999999998,
1
)
$$

並宣告 interval。

GER 應在合理 height bound 下恢復：

$$
\left(
\frac35,
\frac45,
1
\right)
$$

而不是任意更高 denominator 的近似。

---

# 18. Benchmark Family B：General Rational Triangle

不只測 primitive integer triples。

可先生成 rational：

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

再取：

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

之後 normalization 應消除 $\lambda$：

$$
N(\lambda a,\lambda b,\lambda c)
=
N(a,b,c).
$$

因此可以同時測：

- GSE；
- gauge；
- GER；
- canonicalization。

---

# 19. Benchmark Family C：Partial Cuboid

已知簡單 exact world：

$$
(a,b,c)=(3,4,12).
$$

有：

$$
d_{ab}=5,
$$

$$
g=13,
$$

但：

$$
d_{ac}=\sqrt{153},
$$

$$
d_{bc}=4\sqrt{10}.
$$

這是一個非常好的 mixed arithmetic control。

closure vector 可設：

$$
C
=
(1,0,0,1)
$$

對應：

$$
(d_{ab},d_{ac},d_{bc},g).
$$

GER 不得因其他 quantities 接近 rational 而把 closure vector 錯誤升級。

---

# 20. Benchmark Family D：Euler Brick

Euler brick 提供：

- integer edges；
- integer face diagonals；
- noninteger body diagonal。

可使用經典例：

$$
(a,b,c)
=
(44,117,240).
$$

則：

$$
d_{ab}=125,
$$

$$
d_{ac}=244,
$$

$$
d_{bc}=267.
$$

而：

$$
g^2
=
44^2+117^2+240^2
=
73225.
$$

因為：

$$
270^2
=
72900,
$$

$$
271^2
=
73441,
$$

所以：

$$
g=\sqrt{73225}
$$

不是整數。

這提供一個非常接近 Perfect Cuboid arithmetic architecture、但已知最後 channel 不閉合的 negative control。

---

# 21. Euler Brick 的重要性

Euler brick 可以測試 GER 是否會犯下最危險的錯誤：

> 因為六個量都 exact integer，就自動把第七個「拉」到附近 integer。

這是禁止的。

正確結果應是：

$$
\operatorname{ClosureVector}
=
(1,1,1,0)
$$

對三個 face diagonals 與 body diagonal。

如果系統輸出：

$$
g=270
$$

或：

$$
g=271,
$$

就是 false positive。

---

# 22. Benchmark Family E：Exact Rational Sphere Point

在 normalized cuboid shape layer：

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

可以人工生成 rational sphere points，而不要求三個 face diagonals rational。

例如利用 rational parametrization：

$$
x
=
\frac{2u}{1+u^2+v^2},
$$

$$
y
=
\frac{2v}{1+u^2+v^2},
$$

$$
z
=
\frac{1-u^2-v^2}{1+u^2+v^2},
$$

對：

$$
u,v\in\mathbb Q
$$

得到 exact rational point。

這可以測 body-diagonal normalization layer，而不假裝它是 Perfect Cuboid。

---

# 23. Benchmark Family F：Deliberately Irrational World

例如：

$$
W^\ast
=
(1,1,\sqrt2).
$$

或在 cuboid 中：

$$
(3,4,12,5,\sqrt{153},4\sqrt{10},13).
$$

P3 必須保證 rational reconstruction engine 不會因 bounded approximation 而誤宣稱 exact rational source。

---

# 24. Benchmark Family G：Near-Rational False Positive

選一個低高度 rational：

$$
r=\frac pq
$$

再建立：

$$
x
=
r+\epsilon
$$

其中 $\epsilon\neq0$，且 $x$ 明確由某個 irrational construction 產生。

如果 interval 太寬，可能同時包含 $r$。

此時正確 status 可能是：

$$
\mathrm{Ambiguous}
$$

或：

$$
\mathrm{InsufficientPrecision},
$$

而不是：

$$
\mathrm{Unique}(r).
$$

---

# 25. Benchmark Family H：Ambiguity Control

主動選 observation interval：

$$
I
$$

使其同時包含兩個 bounded-height rationals：

$$
r_1,
r_2.
$$

例如：

$$
r_1\neq r_2,
$$

但：

$$
r_1,r_2\in I.
$$

若 constraints 無法排除其中之一，正確輸出必須是：

$$
\mathrm{Ambiguous}.
$$

---

# 26. Precision Ladder

對同一 source：

$$
W^\ast
$$

產生：

$$
\widetilde W^{(p)}
$$

其中：

$$
p
\in
\{8,12,16,24,32,64,128,\ldots\}
$$

表示有效 precision。

觀察 status：

$$
\mathrm{Ambiguous}
\rightarrow
\mathrm{Unique}
$$

在哪個 precision threshold 發生。

這可以實驗估計：

$$
p_{\min}(W^\ast,H_{\max}).
$$

---

# 27. Recovery Phase Diagram

定義兩個主控制參數：

$$
p
=
\text{precision},
$$

$$
H
=
\text{height bound}.
$$

對每個：

$$
(p,H)
$$

記錄 recovery status。

可形成 phase diagram：

$$
\mathcal P(p,H)
\in
\{
\mathrm{Unique},
\mathrm{Ambiguous},
\mathrm{None},
\mathrm{Inconclusive}
\}.
$$

這會直接告訴我們：

> 某個 floating candidate 的 precision 是否足以支撐它被解讀成 arithmetic evidence。

---

# 28. Too-Low Height Bound

如果：

$$
H_{\max}
<
H(W^\ast),
$$

則即使 observation perfect，系統也可能返回：

$$
\mathrm{NoCertifiedRecovery}.
$$

這不是演算法失敗，而是 search specification 排除了真值。

因此 report 必須記錄：

$$
H_{\max}.
$$

---

# 29. Too-High Height Bound

若：

$$
H_{\max}
$$

過大，而 precision 固定，candidate density 會增加。

可能從：

$$
\mathrm{Unique}
$$

重新變成：

$$
\mathrm{Ambiguous}.
$$

因此：

$$
\boxed{
\text{higher height bound is not monotonically better.}
}
$$

這是之後 Perfect Cuboid reconstruction 特別重要的現象。

---

# 30. Precision-Height Duality

bounded rational recovery 存在基本 tradeoff：

$$
H\uparrow
\quad\Rightarrow\quad
\text{required precision}\uparrow.
$$

粗略地，由 rational separation：

$$
\Delta
\sim
\frac1{H^2}.
$$

因此需要：

$$
\delta
\ll
\frac1{H^2}.
$$

這提供之後資源分配的第一個理論估計。

---

# 31. Joint Constraint Advantage

假設每個 coordinate 有：

$$
k
$$

個 local candidates。

naive search：

$$
k^n.
$$

但若 constraints 強，global admissible set 可能只剩：

$$
O(1)
$$

或小量候選。

因此 P3 的核心不是做更強的 decimal fitting，而是利用：

$$
\Phi
$$

作 joint arithmetic compression。

---

# 32. Candidate Propagation

若 constraint：

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

且 $x,y$ 已 exact 決定，則：

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

若要求：

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

則只需要檢查：

$$
x^2+y^2
$$

是否為 rational square。

因此很多 quantities 不必獨立 enumerate。

這是 dependency graph 與 arithmetic gate 的第一次真正結合。

---

# 33. Rational-Square Predicate

對：

$$
r=\frac pq>0
$$

且 reduced，

$$
r
$$

是 rational square iff：

$$
p
$$

與：

$$
q
$$

都是 integer squares。

因此：

$$
r=\left(\frac mn\right)^2
$$

可以用 exact integer factor / square test 決定。

這是 P3 可直接使用的 proof-safe arithmetic gate。

---

# 34. Perfect-Cuboid-like Constraint Propagation

若已 recover：

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

則：

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

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

$$
w^2=y^2+z^2.
$$

不需要再任意 fitting：

$$
u,v,w.
$$

只需檢查三個 rational-square predicates。

同時：

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

作為 normalized body-diagonal gate。

這會把 search problem 從六個自由 coordinates 大幅壓低。

---

# 35. Reconstruction Graph

P3 建議把 constraint graph 升級成 directed recovery graph：

$$
G_R.
$$

edge：

$$
q_i\rightarrow q_j
$$

表示：

$$
q_j
$$

可由已知 $q_i$ 集合 exact 推導。

同一 world 可以有多個 recovery order。

演算法可選 cost 最低的一條。

---

# 36. Recovery Ordering

定義每個 quantity 的 local candidate count：

$$
|C_i|.
$$

優先 recover：

1. candidate 最少；
2. constraint degree 最高；
3. arithmetic gate 最強；

的 quantity。

這類 heuristic 只影響效率，不改變 exact acceptance semantics。

---

# 37. Local Tools

P3 可允許以下 proposal tools：

- continued fractions；
- Farey interval enumeration；
- bounded rational reconstruction；
- lattice reduction；
- PSLQ；
- modular hints；
- denominator pattern mining。

但它們全部只能輸出：

$$
\mathrm{Proposal}.
$$

不能直接輸出：

$$
\mathrm{Certified}.
$$

---

# 38. Proposal Provenance

每個 proposal：

$$
r_i
$$

必須記錄：

$$
P_i
=
(
\mathrm{method},
\mathrm{input},
\mathrm{bound},
\mathrm{score},
\mathrm{source\ interval}
).
$$

後續若 exact certificate 成功，可以回溯哪個工具真正產生有效候選。

---

# 39. Exact Gate

所有 proposal 組成 candidate world：

$$
W_c.
$$

接受前必須：

$$
\forall\phi_i\in\Phi,
\qquad
\phi_i(W_c)=0
$$

使用 exact arithmetic。

若任一：

$$
\phi_i(W_c)\neq0,
$$

立即 reject。

沒有 tolerance。

---

# 40. Observation Compatibility Gate

exact candidate 雖然滿足 constraints，也可能與 observation 無關。

因此要求：

$$
q_i^\ast\in I_i
$$

對所有 observed quantities 成立，

或依預先定義的 observation model 通過。

不能因為找到一個漂亮的 exact world，就忽略它離原始 observation 很遠。

---

# 41. Uniqueness Gate

若找到：

$$
W^\ast,
$$

還要繼續檢查在指定：

$$
(\Omega,H_{\max},\Phi)
$$

中是否還有其他：

$$
W'
$$

通過所有 gates。

因此：

$$
\text{first hit}
\neq
\text{unique recovery}.
$$

---

# 42. Certificate Structure

P3 recovery certificate：

$$
\mathcal C_R
=
(
W^\ast,
\widetilde W,
\mathcal I,
H_{\max},
\Phi,
\Pi_R,
\mathcal U,
\mathcal T
).
$$

其中：

- $W^\ast$：exact source；
- $\widetilde W$：observation；
- $\mathcal I$：observation intervals；
- $H_{\max}$：height bound；
- $\Phi$：constraints；
- $\Pi_R$：recovery procedure；
- $\mathcal U$：uniqueness data；
- $\mathcal T$：trace。

---

# 43. Recovery Status

canonical enum：

```text
UNIQUE_RECOVERY
AMBIGUOUS_RECOVERY
NO_CERTIFIED_RECOVERY
INSUFFICIENT_PRECISION
BOUND_EXCLUDES_SOURCE
INVALID_OBSERVATION_MODEL
INTERNAL_VERIFICATION_FAILURE
```

避免只使用 PASS / FAIL。

---

# 44. Synthetic Ground-Truth Match

因為 P3 知道 source：

$$
W^\ast_{\mathrm{source}},
$$

可以定義：

$$
\mathrm{GroundTruthMatch}
=
\left[
\kappa(W^\ast_{\mathrm{recovered}})
=
\kappa(W^\ast_{\mathrm{source}})
\right].
$$

這是真正的 benchmark success criterion。

---

# 45. Metrics

P3 至少記錄：

### Exact Recovery Rate

$$
R_{\mathrm{exact}}
=
\frac{
N_{\mathrm{correct\ unique}}
}{
N_{\mathrm{recoverable}}
}.
$$

### False Positive Rate

$$
R_{\mathrm{FP}}
=
\frac{
N_{\mathrm{false\ exact\ claims}}
}{
N_{\mathrm{negative\ controls}}
}.
$$

### Ambiguity Accuracy

是否在應 ambiguous 時正確拒絕唯一判斷。

### Candidate Reduction Ratio

$$
\rho_C
=
\frac{
N_{\mathrm{global}}
}{
N_{\mathrm{naive}}
}.
$$

### Minimum Precision

$$
p_{\min}.
$$

### Runtime

$$
T(H,p,n).
$$

---

# 46. 最重要的安全指標

對數學用途而言：

$$
R_{\mathrm{FP}}
$$

比 recall 更重要。

即使某些 true worlds 無法 recover，

也比把 irrational / false candidate 誤報成 exact rational world 好。

因此 P3 的初期設計優先：

$$
\boxed{
\text{precision over recall}.
}
$$

---

# 47. Positive Control

一個 positive control 必須同時滿足：

1. source exact；
2. target domain 已知；
3. source 落在 bound 內；
4. observation interval 正確覆蓋 source；
5. precision 足夠；
6. source 在 quotient 後唯一。

如果 recovery 失敗，才真正有意義。

---

# 48. Negative Control

negative control 不一定意味：

$$
\mathcal V(\mathbb Q)=\varnothing.
$$

它可以只意味：

> 在指定 observation interval、height bound 與 admissible region 下，不存在合法 exact source。

因此 negative claims 必須帶 scope。

---

# 49. Irrational Negative Control

對：

$$
\sqrt2
$$

這種 known irrational quantity，可以建立更強測試。

在 rational target domain：

$$
\mathbb A=\mathbb Q,
$$

系統不能回傳 exact rational source：

$$
r
$$

並聲稱：

$$
r=\sqrt2.
$$

它最多只能說：

$$
r\approx\sqrt2.
$$

但 approximation 不能通過 exact identity gate。

---

# 50. Near-Square Trap

Euler brick body diagonal：

$$
g=\sqrt{73225}.
$$

因為：

$$
73225
$$

靠近：

$$
270^2=72900
$$

與：

$$
271^2=73441,
$$

可以故意把 display precision 壓低，測試 UI 是否會錯誤產生：

**Exact Lock**。

正確結果只能是：

**Unresolved / Irrational under exact square test**。

---

# 51. Scale-Ambiguous Observations

若 observation 沒有 gauge，則：

$$
W^\ast
$$

與：

$$
\lambda W^\ast
$$

都可能解釋 shape。

因此 reconstruction 前要：

$$
N(\widetilde W)
$$

或把 scale 納入 nuisance parameter。

P3 第一版優先使用 normalized worlds。

---

# 52. Scale Quotient Recovery

定義：

$$
\widehat W
=
N(W).
$$

Recovery target 不再是：

$$
W^\ast,
$$

而是：

$$
[W^\ast]_S.
$$

成功判定：

$$
\kappa(
\widehat W_{\mathrm{recovered}}
)
=
\kappa(
\widehat W_{\mathrm{source}}
).
$$

這避免把 arbitrary common scale 當成 reconstruction error。

---

# 53. Symmetry Quotient Recovery

對 Perfect-Cuboid-like world：

$$
S_3
$$

作用於：

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

因此：

$$
(3,4,12)
$$

與：

$$
(12,3,4)
$$

不應算成 recovery mismatch。

canonicalization：

$$
a\le b\le c
$$

即可消除該 symmetry。

---

# 54. Synthetic Dataset 規模

P3 初版可從：

$$
N=10^3
$$

個小型 worlds 起步。

分層：

- 300 rational triangles；
- 200 scaled duplicates；
- 150 partial cuboids；
- 100 Euler-brick-like / known Euler bricks；
- 100 irrational controls；
- 100 near-rational traps；
- 50 ambiguity controls。

真正實作時可以依計算成本調整。

數字本身不是 theorem requirement，只是 benchmark 建議。

---

# 55. Parameter Stratification

dataset 不應只抽簡單 denominator。

應按 height 分層：

$$
H
\in
[1,10],
$$

$$
[11,10^2],
$$

$$
[10^2,10^3],
$$

$$
[10^3,10^4],
$$

或更高。

這樣才能看到 precision demand 如何成長。

---

# 56. Noise Stratification

perturbation 也分層：

$$
\epsilon
\in
\{
0,
10^{-6},
10^{-9},
10^{-12},
10^{-18},
\ldots
\}.
$$

另外測：

- symmetric noise；
- one-sided truncation；
- coordinate-specific noise；
- correlated world-level noise。

---

# 57. Correlated Noise

真實計算程序的誤差不一定獨立。

例如 derived quantity 來自同一組 floating primitives：

$$
u=\sqrt{x^2+y^2}.
$$

因此：

$$
\epsilon_u
$$

與：

$$
\epsilon_x,\epsilon_y
$$

存在 correlation。

P3 後期應加入：

$$
\widetilde W
=
\rho_p(
\operatorname{EvaluateFloat}(W^\ast)
)
$$

而不只是人工對每個 quantity 加獨立 random noise。

---

# 58. Representation-Origin Experiment

可以比較三種 observation origin：

### O1

exact rational 直接 decimal rounding。

### O2

exact rational 經 floating computation graph。

### O3

exact world 經多次 scale / normalize / recompute 後再輸出。

若 GER 只對 O1 成功，可能還不足以處理真正複雜 world runtime 的誤差。

---

# 59. Recovery Stability

對同一 exact source 的多個 observations：

$$
\widetilde W_1,
\ldots,
\widetilde W_k,
$$

理想上：

$$
\kappa(
\mathcal R(\widetilde W_i)
)
=
\kappa(W^\ast)
$$

只要都在 certified recovery basin 中。

這可以定義：

$$
\mathcal B_R(W^\ast)
$$

為 recovery basin。

---

# 60. Recovery Basin

定義：

$$
\mathcal B_R(W^\ast;H,p)
=
\left\{
\widetilde W:
\mathcal R(\widetilde W)=
[W^\ast]
\right\}.
$$

研究 basin 的大小與 shape，可能成為之後 Perfect Cuboid floating candidate 分析的重要工具。

---

# 61. Basin 不等於證明存在

即使一個 unknown floating candidate 落入某個 rational world's recovery basin，

仍需要 exact source：

$$
W^\ast
$$

通過所有 constraints。

真正證明的是：

$$
W^\ast,
$$

不是 basin 或 candidate proximity。

---

# 62. Recovery Energy 只可作 Search Heuristic

可以使用：

$$
J(W)
=
\alpha D_{\mathrm{obs}}(W,\widetilde W)
+
\beta D_\Phi(W)
+
\gamma\log H(W).
$$

但：

$$
\min J
$$

不能作 theorem condition。

theorem gate 仍是：

$$
D_\Phi(W^\ast)=0
$$

exactly，

以及完整 arithmetic / uniqueness certificate。

---

# 63. Constraint-First vs Approximation-First

兩種策略：

### Approximation-First

先對每個 coordinate 建 rational candidates，再過 constraints。

### Constraint-First

先用 algebraic structure 降維，再重建少數 primitive parameters。

P3 預期後者在 Perfect-Cuboid-like world 更強。

例如只 recover：

$$
x,y,z,
$$

然後 exact 推導：

$$
u,v,w.
$$

---

# 64. Hybrid Recovery

實際建議：

$$
\boxed{
\text{Gauge}
\rightarrow
\text{Constraint Reduction}
\rightarrow
\text{Local Arithmetic Proposals}
\rightarrow
\text{Exact Global Gate}
}
$$

而不是：

$$
\text{Approximate all coordinates independently}.
$$

---

# 65. P3 的第一個演算法草案

```text
function recover_world(observation, model, bounds):
    normalize observation by declared gauge
    construct observation intervals
    identify primitive recovery variables

    for each primitive variable:
        enumerate bounded rational candidates

    order variables by candidate count and constraint degree

    run constraint-guided exact search:
        assign candidate
        propagate exact consequences
        apply arithmetic predicates
        prune contradictions

    quotient surviving worlds by scale/symmetry equivalence

    if no survivors:
        classify reason

    if one equivalence class:
        verify exact certificate
        verify observation compatibility
        verify uniqueness within bounds
        return UNIQUE_RECOVERY

    return AMBIGUOUS_RECOVERY
```

---

# 66. Arithmetic Propagation 草案

```text
if x and y are exact rationals:
    r = x*x + y*y

    if target z is required rational:
        if rational_square(r):
            z = positive_rational_sqrt(r)
        else:
            reject branch
```

這比：

```text
z ≈ sqrt(float(x*x+y*y))
then rational_fit(z)
```

更可靠。

---

# 67. Perfect-Cuboid-like Normalized Search

normalized constraints：

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

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

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

$$
w^2=y^2+z^2.
$$

若 target：

$$
x,y,z,u,v,w\in\mathbb Q,
$$

可把 primitive search 降成：

$$
x,y,z.
$$

甚至利用：

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

再降成：

$$
x,y.
$$

但是否能在 arithmetic reconstruction 中安全採這種降維，要由 parameterization singularity 與 sign domain 再檢查。

---

# 68. Sign Domain

Perfect Cuboid 要求：

$$
x>0,
$$

$$
y>0,
$$

$$
z>0.
$$

因此 square root branch 固定取正。

這可以直接剪除：

$$
\pm
$$

symmetry。

---

# 69. Ordering Domain

再加入：

$$
x\le y\le z.
$$

即可 quotient：

$$
S_3.
$$

因此 admissible domain：

$$
\Omega_{\mathrm{PC}}
=
\{
0<x\le y\le z<1
\}.
$$

這對唯一性判定很重要。

---

# 70. Partial Closure Benchmark

對一個 candidate world 可定義：

$$
C(W)
=
(c_{ab},c_{ac},c_{bc},c_g).
$$

P3 應測：

- recovery 是否保持 known closure vector；
- noise 是否造成 false closure；
- exact gate 是否能恢復正確 partial closure。

Euler brick 的 target：

$$
C(W)
=
(1,1,1,0).
$$

---

# 71. Closure Recovery Accuracy

定義：

$$
R_C
=
\frac{
\text{correctly recovered closure bits}
}{
\text{all closure bits}
}.
$$

這可以在真正 Perfect Cuboid candidate 前，先看 engine 是否能正確識別「哪一個 channel 沒有閉合」。

---

# 72. False Closure 是最嚴重錯誤

如果真值：

$$
c_i=0
$$

但 engine 回：

$$
\hat c_i=1,
$$

這是：

$$
\mathrm{FalseClosure}.
$$

P3 必須把它當成高嚴重度錯誤。

尤其在 Perfect Cuboid 研究中：

$$
(1,1,1,0)
\rightarrow
(1,1,1,1)
$$

如果只是數值幻覺，會直接導致錯誤「證明」。

---

# 73. Recovery Trace

每次 successful recovery 保留：

$$
\mathcal T_R
=
(
t_1,\ldots,t_m
).
$$

例如：

1. normalize；
2. enumerate $x$；
3. enumerate $y$；
4. derive $z^2$；
5. rational-square gate；
6. derive $u,v,w$；
7. exact verify；
8. quotient symmetry；
9. uniqueness scan。

這些 trace 是日後 algorithm-to-theorem compilation 的核心資料。

---

# 74. Machine-Recheckable Output

P3 output 至少包含：

```text
source_model
observation
intervals
height_bound
gauge
candidate_counts
pruning_trace
exact_world
exact_constraints
symmetry_class
uniqueness_scope
certificate_status
```

所有 rational 必須用：

```text
numerator / denominator
```

canonical form 儲存。

---

# 75. Failure Diagnosis

若 recovery 失敗，不能只回：

**FAIL**。

至少分類：

- source outside bound；
- interval misses source；
- precision insufficient；
- local candidate generator incomplete；
- constraint implementation wrong；
- symmetry canonicalization wrong；
- arithmetic predicate wrong；
- uniqueness unresolved。

---

# 76. P3 的驗收門檻

在進未知 Perfect Cuboid floating candidate 前，至少要求：

1. rational triangle positive controls 高可靠恢復；
2. scale duplicates canonical merge；
3. mixed rational/irrational cuboid 正確標註；
4. Euler brick 不出現 false body-diagonal closure；
5. deliberate irrational controls 零 false exact claim；
6. ambiguity controls 不強行 unique；
7. precision ladder 呈現合理 threshold；
8. exact certificate 可獨立重算；
9. replay deterministic；
10. source-bound exclusion 能正確診斷。

---

# 77. P3 與 P4 的分界

P3 主要回答：

> 已知 exact rational source 存在時，我們能不能把它找回來？

P4 將反過來加強：

> 當 exact rational source 不存在、或 observation 太模糊時，我們能不能可靠拒絕？

因此：

$$
\mathrm{P3}
=
\text{Recovery Capability},
$$

$$
\mathrm{P4}
=
\text{False-Positive Resistance}.
$$

---

# 78. P3 與真正 Perfect Cuboid Candidate 的分界

真正 candidate：

$$
\widetilde W_{\mathrm{PC}}
$$

在 P3 以前只能被視為 observation。

P3 完成後，才能把它送入同一 pipeline。

結果只能是：

$$
\mathrm{Unique},
$$

$$
\mathrm{Ambiguous},
$$

$$
\mathrm{NoCertifiedRecovery},
$$

或：

$$
\mathrm{InsufficientPrecision}.
$$

不能增加第五個狀態：

**Looks Perfect**。

---

# 79. 一個重要的方法論結論

Perfect Cuboid 的 floating candidate 真正有價值的地方，不是：

$$
\text{它很接近整數。}
$$

而是它可以成為：

$$
\text{inverse-world reconstruction query}.
$$

也就是問：

$$
\boxed{
\exists
W^\ast
\in
\mathcal V(\mathbb Q)
\text{ compatible with }
\widetilde W
?
}
$$

並進一步問：

$$
\boxed{
\text{Is it unique under declared bounds and quotient?}
}
$$

---

# 80. P3 核心命題整理

### 命題 P3-A

有界 denominator 的 rationals 在足夠小 interval 中至多有一個候選。

### 命題 P3-B

由 exact necessary constraints 導出的 early pruning 是 proof-safe。

### 命題 P3-C

Scale quotient 可以把同一 exact source 的無限多尺度表示壓成單一 normalized target。

### 命題 P3-D

Global constraint coupling 不會把 invalid local approximations 變成 exact solutions；它只能淘汰或確認 exact candidates。

### 命題 P3-E

Unique recovery 必須相對於明確的：

$$
(\Phi,\Omega,H_{\max},\mathbb A,\sim)
$$

聲明，而不是無條件全域唯一。

---

# 81. P3 的核心猜想

### 猜想 P3-C1：Constraint-Coupled Precision Gain

在相同 target height 下，使用 joint exact constraints 的 world recovery 所需 observation precision，可低於完全獨立 coordinate recovery 後再交叉驗證的 precision demand。

### 猜想 P3-C2：Low-Dimensional Primitive Recovery

對高度耦合的幾何世界，先 recover minimal primitive variables，再 exact propagate derived quantities，會顯著降低 candidate explosion。

### 猜想 P3-C3：Recovery Basin Structure

對 bounded-height isolated rational world，存在非零 numerical neighborhood，使足夠精確且正確建模的 observations 均 recover 到同一 quotient-class source。

這三項將由 P3 實驗驗證，而不是現在宣稱為定理。

---

# 82. 與世界模型方法的關係

P3 的本質不是單純 number theory utility。

它把 virtual world 當成 inverse problem：

$$
\text{latent exact world}
\rightarrow
\text{rendered / computed observation}.
$$

GER 則執行：

$$
\text{observation}
\rightarrow
\text{latent exact world hypothesis}.
$$

因此整個問題可以重新理解為：

$$
\boxed{
\text{Arithmetic World Identification}.
}
$$

---

# 83. 從電腦方法論到數學方法論

如果 P3 找到穩定 pattern：

例如只要：

$$
\delta
<
f(H,\Phi)
$$

就必然 unique recover，

下一步不是只保留成程式經驗。

應嘗試證明：

$$
\delta_{\max}
=
f(H,\Phi)
$$

的充分條件或下界。

因此：

$$
\text{benchmark}
\rightarrow
\text{empirical threshold}
\rightarrow
\text{conjecture}
\rightarrow
\text{proof}.
$$

這正是 GERES 原始目標中的 algorithm-to-theorem 路線。

---

# 84. P3 實作 MVP

### MVP-1

Exact rational triangle generator。

### MVP-2

Observation projector。

### MVP-3

Interval builder。

### MVP-4

Bounded rational candidate generator。

### MVP-5

Exact Pythagorean constraint gate。

### MVP-6

Unique / Ambiguous / None classifier。

### MVP-7

Scale / symmetry canonicalizer。

### MVP-8

Euler brick partial-closure benchmark。

### MVP-9

Irrational control。

### MVP-10

Recovery certificate exporter。

做到 MVP-10，才值得把 unknown Perfect Cuboid floating candidates 接入。

---

# 85. 與 WESL 的整合

WESL 在 P3 後新增：

## Recovery View

同時顯示：

$$
W_{\mathrm{obs}}
$$

與：

$$
W^\ast_{\mathrm{candidate}}.
$$

## Candidate Lattice

顯示每個 bounded rational proposal。

## Constraint Pruning Animation

顯示候選如何因 exact constraints 被淘汰。

## Precision Slider

改變 observation precision，觀察：

$$
\mathrm{Ambiguous}
\rightarrow
\mathrm{Unique}
$$

的 transition。

## Certificate Lock

只有 exact gate 與 uniqueness scope 通過，才顯示：

**Certified Recovery**。

---

# 86. 視覺化的研究價值

這裡的可視化不是裝飾。

它可以直接顯示：

$$
\text{local candidate cloud}
$$

如何在 constraint coupling 後收縮成：

$$
\text{global arithmetic point}.
$$

如果最後「喀一聲」發生，它應該代表：

$$
\boxed{
\text{candidate set quotient collapsed to one certified exact world class}
}
$$

而不是某個 decimal 剛好變得很漂亮。

---

# 87. Claim Boundary

截至 P3 方法論版本：

已建立：

- synthetic exact-source protocol；
- observation protocol；
- bounded-height semantics；
- scalar uniqueness bound；
- world-level candidate semantics；
- global constraint pruning；
- quotient-aware uniqueness；
- positive / negative / ambiguity controls；
- Euler brick partial-closure control；
- precision-height phase diagram；
- recovery certificate；
- P3 MVP road map。

尚未宣稱：

- GER 已實作完成；
- Perfect Cuboid floating candidate 已 recover；
- Perfect Cuboid 存在；
- bounded-height global recovery 猜想已證明；
- joint constraints 必然帶來多少 precision gain。

---

# 88. 結論

GERES P3 將研究方向從：

$$
\text{forward world transformation}
$$

正式推進到：

$$
\text{inverse arithmetic world identification}.
$$

最重要的控制原則是：

$$
\boxed{
\text{先在知道答案的世界證明演算法會找回答案，再把它用到不知道答案的世界。}
}
$$

而 recovery 本身必須完成：

$$
\boxed{
\widetilde W
\rightarrow
\text{bounded proposals}
\rightarrow
\text{exact constraint coupling}
\rightarrow
\text{quotient}
\rightarrow
\text{uniqueness}
\rightarrow
W^\ast
}
$$

真正的成功不是：

$$
W^\ast\approx\widetilde W,
$$

而是：

$$
\boxed{
W^\ast
\in
\mathcal V(\mathbb A)
}
$$

exactly，

並且：

$$
\boxed{
[W^\ast]
\text{ is uniquely recoverable within the declared scope.}
}
$$

這使 Perfect Cuboid 的浮點候補不再只是一組「非常接近」的數，而變成一個可以被嚴格詢問的 inverse-world problem。

---

## 下一階段

**GERES P4 — Irrational and False-Positive Gate**

P4 將集中研究：

$$
\boxed{
\text{如何證明某些漂亮的近似不應被重建成 exact arithmetic world。}
}
$$

重點包括：

- irrational controls；
- near-square traps；
- rational-density traps；
- insufficient precision；
- adversarial decimal patterns；
- false uniqueness；
- bounded-domain rejection certificate；
- Perfect-Cuboid-like partial closure rejection。

P3 解決「能不能找回來」。

P4 將解決「什麼時候必須拒絕找回來」。
