---
title: "單一狀態、多重投影：人類、AI、試算表與 Runtime 的執行同一性"
title_en: "One State, Multiple Projections: Executable Identity Across Human, AI, Spreadsheet, and Runtime Views"
series: "矩陣原生智能與可稽核計算系列"
series_en: "Matrix-Native Intelligence and Auditable Computation Series"
series_id: "EML-MNIAC-2026"
paper_id: "EML-MNIAC-2026-07"
version: "v0.1"
date: "2026-08-17"
language: "zh-Hant"
document_type: "系列第07篇／Executable Identity／多重投影與受控回寫統一論文"
status: "Public Draft"
author: "Neo.K（許筌崴）／EveMissLab"
depends_on:
  - "EML-MNIAC-2026-06 AI Matrix Ledger Format：從試算表格式到可追溯計算結構 v0.1"
internal_artifacts:
  - "MLF 1.0"
  - "MLF Compiler 1.0.0"
  - "MMLC Runtime 1.0"
  - "PHOSPHOR-SHEET v1.0–v1.2"
  - "PHOSPHOR-SHEET 本地 Agent 接手與續作指南"
  - "PHOSPHOR-SHEET 驗證摘要"
  - "PHOSPHOR-SHEET v1.2 sample round-trip workbook"
canonical_keywords:
  - Executable Identity
  - Single Source of Truth
  - Multi-Projection State
  - PHOSPHOR-SHEET
  - MLF
  - MMLC Runtime
  - Governed Write-back
  - Command Intent
  - Round-trip Control
  - Projection Drift
  - Authority Boundary
  - Event Replay
  - View Update
---

# 單一狀態、多重投影
## 人類、AI、試算表與 Runtime 的執行同一性

**One State, Multiple Projections:  
Executable Identity Across Human, AI, Spreadsheet, and Runtime Views**

---

## 摘要

本文是《矩陣原生智能與可稽核計算》系列第 07 篇，正式提出並整理 **Executable Identity（執行同一性）**：當同一計算系統同時具有 Human UI、AI event stream、Spreadsheet workbook、graph/tensor projection 與 deterministic runtime 時，如何避免每個介面逐漸形成一套自己的「真實狀態」？

本文整合三條先前獨立發展的工程主線：

1. **MLF 1.0**：保存 canonical structure、identity、formula AST、dependency、route、provenance、projection 與 conversion loss；
2. **MMLC Runtime 1.0**：提供 deterministic execution、local/global audit、semantic hash、execution hash 與 replay；
3. **PHOSPHOR-SHEET v1.0–v1.2**：把 PHOSPHOR 同一 VM state 正式投影為 Human、AI、Spreadsheet 三種介面，並在 v1.1–v1.2 加入受治理的 XLSX command-intent round trip。

PHOSPHOR-SHEET 的核心規則非常明確：

```text
執行狀態只有一份。
人類介面、AI 事件流與試算表只是同一狀態的不同投影。
```

因此其架構不是：

$$
S_H,\quad S_A,\quad S_X
$$

三套互相同步的 state machine，而是：

$$
\boxed{
S
\xrightarrow{\Phi_H}
H,
\qquad
S
\xrightarrow{\Phi_A}
A,
\qquad
S
\xrightarrow{\Phi_X}
X.
}
$$

其中 $S$ 是權威執行狀態， $H,A,X$ 是不同用途的 projection。

然而 Spreadsheet 與一般唯讀 view 不同：`09_Control` 可以攜帶 command intent 回到 Runtime。本文因此進一步區分：

$$
\boxed{
\text{Projection Read Path}
}
$$

與：

$$
\boxed{
\text{Governed Write-back Path}.
}
$$

試算表中的修改不能直接變成：

$$
X'\Rightarrow S'.
$$

而必須經：

$$
\boxed{
X'
\rightarrow
Intent
\rightarrow
Validation
\rightarrow
Approval
\rightarrow
ExplicitCapability
\rightarrow
RuntimeTransition
\rightarrow
AuditEvent
\rightarrow
S'.
}
$$

此架構與 Event Sourcing / CQRS / Materialized View 中「權威事件／寫入模型 + 可重建投影」具有明顯近鄰，也與 bidirectional-transformation / lens 文獻中的 view-update problem 相交；但 PHOSPHOR-SHEET 並不是任意雙向同步 lens。它刻意採用**窄化、白名單、權限化的 command intent**：只有合法命令經驗證與授權後，才可透過 explicit Host handler 改變 VM。

本文進一步區分 **Representational Canonicality** 與 **Executable Canonicality**。MLF 的 canonical structure 是交換與表示契約中的規範核心；Runtime 的 canonical state 則是「現在真正執行到哪裡」的權威狀態。兩者可以互相投影與綁定，但不可混為同一概念。

本文最後提出一組 Executable Identity 條件：stable run/session identity、projection source binding、runtime/version binding、deterministic replay 或宣告式 nondeterminism、terminal idempotency、write authorization、event uniqueness、stale-view rejection、round-trip auditability 與 divergence detection。其目的不是創造「唯一真相」的形上學，而是為多介面 AI 系統建立一個可驗證的工程判定：

$$
\boxed{
\textbf{
不同介面可以看見不同東西，
但不能在未宣告的情況下各自擁有一套執行真實。
}
}
$$

---

# 1. 問題：多介面為什麼會產生多重真實？

假設一個系統同時具有：

- React UI；
- AI JSONL stream；
- Excel workbook；
- CLI；
- WebSocket；
- database；
- runtime snapshot。

最簡單的實作方式往往是：

> 每個介面都保存自己需要的一份 state。

於是形成：

$$
S_H,
\quad
S_A,
\quad
S_X,
\quad
S_{CLI}.
$$

接著再努力同步它們。

表面上這很方便。

但一旦同步延遲、版本不同、寫入競爭或 parser 不一致，就會出現：

$$
\boxed{
S_H
\neq
S_A
\neq
S_X.
}
$$

---

# 2. Dual-Truth Problem

本文將此稱為：

$$
\boxed{
\text{Dual-Truth / Multi-Truth Problem}.
}
$$

其最低形式為：

存在兩個介面：

$$
V_1,
V_2
$$

都被系統當成 authoritative state，

但：

$$
State(V_1)\neq State(V_2).
$$

此時系統必須回答：

> 到底哪一個是真的？

如果答案是：

> 「看情況。」

那麼其實缺少明示 authority model。

---

# 3. PHOSPHOR-SHEET 的核心回答

PHOSPHOR-SHEET 不建立：

```text
Excel VM
```

而是：

```text
                         ┌─ ΦHuman → React UI
VM Core + CTS + Events ──┼─ ΦAI    → phosphor-jsonl-v1
                         └─ ΦSheet → WorkbookModel / XLSX / validated control
```

因此：

$$
\boxed{
\exists! S_{exec}
}
$$

在 declared runtime scope 內只有一個 executable authority。

---

# 4. 單一狀態不等於只允許一種表示

單一執行狀態不要求：

$$
H=A=X.
$$

Human UI 可以顯示：

- 圖；
- register；
- timeline。

AI stream 可以使用：

- JSONL；
- event vocabulary；
- machine-readable fields。

Spreadsheet 可以顯示：

- tick ledger；
- registers；
- memory changes；
- anomalies；
- CTS；
- control rows。

所以：

$$
\boxed{
\text{Representational Diversity}
\neq
\text{State Multiplicity}.
}
$$

---

# 5. Representational Canonicality 與 Executable Canonicality

這裡需要修正一個容易混淆的「canonical」用法。

## 5.1 Representational Canonicality

MLF 中：

$$
\mathcal F
$$

是格式 scope 內完整結構的 canonical representation。

它負責：

- identity；
- dependency；
- formula；
- route；
- provenance；
- loss；
- projections。

---

## 5.2 Executable Canonicality

Runtime 中：

$$
S_t
$$

是時間 $t$ 真正有效的 executable state。

它負責：

- PC / instruction；
- registers；
- memory；
- tick；
- runtime mode；
- current event sequence；
- accepted state transitions。

---

## 5.3 二者不是同一個 canonical

因此：

$$
\boxed{
Canonical_{repr}
\neq
Canonical_{exec}.
}
$$

MLF package 可以完整描述一個 state snapshot，

但：

> 一份很完整的 MLF 文件仍然不會因為「格式完整」就自動成為正在運作 VM 的控制權來源。

---

# 6. Canonical Structure 可以描述 Executable State

若：

$$
E:
S_t
\rightarrow
\mathcal F_t
$$

是一個 export / encoding，

則：

$$
\mathcal F_t
$$

可以保存：

- snapshot；
- identity；
- event references；
- dependencies；
- provenance。

但權威更新仍應是：

$$
S_t
\xrightarrow{\delta}
S_{t+1}.
$$

而不是：

$$
\mathcal F_t
\xrightarrow{\text{arbitrary edit}}
S_{t+1}.
$$

---

# 7. Projection 模型

定義：

$$
\Phi_i:
S
\rightarrow
V_i.
$$

例如：

$$
H_t
=
\Phi_H(S_t),
$$

$$
A_t
=
\Phi_A(S_t),
$$

$$
X_t
=
\Phi_X(S_t).
$$

這些 projection 可以是 lossy。

因此每個：

$$
V_i
$$

不必包含：

$$
S_t
$$

全部資訊。

---

# 8. Projection Fidelity

對介面 $V_i$ 的任務查詢集合：

$$
\mathcal Q_i,
$$

定義：

$$
Pres_{\mathcal Q_i}(\Phi_i)=1
$$

若：

$$
\forall q\in\mathcal Q_i,
$$

介面答案與 canonical state 在相應 query translation 下保持一致。

這比要求：

$$
V_i=S
$$

實用。

---

# 9. 投影可以過期

若：

$$
V_i(t)
=
\Phi_i(S_t),
$$

但 canonical state 已變成：

$$
S_{t+k},
$$

則舊 view：

$$
V_i(t)
$$

是 stale projection。

因此必須保存：

$$
\boxed{
ProjectionVersion
+
SourceIdentity
+
SourceRevision.
}
$$

否則使用者可能拿舊 workbook 去控制新 VM。

---

# 10. Stale Projection Hazard

PHOSPHOR-SHEET 已明確把以下風險列為後續安全項目：

- 舊 workbook 控制新 session；
- program 切換後 target/session identity 漂移；
- workbook / command provenance；
- session ID 與 workbook target 綁定；
- nonce / expiry / replay protection。

這表示：

$$
\boxed{
\text{View freshness}
}
$$

本身就是 authority 的一部分。

---

# 11. Executable Identity 的最低定義

本文定義 executable identity token：

$$
\boxed{
\operatorname{EID}(S_t)
=
(
run,
session,
target,
program,
runtimeVersion,
revision,
eventSeq,
semanticDigest
).
}
$$

具體系統可以省略或增加欄位。

其目的是回答：

> 這個 projection 到底是在描述哪一次執行？

---

# 12. 為什麼只用 VM ID 不夠？

同一：

$$
vm\_id
$$

可能：

- reset；
- reload；
- 換 program；
- 換 runtime version；
- 重開 session。

所以：

$$
vm\_id
$$

只是 identity 的一部分。

需要：

$$
\boxed{
\text{Identity}
+
\text{Revision / Session}.
}
$$

---

# 13. MMLC Runtime 的 Semantic Hash 與 Execution Hash

MMLC 可分：

$$
H_{sem}
$$

與：

$$
H_{exec}.
$$

semantic hash 可綁：

- ledger semantics；
- branch structure；
- layout-relevant semantics；
- audit policy。

execution hash 再綁：

- semantic hash；
- actual outputs。

因此：

$$
\boxed{
SemanticIdentity
\neq
ExecutionIdentity.
}
$$

---

# 14. 為什麼 Execution Hash 有用？

兩次執行可能：

$$
H_{sem}^{(1)}
=
H_{sem}^{(2)}
$$

但若 nondeterminism、runtime bug 或外部 input 造成：

$$
H_{exec}^{(1)}
\neq
H_{exec}^{(2)},
$$

就不能說：

> 「語義一樣，所以執行也一樣。」

反過來也可能偶然：

$$
Output_1=Output_2
$$

但 semantic structure 已不同。

所以兩種 hash 應分離。

---

# 15. Deterministic Replay

對 deterministic runtime，給定：

$$
S_0,
$$

相同：

- source；
- operator lock；
- traversal；
- seed；
- runtime version；
- command/event sequence；

應得到：

$$
\boxed{
S_T^{(1)}
\equiv
S_T^{(2)}
}
$$

在宣告的 equivalence 下。

MMLC Runtime 已提供：

$$
validate\_file()
$$

與：

$$
execute\_file(deterministic=True)
$$

並回傳：

- global audit；
- semantic hash；
- execution hash。

---

# 16. Replay 不是 Snapshot Copy

Replay：

$$
E_1,E_2,\ldots,E_n
\rightarrow
S_n
$$

是重新執行 transition。

Snapshot copy：

$$
S_n
\rightarrow
S_n'
$$

只是複製 state。

因此：

$$
\boxed{
Replay
\neq
State Copy.
}
$$

---

# 17. Event Sourcing 的外部近鄰

Event Sourcing 的經典工程模式使用：

$$
\boxed{
AppendOnlyEventStore
}
$$

作 system of record，

並由 events replay 產生 current state。

Materialized views 則是從權威事件源建立的 query-optimized projections。

這和：

$$
S
\rightarrow
H,A,X
$$

有直接結構近鄰。

---

# 18. 但 PHOSPHOR 並非純 Event-Sourced VM

本文不把 PHOSPHOR 偷換成：

> 純 event-sourcing architecture。

PHOSPHOR 的 canonical snapshot 仍由：

```text
VM state
↓
buildHeadlessSnapshot()
```

產生，

同時使用：

```text
phosphor-jsonl-v1
```

作唯一 event envelope。

所以更精確是：

$$
\boxed{
\text{Canonical Runtime State}
+
\text{Append-Only Event Stream}
+
\text{Multiple Projections}.
}
$$

---

# 19. Materialized View 的重要教訓

外部 Materialized View pattern 有一條很有價值的原則：

> view 是可重建的 read projection，不應被應用直接當作 authoritative source 更新。

PHOSPHOR-SHEET 對 readonly sheets 幾乎遵循同樣思想：

$$
\boxed{
\text{Workbook state sheets can be regenerated from runtime state}.
}
$$

---

# 20. 但 `09_Control` 是特殊例外

`09_Control` 不是：

$$
StateView.
$$

而是：

$$
\boxed{
CommandIntentView.
}
$$

它允許人類在 Excel 中新增：

- DRAFT；
- QUEUED；
- APPROVED；

command rows。

因此：

$$
\boxed{
XLSX
}
$$

同時包含：

1. derived state projection；
2. untrusted input surface。

這兩種角色必須拆開。

---

# 21. State Projection 與 Intent Surface

將 workbook 分：

$$
X
=
(X_{state},X_{intent}).
$$

其中：

$$
X_{state}
=
\Phi_X(S)
$$

是 runtime projection。

而：

$$
X_{intent}
$$

是人類／外部工具提出的操作意圖。

所以：

$$
\boxed{
X_{intent}
\not\subset
S
}
$$

在被接受前，它不是 canonical state 的一部分。

---

# 22. 為什麼不能直接做雙向同步？

最直覺的做法：

$$
get:
S\rightarrow X,
$$

$$
put:
X\rightarrow S.
$$

但 workbook 可被任意修改。

如果：

$$
put
$$

對所有 cell edit 都有效，

那麼：

- 一格 typo；
- formula；
- malicious cell；
- stale workbook；
- old session；

都可能直接改 VM。

所以：

$$
\boxed{
GeneralViewWriteback
}
$$

風險過高。

---

# 23. Bidirectional Lens 的近鄰

Bidirectional transformation / lens 文獻處理：

$$
get:S\rightarrow V
$$

與：

$$
put:S\times V\rightarrow S
$$

之間的 view-update problem。

一個修改過的 view：

$$
V'
$$

可以和原 source：

$$
S
$$

共同決定更新後：

$$
S'.
$$

這提供很好的形式對照。

---

# 24. PHOSPHOR-SHEET 不是一般 Lens

PHOSPHOR-SHEET 不允許：

$$
\forall \Delta X,
\quad
put(S,X+\Delta X).
$$

它只接受：

$$
\Delta X
$$

中極窄的一部分：

$$
\boxed{
\Delta X_{control}
}
$$

再把它解析成：

$$
Intent.
$$

所以更接近：

$$
\boxed{
\text{Governed Command Lens}
}
$$

而不是 general bidirectional data synchronization。

---

# 25. Governed Write-back

定義：

$$
\Psi_X:
X'
\rightarrow
I
$$

抽取 command intents。

接著：

$$
V:
(I,S)
\rightarrow
\{valid,invalid\}.
$$

授權：

$$
A:
(I,S,Policy)
\rightarrow
\{allow,deny,review\}.
$$

Host capability：

$$
K:
I
\rightarrow
Handler.
$$

最後：

$$
\boxed{
S'
=
\delta(S,K(I))
}
$$

只在所有 gate 通過後發生。

---

# 26. 完整回寫路徑

因此：

$$
\boxed{
X'
\rightarrow
Parse
\rightarrow
Intent
\rightarrow
Validation
\rightarrow
Approval
\rightarrow
Capability
\rightarrow
Runtime
\rightarrow
Event
\rightarrow
S'
\rightarrow
\Phi_X(S').
}
$$

這是一個完整 round trip。

---

# 27. Authority 不在 Workbook

PHOSPHOR-SHEET 明確要求：

> 工作簿本身不能取得 ambient authority。

因此：

$$
\boxed{
Authority
}
$$

存在於：

- Runtime；
- Policy；
- Explicit Handler Injection。

不是：

- cell address；
- formula；
- `Approved` 字串本身。

---

# 28. Approved 不是裝飾欄

UI 不得：

> 看到 `Approved=True` 就直接執行 raw row。

它仍需：

- command allowlist；
- target allowlist；
- parameter validation；
- handler existence；
- session binding；
- terminal state check。

所以：

$$
\boxed{
Approval
\neq
Capability.
}
$$

---

# 29. Capability 也不是 Authority 全部

即使 handler 存在：

$$
K(I)
$$

也不代表：

$$
I
$$

被批准。

因此：

$$
\boxed{
Intent
\neq
Validation
\neq
Approval
\neq
Capability
\neq
Execution.
}
$$

這五層不應壓成一個 `if`。

---

# 30. DRAFT 必須 Inert

PHOSPHOR control state：

```text
DRAFT      → inert
QUEUED     → processable
APPROVED   → processable
EXECUTED   → terminal
REJECTED   → terminal
FAILED     → terminal
```

所以：

$$
\boxed{
DRAFT
\not\Rightarrow
Execution.
}
$$

這是 write-back safety 的第一條最低律。

---

# 31. Mutation 額外需要 Approval

Mutation command：

- `vm:run`；
- `vm:pause`；
- `vm:step`；
- `vm:reset`；
- `vm:call`；

還要求：

$$
\boxed{
Approved=TRUE.
}
$$

因此 read-like inspect 與 state mutation 的 authority 不同。

---

# 32. Command Allowlist

目前正式 command set 包含：

```text
vm:inspect
vm:run
vm:pause
vm:step
vm:reset
vm:call
stream:replay
sheet:export
```

這使：

$$
\boxed{
\text{Workbook command language is finite and declared}.
}
$$

不是任意 shell。

---

# 33. 禁止 `eval()` 是架構問題，不只是資安風格

若：

$$
WorkbookCell
\rightarrow
eval()
\rightarrow
Runtime
$$

則 projection 直接取得：

$$
AmbientAuthority.
$$

這會摧毀：

$$
\boxed{
ExecutableCanonicality.
}
$$

因為 workbook 開始成為第二個 runtime semantics source。

---

# 34. 終止狀態必須冪等

對：

$$
EXECUTED,
REJECTED,
FAILED
$$

再次 import：

$$
\boxed{
\delta(S,c)=S
}
$$

在 command execution 意義上必須成立。

也就是：

$$
\boxed{
TerminalIdempotency.
}
$$

---

# 35. Duplicate Command ID

若相同：

$$
command\_id
$$

再次出現，

必須拒絕。

否則：

$$
\boxed{
WorkbookReplay
}
$$

可能變成：

$$
\boxed{
CommandReplayAttack / AccidentalDuplicateExecution.
}
$$

---

# 36. v1.2 Round-trip 實驗

PHOSPHOR-SHEET v1.2 的最小 round trip：

1. 建立 VM session；
2. export XLSX；
3. 在 Excel / LibreOffice 修改 `09_Control`；
4. 加入：
   - `DRAFT vm:inspect`；
   - `QUEUED vm:inspect`；
   - approved `APPROVED vm:step`；
5. 儲存；
6. import browser；
7. execute ready commands；
8. 驗證：
   - DRAFT 保持 DRAFT；
   - QUEUED inspect → EXECUTED；
   - APPROVED step → EXECUTED；
   - Result JSON 回寫；
   - audit events 回 event stream；
9. re-export；
10. re-import；
11. terminal commands 不重跑。

這其實已經是一個：

$$
\boxed{
\text{Governed Bidirectional Round Trip}.
}
$$

---

# 37. Round-trip Law 1 — Read Consistency

對 projection：

$$
X_t=\Phi_X(S_t),
$$

應滿足 declared query domain：

$$
\boxed{
Observe_X(X_t)
\equiv
Observe_S(S_t).
}
$$

不是 byte-identical，

而是 projection contract 內 semantic consistency。

---

# 38. Round-trip Law 2 — Inert Draft

若：

$$
Intent.status=DRAFT,
$$

則：

$$
\boxed{
S_{t+1}=S_t
}
$$

除了可能產生非執行性 UI state 之外，

不得造成 VM mutation。

---

# 39. Round-trip Law 3 — Authorized Mutation

只有：

$$
Valid(I)
\land
Approved(I)
\land
Capability(I)
$$

才能：

$$
S_t\rightarrow S_{t+1}.
$$

所以：

$$
\boxed{
Mutation
\Rightarrow
Validation\land Authorization\land Capability.
}
$$

---

# 40. Round-trip Law 4 — Audit Completeness

任何 command outcome：

$$
executed,
rejected,
failed
$$

必須對應：

$$
phosphor\text{-}jsonl\text{-}v1
$$

event。

因此：

$$
\boxed{
StateTransition
\Rightarrow
AuditEvent.
}
$$

---

# 41. Round-trip Law 5 — Terminal Idempotency

若：

$$
c.status\in
\{EXECUTED,REJECTED,FAILED\},
$$

則再次 import / process：

$$
\boxed{
ExecuteAgain(c)=false.
}
$$

---

# 42. Round-trip Law 6 — Projection Rebuildability

對 state sheets：

$$
X_{state}
$$

應能由：

$$
S+Events
$$

重新產生。

因此：

$$
\boxed{
WorkbookStateView
}
$$

不應成為不可替代唯一資料庫。

---

# 43. Round-trip Law 7 — Source Binding

接受 command 前，

需能判定它屬於：

$$
\operatorname{EID}(S_t).
$$

若 workbook source：

$$
EID_X
$$

和 runtime：

$$
EID_S
$$

不一致，

則：

$$
\boxed{
Reject / Review.
}
$$

---

# 44. Round-trip Law 8 — Version Binding

如果 workbook protocol、runtime API、event envelope 或 snapshot shape 已 changed，

舊 workbook 不能被默認相容。

必須：

- migrate；
- reject；
- explicit backward compatibility。

因此：

$$
\boxed{
VersionMismatch
\not\Rightarrow
ImplicitAcceptance.
}
$$

---

# 45. Round-trip Law 9 — No Ambient Authority

Workbook 不得直接：

- shell；
- eval；
- OS path；
- arbitrary VM method。

所有 authority 必須來自：

$$
\boxed{
ExplicitInjectedCapability.
}
$$

---

# 46. Round-trip Law 10 — Projection Divergence Must Surface

如果：

$$
\Phi_X(S_t)
$$

和 imported workbook：

$$
X'
$$

在非-control canonical sheets 出現不允許差異，

系統應：

$$
\boxed{
DetectConflict
}
$$

而不是靜默以 workbook 覆蓋 runtime。

---

# 47. 十張 Canonical Workbook Sheets

PHOSPHOR-SHEET v1.2 使用：

```text
00_Manifest
01_Tick_Ledger
02_Registers
03_Memory_Changes
04_Event_Stream
05_Semantic_Dictionary
06_Anomalies
07_Intent_Actual
08_CTS
09_Control
```

其中前九張主要是：

$$
\boxed{
State / Evidence Projection.
}
$$

而：

$$
09\_Control
$$

是：

$$
\boxed{
Untrusted Intent + Execution Ledger.
}
$$

這種角色分離很重要。

---

# 48. Canonical Workbook 不等於 Canonical Runtime

「canonical sheets」只表示：

> PHOSPHOR-SHEET protocol 規定的標準 workbook shape。

它不表示：

$$
\boxed{
Workbook=RuntimeAuthority.
}
$$

所以必須區分：

$$
CanonicalWorkbookSchema
$$

與：

$$
CanonicalExecutableState.
$$

---

# 49. v1.0 → v1.2 的能力演進

## v1.0 — Read-only Projection

- WorkbookModel；
- Snapshot / Event / CTS；
- 9 standard sheets；
- CSV / SpreadsheetML；
- React SHEET tab；
- 27 checks。

---

## v1.1 — Real XLSX + Governed Control

- real ZIP / OOXML XLSX；
- `09_Control`；
- command allowlist；
- approval；
- Host handler；
- Node reader；
- control audit events；
- total 51 checks。

---

## v1.2 — Interactive Round-trip Control

- browser XLSX reader；
- Excel-modify/reimport；
- DRAFT / QUEUED / APPROVED governance；
- parameter ranges；
- Host target allowlist；
- actual VM command execution；
- total 61 checks。

---

# 50. 驗證摘要

現有摘要記錄：

$$
v1.0:
27
$$

checks passed；

$$
v1.1:
29+22=51
$$

checks passed；

$$
v1.2:
29+32=61
$$

checks passed。

v1.2 另外記錄：

- browser-safe strict TypeScript PASS；
- React JSX parse PASS；
- stored / deflated XLSX browser import PASS；
- patch apply / final tree identity PASS；
- formula errors = 0。

但隔離建置環境沒有重新執行完整 upstream `npm install` 與 Vite production build。

因此：

$$
\boxed{
\text{Verified Scope}
\neq
\text{Universal Build Claim}.
}
$$

---

# 51. MLF 在這裡扮演什麼角色？

MLF 提供：

$$
\boxed{
\text{How to preserve structure across projections}.
}
$$

PHOSPHOR-SHEET 提供：

$$
\boxed{
\text{How one concrete runtime exposes three projections}.
}
$$

MMLC Runtime 提供：

$$
\boxed{
\text{How deterministic execution / audit / replay can be independently checked}.
}
$$

三者不是重複。

---

# 52. 三層統一架構

因此可寫：

$$
\boxed{
\text{Representation Layer}
\rightarrow
\text{Execution Layer}
\rightarrow
\text{Projection / Control Layer}.
}
$$

具體：

$$
\boxed{
MLF
\leftrightarrow
MMLC\ Runtime
\leftrightarrow
PHOSPHOR\text{-}SHEET.
}
$$

但不是說目前三個 repo 已直接共用同一 runtime package。

這是理論與架構對齊，不應冒充已完成程式碼整合。

---

# 53. 一個更一般的 Executable Identity Model

定義系統：

$$
\mathfrak E
=
(
S,
\Delta,
E,
\Phi,
\Psi,
P,
K,
I
),
$$

其中：

- $S$：canonical executable state；
- $\Delta$：合法 transition；
- $E$：append-only events / audit；
- $\Phi$：outbound projections；
- $\Psi$：inbound intent extractors；
- $P$：validation / policy；
- $K$：explicit capabilities；
- $I$：identity / version / session bindings。

---

# 54. Outbound Projection

$$
\Phi
=
\{
\Phi_H,
\Phi_A,
\Phi_X,
\ldots
\}.
$$

每個：

$$
\Phi_i
$$

只能讀取其合法 visibility domain。

因此：

$$
\boxed{
Projection
}
$$

本身也可以有 permission boundary。

---

# 55. Inbound Intent

$$
\Psi_X:
X
\rightarrow
IntentSet.
$$

重要的是：

$$
\Psi_X
$$

不應解釋整份 workbook 的所有改動。

它只抽取：

$$
\boxed{
DeclaredControlSurface.
}
$$

例如：

$$
09\_Control.
$$

---

# 56. Policy

對 intent：

$$
i,
$$

policy：

$$
P(i,S,I)
$$

檢查：

- status；
- args；
- target；
- approval；
- session；
- duplication；
- version；
- handler；
- range。

---

# 57. Capability

合法 intent 最後映射：

$$
K(i)
$$

至：

$$
\boxed{
NarrowHostHandler.
}
$$

這是一種 capability-based boundary。

Workbook 不知道：

> Host 裡還有哪些能力。

它只知道：

> 這個 command name 是否有合法 handler。

---

# 58. Transition

最後：

$$
S_{t+1}
=
\Delta(
S_t,
K(i)
).
$$

並產生：

$$
e_{t+1}.
$$

所以：

$$
\boxed{
WriteBack
=
ValidatedTransition,
}
$$

不是：

$$
\boxed{
StateOverwrite.
}
$$

---

# 59. Conflict 有哪些類型？

本文將 projection conflict 分成至少六類。

## C1 — Stale View

projection revision < runtime revision。

## C2 — Wrong Session

workbook 綁定舊 session。

## C3 — Structural Drift

canonical sheets 被任意修改。

## C4 — Command Conflict

同一 command ID 重複或 terminal command 重播。

## C5 — Version Conflict

sheet protocol / event protocol / runtime API 不相容。

## C6 — Authority Conflict

workbook 企圖呼叫未注入 capability。

---

# 60. Conflict 不應全部自動 Merge

某些 conflict 可以：

- re-project；
- migrate；
- ignore presentation changes。

但：

- stale mutation；
- unknown target；
- duplicate command；
- ambiguous state write；

不應自動 merge。

因此：

$$
\boxed{
Conflict
\not\Rightarrow
AutoMerge.
}
$$

---

# 61. 目前還沒有完成的多人同步問題

PHOSPHOR-SHEET v1.2 是：

$$
\boxed{
\text{single-workbook governed round trip}
}
$$

的主要證據。

它還沒有自動解決：

- 多人同時編輯；
- 多 workbook concurrent writes；
- offline branch merge；
- RBAC quorum approval；
- distributed conflict-free merge。

所以本文不把：

$$
\boxed{
MultiWriterConsistency
}
$$

宣稱為已完成。

---

# 62. 未來多寫入需要更強版本／併發協定

若未來存在：

$$
X_1',
X_2'
$$

同時基於：

$$
S_t
$$

提出 mutation，

Runtime 必須處理：

$$
\boxed{
OptimisticVersionCheck
}
$$

或其他 concurrency policy。

外部 Event Sourcing / CQRS 也同樣強調 version、event ordering 與 optimistic concurrency。

這是 Executable Identity 未來自然延伸。

---

# 63. Materialized View 與 PHOSPHOR Projection 的差異

Materialized View 通常：

$$
\boxed{
ReadOnly.
}
$$

PHOSPHOR-SHEET：

$$
\boxed{
StateSheets=ReadProjection,
\quad
ControlSheet=IntentSurface.
}
$$

所以不能籠統說：

> 整個 workbook 是 materialized view。

更精確是 mixed projection artifact。

---

# 64. View Update Problem 與 PHOSPHOR 的差異

經典 lens：

$$
get:S\rightarrow V,
$$

$$
put:S\times V\rightarrow S.
$$

PHOSPHOR：

$$
get:S\rightarrow X,
$$

但回程是：

$$
\boxed{
put_{control}:
S\times Intent(X)
\rightarrow
S'.
}
$$

不是：

$$
put_{allcells}.
$$

這種 asymmetry 是刻意安全設計。

---

# 65. Executable Identity 的判定條件

本文提出最低判定：

若多 projection system 在 declared scope 中滿足：

1. canonical executable state 唯一；
2. projection 可綁定 source identity；
3. runtime transition 只有一條權威路徑；
4. mutation 必須經 validation / authorization；
5. event / audit sequence 可追蹤；
6. terminal operation 冪等；
7. stale / wrong-session projection 可拒絕；
8. version migration 明示；
9. deterministic domain 可 replay；
10. projection divergence 可檢測；

則稱系統具有：

$$
\boxed{
\text{Executable Identity}.
}
$$

---

# 66. Executable Identity 不要求 Byte Identity

Human UI：

$$
H
$$

和 workbook：

$$
X
$$

當然不會 byte-identical。

所以：

$$
\boxed{
ByteIdentity
}
$$

不是判定條件。

真正要求：

$$
\boxed{
AuthorityIdentity
+
SourceBinding
+
TransitionConsistency.
}
$$

---

# 67. Executable Identity 也不要求所有 Projection 同步即時

某些 projection 可以 eventual-consistent。

例如 UI 或 report lag。

只要：

- revision 明示；
- stale state 不被冒充 fresh；
- write-back 有 revision gate；

就仍可以保持 executable identity。

所以：

$$
\boxed{
InstantConsistency
}
$$

不是必要條件。

---

# 68. 但「不知道自己過期」是失敗

如果：

$$
X_t
$$

已 stale，

卻沒有任何：

$$
revision,
session,
source\_hash
$$

可以辨認，

那麼 workbook 可能被錯誤提升為 current control source。

這是：

$$
\boxed{
IdentityFailure.
}
$$

---

# 69. 一個理想的 Workbook Binding

未來可以在 `00_Manifest` 保存：

```yaml
sheet_proto: phosphor-sheet-v1
vm_id: ...
session_id: ...
program_id: ...
runtime_version: ...
snapshot_revision: ...
event_seq: ...
source_semantic_hash: ...
source_execution_hash: ...
issued_at: ...
expires_at: ...
nonce: ...
```

這裡部分欄位屬於本文建議，並非 v1.2 全部已實作。

---

# 70. 一個理想的 Command Binding

每個 command：

```yaml
command_id: ...
workbook_revision: ...
target_session: ...
command: vm:step
args: ...
requested_by: ...
approved: true
approval_identity: ...
status: APPROVED
nonce: ...
```

執行後追加：

```yaml
result: ...
execution_event: ...
new_revision: ...
```

同樣，這是基於現有架構的後續形式化建議。

---

# 71. 為什麼 Hash 仍不等於 Authority？

即使：

$$
Hash(X)=expected,
$$

也只能證明：

> workbook bytes 沒變。

不能證明：

> workbook 有權修改 VM。

因此：

$$
\boxed{
Integrity
\neq
Authorization.
}
$$

這和 MLF、MMR-Bench 的結論一致。

---

# 72. 為什麼 Signature 仍不等於 Valid Command？

簽章可證明：

> 某 identity 簽過這個 command。

但如果 command：

- target 錯；
- args 超界；
- runtime version 不相容；

仍必須拒絕。

所以：

$$
\boxed{
Signature
\neq
SemanticValidity.
}
$$

---

# 73. Human / AI / Sheet 三種介面的對稱與不對稱

在 read side：

$$
\Phi_H,
\Phi_A,
\Phi_X
$$

大致對稱：

都只是：

$$
S
$$

的 projection。

但在 write side：

它們的權限可以完全不同。

例如：

- Human UI 可以按 Pause；
- AI 只能 propose；
- Sheet mutation 需要 Approval；
- Headless observer 只能 read。

所以：

$$
\boxed{
ReadProjectionSymmetry
\not\Rightarrow
WriteAuthoritySymmetry.
}
$$

---

# 74. AI View 也不能自動成為 Authority

如果 AI event stream 看到：

$$
S_t,
$$

並產生：

$$
proposal,
$$

它也應走：

$$
\boxed{
Proposal
\rightarrow
Policy
\rightarrow
Capability
\rightarrow
Transition.
}
$$

所以 Executable Identity 不是只為 Excel 設計。

它適用所有外部 Agent interface。

---

# 75. 這和 MLF prediction/decision/promotion 完全對齊

MLF：

$$
prediction
\neq
decision
\neq
promotion.
$$

PHOSPHOR：

$$
intent
\neq
approval
\neq
execution.
$$

兩者其實具有共同治理骨架：

$$
\boxed{
\text{Proposed State Change}
\neq
\text{Authorized State Change}.
}
$$

---

# 76. MMLC 的 Audit 又補上第三條腿

MMLC：

$$
Execution
\rightarrow
Audit
\rightarrow
Hash.
$$

所以三者可以形成：

$$
\boxed{
MLF:
\text{Preserve}
}
$$

$$
\boxed{
PHOSPHOR:
\text{Govern}
}
$$

$$
\boxed{
MMLC:
\text{Execute / Audit / Replay}.
}
$$

這是本系列目前最乾淨的三分。

---

# 77. 但目前還不是一個單一產品

本文必須保持工程誠實。

現在的：

- `matrix-ledger-format`；
- `mmlc-runtime`；
- `eml-phosphor`;

是不同工程節點。

本文建立的是：

$$
\boxed{
\text{Unified Architecture / Research Interface}.
}
$$

不是宣稱：

> 三個 repo 現在已共用同一 codebase。

---

# 78. 可證偽條件

## F1 — Projection Drift Undetected

如果：

$$
X
$$

與：

$$
S
$$

已經不一致，

系統仍無法識別 stale / conflict，

Executable Identity 失敗。

---

## F2 — Workbook Becomes Second VM

如果 Spreadsheet layer 自己重新實作：

- memory；
- PC；
- instruction semantics；

並能和 VM Core 分叉，

則：

$$
\boxed{
SingleStatePrinciple
}
$$

失敗。

---

## F3 — Direct Cell Mutation

如果使用者改：

```text
02_Registers!R0
```

就能直接改 canonical VM register，

而沒有 command / policy / event，

則：

$$
\boxed{
ProjectionBoundary
}
$$

失敗。

---

## F4 — Terminal Replay

如果：

$$
EXECUTED
$$

command re-import 後再次執行，

則 idempotency 失敗。

---

## F5 — Wrong Session Accepted

如果舊 workbook 能修改新 session，

則 source binding 失敗。

---

## F6 — Audit Missing

如果 state 已變：

$$
S_t\rightarrow S_{t+1},
$$

但 event stream 沒有對應 control event，

則 audit completeness 失敗。

---

## F7 — Capability Escalation

如果 workbook 可以指定未 allowlist 的 Host method，

則 capability boundary 失敗。

---

## F8 — Replay Inconsistency

對 deterministic MMLC-like domain，

相同 source / lock / traversal / runtime version 不能重現 execution hash，

則 executable replay claim 失敗。

---

# 79. Executable Identity 不是「單一真理哲學」

本文最後要刻意避免：

$$
\boxed{
\text{Single Source of Truth}
\rightarrow
\text{Metaphysical Monism}.
}
$$

我們只是在一個明確 runtime scope 中規定：

> 哪個 state transition source 具有執行 authority。

這是工程治理。

不是宇宙本體論。

---

# 80. 最終核心命題

本文最終將 Executable Identity 濃縮為：

$$
\boxed{
\begin{aligned}
&\exists S_{exec},\\
&V_i=\Phi_i(S_{exec}),\\
&\Delta V_i\not\Rightarrow\Delta S_{exec},\\
&\Delta S_{exec}
\text{ only through declared validated transition}.
\end{aligned}
}
$$

也就是：

$$
\boxed{
\textbf{
看見狀態的介面可以很多，
改變狀態的合法路徑必須是明示且可稽核的。
}
}
$$

---

# 81. 從「Excel 當 AI」走到這裡

最早的直覺是：

> AI 模型能不能放在表格裡？

後來：

> 試算表能不能跑計算？

再後來：

> 矩陣能不能保存方向、依賴與稽核？

到 MLF：

> 同一完整結構能不能產生不同 projection？

到本文：

> **不同 projection 能不能共同操作同一 runtime，而不產生多套真實？**

所以整條研究線真正走到了：

$$
\boxed{
\text{Representation}
\rightarrow
\text{Execution}
\rightarrow
\text{Governed Multi-Interface State}.
}
$$

---

# 82. 下一篇

## EML-MNIAC-2026-08

**《矩陣原生智能：從多方向路由到 MMR-IFN 稀疏注意力》**

下一篇將重新回到「模型 architecture」主線，處理：

- MMR route semantics；
- IFN hierarchical address；
- active slice；
- graph compilation；
- edge-list sparse attention；
- dense vs sparse；
- complexity；
- routing quality；
- CPU benchmark boundary；
- language-model quality 尚未證明；
- matrix-native intelligence 的真正最強／最弱主張。

---

# 參考資料

## 內部規格與工程

1. EveMissLab, **PHOSPHOR-SHEET 本地 Agent 接手與續作指南**, 2026-07-14.
2. EveMissLab, **PHOSPHOR-SHEET 版本路線圖**.
3. EveMissLab, **PHOSPHOR-SHEET 驗證摘要**.
4. EveMissLab, **PHOSPHOR-SHEET v1.2 sample / round-trip workbooks**.
5. Repository: `kakon77777-commits/eml-phosphor`.
6. EveMissLab, **MLF 1.0 / MLF Compiler 1.0.0**.
7. Repository: `kakon77777-commits/matrix-ledger-format`.
8. EveMissLab, **MMLC Runtime 1.0 / MMLF 1.0**.
9. Repository: `kakon77777-commits/mmlc-runtime`.
10. EML-MNIAC-2026-06, 《AI Matrix Ledger Format：從試算表格式到可追溯計算結構》.

## 外部技術近鄰

11. Microsoft Azure Architecture Center, **Event Sourcing pattern**.  
    https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing

12. Microsoft Azure Architecture Center, **CQRS pattern**.  
    https://learn.microsoft.com/en-us/azure/architecture/patterns/cqrs

13. Microsoft Azure Architecture Center, **Materialized View pattern**.  
    https://learn.microsoft.com/en-us/azure/architecture/patterns/materialized-view

14. J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, Alan Schmitt, **Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View Update Problem**, POPL 2005 / TOPLAS 2007.  
    https://www.cs.cornell.edu/~jnfoster/papers/lenses.pdf

Event Sourcing / CQRS 提供「權威事件／寫模型與可重建讀模型」的成熟外部近鄰；Materialized View 強調 view 可由 source 重建且不應成為隨意直接更新的權威來源；bidirectional lenses 則形式化 source/view 的 get-put 關係。PHOSPHOR-SHEET 與這些思想有結構共鳴，但其回寫範圍更窄：它不是同步任意 workbook state，而是只把 `09_Control` 的已宣告 command intent 經 validation、approval 與 explicit Host capability 轉換成 Runtime transition。

---

**系列狀態：** 第 07 篇完成。  
**下一篇：** EML-MNIAC-2026-08 —《矩陣原生智能：從多方向路由到 MMR-IFN 稀疏注意力》
