# X4-DMSD：X–四邊卯榫約束域與十進制多尺度搜尋方法論

**X4-DMSD: Exact X–Four-Edge Joint Constraint Domains with Decimal Multiscale Search**

版本：v0.1  
性質：基礎方法論／命題／猜想／搜尋架構  
目標問題：Perfect Cuboid / 完美長方體之 exact structural search  
核心技術：X-coupling、Four-Edge Joint、Exact Angle Fingerprint、DMSD、Lazy Refinement、Sound Pruning  
Canonical source：UTF-8 Markdown

---

## 摘要

本研究提出一種針對 Perfect Cuboid 類高度稀疏算術幾何問題的全新搜尋方法論：不再以邊長 tuple、近平方 gap、浮點殘差或巨大整數枚舉作為第一層搜尋對象，而先建立一個由 **X 結構、四邊角度、共享邊耦合與全域對角線方向** 所共同定義的 exact 卯榫約束域。

核心思想是：

> 一個候補只有在所有 X–edge–angle interfaces 可以「剛好喀入」時才進入下一層；多一分不行，少一分也不行。

這裡的「角度」不使用浮點三角函數判定，而以 Pythagorean ratio、direction fingerprint 與整數交叉乘積建立 exact predicate，因此：

$$
\operatorname{LOCK}\in\{0,1\}.
$$

沒有：

$$
0.99999999
$$

式的近似通過。

接著，本研究將 DMSD（Decimal Multiscale Serializable Domain）特製化，使其不再序列化巨大整數域中的所有元素，而序列化：

$$
\boxed{
\text{X–joint compatible constraint blocks}
}
$$

也就是每個十進制尺度 block 只保存與 PerfectClick 有關的摘要狀態、共享邊 key、角度 key、剩餘可能性與不可行證書。若一整個 block 已能由 exact necessary conditions 判定：

$$
\operatorname{PossibleClick}(B)=0,
$$

則整個 block 被 sound-prune，不進行元素展開。

因此，X4-DMSD 的目的不是：

$$
10^{12}
\rightarrow
10^{100}
$$

地擴大 brute force，

而是：

$$
\boxed{
\text{element search}
\rightarrow
\text{constraint-domain search}
\rightarrow
\text{multiscale block elimination}.
}
$$

本文建立 X4-DMSD 的基本物件、Exact X fingerprint、Four-Edge Joint、Shared-Edge Coupling、PerfectClick predicate、DMSD block semantics、sound pruning 條件、lazy refinement、搜尋狀態機、證書格式，以及後續實驗路線。

本文不宣稱 Perfect Cuboid 已被找到，也不宣稱此方法一定優於所有既有搜尋。本文提出的是一個可實作、可反駁、可逐尺度擴張，而且不依賴浮點近似作 theorem gate 的專用搜尋框架。

---

# 1. 問題重新定義

Perfect Cuboid 的標準長度表示可寫成：

$$
W
=
(a,b,c,d_{ab},d_{ac},d_{bc},g),
$$

滿足：

$$
a^2+b^2=d_{ab}^2,
$$

$$
a^2+c^2=d_{ac}^2,
$$

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

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

傳統搜尋常把：

$$
a,b,c
$$

或 Pythagorean tuples 當作主要枚舉變數。

X4-DMSD 改變第一層搜尋單位。

第一層搜尋對象不再是：

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

而是：

$$
\boxed{
\text{可 exact 卯榫的 X–四邊局部世界單元}
}
$$

以及這些局部單元能否形成全域共享邊 closure。

---

# 2. 「喀一聲」不是數值比喻

定義：

$$
\operatorname{LOCK}(J_1,J_2)
\in
\{0,1\}.
$$

若兩個 joint 在所有 theorem-relevant interfaces 上 exact compatible，則：

$$
\operatorname{LOCK}=1.
$$

否則：

$$
\operatorname{LOCK}=0.
$$

禁止定義：

$$
0<
\operatorname{LOCK}
<
1.
$$

因此：

$$
\boxed{
\text{near fit}
\neq
\text{fit}.
}
$$

---

# 3. 不直接計算角度

若一個 rectangle face 的邊為：

$$
a,b>0,
$$

face diagonal 為：

$$
d,
$$

且：

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

則角度 $\theta$ 可以寫成：

$$
\cos\theta=\frac ad,
$$

$$
\sin\theta=\frac bd.
$$

因此不需要：

$$
\theta=\arctan\left(\frac ba\right)
$$

的浮點計算。

定義 exact edge-angle fingerprint：

$$
\boxed{
\chi(a,b;d)
=
\left(
\frac ad,\frac bd
\right).
}
$$

---

# 4. Direction Fingerprint

如果只比較方向，

甚至不需要 diagonal：

$$
\theta_1=\theta_2
$$

iff：

$$
\frac{b_1}{a_1}
=
\frac{b_2}{a_2}.
$$

對整數或 rational quantities：

$$
\boxed{
b_1a_2=b_2a_1.
}
$$

所以 exact angle equality 可以完全使用整數乘法判定。

---

# 5. X Fingerprint

rectangle 的兩條 diagonals 可以寫成 direction vectors：

$$
v_+=(a,b),
$$

$$
v_-=(a,-b).
$$

其中央夾角 $\phi$ 滿足：

$$
\cos\phi
=
\frac{a^2-b^2}{a^2+b^2},
$$

$$
\sin\phi
=
\frac{2ab}{a^2+b^2}.
$$

定義：

$$
\boxed{
\Xi(a,b)
=
\left(
\frac{a^2-b^2}{a^2+b^2},
\frac{2ab}{a^2+b^2}
\right).
}
$$

稱為 **X Fingerprint**。

---

# 6. 為什麼 $\Xi$ 比浮點角度更適合

若：

$$
a,b\in\mathbb Q,
$$

則：

$$
\Xi(a,b)\in\mathbb Q^2.
$$

因此：

- 不需 trigonometric approximation；
- 不需 angle tolerance；
- 不需 degrees / radians conversion；
- 可直接 exact compare；
- 可 modularize；
- 可 hash；
- 可作 block summary key。

---

# 7. Four-Edge Joint

一個 face 不只由兩條 edge lengths 構成。

在 rectangle topology 下，四條邊形成兩組 equal opposite edges。

定義：

$$
J_{ab}
=
(
E_a^{(1)},
E_b^{(1)},
E_a^{(2)},
E_b^{(2)},
X_{ab},
\chi_{ab},
\Xi_{ab}
).
$$

其中：

$$
|E_a^{(1)}|
=
|E_a^{(2)}|
=
a,
$$

$$
|E_b^{(1)}|
=
|E_b^{(2)}|
=
b.
$$

---

# 8. X4 Joint

本文把：

$$
X+\text{four edges}
$$

視為單一不可分割搜尋單元：

$$
\boxed{
J^{X4}_{ab}.
}
$$

一個 X4 joint 至少包含：

1. 四邊 topology；
2. opposite-edge equality；
3. diagonal X；
4. exact angle fingerprint；
5. X central-angle fingerprint；
6. orientation；
7. scale-free ratio class；
8. arithmetic provenance。

---

# 9. Joint Equivalence

若：

$$
(a,b,d)
\mapsto
(ka,kb,kd)
$$

其中：

$$
k>0,
$$

則：

$$
\chi
$$

與：

$$
\Xi
$$

不變。

所以可以定義 X4 shape equivalence：

$$
J_1
\sim_X
J_2
$$

若其 normalized fingerprints一致。

---

# 10. Pythagorean Seed

primitive Pythagorean face可由：

$$
m>n>0
$$

生成：

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

$$
b=2mn,
$$

$$
d=m^2+n^2.
$$

其中：

$$
\gcd(m,n)=1
$$

且 $m,n$ parity 不同時給 primitive triple。

因此 X4 joint 可以直接以：

$$
(m,n)
$$

作 seed，而不先用巨大：

$$
(a,b,d)
$$

表示。

---

# 11. Scale Quotient

若：

$$
(a,b,d)
=
k
(
m^2-n^2,
2mn,
m^2+n^2
),
$$

所有 angle / X fingerprints與：

$$
k
$$

無關。

因此：

$$
\boxed{
\text{first search shape seed, then scale}.
}
$$

這與 DMSD 的 Scale First 原則是互補而非衝突：

- X4 quotient 消除無意義 common scale；
- DMSD 管理 seed / family / coupling 的 arithmetic height scale。

---

# 12. 三個 Face-X Joints

Perfect Cuboid 有三個 face joints：

$$
J_{ab},
$$

$$
J_{ac},
$$

$$
J_{bc}.
$$

它們不是三個獨立 Pythagorean triples。

共享關係：

$$
J_{ab}
\cap
J_{ac}
=
a,
$$

$$
J_{ab}
\cap
J_{bc}
=
b,
$$

$$
J_{ac}
\cap
J_{bc}
=
c.
$$

---

# 13. Shared-Edge Coupling

定義 shared-edge operator：

$$
J_{ab}
\bowtie_a
J_{ac}.
$$

它成立 iff 兩個 joints 中標記為 $a$ 的 edge，在允許的 global scale convention 下 exact compatible。

類似：

$$
J_{ab}
\bowtie_b
J_{bc},
$$

$$
J_{ac}
\bowtie_c
J_{bc}.
$$

---

# 14. Raw Equality 與 Ratio Equality

若在 integerized world 中比較：

$$
a_{ab}
=
a_{ac},
$$

則使用 raw equality。

若尚在 scale-free joint space，

可比較：

$$
\frac{a_{ab}}{d_{ab}}
$$

等 normalized edge signature，

並在後續 global scale solving 中求共同 scale。

所以 coupling有兩種 mode：

### Integer Coupling

$$
a_1=a_2.
$$

### Projective Coupling

$$
a_1:a_2
$$

由共同 scale equation決定。

---

# 15. Global Scale Variables

對三個 local joints：

$$
J_{ab}^{(0)},
J_{ac}^{(0)},
J_{bc}^{(0)},
$$

可分別給 scale：

$$
k_{ab},
k_{ac},
k_{bc}.
$$

要求：

$$
k_{ab}a_{ab}^{(0)}
=
k_{ac}a_{ac}^{(0)},
$$

$$
k_{ab}b_{ab}^{(0)}
=
k_{bc}b_{bc}^{(0)},
$$

$$
k_{ac}c_{ac}^{(0)}
=
k_{bc}c_{bc}^{(0)}.
$$

這是一個 exact rational scale-coupling system。

---

# 16. Shared-Edge Scale Consistency

上式等價於：

$$
\frac{k_{ac}}{k_{ab}}
=
\frac{a_{ab}^{(0)}}{a_{ac}^{(0)}},
$$

$$
\frac{k_{bc}}{k_{ab}}
=
\frac{b_{ab}^{(0)}}{b_{bc}^{(0)}}.
$$

第三式必須與前兩式兼容：

$$
\boxed{
\frac{c_{ac}^{(0)}}{c_{bc}^{(0)}}
=
\frac{k_{bc}}{k_{ac}}.
}
$$

若不成立，三 joint 永遠無法組成 cuboid。

這是一個 powerful exact pre-filter。

---

# 17. 命題 X4-1：Triple-Joint Coupling Condition

給三個 local scale-free Pythagorean joints。

存在正 rational scales：

$$
k_{ab},k_{ac},k_{bc}
$$

使其共享邊 exact 合併，iff 三個 pairwise scale ratios一致。

這可轉成單一 cross-multiplication identity。

因此 shared-edge compatibility可以在 integer seed層就做 exact reject。

---

# 18. Global Body-X Signature

Perfect Cuboid 還需要 body diagonal：

$$
g.
$$

定義：

$$
\boxed{
\Gamma(a,b,c;g)
=
\left(
\frac ag,
\frac bg,
\frac cg
\right).
}
$$

若：

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

則：

$$
\Gamma
$$

位於 unit sphere。

---

# 19. Body-X as Global Mortise

可以把：

$$
\Gamma
$$

理解成全域 socket / mortise。

三個 face joints組合出的：

$$
(a,b,c)
$$

必須再精確吻合：

$$
g.
$$

因此：

$$
\boxed{
\text{three local X4 joints}
+
\text{one global body-X joint}.
}
$$

---

# 20. PerfectClick Predicate

定義：

$$
\operatorname{PerfectClick}
(
J_{ab},
J_{ac},
J_{bc},
\Gamma
).
$$

只有下列全部成立：

$$
J_{ab}
\bowtie_a
J_{ac},
$$

$$
J_{ab}
\bowtie_b
J_{bc},
$$

$$
J_{ac}
\bowtie_c
J_{bc},
$$

以及：

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

且所有 theorem-required quantities位於 target arithmetic domain，

才有：

$$
\boxed{
\operatorname{PerfectClick}=1.
}
$$

---

# 21. Target Arithmetic Domain

對 Perfect Cuboid：

$$
\mathbb A
=
\mathbb Z_{>0}.
$$

也可先在 normalized layer使用：

$$
\mathbb Q_{>0}.
$$

若 rational shape完整 closure，

再 denominator clearing：

$$
\mathbb Q
\rightarrow
\mathbb Z.
$$

---

# 22. PerfectClick 不是 Score

禁止：

$$
\operatorname{PerfectClick}
=
0.9999.
$$

可以另外有 search score：

$$
S_{\mathrm{heuristic}},
$$

但 theorem status仍：

$$
\operatorname{PerfectClick}
\in
\{0,1\}.
$$

---

# 23. 卯榫 Constraint Domain

定義：

$$
\mathcal J_X
$$

為所有合法 X4 local joints。

定義三 joint coupling domain：

$$
\mathcal C_{X4}
=
\left\{
(J_{ab},J_{ac},J_{bc})
:
\text{shared-edge compatible}
\right\}.
$$

Perfect target domain：

$$
\boxed{
\mathcal P_{X4}
=
\left\{
W\in\mathcal C_{X4}
:
\operatorname{PerfectClick}(W)=1
\right\}.
}
$$

---

# 24. 搜尋問題改寫

傳統：

$$
\text{Search }(a,b,c)\in\mathbb Z^3.
$$

X4：

$$
\boxed{
\text{Search }W\in\mathcal C_{X4}.
}
$$

這代表大部分不可能形成 joint 的 tuples根本不進入搜尋域。

---

# 25. 這不是普通 Constraint Programming

一般 constraint programming也會剪枝。

X4-DMSD 額外要求：

1. 搜尋基本單位是幾何 joint，而不是 scalar variable；
2. angle / X structure canonicalized；
3. scale quotient先做；
4. shared-edge coupling是第一級 index；
5. DMSD以 constraint blocks跨數量級展開；
6. block summary本身要可合併與可證排除。

---

# 26. DMSD 特製化

原 DMSD 的基本思想：

$$
\text{Scale First}
+
\text{Summary}
+
\text{Lazy Refinement}.
$$

X4-DMSD 不改變此原則，

但把 property換成：

$$
\boxed{
\text{joint compatibility property}.
}
$$

---

# 27. X4-DMSD Block

定義一個 multiscale block：

$$
B_k^X.
$$

它不是：

$$
[10^k,10^{k+1})
$$

內所有普通整數的 materialized list。

而是一個 X-joint seed / height / coupling region。

---

# 28. Seed Height

例如對 Pythagorean seed：

$$
(m,n),
$$

可定義：

$$
H_X(m,n)
=
\max(m,n)
$$

或：

$$
H_d(m,n)
=
m^2+n^2.
$$

十進制 scale：

$$
10^k
\le
H_X
<
10^{k+1}.
$$

---

# 29. Block Summary

X4-DMSD block summary：

$$
\Sigma(B)
=
(
K_X,
K_E,
K_R,
K_M,
K_G,
K_C
).
$$

其中：

### $K_X$

X fingerprint classes。

### $K_E$

edge-ratio / shared-edge signature classes。

### $K_R$

residue / modular masks。

### $K_M$

possible mating classes。

### $K_G$

body-X compatible summaries。

### $K_C$

closure state：

$$
\{
\mathrm{IMPOSSIBLE},
\mathrm{POSSIBLE},
\mathrm{UNKNOWN},
\mathrm{EXACT}
\}.
$$

---

# 30. IMPOSSIBLE 的語義

只有當 exact necessary condition證明整個 block沒有任何 PerfectClick candidate時：

$$
K_C(B)
=
\mathrm{IMPOSSIBLE}.
$$

才可以 prune。

因此：

$$
\boxed{
\text{pruning must be sound}.
}
$$

---

# 31. Sound-Pruning Requirement

定義：

$$
\operatorname{Prune}(B)=1.
$$

必須保證：

$$
\boxed{
B\cap\mathcal P_{X4}
=
\varnothing.
}
$$

如果只是：

> 看起來希望很低，

不能 prune。

---

# 32. No-False-Negative Principle

對 theorem-directed mode：

$$
\boxed{
\operatorname{PerfectClick}(W)=1
\Rightarrow
W
\text{ must never be pruned by any ancestor block}.
}
$$

這是 X4-DMSD 最重要的 correctness property。

---

# 33. Necessary-Condition Summaries

一個 block 可以保存例如：

- possible slope classes；
- possible opposite-edge ratios；
- possible shared-edge gcd classes；
- possible modular square classes；
- possible body-diagonal residues；
- possible scale-ratio compatibility；
- known impossible angle pairings。

---

# 34. Block-Level Join

對兩個 blocks：

$$
B_i,
B_j,
$$

定義：

$$
B_i
\bowtie
B_j.
$$

它不產生完整 Cartesian product。

先比較 summaries：

$$
\Sigma(B_i),
\Sigma(B_j).
$$

若 summary-level necessary conditions不相容：

$$
\boxed{
B_i\bowtie B_j=\varnothing.
}
$$

則整個 block pair被排除。

---

# 35. Summary Before Elements

X4-DMSD 的核心 computational rule：

$$
\boxed{
\text{summary join first}
\rightarrow
\text{refine only survivors}.
}
$$

不是：

$$
\text{materialize}
\rightarrow
\text{compare every pair}.
$$

---

# 36. Decimal Multiscale Tree

root：

$$
B_0.
$$

children：

$$
B_{0,0},
\ldots,
B_{0,9}.
$$

或依 seed height：

$$
[10^k,10^{k+1})
$$

再切：

$$
10
$$

個 logarithmic / arithmetic subblocks。

---

# 37. Lazy Refinement

若：

$$
K_C(B)
=
\mathrm{IMPOSSIBLE},
$$

停止。

若：

$$
K_C(B)
=
\mathrm{EXACT},
$$

直接輸出 certificate。

若：

$$
K_C(B)
=
\mathrm{POSSIBLE}
$$

或：

$$
\mathrm{UNKNOWN},
$$

才：

$$
B
\rightarrow
\{B_1,\ldots,B_m\}.
$$

---

# 38. Arbitrary Scale Representation

因此即使：

$$
H_X
\sim
10^{100},
$$

系統也不要求 materialize：

$$
10^{100}
$$

個 seeds。

只需要序列化：

$$
B_{100}^X.
$$

之後是否 refinement由 compatibility summary決定。

---

# 39. Scale Jump

如果某一 property operator能直接作用：

$$
B_k
$$

而不展開低層，

則可以：

$$
k=10
\rightarrow
100
\rightarrow
1000.
$$

這就是 DMSD 在本問題真正負責的「數量級放大」。

---

# 40. 不是 Skip Proof

Scale jump不代表跳過證明。

它要求 block operator：

$$
F_B
$$

對整個 block成立。

例如：

$$
\operatorname{ResidueMask}(B).
$$

若 mask 已與 PerfectClick必要 residue不相交，

整個 block exact reject。

---

# 41. Residue Projection

對 edge / diagonal square conditions，可選 modulus：

$$
m.
$$

保存：

$$
R_m(B)
\subseteq
(\mathbb Z/m\mathbb Z)^n.
$$

如果：

$$
R_m(B)
\cap
R_m^{\mathrm{Perfect}}
=
\varnothing,
$$

則：

$$
B
$$

可 sound-prune。

---

# 42. Multi-Modulus Intersection

多個 moduli：

$$
m_1,\ldots,m_t
$$

可組合：

$$
R(B)
=
\bigcap_i
R_{m_i}(B).
$$

這本質上是 block-level modular sieve。

---

# 43. Angle-Key Index

因為：

$$
\frac ba
$$

定義 direction，

可以使用 reduced ratio：

$$
\operatorname{AngleKey}(a,b)
=
\frac{b/\gcd(a,b)}{a/\gcd(a,b)}.
$$

對 Pythagorean seed也可直接由：

$$
m,n
$$

生成 canonical key。

---

# 44. X-Key Index

$$
\Xi(a,b)
$$

可化成 reduced rational pair：

$$
(\xi_1,\xi_2).
$$

定義：

$$
\operatorname{XKey}
=
\operatorname{Reduce}
(
a^2-b^2,
2ab,
a^2+b^2
).
$$

這其實是一個 Pythagorean triple-like key。

---

# 45. Shared-Edge Key

若 local joint edge：

$$
e
$$

在 primitive representation為：

$$
e_0,
$$

則 global scale coupling可記成：

$$
[e_0:k].
$$

block summary可以儲存：

- prime support；
- valuation ranges；
- gcd class；
- possible scale ratio。

---

# 46. Prime-Valuation Summary

若 shared-edge compatibility需要：

$$
k_1e_1=k_2e_2,
$$

則對任意 prime：

$$
p,
$$

有：

$$
v_p(k_1)+v_p(e_1)
=
v_p(k_2)+v_p(e_2).
$$

block可先保存 valuation intervals。

若 intervals disjoint，

可直接 reject。

---

# 47. Body-Diagonal Residue Gate

即使三 face joints已合併，

還需：

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

為 square。

因此 block-level可保存：

$$
a^2+b^2+c^2
\bmod m.
$$

若對所有 possible residues都不是 square residue：

$$
\boxed{
\text{global body-X impossible}.
}
$$

---

# 48. Search State Machine

X4-DMSD candidate state：

$$
\mathrm{BLOCK},
$$

$$
\mathrm{LOCAL\_JOINT},
$$

$$
\mathrm{PAIR\_COUPLED},
$$

$$
\mathrm{TRIPLE\_COUPLED},
$$

$$
\mathrm{BODY\_COMPATIBLE},
$$

$$
\mathrm{PERFECT\_CLICK},
$$

$$
\mathrm{REJECTED}.
$$

---

# 49. Early Rejection Priority

建議 gate order：

1. local Pythagorean/X validity；
2. angle/X key canonicalization；
3. shared-edge ratio feasibility；
4. valuation / residue compatibility；
5. triple scale consistency；
6. body-square residue；
7. exact body diagonal；
8. final PerfectClick certificate。

便宜 gate先跑。

---

# 50. Candidate Graph

每個 surviving local X4 joint是一個 node：

$$
v_i.
$$

若兩 joints可能共享某 edge：

$$
e_{ij}\in E.
$$

因此形成：

$$
G_X=(V,E).
$$

Perfect Cuboid candidate變成：

$$
\boxed{
\text{具有三類共享邊一致性的 triangle / motif search}
}
$$

而不是任意 triple enumeration。

---

# 51. Typed Edges

graph edge不是單一 relation。

類型：

$$
E_a,
$$

$$
E_b,
$$

$$
E_c.
$$

所以 target motif必須同時包含：

$$
a,b,c
$$

三種 compatibility。

---

# 52. Hypergraph Form

更自然地，可以直接使用 hyperedge：

$$
h
=
(J_{ab},J_{ac},J_{bc}).
$$

若三 joint scale system一致，

則：

$$
h
$$

成為 triple-coupled world seed。

---

# 53. DMSD Hyperblock

進一步：

$$
\mathbb B
=
(B_{ab},B_{ac},B_{bc})
$$

是三個 X-joint blocks 的 hyperblock。

先判定：

$$
\operatorname{PossibleTripleLock}(\mathbb B).
$$

若 false，

整個 hyperblock不展開。

---

# 54. Complexity 轉移

普通搜尋複雜度主要在：

$$
|\mathcal A|
\cdot
|\mathcal B|
\cdot
|\mathcal C|.
$$

X4-DMSD 希望把成本轉成：

$$
\boxed{
\text{number of surviving compatible blocks}
+
\text{refinement cost}.
}
$$

是否真的更小，必須實驗測量。

---

# 55. Methodological Conjecture X4-C1

**Constraint-Domain Compression Conjecture**

對 Perfect Cuboid 搜尋，先建立 exact X4 local-joint domain再做 shared-edge coupling，會使有效候補密度顯著高於 ambient integer tuple search。

這是實驗猜想，不是目前定理。

---

# 56. Methodological Conjecture X4-C2

**Multiscale Block Sparsity Conjecture**

隨 arithmetic height增大，大部分 DMSD X4 blocks會在 element materialization前，被：

- scale-ratio incompatibility；
- modular residue；
- valuation；
- body-square；
- angle-key；

中的至少一種 exact necessary condition排除。

---

# 57. Methodological Conjecture X4-C3

**Exact-Click Isolation Conjecture**

如果 Perfect Cuboid solution存在，其對應 X4 joint triple在足夠細的 DMSD refinement下會落入一個：

$$
\mathrm{EXACT}
$$

block，

而不是只能以 asymptotic near-hit被辨識。

---

# 58. Methodological Conjecture X4-C4

**Scale-Independent Structural Signature Conjecture**

若兩個 huge-scale Perfect candidates只差 common scale，它們在 X4-DMSD 的 local fingerprints與 coupling skeleton上會 canonicalize到同一 shape signature。

因此 scale duplicates可在 materialization前消除。

---

# 59. Soundness Theorem Goal

未來應證：

若：

$$
\operatorname{Prune}(B)=1,
$$

則：

$$
B\cap\mathcal P_{X4}
=
\varnothing.
$$

對每一類 pruning operator個別證明。

---

# 60. Completeness Goal

若搜尋 tree無界 refinement：

$$
B
\rightarrow
B_i
\rightarrow
B_{ij}
\rightarrow\cdots
$$

且所有 nonempty candidate cells都最終被 refine，

則任何有限-height PerfectClick candidate都應被抵達。

這需要 formal coverage proof。

---

# 61. Search Certificate

若找到 PerfectClick：

$$
\mathcal C_{\mathrm{click}}
$$

至少輸出：

1. 三個 local X4 seeds；
2. local Pythagorean certificates；
3. shared-edge scale solution；
4. merged $a,b,c$；
5. three face diagonals；
6. body diagonal；
7. all exact equations；
8. primitive reduction；
9. originating DMSD block path。

---

# 62. Rejection Certificate

block reject至少輸出：

$$
\mathcal C_{\mathrm{reject}}
=
(
B,
\text{gate},
\text{witness},
\text{scope}
).
$$

例如：

```text
gate = body_residue
modulus = 16
possible_body_residues = {3,5,6}
square_residues = {0,1,4,9}
intersection = empty
```

---

# 63. UNKNOWN 是合法狀態

如果 block summary不足以判定：

$$
K_C(B)
=
\mathrm{UNKNOWN}.
$$

不能因為：

- 太大；
- 尚未算；
- operator缺失；

而直接 prune。

---

# 64. POSSIBLE 也不是 Candidate Witness

$$
\mathrm{POSSIBLE}
$$

只表示 necessary gates尚未排除。

不能宣稱：

$$
\operatorname{PerfectClick}=1.
$$

---

# 65. 三層 Truth

X4-DMSD 採：

### Block Truth

$$
\mathrm{IMPOSSIBLE},
\mathrm{POSSIBLE},
\mathrm{UNKNOWN}.
$$

### World Truth

exact constraints是否成立。

### Theorem Truth

是否完整 PerfectClick。

三層不可混用。

---

# 66. 特製 DMSD Property Algebra

原 DMSD property通常是 count / histogram / residue vector。

X4-DMSD 的 property改成：

$$
\boxed{
\text{compatibility algebra}.
}
$$

merge operator：

$$
\oplus
$$

不是只加總，

而可以是：

- set union；
- mask intersection；
- relation composition；
- valuation convolution；
- edge-key join。

---

# 67. Example：Residue Mask Merge

若 child blocks：

$$
B_i
$$

具有 possible residues：

$$
R(B_i),
$$

parent：

$$
R(B)
=
\bigcup_iR(B_i).
$$

如果：

$$
R(B)
$$

已完全 incompatible，

parent可直接 prune。

---

# 68. Example：Compatibility Intersection

若 block $A$ 可能 edge keys：

$$
K_A,
$$

block $B$ 可能 edge keys：

$$
K_B,
$$

則：

$$
K_{A\bowtie B}
=
K_A\cap K_B.
$$

若：

$$
K_A\cap K_B=\varnothing,
$$

則：

$$
A\bowtie B=\varnothing.
$$

---

# 69. Example：Scale-Ratio Set

如果 local block可能的 primitive shared edge集合：

$$
E_A,
E_B,
$$

可保存 reduced ratio classes：

$$
R_{AB}
=
\left\{
\frac{e_A}{e_B}
\right\}.
$$

三 joint若 ratio cycle：

$$
R_{ab,ac}
R_{ac,bc}
R_{bc,ab}
$$

無法包含：

$$
1,
$$

則 triple impossible。

---

# 70. Triple Ratio Cycle

對一個 exact triple：

$$
\frac{k_{ac}}{k_{ab}}
\cdot
\frac{k_{bc}}{k_{ac}}
\cdot
\frac{k_{ab}}{k_{bc}}
=
1.
$$

因此任何 block-level ratio intervals / sets如果：

$$
1
\notin
R_1R_2R_3,
$$

可直接 reject。

---

# 71. Angle Coupling 的幾何視圖

可視化上，每個 local joint是一個 puzzle piece。

但程式實際保存的不是 bitmap shape，

而是：

$$
\chi,
\Xi,
E,
R,
V_p.
$$

也就是 exact symbolic mortise/tenon signature。

---

# 72. 「多一分少一分」的正式化

人類視覺語言：

> 多一分不行，少一分不行。

X4 formal language：

$$
\boxed{
\text{cross-products equal}
}
$$

$$
\boxed{
\text{shared-edge scale equations solvable}
}
$$

$$
\boxed{
\text{all exact quadratic constraints zero}
}
$$

$$
\boxed{
\text{arithmetic domains satisfied}.
}
$$

---

# 73. Floating Point 的角色

float只能用於：

- UI；
- animation；
- rough ordering；
- visual inspection。

不能決定：

$$
\operatorname{LOCK}.
$$

---

# 74. No Angular Tolerance

禁止：

$$
|\theta_1-\theta_2|
<
10^{-12}
$$

作 lock。

正式使用：

$$
b_1a_2=b_2a_1
$$

或 normalized rational fingerprint equality。

---

# 75. No Scale Tolerance

禁止：

$$
|k_1e_1-k_2e_2|<\epsilon.
$$

正式使用 rational equality。

---

# 76. No Body Tolerance

禁止：

$$
|a^2+b^2+c^2-g^2|<\epsilon.
$$

正式使用：

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

---

# 77. X4-DMSD MVP

第一版不需要搜尋到巨大尺度。

MVP 應先：

### M1

生成 primitive Pythagorean X4 joints。

### M2

canonical X / angle keys。

### M3

shared-edge pair join。

### M4

triple scale-consistency join。

### M5

body-diagonal exact gate。

### M6

建立 DMSD height blocks。

### M7

block residue summaries。

### M8

lazy refinement。

### M9

bounded baseline comparison。

### M10

scale-jump experiment。

---

# 78. Control A：Known Pythagorean Reconstruction

驗證 local X4生成器能完整重建：

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

$$
(5,12,13),
$$

等 known joints。

---

# 79. Control B：Known Euler Brick

Euler brick：

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

三 face diagonals closed但 body未 closed。

X4-DMSD應成功形成 triple-joint world，

但：

$$
\operatorname{PerfectClick}=0.
$$

這是非常重要的 negative control。

---

# 80. Control C：Near-Hit Trap

輸入大量近平方、近角度 candidates。

所有 approximate match不得通過：

$$
\operatorname{LOCK}.
$$

---

# 81. Control D：Scale Duplicate

對：

$$
W
$$

與：

$$
kW,
$$

X4 shape signature應 identical。

不得重複視為兩個 distinct structural solutions。

---

# 82. Control E：Huge DMSD Empty Block

人工構造一個：

$$
10^{100}
$$

尺度 block，

使 residue / valuation summary可證無解。

要求系統不 materialize elements即可 reject。

這是 DMSD 核心能力驗證。

---

# 83. Baseline 1：Ambient Edge Search

測：

$$
a,b,c\le N.
$$

記錄：

- tuples tested；
- face-square tests；
- body-square tests；
- runtime。

---

# 84. Baseline 2：Pythagorean Triple Join

傳統生成 triples後，以共享 edge join。

這是 X4-DMSD 必須打敗或至少提供不同結構價值的更公平 baseline。

---

# 85. Baseline 3：X4 Without DMSD

使用 exact X4 joint / coupling，

但不做 multiscale block pruning。

這可以分離：

$$
\text{X4 gain}
$$

與：

$$
\text{DMSD gain}.
$$

---

# 86. Baseline 4：X4-DMSD

完整：

$$
\boxed{
\text{X4}
+
\text{block summaries}
+
\text{sound prune}
+
\text{lazy refinement}.
}
$$

---

# 87. Metrics

至少測：

### Element Avoidance Ratio

$$
R_E
=
1-
\frac{
N_{\mathrm{materialized}}
}{
N_{\mathrm{ambient}}
}.
$$

### Block Prune Rate

$$
R_B
=
\frac{
N_{\mathrm{pruned\ blocks}}
}{
N_{\mathrm{visited\ blocks}}
}.
$$

### Structural Yield

$$
Y_S
=
\frac{
N_{\mathrm{triple\ coupled}}
}{
N_{\mathrm{generated\ local\ joints}}
}.
$$

### Exact Candidate Yield

$$
Y_C
=
\frac{
N_{\mathrm{body\ compatible}}
}{
N_{\mathrm{triple\ coupled}}
}.
$$

---

# 88. Correctness Metrics

最重要的是：

$$
\boxed{
\mathrm{FalseNegative}=0.
}
$$

在所有 known controls。

如果 X4-DMSD 因 pruning漏掉 known exact solution，

方法直接失敗。

---

# 89. Cross-Scale Consistency

若先在：

$$
B_k
$$

summary，

再 refine，

parent summary必須與 children merge一致：

$$
\boxed{
\Sigma(B_k)
=
\bigoplus_i
\Sigma(B_{k,i})
}
$$

對宣稱 exact composable 的 summary fields成立。

---

# 90. DMSD Serialization

一個 block可 serialize：

```text
block_id
scale
height_interval
seed_family
x_keys
edge_keys
residue_masks
valuation_masks
possible_mates
body_masks
closure_state
children
certificate
```

---

# 91. Canonical Block Hash

每個 block summary可 canonical hash：

$$
H(B)
=
\operatorname{SHA256}
(
\operatorname{CanonicalSerialize}(\Sigma(B))
).
$$

用於：

- cache；
- distributed search；
- AI agent handoff；
- deduplication。

---

# 92. Distributed / Agent Search

因 block彼此可獨立 refine，

可以分發：

$$
B_1,\ldots,B_n
$$

給不同 workers / agents。

每個只需返回：

- summary；
- children；
- reject certificate；
- exact candidate。

---

# 93. World Search Ledger

每次：

$$
B
\rightarrow
B_i
$$

都寫：

$$
\mathcal L.
$$

如果某 solution最後被找到，

可以完整重播：

$$
\text{root block}
\rightarrow
\cdots
\rightarrow
\text{PerfectClick}.
$$

---

# 94. Search Without Materialization

最理想情況：

$$
B_{100}
$$

直接因 summary reject。

此時系統證明：

> 某一 entire $10^{100}$ arithmetic-scale region 不可能包含 compatible X4 world。

這才是 X4-DMSD 對「數量級」的真正攻擊。

---

# 95. 不是宣稱整個 $10^{100}$ Range 無解

block semantics必須非常精確。

只能排除：

$$
\boxed{
\text{該 block 所代表的 seed / constraint region}.
}
$$

不能因 block definition不覆蓋全部數字，就宣稱整個數值區間無解。

---

# 96. Coverage Map

因此 DMSD必須保存：

$$
\operatorname{Coverage}(B).
$$

證明：

$$
\bigcup_i
\operatorname{Coverage}(B_i)
=
\operatorname{Coverage}(B).
$$

否則 prune statistics沒有 theorem意義。

---

# 97. Representation Artifact Audit

十進制 block可能產生 base-related pattern。

所以 X4-DMSD必须區分：

$$
\text{mathematical structure}
$$

與：

$$
\text{decimal partition artifact}.
$$

必要時做 cross-base audit：

$$
10,
2,
3,
16,
\ldots
$$

---

# 98. Decimal 的角色

十進制不是 theorem primitive。

它只是：

- 人類可讀尺度；
- DMSD serialization grammar；
- logarithmic partition。

所有 PerfectClick equations與 base無關。

---

# 99. Cross-Base Invariance Goal

如果某 pruning rule是真正 arithmetic structure，

它應該在不同 block bases中對同一 candidate coverage給出一致 theorem outcome。

---

# 100. X4-DMSD 的真正研究命題

不是：

> 十進制可以證明 Perfect Cuboid。

而是：

$$
\boxed{
\text{可以用 exact joint semantics把 Perfect Cuboid 搜尋域重新編譯成可多尺度序列化的 constraint domain。}
}
$$

然後實驗：

$$
\boxed{
\text{這種 representation 是否能把有效搜尋尺度推得遠高於普通 element search。}
}
$$

---

# 101. 與 GERES 的關係

GERES 主線研究：

$$
\text{world reconstruction}
\rightarrow
\text{low-dimensional arithmetic geometry}.
$$

X4-DMSD 主線研究：

$$
\text{exact local joints}
\rightarrow
\text{multiscale constraint search}.
$$

兩條線不互相替代。

---

# 102. 雙線交會

若 X4-DMSD 找到：

$$
\mathrm{PerfectClick}=1,
$$

直接產生 GERES-compatible exact world certificate。

若只找到：

$$
(0,1,1,1)
$$

near-world，

可以送回 GERES分析其 arithmetic geometry。

---

# 103. 與 X-Diagonal Geometry Branch 的關係

X4-DMSD 可以視為原 X-Diagonal / center-axis coupling 的離散 exact search specialization。

原本：

$$
\text{visual geometry}
$$

現在變成：

$$
\boxed{
\text{canonical X keys}
+
\text{joint compatibility algebra}.
}
$$

---

# 104. 第一階段系列路線

### X4-P0

本文：方法論。

### X4-P1

Exact X4 Joint Algebra。

### X4-P2

Shared-Edge Scale Coupling Engine。

### X4-P3

PerfectClick Runtime。

### X4-P4

DMSD Block Semantics。

### X4-P5

Sound Modular / Valuation Pruning。

### X4-P6

Bounded Baseline Benchmark。

### X4-P7

Decimal Scale Jump。

### X4-P8

Cross-Base Audit。

### X4-P9

Distributed Huge-Scale Search。

### X4-P10

Theorem Extraction / Formal Verification。

---

# 105. 第一個真正 MVP

不應立刻：

$$
10^{100}.
$$

先做：

$$
H_X\le10^4
$$

或更小。

比較：

1. ambient integer search；
2. Pythagorean triple join；
3. X4 exact join；
4. X4-DMSD。

只要：

$$
R_E,
R_B,
Y_S
$$

開始顯示明確優勢，

再 scale jump。

---

# 106. Scale Jump Gate

只有在下列成立後才允許：

$$
10^k
\rightarrow
10^{k+\Delta}.
$$

要求：

1. block coverage verified；
2. summary merge exact；
3. no-false-negative controls pass；
4. prune certificates replayable；
5. cross-base artifact audit至少部分通過。

---

# 107. 最重要的反例

若 DMSD block summary太粗，

可能：

$$
B
$$

內只有一個 rare PerfectClick，

但 summary誤判：

$$
\mathrm{IMPOSSIBLE}.
$$

這是整個方法最危險的 failure。

因此：

$$
\boxed{
\text{soundness first, compression second}.
}
$$

---

# 108. Exactness Priority

寧可：

$$
\mathrm{UNKNOWN}
$$

blocks很多，

也不能錯 prune。

初期 X4-DMSD應偏保守。

---

# 109. Formal Theorem Goal

長期希望證：

**X4-DMSD Sound Coverage Theorem**

若：

$$
\mathcal T
$$

是完整 X4-DMSD search tree，

且所有 prune operators sound，

則對任意有限-height Perfect Cuboid witness：

$$
W^\ast,
$$

必存在一條未被 prune 的 path：

$$
B_0
\rightarrow
B_1
\rightarrow
\cdots
\rightarrow
W^\ast.
$$

---

# 110. Formal Compression Goal

再證：

對某些 summary operators：

$$
\Sigma(B)
$$

的計算成本 sublinear於 block cardinality，

甚至：

$$
O(1)
$$

或：

$$
O(\log |B|).
$$

這才是真正支持「數量級放大」的理論核心。

---

# 111. X4-DMSD 的哲學位置

世界本身不是一串數。

數只是：

$$
\text{world projection}.
$$

X4-DMSD 嘗試搜尋的不是：

$$
\text{numbers that happen to work},
$$

而是：

$$
\boxed{
\text{structures that are allowed to exist together}.
}
$$

DMSD則負責：

$$
\boxed{
\text{不必把整個巨大世界展開，仍能逐尺度判斷哪些結構值得存在。}
}
$$

---

# 112. Claim Boundary

截至本文：

已建立：

- Exact angle fingerprint；
- X fingerprint；
- X4 joint；
- shared-edge coupling；
- scale-coupling semantics；
- body-X signature；
- PerfectClick predicate；
- X4 constraint domain；
- DMSD block semantics；
- summary / join / lazy refinement；
- sound-pruning requirement；
- search certificate；
- baseline與驗收路線。

尚未證明：

- X4-DMSD 一定優於所有既有 Perfect Cuboid search；
- multiscale block sparsity猜想；
- scale jump可達任意巨大 height而保持實用；
- Perfect Cuboid存在；
- PerfectClick witness已找到；
- 所有 pruning operators已形式證明 sound。

---

# 113. 結論

X4-DMSD 的核心不是：

$$
\text{把 brute force 跑到更大的數}.
$$

而是：

$$
\boxed{
\text{先改變什麼東西值得被搜尋。}
}
$$

普通 element search問：

$$
\text{哪一組 }(a,b,c)\text{ 成立？}
$$

X4 search先問：

$$
\boxed{
\text{哪一些 X–four-edge joints 有資格互相卯榫？}
}
$$

DMSD再問：

$$
\boxed{
\text{哪些巨大尺度 constraint blocks值得被展開？}
}
$$

因此整條方法可以寫成：

$$
\boxed{
\text{Pythagorean / X Seeds}
\rightarrow
\text{Exact X4 Joints}
\rightarrow
\text{Shared-Edge Coupling}
\rightarrow
\text{DMSD Constraint Blocks}
\rightarrow
\text{Sound Pruning}
\rightarrow
\text{Lazy Refinement}
\rightarrow
\text{PerfectClick}.
}
$$

其中：

$$
\boxed{
\operatorname{PerfectClick}\in\{0,1\}.
}
$$

沒有 tolerance。

沒有「差一點」。

沒有「幾乎合上」。

只有：

$$
\boxed{
\text{喀。}
}
$$

或：

$$
\boxed{
\text{沒有喀。}
}
$$

這就是 X4-DMSD 的第一版基礎方法論。

---

## 下一階段

**X4-DMSD P1 — Exact X4 Joint Algebra**

下一篇應正式完成：

1. Pythagorean seed canonicalization；
2. $\chi$ / $\Xi$ canonical form；
3. opposite-edge semantics；
4. shared-edge scale equations；
5. triple-ratio-cycle theorem；
6. exact joint hash；
7. local-to-global reconstruction；
8. Euler brick與 known near-hit controls。

P1 完成後，就可以開始寫真正的 X4 runtime。
