# X4-DMSD P1：Exact X4 Joint Algebra

**Exact X–Four-Edge Joint Algebra for Coupled Perfect-Cuboid Search**

版本：v0.1  
系列：X4-DMSD  
階段：P1  
性質：Exact joint algebra／Pythagorean seed canonicalization／shared-edge coupling theorem  
Canonical source：UTF-8 Markdown

---

## 摘要

X4-DMSD P0 將 Perfect Cuboid 搜尋重新定義為：

$$
\text{Exact X4 Joints}
\rightarrow
\text{Shared-Edge Coupling}
\rightarrow
\text{PerfectClick}.
$$

P1 的任務，是把這裡的「卯榫」完全代數化。

本文首先證明：rectangle face 的 diagonal-edge angle 與 diagonal-X crossing angle都可以用 rational fingerprints exact 表示，不需要浮點三角函數。

其次，primitive Pythagorean triple：

$$
(m^2-n^2,2mn,m^2+n^2)
$$

可作為 X4 joint 的 canonical seed。共同整數 scale不改變 joint fingerprint。

本文最重要的結果是 **Triple-Joint Coupling Theorem**。

設三個 oriented primitive Pythagorean face joints：

$$
J_{ab}=(A,B,H_{ab}),
$$

$$
J_{ac}=(A',C,H_{ac}),
$$

$$
J_{bc}=(B',C',H_{bc}).
$$

存在正 rational scales：

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

使三者 exact 共享：

$$
a,b,c
$$

iff：

$$
\boxed{
ACB'=BC'A'.
}
$$

而且若此 identity成立，不只存在 rational scales，還可以直接取 integer witness：

$$
\boxed{
k_{ab}=A'B',
\qquad
k_{ac}=AB',
\qquad
k_{bc}=BA'.
}
$$

所以任何 compatible triple of local Pythagorean joints 都能 exact 建立一個 Euler brick，經共同 gcd reduction 後得到 primitive representative。

反過來，任何 Euler brick 的三個 face triples primitive-reduce 後，都必須滿足此 coupling identity。

因此：

$$
\boxed{
\text{Euler brick}
\iff
\text{exactly compatible triple of oriented primitive X4 joints}.
}
$$

Perfect Cuboid 再多一個 body Pythagorean gate：

$$
d_{ab}^2+c^2=g^2.
$$

因此 PerfectClick 可視為：

$$
\boxed{
\text{three face X4 joints}
+
\text{one body joint}
}
$$

的 exact four-joint motif。

本文同時附帶一個 exact Python prototype，並使用經典 Euler brick：

$$
(44,117,240)
$$

驗證整套 local-to-global construction。

---

# 1. Local Rectangle-X World

對一個 rectangle face，令 ordered edge lengths：

$$
u,v>0.
$$

若 diagonal：

$$
h
$$

滿足：

$$
u^2+v^2=h^2,
$$

則建立 local X4 joint：

$$
J^{X4}(u,v;h).
$$

「ordered」很重要。

因為：

$$
(u,v)
$$

與：

$$
(v,u)
$$

雖然是同一 unlabelled rectangle shape，

但在 cuboid world 中可能分別對應：

$$
(a,b)
$$

與：

$$
(b,a).
$$

---

# 2. Four-Edge Semantics

rectangle 的四邊不是四個獨立 length variables。

它們是兩組 opposite-edge classes：

$$
(E_u^{(1)},E_u^{(2)}),
$$

$$
(E_v^{(1)},E_v^{(2)}),
$$

其中：

$$
|E_u^{(1)}|
=
|E_u^{(2)}|
=
u,
$$

$$
|E_v^{(1)}|
=
|E_v^{(2)}|
=
v.
$$

所以 X4 algebra可以把四個 physical edge slots壓成：

$$
(u,v)
$$

加上 slot/orientation metadata。

---

# 3. Edge-Angle Fingerprint

令 face diagonal與 $u$ edge的 acute angle為：

$$
\theta.
$$

則：

$$
\cos\theta=\frac uh,
$$

$$
\sin\theta=\frac vh.
$$

定義：

$$
\boxed{
\chi(u,v;h)
=
\left(
\frac uh,\frac vh
\right).
}
$$

另一類 edge的 complementary interface：

$$
\chi^\perp
=
\left(
\frac vh,\frac uh
\right).
$$

---

# 4. Four-Edge Interface Signature

因此整個 rectangle 的四個 diagonal-edge interfaces可 canonical 表示為：

$$
\boxed{
\Omega_{4E}(J)
=
(
\chi,
\chi^\perp,
\chi,
\chi^\perp
).
}
$$

opposite edges具有完全相同的 local angle signature。

這就是 X4 中「四邊角度」的 exact form。

---

# 5. Exact Angle Lock

對兩個 ordered directions：

$$
(u_1,v_1),
$$

$$
(u_2,v_2),
$$

它們 angle exact 相同 iff：

$$
\frac{v_1}{u_1}
=
\frac{v_2}{u_2}.
$$

因此：

$$
\boxed{
v_1u_2=v_2u_1.
}
$$

完全不需要：

$$
\arctan
$$

或 tolerance。

---

# 6. 命題 P1-A：Cross-Product Angle Criterion

對 positive ordered edge pairs：

$$
(u_1,v_1),
(u_2,v_2),
$$

下列等價：

$$
\theta_1=\theta_2,
$$

$$
\frac{v_1}{u_1}
=
\frac{v_2}{u_2},
$$

$$
v_1u_2=v_2u_1.
$$

所以 angle lock 是 exact integer/rational predicate。

---

# 7. X Crossing Fingerprint

rectangle diagonals的 direction vectors：

$$
d_+=(u,v),
$$

$$
d_-=(u,-v).
$$

定義 oriented crossing angle fingerprint：

$$
\boxed{
\Xi(u,v)
=
\left(
\frac{u^2-v^2}{u^2+v^2},
\frac{2uv}{u^2+v^2}
\right).
}
$$

因：

$$
u^2+v^2=h^2,
$$

也可寫：

$$
\Xi(u,v)
=
\left(
\frac{u^2-v^2}{h^2},
\frac{2uv}{h^2}
\right).
$$

---

# 8. Double-Angle Structure

若：

$$
\chi=(c,s)
$$

其中：

$$
c=\frac uh,
$$

$$
s=\frac vh,
$$

則：

$$
\boxed{
\Xi
=
(c^2-s^2,2cs).
}
$$

也就是 rational unit-circle上的 double-angle map。

---

# 9. X-Key 是另一個 Pythagorean Key

identity：

$$
(u^2-v^2)^2+(2uv)^2=(u^2+v^2)^2.
$$

因此 integer tuple：

$$
\boxed{
XKey(u,v)
=
(u^2-v^2,2uv,h^2)
}
$$

本身又是一個 Pythagorean triple-like object。

這讓 X crossing angle可以直接：

- reduce；
- hash；
- modularize；
- DMSD index。

---

# 10. Acute 與 Oriented X-Key

若交換：

$$
u\leftrightarrow v,
$$

則：

$$
u^2-v^2
$$

改變 sign。

所以定義：

### Oriented X-Key

保留 sign：

$$
K_X^\rightarrow.
$$

### Acute X-Key

取：

$$
|u^2-v^2|.
$$

前者用於 global edge-role coupling；

後者用於 unlabelled shape indexing。

---

# 11. 命題 P1-B：X4 Similarity Completeness

對 positive rectangles，以下等價：

1. ordered shapes相似；
2. edge ratio相同；
3. $\chi$ 相同；
4. oriented X4 angle signature相同。

因此：

$$
\boxed{
\chi
}
$$

已經是 ordered rectangle similarity class的 complete exact key。

$\Xi$ 則提供冗餘但有用的 X-crossing certificate。

---

# 12. Primitive Pythagorean Seed

primitive face：

$$
u^2+v^2=h^2
$$

可唯一寫成：

$$
u_{\mathrm{odd}}
=
m^2-n^2,
$$

$$
u_{\mathrm{even}}
=
2mn,
$$

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

其中：

$$
m>n>0,
$$

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

$$
m\not\equiv n\pmod2.
$$

---

# 13. Orientation Bit

同一 primitive triple可以有兩種 ordered role assignment：

### Odd-First

$$
(u,v)
=
(m^2-n^2,2mn).
$$

### Even-First

$$
(u,v)
=
(2mn,m^2-n^2).
$$

所以 canonical local seed：

$$
\boxed{
K_{\mathrm{seed}}
=
(m,n,\sigma),
}
$$

其中：

$$
\sigma\in\{\mathrm{odd\ first},\mathrm{even\ first}\}.
$$

---

# 14. 命題 P1-C：Scale-Invariant Seed Recovery

若：

$$
(U,V,H)
=
k(u,v,h)
$$

對：

$$
k\in\mathbb Z_{>0},
$$

先除：

$$
\gcd(U,V,H)
$$

即可 recover同一：

$$
(m,n,\sigma).
$$

因此：

$$
\boxed{
\text{common scale does not duplicate X4 shape state}.
}
$$

---

# 15. Exact Seed Recovery

primitive triple中恰有一條 leg odd、一條 even。

令 odd leg：

$$
o.
$$

則：

$$
m^2
=
\frac{h+o}{2},
$$

$$
n^2
=
\frac{h-o}{2}.
$$

所以：

$$
m,n
$$

可以 exact integer-square recovery。

---

# 16. Local Joint Object

P1 將 local joint正式寫為：

$$
\boxed{
J
=
(
m,n,\sigma;
u,v,h;
\chi,\Xi,\Omega_{4E}
).
}
$$

其中 theorem-relevant欄位皆可 exact reconstruct。

所以 serialization不需要保存 floating angle。

---

# 17. 三個 Cuboid Face Joints

定義：

$$
J_{ab}
=
(A,B,H_{ab}),
$$

$$
J_{ac}
=
(A',C,H_{ac}),
$$

$$
J_{bc}
=
(B',C',H_{bc}).
$$

每一個 tuple都是 oriented primitive Pythagorean joint。

注意：

$$
A
$$

與：

$$
A'
$$

不必相等。

因為它們只是各自 primitive local shape中的 $a$-role leg。

真正 global edge由 local scale決定。

---

# 18. Shared-Edge Scale Equations

給 positive scales：

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

global shared-edge requirements：

$$
k_{ab}A
=
k_{ac}A',
$$

$$
k_{ab}B
=
k_{bc}B',
$$

$$
k_{ac}C
=
k_{bc}C'.
$$

---

# 19. Pairwise Scale Ratios

前兩式給：

$$
\frac{k_{ac}}{k_{ab}}
=
\frac{A}{A'},
$$

$$
\frac{k_{bc}}{k_{ab}}
=
\frac{B}{B'}.
$$

第三式需要：

$$
\frac{k_{bc}}{k_{ac}}
=
\frac{C}{C'}.
$$

---

# 20. Triple-Ratio Cycle

因此：

$$
\frac{A}{A'}
\cdot
\frac{C}{C'}
\cdot
\frac{B'}{B}
=
1.
$$

也就是：

$$
\boxed{
ACB'
=
BC'A'.
}
$$

這就是 X4 三面卯榫最核心的 exact equation。

---

# 21. 定理 P1-D：Triple-Joint Coupling Theorem

對三個 positive oriented local Pythagorean joints：

$$
J_{ab},
J_{ac},
J_{bc},
$$

存在 positive rational scales：

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

使三組 shared edges exact 一致，iff：

$$
\boxed{
ACB'
=
BC'A'.
}
$$

---

# 22. 證明：Necessary

若 scales存在，

由：

$$
k_{ac}
=
k_{ab}\frac{A}{A'},
$$

以及：

$$
k_{bc}
=
k_{ab}\frac{B}{B'},
$$

代入第三式：

$$
k_{ac}C
=
k_{bc}C',
$$

得到：

$$
k_{ab}\frac{A}{A'}C
=
k_{ab}\frac{B}{B'}C'.
$$

消去：

$$
k_{ab}>0,
$$

得：

$$
ACB'
=
BC'A'.
$$

---

# 23. 證明：Sufficient

若：

$$
ACB'=BC'A',
$$

直接取：

$$
\boxed{
k_{ab}=A'B',
}
$$

$$
\boxed{
k_{ac}=AB',
}
$$

$$
\boxed{
k_{bc}=BA'.
}
$$

則：

$$
k_{ab}A
=
AA'B'
=
k_{ac}A',
$$

$$
k_{ab}B
=
A'BB'
=
k_{bc}B',
$$

而：

$$
k_{ac}C
=
AB'C
=
BA'C'
=
k_{bc}C'
$$

由 coupling identity成立。

所以 integer scale witness直接存在。

證畢。

---

# 24. 這比「求 scales」更強

一般做法可能先解 rational linear system。

P1-D 顯示根本不需要 numerical solver。

只需要一個 integer equality：

$$
\boxed{
ACB'
\stackrel{?}{=}
BC'A'.
}
$$

如果 false：

$$
\operatorname{LOCK}_{3F}=0.
$$

如果 true：

直接有 integer construction。

---

# 25. Euler-Brick Constructor

當 P1-D 成立，

定義 raw global edges：

$$
a
=
AA'B',
$$

$$
b
=
A'BB',
$$

$$
c
=
AB'C.
$$

由 compatibility：

$$
AB'C
=
BA'C',
$$

所以第三 edge對所有 local faces一致。

---

# 26. Face Diagonals

$$
d_{ab}
=
A'B'H_{ab},
$$

$$
d_{ac}
=
AB'H_{ac},
$$

$$
d_{bc}
=
BA'H_{bc}.
$$

因此全部 integer。

---

# 27. 定理 P1-E：Compatible Triple Produces an Euler Brick

任何滿足 P1-D 的三個 local primitive Pythagorean joints，都能經上述 integer scales產生：

$$
(a,b,c,d_{ab},d_{ac},d_{bc})
\in
\mathbb Z_{>0}^6
$$

且：

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

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

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

除共同 gcd 後仍成立。

---

# 28. Converse

任何 Euler brick：

$$
(a,b,c)
$$

有三個 integer Pythagorean faces。

對每一 face除去該 face triple的 gcd，

得到三個 oriented primitive local joints。

原 brick的三個 local scale本身就是 shared-edge scale witness。

所以 P1-D 必然成立。

因此在 X4 algebra中：

$$
\boxed{
\text{Euler Brick}
\iff
\text{Compatible Triple of Primitive Oriented Face Joints}.
}
$$

這是 representation equivalence，不宣稱為新的 classical theorem。

---

# 29. Known Euler Brick 驗證

取：

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

face diagonals：

$$
125,
244,
267.
$$

primitive local joints：

$$
J_{ab}
=
(44,117,125),
$$

$$
J_{ac}
=
(11,60,61),
$$

$$
J_{bc}
=
(39,80,89).
$$

---

# 30. Coupling Check

$$
A=44,
$$

$$
B=117,
$$

$$
A'=11,
$$

$$
C=60,
$$

$$
B'=39,
$$

$$
C'=80.
$$

左側：

$$
ACB'
=
44\cdot60\cdot39
=
102960.
$$

右側：

$$
BC'A'
=
117\cdot80\cdot11
=
102960.
$$

所以：

$$
\operatorname{LOCK}_{3F}=1.
$$

---

# 31. Explicit Scales

P1-D 給：

$$
k_{ab}
=
11\cdot39
=
429,
$$

$$
k_{ac}
=
44\cdot39
=
1716,
$$

$$
k_{bc}
=
117\cdot11
=
1287.
$$

這產生的是原 Euler brick的：

$$
429
$$

倍。

共同 gcd reduction後 exact 回到：

$$
\boxed{
(44,117,240).
}
$$

prototype已重播此結果。

---

# 32. Role-Swap Negative Control

若把：

$$
J_{bc}
=
(39,80,89)
$$

錯誤交換成：

$$
(80,39,89),
$$

local Pythagorean condition仍成立。

但：

$$
ACB'
\neq
BC'A'.
$$

所以 global coupling立即失敗。

這證明：

$$
\boxed{
\text{local shape validity}
\neq
\text{global role compatibility}.
}
$$

---

# 33. Body Joint

三個 face joints compatible只得到 Euler brick。

Perfect Cuboid還要求：

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

因：

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

等價於：

$$
\boxed{
d_{ab}^2+c^2=g^2.
}
$$

---

# 34. Fourth Pythagorean Joint

因此定義 global body joint：

$$
\boxed{
J_g
=
(d_{ab},c,g).
}
$$

若它 closed，

則：

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

也可等價使用：

$$
(d_{ac},b,g)
$$

或：

$$
(d_{bc},a,g).
$$

---

# 35. 命題 P1-F：One Body Joint Is Enough

已知三個 face Pythagorean constraints成立。

則以下互相等價：

$$
d_{ab}^2+c^2=g^2,
$$

$$
d_{ac}^2+b^2=g^2,
$$

$$
d_{bc}^2+a^2=g^2,
$$

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

所以只需 exact 測一個 body joint。

---

# 36. PerfectClick 的 Four-Joint Form

因此 Perfect Cuboid 可以重寫成：

$$
\boxed{
J_{ab}
\bowtie
J_{ac}
\bowtie
J_{bc}
\bowtie
J_g.
}
$$

前三個 joints決定 Euler-brick face closure。

第四個 joint決定 body closure。

---

# 37. Global Body Angle Fingerprint

body joint也有：

$$
\chi_g
=
\left(
\frac{d_{ab}}g,
\frac cg
\right).
$$

所以 Perfect Cuboid最終仍然是 exact angle / ratio joint problem，

不是近平方問題。

---

# 38. X4 Motif Graph

可以把：

$$
J_{ab},
J_{ac},
J_{bc},
J_g
$$

作四個 nodes。

shared quantities作 typed edges：

- $a$；
- $b$；
- $c$；
- $d_{ab}$。

Perfect Cuboid變成一個 exact typed motif。

---

# 39. 為何這對 DMSD 有價值

P0 的 DMSD block不應索引任意：

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

P1 現在給出更小的 exact algebraic keys：

$$
(m,n,\sigma),
$$

$$
\chi,
$$

$$
\Xi,
$$

以及 triple coupling invariant：

$$
\boxed{
ACB'-BC'A'.
}
$$

這些都可以在 block-level summary中使用。

---

# 40. Block-Level Coupling Key

一個 local joint block可以保存 possible primitive leg-role sets：

$$
\mathcal A,
\mathcal B,
\mathcal H.
$$

三 blocks在 materialize前可以測：

$$
0
\in
\mathcal A\mathcal C\mathcal B'
-
\mathcal B\mathcal C'\mathcal A'.
$$

若 exact summary證明不可能為：

$$
0,
$$

整個 hyperblock可 prune。

---

# 41. Ratio-Cycle Key

也可以保存 reduced ratios：

$$
R_a=\frac{A}{A'},
$$

$$
R_b=\frac{B}{B'},
$$

$$
R_c=\frac{C}{C'}.
$$

compatibility：

$$
\boxed{
R_aR_c=R_b.
}
$$

這適合：

- rational hash；
- prime valuation summary；
- modular projection。

---

# 42. Valuation Form

對任意 prime：

$$
p,
$$

coupling identity要求：

$$
v_p(A)
+
v_p(C)
+
v_p(B')
=
v_p(B)
+
v_p(C')
+
v_p(A').
$$

所以 block-level valuation intervals若不相交，可 sound-prune。

---

# 43. Modular Form

對 modulus：

$$
M,
$$

必要條件：

$$
ACB'
\equiv
BC'A'
\pmod M.
$$

所以 DMSD block可以先保存各 leg-role residue masks。

---

# 44. Exact Hash

local joint canonical serialization可使用：

```text
m
n
orientation
primitive_first
primitive_second
hyp
chi
x_key_oriented
```

其 hash與 common scale無關。

---

# 45. Duplicate Elimination

若：

$$
(3,4,5)
$$

與：

$$
(3000,4000,5000)
$$

被輸入，

canonical seed皆：

$$
(2,1,\mathrm{odd\ first}).
$$

因此 local shape只保存一次。

---

# 46. Search Space 的真正變量

P1 後，第一層變量不是：

$$
a,b,c.
$$

而是三個：

$$
(m_i,n_i,\sigma_i)
$$

與一條 exact coupling identity。

Perfect gate再加入第四個 body seed或 square test。

---

# 47. Search Pipeline

可以寫成：

$$
\boxed{
\text{Seed}
\rightarrow
\text{Joint}
\rightarrow
\text{Role Assignment}
\rightarrow
\text{Triple Coupling}
\rightarrow
\text{Euler Brick}
\rightarrow
\text{Body Joint}
\rightarrow
\text{PerfectClick}.
}
$$

---

# 48. P1 Prototype

本 artifact附：

`x4_joint_algebra.py`

實作：

- primitive seed generation；
- scaled triple canonicalization；
- $\chi$；
- oriented / acute X-key；
- four-edge interface signature；
- exact angle equality；
- triple coupling；
- explicit scale witness；
- Euler-brick constructor；
- body-joint gate。

---

# 49. Prototype 驗證

自動驗證：

- 多組 primitive seeds；
- scales：
  $$
  1,2,7,101;
  $$
- canonical seed invariance；
- $\chi$ invariance；
- $\Xi$ invariance；
- exact angle cross-product gate；
- Euler brick：
  $$
  (44,117,240);
  $$
- role-swap rejection；
- four-edge opposite-pair semantics；
- body-joint negative control。

---

# 50. Validation Boundary

prototype沒有：

- huge-scale DMSD；
- block pruning；
- distributed search；
- Perfect Cuboid witness；
- exhaustive Euler-brick enumeration。

P1只驗證 algebra本身。

---

# 51. P1 核心命題整理

### P1-A

angle equality可由 cross multiplication exact 判定。

### P1-B

$\chi$ 是 ordered rectangle similarity class的 complete key。

### P1-C

primitive Pythagorean seed對 common scale invariant。

### P1-D

三 face joints shared-edge compatible iff：

$$
ACB'=BC'A'.
$$

### P1-E

compatible triple exact 生成 Euler brick。

### P1-F

已有三 face closure時，一個 body Pythagorean joint足以判定 Perfect closure。

---

# 52. 對「卯榫」的最終代數翻譯

P0 的語言：

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

P1 現在翻成：

### Local

$$
u^2+v^2=h^2.
$$

### Angle

$$
v_1u_2=v_2u_1.
$$

### X

$$
\Xi
\text{ exact equality}.
$$

### Triple Face Coupling

$$
\boxed{
ACB'=BC'A'.
}
$$

### Body

$$
d_{ab}^2+c^2=g^2.
$$

全部為 exact equalities。

---

# 53. 對 DMSD 的直接輸出介面

下一階段 DMSD不需要理解 geometry renderer。

它只需要讀：

```text
seed_key
role
leg_values
angle_key
x_key
residue_summary
valuation_summary
coupling_key
```

所以 geometry已被編譯成 arithmetic joint algebra。

---

# 54. Claim Boundary

P1 已完成：

- exact local X4 semantics；
- four-edge interface；
- angle / X fingerprints；
- primitive seed canonicalization；
- shared-edge scale equations；
- necessary-and-sufficient triple coupling theorem；
- integer scale witness；
- Euler-brick constructor equivalence；
- body fourth-joint formulation；
- exact executable prototype。

P1 尚未證明：

- X4-DMSD 搜尋效率；
- DMSD block soundness；
- huge-scale compression；
- Perfect Cuboid存在；
- any new Euler brick theorem novelty。

---

# 55. 結論

P1 把 X4-DMSD 最重要的直覺：

> 三塊幾何零件到底能不能「喀」在一起？

壓成一條非常簡單的 integer identity：

$$
\boxed{
ACB'=BC'A'.
}
$$

這條式子成立，

三個 local Pythagorean X4 joints就可以 exact 共同縮放成一個 Euler brick。

不成立，

無論數量級多大都不可能靠 common scaling補救。

因此 X4-DMSD 後續真正值得跨尺度搜尋的，不再是所有 Pythagorean triples的 arbitrary combinations，

而是：

$$
\boxed{
\text{可能滿足 triple coupling identity 的 joint blocks。}
}
$$

最後再用第四個 body joint：

$$
\boxed{
d_{ab}^2+c^2=g^2
}
$$

完成：

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

這就是 Exact X4 Joint Algebra 的第一版閉合。

---

## 下一階段

**X4-DMSD P2 — Shared-Edge Scale Coupling Engine**

P2 應把 P1-D 轉成真正的高效 join engine：

1. joint indexing；
2. role-aware keys；
3. ratio-cycle hash；
4. valuation signatures；
5. modular signatures；
6. pair join；
7. triple join；
8. duplicate quotient；
9. Euler-brick regeneration；
10. baseline comparison。

P2 完成後，才把 engine接進 DMSD multiscale blocks。
