CODT-02
認知算子代數與相對原子性
Cognitive Operator Algebra and Relative Atomicity
系列: Cognitive Operator-Domain Theory, CODT / 認知算子-域理論
系列篇次: 02 / 10
版本: v1.0
日期: 2026-08-20
作者: Neo.K
機構脈絡: EveMissLab / 一言諾科技有限公司
文件性質: 理論論文 / 算子形式化篇
前篇: CODT-01〈從認知方法到認知算子:認知解構學的域化轉向〉
摘要
CODT-01 已提出「Operator Before Domain」:認知域不得由歷史方法名稱直接指定,而應先從可重用認知作用、合法組合、運行歷史與失效邊界中後生。本文進一步回答:若認知方法要被拆成算子,這些算子究竟構成什麼樣的形式結構?
本文提出 型別化、語境化、部分定義的認知算子代數候選(typed contextual partial cognitive operator algebra candidate)。其核心不是宣稱 cognition 已經是一個標準代數結構,而是明確區分:算子語法、型別相容性、語境合法性、實際執行、認識資格與歷史證書。對 cognitive operator ,本文沿用並收斂既有 operator object:
本文主張:composition 預設為 partial;operator words 在 syntax level 可用 ordered words 表示,但 semantic execution 不等同於任意 concatenation;一般情況下 composition 非交換,且只有在中間型別、語境、history side effects、resource 與 epistemic license 都相容時,才可取得局部 associativity certificate。合法 composition 也不等於 truth、progress、utility 或 certification。
本文同時正式化 相對原子性。一個 operator 在時間 被視為 primitive,只表示在當前表示語言、觀察解析度、證據、型別系統與計算預算下,尚未存在更好的合法分解:
有效分解不只要求把一個名稱切成多個名稱,而必須同時通過型別保存、作用保存、邊界保存、trace 可重放、失效解釋與非平凡性檢查。本文以 Retain、Measure、Attend、AlignRepresentation、Hypothesize、RankHypothesis、SeekDisconfirmingCase 等既有重分類案例說明:CODT 的 primitive status 是可被新 shared-bottom structure 反證的版本化研究狀態,而非不可撤銷的本體宣告。
本文最後提出 Operator Reclassification Contract,使舊 operator ID、舊 history 與新 decomposition 可以同時保留。這為下一篇「認知域的生成」提供必要基礎:只有當 operator identity、composition 與 atomicity 不再依附於預設 domain,domain emergence 才可能真正具有內容。
關鍵詞
認知算子;CODT;partial algebra;typed composition;operator word;relative atomicity;non-commutativity;cognitive runtime;operator decomposition;epistemic license;history preservation
1. 從「有算子」到「算子如何存在」
CODT-01 已完成第一個轉向:
但如果只停在這裡,理論仍可能退化成另一種名詞表。
例如,我們可以把「觀察」拆成 Access、Attend、Discriminate、RegisterEvidence、Measure,但僅僅列出五個名稱,並不能回答:
Access的輸入與輸出是什麼?Measure能否直接接在任意 observation 後?Attend是否只能屬於 Observation?Measure若後來被拆解,舊 trace 怎麼處理?Hypothesize與RankHypothesis的 output 是否具有相同 epistemic license?- syntax 上接得起來,是否代表 runtime 上可以合法執行?
- composition 合法是否等於結論正確?
因此 CODT-02 的問題不是「cognition 是否像數學一樣有一套漂亮代數」,而是:
如果 operator 要被 AI、Agent、runtime、驗證器與研究者共同使用,最低需要哪些形式結構,才能避免「能寫在一起」被偷換成「能執行」「能相信」或「是真的」?
本文將這個最低結構稱為:
即 cognitive operator algebra candidate。
「algebra」在這裡首先是工程與形式化名稱,不代表本文已證明 屬於某個既有 universal-algebra variety。
2. 為什麼不是普通 monoid
標準 total binary operation 可以寫成:
這表示 operation 對整個輸入 domain 都有定義。
但 cognition 顯然不是這樣。
EmitActionRequest 不能在沒有 ActionSpec 的情況下合法執行;TransformRepresentation 不能在 target representation space、bridge basis 或 transform rule 未指定時自由運作;ApplyBeliefUpdate 不能在沒有 belief state、evidence support 與 update rule 時被當成總函數。
因此 CODT 更接近 partial operation:
其中:
標準 partial algebra 研究「operation 只在部分輸入 tuple 上有定義」的結構。CODT 借用這一點作數學參照,但加入更多條件:
- typed input/output;
- context-dependent admissibility;
- epistemic license;
- boundary constraints;
- history dependence;
- side effects;
- representation bridge;
- resource budget;
- certificate;
- failure semantics。
另一方面,ordered operator words 可在 syntax layer 借用 free monoid 的語言。若:
所有有限形式字串可寫成:
但 CODT 不主張:
因為 free monoid 允許任意 letters concatenation,而 cognition 不允許任意 operator concatenation。
因此:
3. Cognitive Operator Object
本文採用:
其中:
- :kernel transformation;
- :input types;
- :output types;
- :use types;
- :admissibility scope;
- :spectrum / measurable profile;
- :lower boundary;
- :upper / exclusion boundary;
- :epistemic license;
- :context requirements;
- :evidence references;
- :failure modes;
- :history / provenance;
- :version。
Kernel 不是完整 operator。一個 transformation 在形式上能寫出來,不代表它在目前 context 中被允許執行。
Input / output types 決定 operator 是否能合法接線;use type 區分 discovery、audit、control、translation、simulation、certification 與 action preparation;admissibility scope 回答 operator 在什麼條件下可用,而不是它「屬於哪一個 domain」。
因此仍保留:
Operator identity 也不等於我們當前對 operator 的完整理論:
ID 可以保留,而 primitive status、型別、邊界與 decomposition 可以版本化修正。
4. 三種不同的「可接」
自然語言中的「A 可以接 B」至少混合三種關係。
4.1 Syntactic concatenability
只要兩個 symbols 都存在,我們總可以寫:
這只表示字串成立。
4.2 Type composability
若:
或存在顯式 bridge:
則 取得 type-level composability。
4.3 Runtime admissibility
即使 type 相容,仍可能因 authority、scope、epistemic license、resource、history、world legality、active goal 或 invariants 而不能執行。
因此最重要的分離是:
5. Legal Composition
對 operators 與 context ,定義:
最低 legal guard:
若涉及外部世界操作,還需要 AuthorityCheck、CapabilityCheck 與 WorldLegalityCheck。
四態必須保留:Undetermined 不得偷轉成 Legal 或 Illegal;Conflicted 則表示不同有效 constraints / certificates 對 legality 給出不相容結果。
6. Operator Application 是 Partial Function
對 cognitive state 、context 、history ,operator application 寫成:
其中:
- :更新後 cognitive/runtime state;
- :產生的 artifact;
- :certificate / legality / failure record;
- :追加後 history。
表示 partiality。
如果 type、scope、license、resource 或 legality 不成立,application 可以不定義。
而:
與:
必須分開。前者表示不應執行,後者表示合法執行但得到 failure / negative evidence。
7. Operator Word
設 operator alphabet ,syntax-level word:
定義:
但 CODT 真正關心 admissible word。
若每一個 prefix:
都在對應 runtime state 與 context 下有 defined evaluation,則:
因此:
而這個 admissible subset 會隨 改變。
8. Non-Commutativity
CODT 一般假設:
這不是修辭,而是 dependency。
例如:
通常有定義;反方向可能缺 transform contract。
又例如:
與:
具有不同安全語義。
再例如:
與:
產生不同 measurement license。
因此 non-commutativity 本質上是:
9. Syntax Associativity 與 Semantic Associativity
字串 concatenation 本身滿足:
但 semantic execution 不一定繼承。
若中間步驟會改變 memory、belief、resource budget、active representation、authority、observer state、world presentation 或 certificate,則:
與:
可能具有不同 intermediate state contract。
因此定義 Associativity Certificate:
只有當 intermediate types、side effects、history guards、resource accounting、epistemic license 與 representation bridge semantics 都保持等價時,才允許:
所以:
10. Identity Operator 只能是型別局部的
對 type 可以定義:
但 identity 至少不得隱性改變 epistemic license、provenance、world state、representation semantics 或被宣告為零成本的 resource ledger。
真實 runtime 中,即使 no-op 也可能消耗 time、token、energy 或寫入 history。
因此:
11. Legal 不等於 True
若:
只表示這條 operator word 可以依目前 contract 執行。
它不推出:
合法 abduction 可以產生錯誤 hypothesis;合法 analogy 可以產生後續被否證的 candidate;合法 measurement 可以因 noise 產生 inaccurate estimate。
所以:
CODT 至少需要正交區分:
12. Epistemic License Propagation
不同 operators 不只是輸出不同資料,也輸出不同「可以被相信到什麼程度」的 license。
定義:
為 operator 對 artifact 產生的 epistemic license。
例如:
但 license propagation 不能預設為單調升級。
若:
不能預設:
CODT 因此禁止:
低資格 evidence 不能因經過很多形式加工,就自動變成高資格 knowledge claim。
13. Representation Bridge 必須顯式存在
若 與 不在同一 representation space,不能因「語義大概接得起來」就直接 composition。
必須插入:
bridge 至少需要:source representation declaration、target representation declaration、bridge basis、transform rule、preservation target 與 loss record。
因此:
14. Relative Atomicity
令:
表示時間 的 operator language / representation system; 表示目前 evidence; 表示 resolution; 表示 decomposition budget。
則 atomicity 應寫成:
而不是永恆的:
所以:
這就是 CODT 的 relative atomicity。
15. 什麼才算有效 decomposition
把一個 operator 名稱拆成五個新名詞,不叫 decomposition success。
對:
至少需要通過六個條件。
15.1 Type Preservation
新 word 的總 input/output contract 應與原 operator interface 相容:
若有 representation conversion,必須明示 bridge。
15.2 Behavioral Preservation
在宣告 scope 內:
這不是要求 implementation detail 完全相同,而是要求指定 invariants 被保留。
15.3 Boundary Preservation
原本 的必要條件與排除條件不能因拆解而消失。
15.4 Failure Explanatory Gain
好的 decomposition 應能把原本模糊的:
局部化成:
或 operator-interface failure。
15.5 Trace Replayability
舊 trace 必須能透過 versioned mapping 解讀:
不能因為新 decomposition 出現,就宣稱舊 operator 從未存在。
15.6 Non-Triviality
不能只寫:
或兩個 rename functions。
分解至少應增加 reuse、type clarity、boundary clarity、failure localization、predictive value、runtime control 或 independent testability 中的一項實質結構價值。
16. Effective Atomicity Criterion
在條件:
下,若不存在 decomposition 同時滿足:
- legal;
- non-trivial;
- interface-preserving;
- boundary-preserving;
- replayable;
- 帶來足夠 decomposition gain;
則:
CODT 研究的是有效停止點,而不是假定宇宙存在永恆 cognitive periodic table。
17. Reclassification 不是刪除
Relative atomicity 最重要的工程後果是:primitive 被拆掉後,舊資料不能被重寫。
一個 operator record 可以經歷:
但 OperatorID 可以保留。
例如 COG-OBS-002 Attend 在舊版本可以是 atomic candidate,新版可以成為 macro candidate,並附 decomposition:
因此:
新版理論可以改寫「我們現在怎麼理解舊 operator」,不能改寫「舊 runtime 當時記錄了什麼」。
18. 已發生的 Relative Atomicity 案例
CDD Experimental Foundations 已經出現多個實際案例。
18.1 Retain
Retain 因此降為 macro candidate。
18.2 Measure
這使「measurement」不再等同於「assign a number」。
18.3 Attend
更重要的是 attention 後來被發現同時服務 observation、search、memory、planning、proof 與 generation,因此原本的 Observation 位置被 shared-bottom structure 改寫。
18.4 AlignRepresentation
後續被拆入 representation-space declaration、bridge-basis selection、transform 與 preservation audit,因此不再適合作為 primitive。
18.5 Hypothesize
後續 decomposition pressure 指向 generic generation、search、memory retrieval、analogy、counterfactual mutation 與 decision/ranking,因此更像 domain-constrained program。
18.6 RankHypothesis
被重新定位到 Decision / Evaluation shared-bottom。
18.7 SeekDisconfirmingCase
被重新理解為:
Refutation 提供 target polarity,Search 提供 traversal machinery。
19. Atomicity Review Protocol
所有 primitive candidate 都應接受週期性 review。
Step 1:Freeze Current Record
固定 operator version、types、boundaries、license、failure modes 與 evidence。
Step 2:Collect Decomposition Pressure
來源可包括:新 shared-bottom family、重複 implementation、failure localization、cross-domain reuse、type ambiguity、representation mismatch、external evidence 與 runtime trace structure。
Step 3:Generate Candidate Decompositions
Step 4:Run Preservation Tests
檢查 Type、Behavior、Boundary、License、History。
Step 5:Run Gain Tests
檢查 reuse、auditability、compression、prediction、control 與 failure diagnosis 是否增加。
Step 6:Reclassify
輸出可以是:keep atomic candidate、cluster candidate、macro candidate、deprecated compatibility 或 unresolved。
Step 7:Preserve Historical Mapping
新理論不能刪除舊 trace。
20. 五種不同的「等價」
CODT 至少區分:
- syntactic equivalence;
- type equivalence;
- behavioral equivalence;
- epistemic equivalence;
- runtime equivalence。
因此:
這是之後 domain quotient 必須非常小心的原因。
21. Side Effects 是 cognition 的一級物件
實際 cognition 充滿 state effects:memory write、belief update、focus shift、resource consumption、plan-state modification、certificate generation、failure trace 與 world-facing request。
因此 operator 最好不要只寫:
而寫:
這使「同樣 input/output type」不再足以判定 operators 可交換或可重排。
22. Resource-Bounded Composition
合法性必須再和 executable-now 分開。
若:
則即使:
當前 runtime 仍可能無法完成。
因此:
所以:
23. Operator Program
Operator program 不只是單一 word,它可以包含:serial composition、parallel branches、conditional routing、loops、recursion、fallback、certification branch、rollback 與 stop condition。
因此第一篇的 Method-as-Program 可以改寫成:
一個 method 的 identity 可以來自穩定 program topology,而不需要任何一個 operator 成為其不可拆的「本質」。
24. Operator Algebra 不是 Domain Algebra
本文定義的是:
不是:
operator algebra 回答:有哪些 operators、如何 type、如何 composition、何時 undefined、何時 legal、如何保留 history、primitive 如何被拆解。
domain theory 才回答:哪些 operators / programs 在 runtime 中形成穩定作用區、如何重疊、如何形成 boundary,以及是否具有 predictive / compressive / operational value。
所以:
25. CODT-02 的形式化憲法增補
在 CODT-01 的 C0-C8 基礎上,本文增加:
CODT-C9:Partiality by Default
CODT-C10:Syntax-Execution Separation
CODT-C11:Local Associativity Only
CODT-C12:Legal-Truth Separation
CODT-C13:Explicit Bridge
representation mismatch 必須顯式插入 bridge。
CODT-C14:Relative Atomicity
CODT-C15:Non-Destructive Reclassification
CODT-C16:Resource-Aware Executability
26. 外部數學邊界
本文使用 partial algebra、free monoid、typed composition 等外部數學語言作形式化參照。
標準 partial algebra 提供:
free monoid 提供:
typed lambda calculus / category-theoretic semantics 則提供 type-respecting composition 的一般背景。
但 CODT 額外加入:
因此本文較精確的描述是:
這是一個對 CODT 設計的描述,不是宣稱已有同名標準數學類別。
27. 相對原子性作為理論自我防錯機制
如果一個理論一開始就宣布「這些東西就是人類心智真正原子」,任何新 evidence 都只能被強迫塞進既有 ontology。
CODT 選擇相反方向。
primitive 是:
而不是:
這使 CODT 可以在不摧毀 history 的情況下持續:
因此 relative atomicity 不只是 operator engineering,也是 CODT 的 epistemic humility mechanism。
28. 與下一篇的接口
有了本文,下一篇才真正可以問:
哪些 operators 應該被視為同一個 domain 的穩定構件?
答案不能再是「因為它們名字都叫歸納」。
下一篇會要求 domain candidate 從 legal operator reuse、type compatibility、shared license、recurrent composition、invariant profile、failure boundary、flow、history、compression 與 predictive value 中產生。
因此:
CODT-02 的責任就是把第一個箭頭固定。
結論
CODT 將 cognition 拆成 operators,不代表 cognition 被簡化成一串任意可拼接的積木。
真正的認知算子系統必須同時面對:
因此 cognitive operator word 只有在 syntax 上像 word;在 runtime 上,它更像一條條件化、部分定義、帶狀態與證書的合法 execution path。
而 primitive 也不再是不可挑戰的 ontology。
CODT 的 relative atomicity 只宣告:
一旦新的 shared-bottom structure、failure evidence、representation 或 runtime trace 出現,primitive 可以被拆解、降級與重新使用。
本文最重要的結論因此是:
只有做到這一步,CODT 才能在後續真正研究 domain emergence,而不是把一套預先決定的 cognitive atoms 換個名字重新分類。
參考文獻與形式化參照
A. 外部形式化參照
- Grätzer, G. (1979). Universal Algebra, 2nd ed. Springer-Verlag.
- Burmeister, P. A Model Theoretic Oriented Approach to Partial Algebras. partial operations / partial-algebra structure 的經典參照。
- Sakarovitch, J. (2009). Elements of Automata Theory. Cambridge University Press. free monoid / words / concatenation 作 syntax-level 參照。
- Pierce, B. C. (2002). Types and Programming Languages. MIT Press. typed terms、typing discipline 與 operational semantics 的一般參照。
- Mac Lane, S. (1998). Categories for the Working Mathematician, 2nd ed. Springer. composition / identity / categorical structure 作背景參照。
邊界聲明: CODT 不宣稱 cognitive operator algebra 等同於上述任一標準數學結構。partial algebra、free monoid、type-respecting composition 只提供形式化比較語言;CODT 額外加入語境合法性、認識資格、邊界、history、resource、failure、certificate、observer 與 World interface。
B. 內部理論來源
- CODT-01〈從認知方法到認知算子:認知解構學的域化轉向〉。
- Neo.K, 《認知解構學正式定義方法論 2.0》。
- GCORF / General Cognitive Operator Reverse Engineering Framework。
- CDD Phase 0 v0.1-v0.3 operator recovery / shared-bottom SourcePacks。
- HSO v0.8 / Ecological Geometry Atlas。
- MWT v0.1 / Mathematical World Theory SourcePack。
- CDD Phase 0 v0.4-v0.11 Experimental Foundations,作後續 domain / atlas / world-coupling falsification context。
版本記錄
v1.0
- 正式建立 CODT cognitive operator algebra candidate。
- 定義 operator object、partial application、legal composition 與 admissible operator word。
- 區分 syntax concatenation、type composability 與 runtime legality。
- 固定 non-commutativity 與 local associativity certificate。
- 區分 Legal、True、Useful、Certified 與 ExecutableNow。
- 正式定義 relative atomicity 與 effective decomposition criteria。
- 建立 non-destructive operator reclassification contract。
- 納入 Retain、Measure、Attend、AlignRepresentation、Hypothesize、RankHypothesis、SeekDisconfirmingCase 等既有重分類案例。
- 為 CODT-03 的 domain emergence 提供 operator-level 基礎。