# FORC-P1：Exact Rational Difference Algebra and Virtual Curvature Runtime

**Canonical Four-Channel Closure, Exact Divided Differences, and Rational-Branch Navigation**

版本：v0.1  
系列：FORC — Fraction-Ontological Ratio Calculus  
階段：P1  
性質：exact rational runtime／canonical defect vector／virtual curvature／ratio integral／control experiments  
Canonical source：UTF-8 Markdown

---

## 摘要

FORC-P0 提出：

$$
\boxed{
\text{Ratio-local, integer-nonlocal}.
}
$$

P1 將此方法第一次變成可執行 exact rational runtime。

本輪首先固定四個 canonical closure channels。

對任意 positive rational cuboid world，利用 common scale 將：

$$
a=1
$$

正規化。

定義 rational world state：

$$
\boxed{
X
=
(
b,c,d_{ab},d_{ac},d_{bc},g
)
\in
\mathbb Q_{>0}^6.
}
$$

四個 theorem-level defects：

$$
\boxed{
E_1
=
d_{ab}^2-1-b^2,
}
$$

$$
\boxed{
E_2
=
d_{ac}^2-1-c^2,
}
$$

$$
\boxed{
E_3
=
d_{bc}^2-b^2-c^2,
}
$$

$$
\boxed{
E_4
=
g^2-1-b^2-c^2.
}
$$

因此：

$$
\boxed{
\mathbf E
=
(E_1,E_2,E_3,E_4).
}
$$

若：

$$
\mathbf E=\mathbf0,
$$

則 normalized rational world 已完成三個 face-square closure與 body-square closure。

因所有量均 rational，清 denominator 後即得到 integer Perfect Cuboid。

所以在 FORC-P1 中：

$$
\boxed{
\mathbf E=\mathbf0
}
$$

不再只是 heuristic Four-Corner Click，而是 classical rational Perfect Cuboid 的 canonical normalized theorem gate。

這一設計也避免把「四角」過早硬解讀成四個 physical corner angles。

X / angle fingerprints仍保留為 navigation metadata，但真正的四個零點直接對應四條 defining equations。

接著 P1 建立：

- exact rational L1 path length；
- first divided difference；
- defect velocity；
- nonuniform second divided difference；
- virtual constraint curvature；
- inward velocity；
- inward curvature；
- signed ratio integral；
- absolute defect integral；
- curvature integral；
- Stern–Brocot mediant；
- Farey-neighbor control；
- rational branch report。

所有 runtime arithmetic 都使用：

$$
\boxed{
\mathbb Q
}
$$

exact backend。

P1 另外建立一條具有代表性的 control branch。

取 normalized unit-cube geometry：

$$
b=c=1.
$$

真實世界要求：

$$
d_{ab}=d_{ac}=d_{bc}=\sqrt2,
$$

$$
g=\sqrt3.
$$

FORC 不使用 float，而用：

$$
\sqrt2
$$

與：

$$
\sqrt3
$$

的 exact rational convergents 建立 rational branch。

此 branch 的 closure energy 持續下降到非常小，但在有限 branch 中：

$$
\boxed{
0
}
$$

個 exact Four-Channel Click。

這是一個非常重要的 control：

$$
\boxed{
\text{rational branch can converge toward a real-geometric world
without ever becoming an exact rational realization}.
}
$$

所以 FORC 的 curvature / integral 只能導航，不能把 convergence誤寫成 existence proof。

---

# 1. 為什麼 P1 先固定 Theorem-Level 四通道

P0 的「X + 四邊 + 四角」是一個幾何直覺。

但如果直接把 physical four corner angles 當四個 independent defects，會遇到：

- opposite corner symmetry；
- angle channels不獨立；
- local rectangle本身總能 real closure；
- 與 classical Perfect Cuboid theorem gate不完全一致。

所以 P1 改採：

$$
\boxed{
\text{Four defining quadratic closures}
}
$$

作 canonical channels。

---

# 2. Normalization

對任意 rational candidate：

$$
a>0.
$$

common scale除以：

$$
a
$$

可令：

$$
a=1.
$$

因所有 defining equations homogeneous degree $2$，

此 normalization不改 PerfectClick truth。

---

# 3. Ratio World

定義：

$$
\boxed{
X
=
(
b,c,d_{ab},d_{ac},d_{bc},g
)
}
$$

全部皆為相對於：

$$
a
$$

的 exact rational ratios。

這個 state 已經是 fraction ontology object，而不是 decimal point。

---

# 4. Canonical Defect 1

第一個 face：

$$
1^2+b^2=d_{ab}^2.
$$

所以：

$$
\boxed{
E_1=d_{ab}^2-1-b^2.
}
$$

---

# 5. Canonical Defect 2

第二個 face：

$$
1^2+c^2=d_{ac}^2.
$$

所以：

$$
\boxed{
E_2=d_{ac}^2-1-c^2.
}
$$

---

# 6. Canonical Defect 3

第三個 face：

$$
b^2+c^2=d_{bc}^2.
$$

所以：

$$
\boxed{
E_3=d_{bc}^2-b^2-c^2.
}
$$

---

# 7. Canonical Defect 4

body：

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

所以：

$$
\boxed{
E_4=g^2-1-b^2-c^2.
}
$$

---

# 8. Four-Channel Click Theorem

對：

$$
X\in\mathbb Q_{>0}^6,
$$

若：

$$
E_1=E_2=E_3=E_4=0,
$$

則存在 rational Perfect Cuboid realization。

清 denominator 得 integer Perfect Cuboid。

所以：

$$
\boxed{
\mathbf E=\mathbf0
\Longleftrightarrow
\text{normalized rational PerfectClick}.
}
$$

---

# 9. FORC Navigation 不改 Theorem Gate

所有：

$$
V_i,\kappa_i,\mathcal I_i
$$

都只是對：

$$
E_i
$$

的 path analysis。

它們不能取代：

$$
E_i=0.
$$

---

# 10. Multi-Dimensional Rational Step

兩個 ratio worlds：

$$
X,Y\in\mathbb Q^6.
$$

定義 exact L1 step：

$$
\boxed{
h(X,Y)
=
\sum_{j=1}^6
|Y_j-X_j|.
}
$$

---

# 11. 為什麼用 L1

若使用 Euclidean norm：

$$
\sqrt{
\sum_j
(Y_j-X_j)^2
},
$$

可能無必要引入 irrational quantity。

L1 保持：

$$
\boxed{
h\in\mathbb Q.
}
$$

---

# 12. Defect Velocity

對：

$$
X_k\rightarrow X_{k+1},
$$

定義：

$$
\boxed{
V_i(k)
=
\frac{
E_i(X_{k+1})-E_i(X_k)
}{
h(X_k,X_{k+1})
}.
}
$$

---

# 13. Vector Velocity

$$
\boxed{
\mathbf V
=
(V_1,V_2,V_3,V_4).
}
$$

只要 world coordinates rational，

velocity全部 rational。

---

# 14. Nonuniform Virtual Curvature

對：

$$
X_{k-1},X_k,X_{k+1},
$$

令：

$$
h_-=h(X_{k-1},X_k),
$$

$$
h_+=h(X_k,X_{k+1}).
$$

以及：

$$
s_-=
\frac{
E_i(X_k)-E_i(X_{k-1})
}{
h_-
},
$$

$$
s_+=
\frac{
E_i(X_{k+1})-E_i(X_k)
}{
h_+
}.
$$

定義：

$$
\boxed{
\kappa_i(k)
=
\frac{
2(s_+-s_-)
}{
h_-+h_+
}.
}
$$

---

# 15. Quadratic Exactness Control

如果 scalar：

$$
E(x)=x^2-x,
$$

即使取 nonuniform rational points，

上述 second divided difference仍 exact：

$$
\boxed{
\kappa=2.
}
$$

P1 runtime已驗證。

---

# 16. Linear Control

若：

$$
E(x)=3x+7,
$$

則：

$$
\boxed{
\kappa=0.
}
$$

同樣 exact 通過。

---

# 17. Toward-Click 不需要固定 Global Sign Convention

P0 使用：

$$
o_i\in\{-1,+1\}
$$

做 channel orientation。

P1 進一步採更直接的 local zero-oriented quantity。

---

# 18. Inward Velocity

若：

$$
E_i\neq0,
$$

定義：

$$
\boxed{
I_i^{(V)}
=
-\operatorname{sgn}(E_i)V_i.
}
$$

若：

$$
I_i^{(V)}>0,
$$

表示當前 motion 正降低：

$$
|E_i|.
$$

---

# 19. Outward Velocity

$$
\boxed{
I_i^{(V)}<0
}
$$

表示：

$$
|E_i|
$$

正在增加。

---

# 20. Exact Channel

若：

$$
E_i=0,
$$

該 channel 已 click。

P1 定義 inward velocity為：

$$
0.
$$

不再需要判方向。

---

# 21. Inward Curvature

同理定義：

$$
\boxed{
I_i^{(\kappa)}
=
-\operatorname{sgn}(E_i)\kappa_i.
}
$$

正值表示 local curvature 朝 zero-defect側彎曲。

---

# 22. Curvature 仍不是保證

即使：

$$
I_i^{(V)}>0,
$$

$$
I_i^{(\kappa)}>0,
$$

也不能推出 branch 未來必有：

$$
E_i=0.
$$

這仍是 navigation signal。

---

# 23. Closure Energy

定義 exact L1 closure energy：

$$
\boxed{
\Phi(X)
=
\sum_{i=1}^4
|E_i(X)|.
}
$$

---

# 24. 為什麼 Canonical State 仍是 Vector

一個 channel可以改善，

另一個惡化。

所以：

$$
\Phi
$$

只能 ranking。

theorem state必須保留：

$$
\mathbf E.
$$

---

# 25. Signed Defect Integral

沿 path：

$$
\gamma
=
(X_0,\ldots,X_N),
$$

P1 使用 trapezoidal exact integral：

$$
\boxed{
\mathcal I_i
=
\sum_{k=0}^{N-1}
\frac{
E_i(X_k)+E_i(X_{k+1})
}{2}
h_k.
}
$$

---

# 26. Absolute Defect Integral

定義：

$$
\boxed{
\mathcal A_i
=
\sum_{k=0}^{N-1}
\frac{
|E_i(X_k)|+|E_i(X_{k+1})|
}{2}
h_k.
}
$$

它描述 branch 累積 closure burden。

---

# 27. Curvature Integral

$$
\boxed{
\mathcal K_i
=
\sum_{k=1}^{N-1}
\kappa_i(k)
\frac{
h_-+h_+
}{2}.
}
$$

---

# 28. 所有積分仍可 Exact Rational

P1 runtime 的 path state、defects、steps皆使用：

$$
\texttt{Fraction}.
$$

所以：

$$
\boxed{
\mathcal I_i,
\mathcal A_i,
\mathcal K_i
\in\mathbb Q.
}
$$

---

# 29. Farey Control

取：

$$
\frac13,
\quad
\frac25.
$$

有：

$$
2\cdot3-1\cdot5=1.
$$

因此是 Farey neighbors。

exact step：

$$
\boxed{
\frac25-\frac13
=
\frac1{15}.
}
$$

---

# 30. Mediant Control

其 mediant：

$$
\boxed{
\frac{1+2}{3+5}
=
\frac38.
}
$$

runtime驗證：

$$
\frac13
<
\frac38
<
\frac25.
$$

---

# 31. Unit-Cube Real World

取：

$$
a=b=c=1.
$$

real geometry要求：

$$
d_{ab}=d_{ac}=d_{bc}=\sqrt2,
$$

$$
g=\sqrt3.
$$

這是一個 exact IGPC real world。

但不是 rational Perfect Cuboid。

---

# 32. Rational Approximation Branch

P1 不使用 floating approximations。

對：

$$
\sqrt2
$$

使用 continued-fraction rational convergents：

$$
1,
\frac32,
\frac75,
\frac{17}{12},
\frac{41}{29},
\ldots
$$

---

# 33. Body Rational Branch

對：

$$
\sqrt3
$$

使用：

$$
1,
2,
\frac53,
\frac74,
\frac{19}{11},
\frac{26}{15},
\ldots
$$

---

# 34. Coupled Unit-Cube Branch

每一層構造：

$$
X_k
=
(
1,1,
q_k^{(2)},
q_k^{(2)},
q_k^{(2)},
q_k^{(3)}
).
$$

所以四個 defects全部 exact rational。

---

# 35. 這是一個關鍵 Negative Control

當 convergents提高時：

$$
\Phi(X_k)
$$

大幅下降。

但 finite branch 中：

$$
\boxed{
0
}
$$

個：

$$
\mathbf E=\mathbf0.
$$

---

# 36. 這證明了什麼

它不是在證明 Perfect Cuboid 不存在。

它只驗證方法論的一個重要安全性觀念：

$$
\boxed{
\text{非常好的 rational convergence}
\not\Rightarrow
\text{exact rational closure}.
}
$$

---

# 37. 浮點「喀」與 Rational Click 必須分開

real geometry可以：

$$
E_i=0
$$

使用 irrational diagonals。

但 rational theorem gate要求：

$$
X\in\mathbb Q^6.
$$

所以：

$$
\boxed{
\text{Real Click}
\neq
\text{Rational Click}.
}
$$

---

# 38. FORC 真正負責的是 Branch Navigation

例如比較兩條 rational branches：

$$
\mathcal B_1,\mathcal B_2.
$$

可根據：

- current $\mathbf E$；
- inward velocity；
- inward curvature；
- absolute defect integral；
- rational height cost；

排序。

---

# 39. Branch Score v0.1

概念上：

$$
\boxed{
S
=
-w_E\Phi
+
w_V\sum_i\max(I_i^{(V)},0)
+
w_\kappa\sum_i\max(I_i^{(\kappa)},0)
-w_H\log H.
}
$$

P1 暫不固定 universal weights。

---

# 40. 為什麼不固定 Weight

不同 defect channels 的 natural scale 可能不同。

在正式 benchmark 前固定 weight容易導入 arbitrary bias。

P1 只固定 exact features，不固定最佳 ranking policy。

---

# 41. Feature Vector

navigation canonical feature：

$$
\boxed{
F_{\mathrm{nav}}
=
(
\mathbf E,
\mathbf V,
\boldsymbol\kappa,
\Phi,
\boldsymbol{\mathcal I},
\boldsymbol{\mathcal A},
\boldsymbol{\mathcal K},
H
).
}
$$

---

# 42. X / Angle Metadata

雖然 theorem channels固定為四個 quadratic defects，

仍可附：

$$
\chi,
\Xi
$$

等 X4 geometry fingerprints。

它們可作：

- branch clustering；
- symmetry reduction；
- navigation features。

但不改四個 theorem zeros。

---

# 43. Future Ratio Branch 不只一維

normalized state：

$$
X\in\mathbb Q^6.
$$

所以真正 search是 multi-dimensional rational graph。

P1 用 L1 arc length使 divided differences仍 exact rational。

---

# 44. 一維 Stern–Brocot 是 Primitive Navigator

可以一次 refine 一個 ratio coordinate，

或以 coupled branch operator同時 refine多個 coordinates。

---

# 45. Coupled Mediant

若兩個 rational world states：

$$
X_L,X_R
$$

具有 componentwise rational intervals，

可以對指定 coordinates取 mediant。

但不應對所有 coordinates盲目 mediant。

必須保留 X4 role semantics。

---

# 46. Branch Identity

future runtime應保存：

$$
\boxed{
\operatorname{BranchID}
=
H(
\text{parent},
\text{rational move}
).
}
$$

與 theorem cell ID分離。

---

# 47. Navigation Identity 與 Truth Identity

FORC branch node表示：

> 搜尋路線上的狀態。

X4-DMSD cell表示：

> theorem domain 的 mathematical region。

兩者可互相引用，但 identity不應混用。

---

# 48. Discovery Mode

FORC 可以：

- best-first；
- beam；
- long jump；
- curvature-guided branch expansion。

目標：

$$
\boxed{
\text{find rational PerfectClick fast}.
}
$$

---

# 49. Proof Mode

FORC只決定：

$$
\boxed{
\text{processing order}.
}
$$

任何 branch即使 score很差，也不能因此 sound-prune。

---

# 50. Sound Pruning 來源

仍然只能來自：

- exact defect sign；
- modular obstruction；
- valuation obstruction；
- CRT defect lattice；
- body-root lattice；
- other proven necessary conditions。

---

# 51. Perfect-Length Fractal 的 P1 定位

P1 將其更準確地定義為：

$$
\boxed{
\text{high-priority multi-scale branch subset}.
}
$$

是否真正具有 classical fractal structure仍未知。

---

# 52. Ratio Integral 的作用

不是要算「面積」本身。

而是將：

$$
\text{branch history}
$$

壓成可比較的 cumulative exact features。

---

# 53. Curvature 的作用

不是要把 rectilinear cuboid變成曲面。

而是研究：

$$
\boxed{
\text{error-to-click field 的離散彎曲}.
}
$$

---

# 54. 長距離 Jump

若某 branch在多層：

$$
I_i^{(V)}>0,
$$

$$
I_i^{(\kappa)}>0,
$$

可以提高 denominator target。

但 skipped interval只能標：

$$
\boxed{
\text{not explicitly explored}.
}
$$

不能標 IMPOSSIBLE。

---

# 55. P13 Integration

P13 persistent ledger未來可新增：

- `branch_id`
- `navigation_parent`
- `fraction_state`
- `nav_feature_hash`
- `ratio_integral_hash`
- `priority`

而 theorem state schema不改。

---

# 56. Navigation Certificate

每次 branch expansion保存：

```text
parent_branch
child_state
rational_move
defect_vector
velocity_vector
curvature_vector
integrals
height
score
```

---

# 57. Theorem Certificate

若 child同时被 X4 gate证明：

$$
\mathrm{EXACT}
$$

或：

$$
\mathrm{IMPOSSIBLE},
$$

另存 theorem certificate。

不能用 navigation certificate冒充 theorem proof。

---

# 58. P1 Runtime Control A

Farey：

$$
\frac13,\frac25
$$

exact step：

$$
\frac1{15}.
$$

PASS。

---

# 59. P1 Runtime Control B

nonuniform rational points上：

$$
E(x)=x^2-x
$$

virtual curvature：

$$
\boxed{
2
}
$$

exact PASS。

---

# 60. P1 Runtime Control C

linear：

$$
E(x)=3x+7
$$

curvature：

$$
\boxed{
0
}
$$

exact PASS。

---

# 61. P1 Runtime Control D

unit-cube rational branch：

- 全部 coordinates exact fractions；
- defects exact fractions；
- velocity exact；
- curvature exact；
- integrals exact。

PASS。

---

# 62. P1 Runtime Control E

unit-cube branch closure energy隨高階 convergents明顯降低。

但：

$$
\boxed{
\text{exact clicks}=0.
}
$$

PASS。

---

# 63. P1 核心結果

### P1-R1

正式固定四個 canonical theorem defects。

### P1-R2

normalized rational PerfectClick 等價於：

$$
\mathbf E=\mathbf0.
$$

### P1-R3

建立 exact multi-dimensional rational divided-difference algebra。

### P1-R4

建立 virtual constraint curvature。

### P1-R5

建立 local zero-oriented inward velocity / curvature。

### P1-R6

建立 three kinds of exact ratio-path integrals。

### P1-R7

Farey / mediant controls通过。

### P1-R8

unit-cube rational branch显示：

$$
\text{near-real closure}
\not\Rightarrow
\text{rational click}.
$$

---

# 64. Claim Boundary

P1 不宣称：

- 当前四-channel navigation feature是最佳搜索特征；
- curvature能保证未来 exact click；
- unit-cube branch与 Perfect Cuboid candidate family有直接存在性关系；
- ratio integral可取代 theorem proof；
- Perfect-Length Fractal 已被证明；
- Perfect Cuboid存在；
- Perfect Cuboid不存在。

---

# 65. 下一階段

**FORC-P2 — Stern–Brocot X4 Branch Search and Curvature-Guided Candidate Enrichment**

下一步：

1. 真实 Stern–Brocot branch generator；
2. multi-coordinate rational move schema；
3. branch priority queue；
4. canonical navigation score；
5. near-only baseline；
6. defect+velocity baseline；
7. defect+velocity+curvature FORC；
8. 相同 node budget比较 candidate quality；
9. 接 X4-DMSD sound gates；
10. 检验：
   $$
   \boxed{
   \text{曲率導航是否真的比只看「離零多近」更有效。}
   }
$$
