math-skill 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +165 -198
- package/README.md +165 -198
- package/agents/math-critic.en.md +28 -26
- package/agents/math-critic.md +33 -33
- package/commands/ask.en.md +10 -0
- package/commands/ask.md +3 -10
- package/design-patterns/attention/equivariant-attention.en.md +72 -0
- package/design-patterns/attention/equivariant-attention.md +72 -0
- package/design-patterns/attention/geometry-aware-attention.en.md +73 -0
- package/design-patterns/attention/geometry-aware-attention.md +72 -0
- package/design-patterns/attention/information-bottleneck-attention.en.md +72 -0
- package/design-patterns/attention/information-bottleneck-attention.md +72 -0
- package/design-patterns/attention/projection-attention.en.md +68 -0
- package/design-patterns/attention/projection-attention.md +68 -0
- package/design-patterns/attention/spectral-attention.en.md +71 -0
- package/design-patterns/attention/spectral-attention.md +71 -0
- package/design-patterns/compression/leverage-score-selection.en.md +71 -0
- package/design-patterns/compression/leverage-score-selection.md +71 -0
- package/design-patterns/compression/low-rank-kv-cache.en.md +60 -0
- package/design-patterns/compression/low-rank-kv-cache.md +60 -0
- package/design-patterns/compression/spectral-token-pruning.en.md +61 -0
- package/design-patterns/compression/spectral-token-pruning.md +61 -0
- package/design-patterns/compression/topology-preserving-compression.en.md +64 -0
- package/design-patterns/compression/topology-preserving-compression.md +64 -0
- package/design-patterns/loss/constraint-penalty.en.md +67 -0
- package/design-patterns/loss/constraint-penalty.md +78 -0
- package/design-patterns/loss/contrastive-loss.en.md +59 -0
- package/design-patterns/loss/contrastive-loss.md +68 -0
- package/design-patterns/loss/information-bottleneck-loss.en.md +69 -0
- package/design-patterns/loss/information-bottleneck-loss.md +74 -0
- package/design-patterns/loss/orthogonality-loss.en.md +56 -0
- package/design-patterns/loss/orthogonality-loss.md +60 -0
- package/design-patterns/loss/variational-loss.en.md +61 -0
- package/design-patterns/loss/variational-loss.md +71 -0
- package/design-patterns/representation/equivariant-split.en.md +87 -0
- package/design-patterns/representation/equivariant-split.md +89 -0
- package/design-patterns/representation/manifold-representation.en.md +85 -0
- package/design-patterns/representation/manifold-representation.md +87 -0
- package/design-patterns/representation/shared-private-decomposition.en.md +84 -0
- package/design-patterns/representation/shared-private-decomposition.md +86 -0
- package/design-patterns/representation/subspace-alignment.en.md +90 -0
- package/design-patterns/representation/subspace-alignment.md +92 -0
- package/design-patterns/routing/graph-routing.en.md +79 -0
- package/design-patterns/routing/graph-routing.md +81 -0
- package/design-patterns/routing/moe-routing.en.md +85 -0
- package/design-patterns/routing/moe-routing.md +87 -0
- package/design-patterns/routing/optimal-transport-routing.en.md +68 -0
- package/design-patterns/routing/optimal-transport-routing.md +72 -0
- package/design-patterns/routing/spectral-clustering-routing.en.md +88 -0
- package/design-patterns/routing/spectral-clustering-routing.md +90 -0
- package/knowledge-base/differential-geometry/connection.en.md +51 -0
- package/knowledge-base/differential-geometry/connection.md +51 -0
- package/knowledge-base/differential-geometry/curvature.en.md +49 -0
- package/knowledge-base/differential-geometry/curvature.md +49 -0
- package/knowledge-base/differential-geometry/geodesic.en.md +51 -0
- package/knowledge-base/differential-geometry/geodesic.md +51 -0
- package/knowledge-base/differential-geometry/manifold.en.md +47 -0
- package/knowledge-base/differential-geometry/manifold.md +47 -0
- package/knowledge-base/differential-geometry/metric-tensor.en.md +50 -0
- package/knowledge-base/differential-geometry/metric-tensor.md +50 -0
- package/knowledge-base/differential-geometry/tangent-space.en.md +48 -0
- package/knowledge-base/differential-geometry/tangent-space.md +48 -0
- package/knowledge-base/information-geometry/fisher-metric.en.md +56 -0
- package/knowledge-base/information-geometry/fisher-metric.md +56 -0
- package/knowledge-base/information-geometry/natural-gradient.en.md +54 -0
- package/knowledge-base/information-geometry/natural-gradient.md +54 -0
- package/knowledge-base/lie-theory/equivariance.en.md +54 -0
- package/knowledge-base/lie-theory/equivariance.md +54 -0
- package/knowledge-base/lie-theory/group-action.en.md +51 -0
- package/knowledge-base/lie-theory/group-action.md +51 -0
- package/knowledge-base/lie-theory/lie-algebra.en.md +51 -0
- package/knowledge-base/lie-theory/lie-algebra.md +51 -0
- package/knowledge-base/lie-theory/lie-group.en.md +51 -0
- package/knowledge-base/lie-theory/lie-group.md +51 -0
- package/knowledge-base/lie-theory/representation.en.md +52 -0
- package/knowledge-base/lie-theory/representation.md +52 -0
- package/knowledge-base/matrix-analysis/low-rank-approximation.en.md +49 -0
- package/knowledge-base/matrix-analysis/low-rank-approximation.md +49 -0
- package/knowledge-base/matrix-analysis/matrix-perturbation.en.md +49 -0
- package/knowledge-base/matrix-analysis/matrix-perturbation.md +49 -0
- package/knowledge-base/matrix-analysis/positive-semidefinite.en.md +50 -0
- package/knowledge-base/matrix-analysis/positive-semidefinite.md +50 -0
- package/knowledge-base/matrix-analysis/projection.en.md +47 -0
- package/knowledge-base/matrix-analysis/projection.md +47 -0
- package/knowledge-base/matrix-analysis/spectral-decomposition.en.md +48 -0
- package/knowledge-base/matrix-analysis/spectral-decomposition.md +48 -0
- package/knowledge-base/optimization/constrained-optimization.en.md +53 -0
- package/knowledge-base/optimization/constrained-optimization.md +53 -0
- package/knowledge-base/optimization/convex-optimization.en.md +50 -0
- package/knowledge-base/optimization/convex-optimization.md +50 -0
- package/knowledge-base/optimization/lagrangian-duality.en.md +50 -0
- package/knowledge-base/optimization/lagrangian-duality.md +50 -0
- package/knowledge-base/optimization/proximal-method.en.md +52 -0
- package/knowledge-base/optimization/proximal-method.md +52 -0
- package/knowledge-base/optimization/riemannian-optimization.en.md +51 -0
- package/knowledge-base/optimization/riemannian-optimization.md +51 -0
- package/knowledge-base/overview.en.md +29 -218
- package/knowledge-base/overview.md +29 -220
- package/knowledge-base/probability/concentration-inequality.en.md +45 -0
- package/knowledge-base/probability/concentration-inequality.md +45 -0
- package/knowledge-base/probability/entropy.en.md +47 -0
- package/knowledge-base/probability/entropy.md +47 -0
- package/knowledge-base/probability/fisher-information.en.md +48 -0
- package/knowledge-base/probability/fisher-information.md +48 -0
- package/knowledge-base/probability/information-bottleneck.en.md +49 -0
- package/knowledge-base/probability/information-bottleneck.md +49 -0
- package/knowledge-base/probability/kl-divergence.en.md +51 -0
- package/knowledge-base/probability/kl-divergence.md +51 -0
- package/knowledge-base/topology/euler-characteristic.en.md +54 -0
- package/knowledge-base/topology/euler-characteristic.md +54 -0
- package/knowledge-base/topology/fundamental-group.en.md +52 -0
- package/knowledge-base/topology/fundamental-group.md +52 -0
- package/knowledge-base/topology/persistent-homology.en.md +54 -0
- package/knowledge-base/topology/persistent-homology.md +54 -0
- package/lenses/algorithmic.en.md +49 -0
- package/lenses/algorithmic.md +49 -0
- package/lenses/axiomatization.en.md +48 -0
- package/lenses/axiomatization.md +48 -0
- package/lenses/categorical.en.md +48 -0
- package/lenses/categorical.md +48 -0
- package/lenses/causal.en.md +49 -0
- package/lenses/causal.md +49 -0
- package/lenses/duality.en.md +47 -0
- package/lenses/duality.md +47 -0
- package/lenses/game.en.md +50 -0
- package/lenses/game.md +50 -0
- package/lenses/geometric.en.md +53 -0
- package/lenses/geometric.md +53 -0
- package/lenses/local-to-global.en.md +52 -0
- package/lenses/local-to-global.md +52 -0
- package/lenses/perturbation.en.md +51 -0
- package/lenses/perturbation.md +51 -0
- package/lenses/probabilistic.en.md +48 -0
- package/lenses/probabilistic.md +48 -0
- package/lenses/projection.en.md +50 -0
- package/lenses/projection.md +50 -0
- package/lenses/spectral.en.md +52 -0
- package/lenses/spectral.md +52 -0
- package/lenses/symmetry.en.md +49 -0
- package/lenses/symmetry.md +49 -0
- package/lenses/topological.en.md +48 -0
- package/lenses/topological.md +48 -0
- package/lenses/variational.en.md +48 -0
- package/lenses/variational.md +48 -0
- package/package.json +9 -3
- package/references/agentic-workflow.en.md +1 -1
- package/references/agentic-workflow.md +1 -1
- package/references/books/abstract-algebra.en.md +124 -0
- package/references/books/abstract-algebra.md +22 -22
- package/references/books/algebraic-geometry-rising-sea.en.md +171 -0
- package/references/books/algebraic-geometry-rising-sea.md +11 -11
- package/references/books/differential-geometry.en.md +140 -0
- package/references/books/differential-geometry.md +19 -19
- package/references/books/matrix-analysis.en.md +146 -0
- package/references/books/matrix-analysis.md +10 -10
- package/references/books/micro-lie-theory.en.md +116 -0
- package/references/books/micro-lie-theory.md +17 -17
- package/references/books/optimization-ml.en.md +163 -0
- package/references/books/optimization-ml.md +7 -8
- package/references/books/smooth-manifolds.en.md +105 -0
- package/references/books/smooth-manifolds.md +14 -14
- package/references/gpu-friendly-math.en.md +23 -10
- package/references/gpu-friendly-math.md +17 -4
- package/references/inspiration.en.md +1 -1
- package/references/inspiration.md +2 -2
- package/skills/math-research-activator/SKILL.en.md +195 -114
- package/skills/math-research-activator/SKILL.md +194 -119
- package/skills/math-research-activator/original-texts.en.md +9 -9
- package/skills/math-research-activator/original-texts.md +11 -11
- package/commands/abstraction.md +0 -11
- package/commands/algorithmic-thinking.md +0 -11
- package/commands/axiomatization.md +0 -11
- package/commands/causal-inference.md +0 -11
- package/commands/discrete-combinatorial.md +0 -11
- package/commands/game-theory.md +0 -11
- package/commands/induction-analogy.md +0 -11
- package/commands/information-theory.md +0 -11
- package/commands/logic-deduction.md +0 -11
- package/commands/modeling.md +0 -11
- package/commands/optimization.md +0 -11
- package/commands/probability-statistics.md +0 -11
- package/commands/symmetry-invariance.md +0 -11
- package/commands/topological-thinking.md +0 -11
- package/commands/transformation.md +0 -11
- package/skills/abstraction/SKILL.en.md +0 -117
- package/skills/abstraction/SKILL.md +0 -121
- package/skills/abstraction/original-texts.en.md +0 -163
- package/skills/abstraction/original-texts.md +0 -175
- package/skills/algorithmic-thinking/SKILL.en.md +0 -132
- package/skills/algorithmic-thinking/SKILL.md +0 -138
- package/skills/algorithmic-thinking/original-texts.en.md +0 -253
- package/skills/algorithmic-thinking/original-texts.md +0 -256
- package/skills/axiomatization/SKILL.en.md +0 -144
- package/skills/axiomatization/SKILL.md +0 -151
- package/skills/axiomatization/original-texts.en.md +0 -154
- package/skills/axiomatization/original-texts.md +0 -160
- package/skills/causal-inference/SKILL.en.md +0 -147
- package/skills/causal-inference/SKILL.md +0 -151
- package/skills/causal-inference/original-texts.en.md +0 -136
- package/skills/causal-inference/original-texts.md +0 -167
- package/skills/discrete-combinatorial/SKILL.en.md +0 -124
- package/skills/discrete-combinatorial/SKILL.md +0 -131
- package/skills/discrete-combinatorial/original-texts.en.md +0 -184
- package/skills/discrete-combinatorial/original-texts.md +0 -185
- package/skills/game-theory/SKILL.en.md +0 -117
- package/skills/game-theory/SKILL.md +0 -123
- package/skills/game-theory/original-texts.en.md +0 -131
- package/skills/game-theory/original-texts.md +0 -131
- package/skills/induction-analogy/SKILL.en.md +0 -145
- package/skills/induction-analogy/SKILL.md +0 -152
- package/skills/induction-analogy/original-texts.en.md +0 -140
- package/skills/induction-analogy/original-texts.md +0 -154
- package/skills/information-theory/SKILL.en.md +0 -134
- package/skills/information-theory/SKILL.md +0 -140
- package/skills/information-theory/original-texts.en.md +0 -127
- package/skills/information-theory/original-texts.md +0 -127
- package/skills/logic-deduction/SKILL.en.md +0 -130
- package/skills/logic-deduction/SKILL.md +0 -135
- package/skills/logic-deduction/original-texts.en.md +0 -160
- package/skills/logic-deduction/original-texts.md +0 -173
- package/skills/modeling/SKILL.en.md +0 -135
- package/skills/modeling/SKILL.md +0 -139
- package/skills/modeling/original-texts.en.md +0 -162
- package/skills/modeling/original-texts.md +0 -165
- package/skills/optimization/SKILL.en.md +0 -129
- package/skills/optimization/SKILL.md +0 -135
- package/skills/optimization/original-texts.en.md +0 -167
- package/skills/optimization/original-texts.md +0 -168
- package/skills/probability-statistics/SKILL.en.md +0 -146
- package/skills/probability-statistics/SKILL.md +0 -151
- package/skills/probability-statistics/original-texts.en.md +0 -191
- package/skills/probability-statistics/original-texts.md +0 -193
- package/skills/symmetry-invariance/SKILL.en.md +0 -135
- package/skills/symmetry-invariance/SKILL.md +0 -139
- package/skills/symmetry-invariance/original-texts.en.md +0 -206
- package/skills/symmetry-invariance/original-texts.md +0 -221
- package/skills/topological-thinking/SKILL.en.md +0 -124
- package/skills/topological-thinking/SKILL.md +0 -128
- package/skills/topological-thinking/original-texts.en.md +0 -134
- package/skills/topological-thinking/original-texts.md +0 -164
- package/skills/transformation/SKILL.en.md +0 -120
- package/skills/transformation/SKILL.md +0 -124
- package/skills/transformation/original-texts.en.md +0 -204
- package/skills/transformation/original-texts.md +0 -216
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: axiomatization
|
|
3
|
-
description: |
|
|
4
|
-
触发:审查论文/理论的假设合理性、构建新公理系统、发现理论内部矛盾、验证相容性/独立性/完备性;或为算法/算子/结构定公理与不变量并检验其可计算性时调用。
|
|
5
|
-
English: Trigger when examining the reasonableness of a theory's assumptions, constructing an axiom system, discovering internal contradictions, verifying consistency/independence/completeness; or defining axioms and invariants for an algorithm/operator/structure and checking their computability.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
> **语言路由**:若用户消息为英文,请读取并遵循同目录下的 `SKILL.en.md`,按其操作规程以英文输出;中文消息则继续使用本文件。
|
|
9
|
-
|
|
10
|
-
# 📐 公理化思想 / Axiomatization
|
|
11
|
-
|
|
12
|
-
> "从最少假设出发,用严格逻辑构建——审查前提比检查结论更重要"
|
|
13
|
-
> "Starting from minimal assumptions, building through rigorous logic — examining premises matters more than checking conclusions"
|
|
14
|
-
>
|
|
15
|
-
> —— 欧几里得《几何原本》、希尔伯特《几何基础》、公理集合论
|
|
16
|
-
> —— Euclid's *Elements*, Hilbert's *Foundations of Geometry*, Axiomatic Set Theory
|
|
17
|
-
|
|
18
|
-
## 核心原则 / Core Principle
|
|
19
|
-
|
|
20
|
-
**任何理论体系都可以(且应该)被还原为一组基本公理,从这些公理出发,通过严格逻辑推理,可以推导出该领域的所有定理。审查前提比检查结论更重要——前提错了,结论再精巧也站不住脚。**
|
|
21
|
-
|
|
22
|
-
**Any theoretical system can (and should) be reduced to a set of fundamental axioms, from which all theorems in that domain can be derived through rigorous logical inference. Examining premises matters more than checking conclusions — if premises are wrong, no amount of elegant reasoning can save the conclusion.**
|
|
23
|
-
|
|
24
|
-
> **数学形式化 / Mathematical Formalization**
|
|
25
|
-
>
|
|
26
|
-
> 评判一个公理系统的质量,有以下核心标准:
|
|
27
|
-
>
|
|
28
|
-
> - **相容性(Consistency)**:公理之间不能互相矛盾。若公理集合矛盾,则由爆炸原理(ex falso quodlibet)可推出任意命题,体系崩溃
|
|
29
|
-
> - **独立性(Independence)**:每条公理都不能由其他公理推导出来
|
|
30
|
-
> - **完备性(Completeness)**:该领域的所有真命题都能从公理出发被证明(注意:完备性因逻辑系统阶数而异,见方法流程)
|
|
31
|
-
>
|
|
32
|
-
> **范畴性(Categoricity)**:若一个公理系统的所有模型彼此同构,则该系统是范畴的。范畴系统唯一确定其研究对象的结构——例如二阶 Peano 公理是范畴的(唯一模型为自然数结构 ℕ),而一阶 Peano 公理不是范畴的(存在非标准模型)。
|
|
33
|
-
>
|
|
34
|
-
> **相对一致性(Relative Consistency)**:若公理系统 A 的所有公理可嵌入为系统 B 中的真命题,且系统 B 已知相容,则系统 A 相容。这是证明相容性的标准方法——例如 PA 的相容性可在 ZFC 中证明(PA 的公理在 ZFC 中皆为真),但 ZFC 自身的相容性只能在更强的系统(如 ZFC+存在不可达基数)中相对证明。
|
|
35
|
-
>
|
|
36
|
-
> 详细数学依据见 `original-texts.md`
|
|
37
|
-
|
|
38
|
-
## GPU 友好性 / GPU-Friendliness(横切检查)
|
|
39
|
-
|
|
40
|
-
当公理化用于**为算法/算子/结构定公理与不变量**时,所定义的结构必须过 `../../references/gpu-friendly-math.md` 八维门——「公理自洽」不等于「可算」:
|
|
41
|
-
|
|
42
|
-
- **友好**:公理系统天然落到线性代数——群作用公理 → 等变层 = GEMM(权重沿轨道共享);环公理松弛为半环 → 广义 GEMM(min-plus/热带)。过维度 1/2/3。
|
|
43
|
-
- **可改造**:本质离散/符号的公理(硬 Top-K、精确有限域算术、符号证明搜索)阻断梯度 → 松弛公理:热带半环分段线性门控、Gumbel-softmax、可微代理。
|
|
44
|
-
- **反模式**:不变量要求全局符号推理或精确离散满足(如精确 Čech 上同调、精确轨道相等判断)→「美但不可算」;改为局部/连续近似。
|
|
45
|
-
|
|
46
|
-
八维最低判定(正式术语):**张量化**看公理实例是否能批量检查;**GEMM 可映射**看运算公理是否能落线性/半环矩阵乘;**复杂度**看一致性/独立性检查是否退化为不可判定或指数搜索;**显存与 KV-Cache**看不变量是否需要全局状态表;**低精度稳定**看公理是否容忍近似等式;**并行与通信**看局部公理能否分块验证;**稀疏结构**看约束图是否结构化;**算子融合**看公理检查能否编译成轻量 loss/guard。
|
|
47
|
-
|
|
48
|
-
> 配合 `../../references/books/abstract-algebra.md`(群/环/域公理、环→半环松弛)与 `../../references/books/algebraic-geometry-rising-sea.md`(层/范畴/上同调公理)。
|
|
49
|
-
|
|
50
|
-
## 不适用场景 / When NOT to Use
|
|
51
|
-
|
|
52
|
-
- **纯粹的事实查询**(如"这个公式是什么")——没有理论体系需要审查。
|
|
53
|
-
- **用户已接受某个理论框架,只需应用**——公理已选定。
|
|
54
|
-
- **经验性问题**(需实验数据而非逻辑推理)——公理化不能替代实证。
|
|
55
|
-
- **构造性语境下默认使用经典工具**——若用户要求构造性证明,不应默认排中律或选择公理。
|
|
56
|
-
|
|
57
|
-
## 何时使用 / When to Use
|
|
58
|
-
|
|
59
|
-
- 阅读论文时,审查其理论基础假设是否合理、是否自洽。
|
|
60
|
-
- 构建理论框架时,从最小公理集出发。
|
|
61
|
-
- 发现某理论体系内部存在矛盾或不一致。
|
|
62
|
-
- 需判断形式系统是否可判定(decidable)或是否完备。
|
|
63
|
-
- 需比较不同公理选择的后果(构造性 vs 经典、一阶 vs 二阶)。
|
|
64
|
-
- **为算子/结构定公理与不变量**,并检验其在 GPU 上的可计算性。
|
|
65
|
-
|
|
66
|
-
## 方法流程 / Method
|
|
67
|
-
|
|
68
|
-
### 第一步:识别公理 / Identify the Axioms
|
|
69
|
-
找出该理论体系的所有基本假设(公理),区分:**显式公理**(作者明确声明)、**隐式公理**(未声明但论证实际使用)、**背景公理**(默认接受的更大框架假设,如默认 ZFC)。
|
|
70
|
-
|
|
71
|
-
> "每一门科学只有当它被公理化之后,才算是真正成熟了。" —— 希尔伯特
|
|
72
|
-
|
|
73
|
-
### 第二步:规定形式语言 / Specify the Formal Language
|
|
74
|
-
公理体系表达力取决于所选形式语言,公理化前必须明确:
|
|
75
|
-
|
|
76
|
-
- **一阶逻辑(First-order Logic)**:量词只作用于个体元素。表达力有限,但拥有完备证明理论(哥德尔完备性定理:可证明的恰好是有效的)。一阶理论模型不唯一(非范畴性),但证明系统可靠且完备。
|
|
77
|
-
- **二阶逻辑(Second-order Logic)**:量词可作用于子集和函数。表达力更强(可表达范畴性,如二阶 Peano 唯一刻画 ℕ),但不存在完备证明系统——其语义不可被任何递归公理集完全捕获。
|
|
78
|
-
- **构造性逻辑(Constructive / Intuitionistic Logic)**:不接受排中律(∀P, P∨¬P)。存在量词证明必须给出显式见证(witness):证明 ∃x.φ(x) 必须构造出具体 x₀ 使 φ(x₀) 成立。推理规则更严格,但保证所有证明可计算。
|
|
79
|
-
|
|
80
|
-
> 选择语言不仅是技术细节,而是根本性哲学决定:一阶逻辑承诺可穷尽的证明系统,二阶逻辑承诺结构唯一性,构造性逻辑承诺可计算性。
|
|
81
|
-
|
|
82
|
-
### 第三步:检验相容性 / Check Consistency
|
|
83
|
-
检查公理之间是否互相矛盾。若公理集合矛盾,则由爆炸原理可推出任意命题,体系崩溃。检验方法:
|
|
84
|
-
|
|
85
|
-
- 寻找是否存在两个公理 P 与 ¬P 同时成立。
|
|
86
|
-
- 尝试构造模型使所有公理同时为真(模型存在 ⇒ 相容)。
|
|
87
|
-
- **相对一致性证明**:将系统 A 的公理嵌入为系统 B 中的真命题,若 B 已知相容则 A 相容。例如 PA 相容(PA 公理在 ZFC 的 von Neumann 自然数模型中皆为真)。
|
|
88
|
-
- **有限模型方法**:对较弱的形式系统(命题逻辑、某些有穷公理化弱算术),可构造有限模型直接验证相容性。
|
|
89
|
-
|
|
90
|
-
### 第四步:检验独立性 / Check Independence
|
|
91
|
-
检查是否有某条公理可由其他公理推导出来。若存在,它不是真正的公理而是定理。检验方法:
|
|
92
|
-
|
|
93
|
-
- 对每条公理 A,构造模型使 A 不成立但其他公理都成立。
|
|
94
|
-
- 若这样的模型存在,则 A 独立于其他公理。
|
|
95
|
-
- 经典案例:平行公理独立于欧氏几何其余公理(非欧几何模型);选择公理独立于 ZF(Cohen 力迫法)。
|
|
96
|
-
|
|
97
|
-
### 第五步:评估完备性 / Assess Completeness
|
|
98
|
-
检查公理体系是否足以推导出该领域所有重要结论。完备性性质因逻辑阶数和理论内容而异:
|
|
99
|
-
|
|
100
|
-
- **一阶理论可以完备**:稠密线性序(DLO)、固定特征的代数封闭域(ACF_p)等一阶理论完备且可判定。完备 ≠ 不存在未决问题;完备指对每个闭公式 φ,φ 或 ¬φ 可由公理证明。
|
|
101
|
-
- **哥德尔不完备定理的适用范围**:不完备性特指包含足够算术的一阶递归可枚举理论(PA、ZFC 等),其中必然存在不可判定命题(如 PA 中的 Gödel 句、ZFC 中的 CH)。
|
|
102
|
-
- **可判定性(Decidability)是独立问题**:完备的一阶理论通常可判定(有算法判定任意公式是否为定理),但不完备理论未必不可判定——可判定性取决于是否存在判定定理的算法,而非是否所有命题都有证明。
|
|
103
|
-
|
|
104
|
-
### 第六步:分析公理选择的影响 / Analyze the Impact of Axiom Choice
|
|
105
|
-
改变或放松某条公理,理论会发生什么变化?许多数学分支的发展正是通过改变公理实现的:
|
|
106
|
-
|
|
107
|
-
- 改变平行公理 → 非欧几何(双曲几何、椭圆几何)。
|
|
108
|
-
- **构造性 vs 经典**:去除排中律 → 构造性数学(Brouwer, Heyting),存在性证明必须提供显式构造;添加选择公理 → 更强的经典数学,但产生非构造性证明(如 Banach-Tarski 分球定理)。
|
|
109
|
-
- **Zorn 引理、良序定理与选择公理**:在 ZF 中三者等价——接受任何一个即接受全部,这一等价性本身是非构造性的。
|
|
110
|
-
- 改变归纳公理 → 非标准分析。
|
|
111
|
-
|
|
112
|
-
### 第七步:应用与结论 / Apply and Conclude
|
|
113
|
-
综合以上分析,给出对该公理体系的整体评价:是否适合其预期应用领域?是否存在需补充或修改的公理?该体系的局限性是什么(不可判定命题、非范畴性、构造性缺失等)?
|
|
114
|
-
|
|
115
|
-
## 常见错误 / Common Errors
|
|
116
|
-
|
|
117
|
-
| 错误 / Error | 批评 / Critique | 正确做法 / Correct Approach |
|
|
118
|
-
|---|---|---|
|
|
119
|
-
| 混淆公理和定理 | 把需证明的命题当作不证自明的公理 | 明确区分:公理是起点,定理是终点 |
|
|
120
|
-
| 忽视隐式假设 | 论证中使用了未声明的假设,推理不严密 | 审查每一步推理,暴露所有隐含假设 |
|
|
121
|
-
| 接受矛盾公理集 | 从矛盾公理可推出任意结论(爆炸原理) | 检验公理集合的相容性 |
|
|
122
|
-
| 把公理当真理 | 公理只是选择出发点的约定,非绝对真理 | 公理的价值在于其推论的有用性 |
|
|
123
|
-
| 忽略公理变更的可能性 | 认为公理是唯一可能的选择 | 考虑改变公理会得到什么新理论 |
|
|
124
|
-
| 混淆一阶与二阶完备性 | 一阶有完备证明系统(哥德尔完备性),二阶没有;二者"完备"含义不同 | 区分证明论完备性与模型论完备性,明确逻辑阶数 |
|
|
125
|
-
| 忽视构造性义务 | 构造性语境中使用排中律或仅证 ¬¬∃x.φ(x) 而不给见证 | 构造性证明须对 ∃x.φ(x) 给出显式见证 x₀;构造性语境禁用排中律 |
|
|
126
|
-
| 假设所有不完备理论同样不完备 | 不同不完备理论的不可判定命题数量与性质差异巨大 | 分析具体理论:哪些命题不可判定、其结构性质如何 |
|
|
127
|
-
| 把离散/符号公理硬塞进训练 | 本质离散/符号的公理系统不可微、不可算 | 过八维门,必要时松弛为可微/近似(热带半环、Gumbel-softmax) |
|
|
128
|
-
|
|
129
|
-
## 操作规程 / Operating Procedure
|
|
130
|
-
|
|
131
|
-
当本 skill 被触发时,输出必须包含:
|
|
132
|
-
|
|
133
|
-
1. **公理清单**:`[公理N]: [内容](来源:显式/隐式/背景)`
|
|
134
|
-
2. **形式语言规定**:`[语言类型]: [一阶/二阶/构造性](理由:...)`
|
|
135
|
-
3. **相容性检查**:`✅ 相容` 或 `❌ 发现矛盾:[具体矛盾]`;若用相对一致性,注明嵌入的目标系统
|
|
136
|
-
4. **独立性分析**:标注是否存在冗余公理 `⚠️ [公理N] 可能由 [公理M] 推出`
|
|
137
|
-
5. **完备性评估**:`✅ 完备` / `⚠️ 不完备:缺少 [X]`;注明是否属哥德尔不完备定理适用范围,标注可判定性
|
|
138
|
-
6. **公理变更分析**:若改变某条公理(去除排中律、添加/去除选择公理),理论会如何变化?
|
|
139
|
-
7. **结论**:对该理论体系相容性、独立性、完备性、范畴性、可判定性的综合判定
|
|
140
|
-
8. **[GPU 可行性]**(若用于算法/算子/结构设计)— 所定公理与不变量导出的结构过 `../../references/gpu-friendly-math.md` 八维门,标注友好/可改造/不友好 + 改造建议
|
|
141
|
-
|
|
142
|
-
**输出不得只给分析而无结论。每项必须给出明确判定,不可悬置。**
|
|
143
|
-
|
|
144
|
-
## 与其他 skill 的关系 / Relations to Other Skills
|
|
145
|
-
|
|
146
|
-
- **逻辑演绎**:公理化需要逻辑演绎作为推理工具;形式推理规则是公理体系的证明机制。
|
|
147
|
-
- **抽象化**:公理化是最高层次的抽象——把一切还原为最少假设。
|
|
148
|
-
- **建模思想**:公理体系本身也是一种模型,需检验其对现实的适用性;模型论直接服务于相容性与独立性检验。
|
|
149
|
-
- **归纳与类比**:公理的选择往往通过归纳和类比获得灵感。
|
|
150
|
-
- **算法思想**:形式系统与可判定性直接关联——可判定理论存在算法判定定理,不可判定理论则不存在。
|
|
151
|
-
- **现代数学激活**:`../../references/books/abstract-algebra.md`(公理系统/群环域、环→半环松弛)、`../../references/books/algebraic-geometry-rising-sea.md`(层/范畴/上同调基础)。
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# Mathematical Sources and Classic Texts
|
|
2
|
-
|
|
3
|
-
## Euclid's *Elements* (~300 BC)
|
|
4
|
-
|
|
5
|
-
**The Axiomatic System (Five Postulates)**:
|
|
6
|
-
|
|
7
|
-
> 1. A straight line segment can be drawn joining any two points.
|
|
8
|
-
> 2. Any straight line segment can be extended indefinitely in a straight line.
|
|
9
|
-
> 3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.
|
|
10
|
-
> 4. All right angles are congruent.
|
|
11
|
-
> 5. (Parallel Postulate) If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect on that side if extended far enough.
|
|
12
|
-
|
|
13
|
-
1. A straight line segment can be drawn joining any two points.
|
|
14
|
-
2. Any straight line segment can be extended indefinitely in a straight line.
|
|
15
|
-
3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.
|
|
16
|
-
4. All right angles are congruent.
|
|
17
|
-
5. (Parallel Postulate) If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect on that side if extended far enough.
|
|
18
|
-
|
|
19
|
-
**Significance**: The first axiomatic system in human history, demonstrating that 465 propositions can be rigorously derived from 5 postulates and 5 common notions through strict logical deduction.
|
|
20
|
-
|
|
21
|
-
## The Parallel Postulate Controversy (~300 BC – 1820s)
|
|
22
|
-
|
|
23
|
-
Euclid's fifth postulate was disquieting from the very beginning: its formulation is far more complex than the first four, resembling a theorem rather than an axiom. For two millennia, countless mathematicians attempted to derive it from the first four postulates, all to no avail.
|
|
24
|
-
|
|
25
|
-
Key figures and developments:
|
|
26
|
-
- **Saccheri** (1733): Attempted to derive a contradiction by assuming the parallel postulate false; though unsuccessful, he was the first to systematically explore the properties of non-Euclidean geometry.
|
|
27
|
-
- **Lambert** (1766): Pursued a similar approach, investigating more deeply the geometric consequences under the hypothesis of the obtuse angle and the hypothesis of the acute angle.
|
|
28
|
-
- **Gauss** (~1820): Privately recognized the logical consistency of non-Euclidean geometry but refrained from publishing for fear of controversy.
|
|
29
|
-
- **Bolyai** (1832) & **Lobachevsky** (1829): Independently published hyperbolic geometry — a geometry in which the parallel postulate is false yet the system is entirely self-consistent.
|
|
30
|
-
|
|
31
|
-
> "I have created a new universe from nothing." — Bolyai
|
|
32
|
-
|
|
33
|
-
**Significance**: The parallel postulate is independent of the other four — it can neither be proved nor refuted from them. This is the earliest instance of axiom independence, revealing the profound fact that "axioms cannot be forced to be true" a full century before Gödel's incompleteness theorems. The birth of non-Euclidean geometry directly gave rise to Riemannian geometry, which later became the mathematical foundation of general relativity.
|
|
34
|
-
|
|
35
|
-
## Hilbert's *Foundations of Geometry* (1899)
|
|
36
|
-
|
|
37
|
-
> "We must be able to replace 'points, lines, planes' with 'tables, chairs, beer mugs' — as long as they satisfy the relations between the axioms."
|
|
38
|
-
|
|
39
|
-
Hilbert proposed more rigorous requirements for axiomatic systems:
|
|
40
|
-
- **Consistency**: The axioms must not contradict one another
|
|
41
|
-
- **Independence**: No axiom can be derived from the others
|
|
42
|
-
- **Completeness**: All geometric propositions must be decidable within the system
|
|
43
|
-
|
|
44
|
-
## Peano Axioms for Arithmetic (1889)
|
|
45
|
-
|
|
46
|
-
Peano formulated five axioms for the natural numbers, constituting the most classical form of the axiomatization of arithmetic:
|
|
47
|
-
|
|
48
|
-
> P1. 0 is a natural number.
|
|
49
|
-
> P2. Every natural number n has a unique successor S(n).
|
|
50
|
-
> P3. 0 is not the successor of any natural number.
|
|
51
|
-
> P4. Different natural numbers have different successors.
|
|
52
|
-
> P5. (Induction) If P(0) and P(n) → P(S(n)), then P holds for all natural numbers.
|
|
53
|
-
|
|
54
|
-
**Significance**: First-order Peano Arithmetic (PA) is the standard object of study in Gödel's incompleteness theorems — PA is consistent but incomplete. Second-order Peano Arithmetic is categorical (see below), uniquely characterizing the structure of the natural numbers.
|
|
55
|
-
|
|
56
|
-
## Zermelo-Fraenkel Set Theory with Choice (ZFC, 1908–1922)
|
|
57
|
-
|
|
58
|
-
ZFC is the standard axiomatic foundation of contemporary mathematics, consisting of 9 axioms:
|
|
59
|
-
|
|
60
|
-
> Z1. Extensionality: Sets with the same elements are equal.
|
|
61
|
-
> Z2. Empty Set: ∅ exists.
|
|
62
|
-
> Z3. Pairing: {a, b} exists.
|
|
63
|
-
> Z4. Union: The union of any family of sets exists.
|
|
64
|
-
> Z5. Power Set: P(A) exists.
|
|
65
|
-
> Z6. Infinity: An infinite set exists.
|
|
66
|
-
> Z7. Replacement (Fraenkel's addition): Images of functions on sets are sets.
|
|
67
|
-
> Z8. Foundation: Every nonempty set has a minimal element; no set contains itself.
|
|
68
|
-
> Z9. Axiom of Choice (AC): For any family of nonempty sets, a choice function exists.
|
|
69
|
-
|
|
70
|
-
**The Axiom of Choice Controversy**: AC seems intuitive yet leads to counterintuitive conclusions — most famously the **Banach-Tarski Paradox** (1924): a ball can be cut into five pieces which, after rotation and reassembly, form two balls each identical in size to the original. Zermelo used AC to prove that every set can be well-ordered (1904), a result that is itself deeply puzzling.
|
|
71
|
-
|
|
72
|
-
> "The Axiom of Choice is obviously true, the Well-Ordering Theorem obviously false, and who can tell the difference?" — Jerry Bona
|
|
73
|
-
|
|
74
|
-
**Significance**: ZFC's 9 axioms suffice to derive virtually all of modern mathematics. Yet ZFC itself is subject to Gödel's incompleteness theorems — ZFC is consistent but cannot prove its own consistency from within.
|
|
75
|
-
|
|
76
|
-
## Continuum Hypothesis (Cantor 1878, Gödel 1940, Cohen 1963)
|
|
77
|
-
|
|
78
|
-
Cantor proposed in 1878 that the cardinality of the real numbers (the continuum) is exactly ℵ₁ — that is, there exists no infinite cardinal strictly between the cardinality of the natural numbers ℵ₀ and the cardinality of the reals.
|
|
79
|
-
|
|
80
|
-
> CH: 2^ℵ₀ = ℵ₁. There is no cardinal between ℵ₀ and 2^ℵ₀.
|
|
81
|
-
|
|
82
|
-
- **Gödel** (1940): Proved that CH is consistent with ZFC — CH cannot be refuted within ZFC. He constructed the constructible universe L, in which CH holds.
|
|
83
|
-
- **Cohen** (1963): Using the forcing method, proved that ¬CH is also consistent with ZFC — CH cannot be proved within ZFC. This marked the birth of forcing.
|
|
84
|
-
|
|
85
|
-
**Significance**: CH is the most concrete instance of Gödel's incompleteness theorems — a natural proposition about the size of infinity that is neither provable nor refutable within the standard axiomatic system of mathematics. This profoundly reveals the limitations of axiomatic systems: even the most fundamental mathematical questions may exceed the power of the axioms.
|
|
86
|
-
|
|
87
|
-
## Gödel's Incompleteness Theorems (1931)
|
|
88
|
-
|
|
89
|
-
> **First Incompleteness Theorem**: In any consistent axiomatic system that includes arithmetic, there exist propositions that can neither be proved nor refuted.
|
|
90
|
-
> **Second Incompleteness Theorem**: A consistent axiomatic system cannot prove its own consistency from within.
|
|
91
|
-
|
|
92
|
-
**Implications for the axiomatic program**: A perfect axiomatization is impossible. But this does not mean axiomatization is without value — it helps us understand the boundaries of a theory.
|
|
93
|
-
|
|
94
|
-
## Whitehead & Russell, *Principia Mathematica* (1910–1913)
|
|
95
|
-
|
|
96
|
-
An attempt to reduce all of mathematics to logic and set-theoretic axioms — the pinnacle of the axiomatization program. Although Gödel later proved the impossibility of such a complete reduction, *Principia* demonstrated the enormous power of the axiomatic method.
|
|
97
|
-
|
|
98
|
-
## Categoricity (Veblen 1904)
|
|
99
|
-
|
|
100
|
-
Veblen introduced the concept of categoricity in 1904: an axiomatic system is called *categorical* if all of its models are isomorphic — that is, the axioms uniquely characterize the object of study.
|
|
101
|
-
|
|
102
|
-
> Categoricity = all models of the axiom system are isomorphic.
|
|
103
|
-
|
|
104
|
-
**Key examples**:
|
|
105
|
-
- **Second-order Peano Arithmetic** is categorical — all models satisfying second-order PA are the standard natural number structure ℕ, unique up to isomorphism.
|
|
106
|
-
- **First-order Peano Arithmetic** is not categorical — there exist non-standard models containing "infinitely large" natural numbers (Skolem 1934).
|
|
107
|
-
- **First-order theory of real closed fields** is categorical (Tarski) — it uniquely characterizes ℝ.
|
|
108
|
-
|
|
109
|
-
**Significance**: Categoricity is the ideal property of an axiomatic system — the axioms truly "pin down" a unique mathematical object. However, the Löwenheim-Skolem theorem shows that any first-order axiomatic system with an infinite model also has infinite models of arbitrary cardinality, and therefore a first-order system can never be categorical (unless it has only finite models). Second-order systems can be categorical, but second-order logic lacks a complete proof system. This is the fundamental tension between first-order and second-order approaches in the axiomatic method.
|
|
110
|
-
|
|
111
|
-
## Tarski's Axiomatization of Geometry (1926–1959)
|
|
112
|
-
|
|
113
|
-
Tarski axiomatized Euclidean plane geometry in first-order logic, using only points together with two primitive relations: betweenness and equidistance.
|
|
114
|
-
|
|
115
|
-
> Tarski's geometry = first-order logic + points + betweenness + equidistance, ~10 axioms (7 in the short version).
|
|
116
|
-
|
|
117
|
-
**Decidability and Completeness**: Tarski proved in 1959 that this axiomatic system is **complete and decidable** — every geometric proposition can be decided within the system, and an algorithm exists to perform this decision automatically.
|
|
118
|
-
|
|
119
|
-
**Contrast with Gödel**: This may seem to contradict Gödel's incompleteness theorems. The crucial point is that Tarski's geometry does not contain arithmetic — it cannot encode the natural numbers, so the condition "includes arithmetic" required by Gödel's theorem is not satisfied. This profoundly illustrates that the completeness or incompleteness of an axiomatic system depends on whether it can express sufficient arithmetic.
|
|
120
|
-
|
|
121
|
-
**Significance**: Tarski's result is a marvel of axiomatic methodology — there exist first-order axiomatic systems that are both complete and decidable. The price is that one must sacrifice the ability to express arithmetic.
|
|
122
|
-
|
|
123
|
-
## Bourbaki (1935–)
|
|
124
|
-
|
|
125
|
-
Bourbaki is the collective pseudonym of a group of French mathematicians dedicated to systematically reconstructing all of mathematics using the axiomatic method. Their monumental work, *Éléments de mathématique*, is grounded in set theory and builds up, layer by layer, the branches of algebra, analysis, topology, differential geometry, and more.
|
|
126
|
-
|
|
127
|
-
> "Mathematics is not about numbers, but about structures." — The Bourbaki spirit
|
|
128
|
-
|
|
129
|
-
**Three Mother Structures**:
|
|
130
|
-
- **Algebraic Structures**: Groups, rings, fields — characterizing the laws of operation and composition.
|
|
131
|
-
- **Order Structures**: Partial orders, total orders, lattices — characterizing the laws of comparison and ordering.
|
|
132
|
-
- **Topological Structures**: Topological spaces, metric spaces — characterizing the laws of continuity and proximity.
|
|
133
|
-
|
|
134
|
-
Bourbaki held that all mathematical structures can be generated through the combination of these three mother structures. This program profoundly influenced the classification and pedagogy of modern mathematics.
|
|
135
|
-
|
|
136
|
-
**Significance**: Bourbaki elevated axiomatization from "laying foundations for a single discipline" to "building a unified architecture for all of mathematics." Although category theory later provided a more flexible perspective, Bourbaki's structuralism remains one of the core legacies of mathematical axiomatic thought.
|
|
137
|
-
|
|
138
|
-
## Constructive Mathematics (Brouwer 1908, Heyting 1930, Bishop 1967)
|
|
139
|
-
|
|
140
|
-
Constructive mathematics rejects the Law of Excluded Middle and the Axiom of Choice in classical logic, requiring that every existence proof must provide a concrete construction method — that is, "there exists x" must be accompanied by "how to find x."
|
|
141
|
-
|
|
142
|
-
> "To exist is to construct." — Core credo of constructive mathematics
|
|
143
|
-
|
|
144
|
-
**Key figures and systems**:
|
|
145
|
-
- **Brouwer** (1908–): Founder of intuitionism, held that mathematics is a free creation of the mind, and opposed treating the Law of Excluded Middle as universally valid.
|
|
146
|
-
- **Heyting** (1930): Established a formal axiomatic system for intuitionistic logic — intuitionistic logic (Heyting arithmetic).
|
|
147
|
-
- **Bishop** (1967): In *Foundations of Constructive Analysis*, demonstrated that constructive methods can reconstruct much of classical analysis without the Law of Excluded Middle and without the Axiom of Choice.
|
|
148
|
-
|
|
149
|
-
**Key differences between constructive logic and classical logic**:
|
|
150
|
-
- Excluded middle ¬¬P → P is not valid in constructive logic.
|
|
151
|
-
- AC is nearly unacceptable in constructive frameworks.
|
|
152
|
-
- Proving ¬P means constructing a function from P to contradiction; proving P ∨ Q means providing a proof of P or a proof of Q.
|
|
153
|
-
|
|
154
|
-
**Significance**: Constructive mathematics is not merely a philosophical stance but a practical necessity — computer-executable proofs must provide algorithms (i.e., constructions). This also has profound connections to Gödel's incompleteness theorems: if the Law of Excluded Middle is rejected, many classical "proofs" no longer hold, and the "incompleteness" profile of an axiomatic system changes accordingly.
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# 数学出处与经典文献 / Mathematical Sources and Classic Texts
|
|
2
|
-
|
|
3
|
-
## 欧几里得《几何原本》/ Euclid's *Elements* (~300 BC)
|
|
4
|
-
|
|
5
|
-
**公理体系(五大公设)**:
|
|
6
|
-
|
|
7
|
-
> 1. 任意两点之间可以作一条直线。
|
|
8
|
-
> 2. 一条有限直线可以不断延长。
|
|
9
|
-
> 3. 以任意中心和半径可以画一个圆。
|
|
10
|
-
> 4. 所有直角都相等。
|
|
11
|
-
> 5. (平行公设)若一条直线与两条直线相交,在同一侧的内角之和小于两直角,则这两条直线无限延长后在该侧相交。
|
|
12
|
-
|
|
13
|
-
1. A straight line segment can be drawn joining any two points.
|
|
14
|
-
2. Any straight line segment can be extended indefinitely in a straight line.
|
|
15
|
-
3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.
|
|
16
|
-
4. All right angles are congruent.
|
|
17
|
-
5. (Parallel Postulate) If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect on that side if extended far enough.
|
|
18
|
-
|
|
19
|
-
**意义**:人类历史上第一个公理化体系,展示了从 5 条公设和 5 条公理出发,通过严格逻辑推理可以推导出 465 个命题。
|
|
20
|
-
|
|
21
|
-
## 平行公设之争 / The Parallel Postulate Controversy (~300 BC – 1820s)
|
|
22
|
-
|
|
23
|
-
欧几里得第五公设从一开始就令人不安:它的表述远比前四条复杂,更像是一条定理而非公理。两千年来,无数数学家试图从前四条公设推导出它,均告失败。
|
|
24
|
-
|
|
25
|
-
关键人物与进展:
|
|
26
|
-
- **Saccheri** (1733):试图通过假设平行公设为假来推导矛盾,虽未成功,但首次系统探索了非欧几何的性质。
|
|
27
|
-
- **Lambert** (1766):类似思路,更深入地研究了钝角假设与锐角假设下的几何结论。
|
|
28
|
-
- **Gauss** (~1820):私下已认识到非欧几何的逻辑自洽性,但因怕引起争议而未发表。
|
|
29
|
-
- **Bolyai** (1832) & **Lobachevsky** (1829):各自独立发表双曲几何——一种平行公设为假但完全自洽的几何体系。
|
|
30
|
-
|
|
31
|
-
> "我已从虚无中创造了另一个全新的世界。" — Bolyai
|
|
32
|
-
> "I have created a new universe from nothing." — Bolyai
|
|
33
|
-
|
|
34
|
-
**意义**:平行公设独立于其余四条——它既不能被证明也不能被证伪。这是公理独立性最早的实例,比哥德尔不完备定理早一百年就揭示了"公理不可被迫为真"的深刻事实。非欧几何的诞生直接催生了黎曼几何,后者成为广义相对论的数学基础。
|
|
35
|
-
|
|
36
|
-
## 希尔伯特《几何基础》/ Hilbert's *Foundations of Geometry* (1899)
|
|
37
|
-
|
|
38
|
-
> "我们可以用'桌子、椅子、啤酒杯'代替'点、线、面'——只要它们满足公理之间的关系。"
|
|
39
|
-
> "We must be able to replace 'points, lines, planes' with 'tables, chairs, beer mugs'—as long as they satisfy the relations between the axioms."
|
|
40
|
-
|
|
41
|
-
希尔伯特提出了更严格的公理体系要求:
|
|
42
|
-
- **相容性**:公理不能互相矛盾
|
|
43
|
-
- **独立性**:每条公理不能由其他公数推出
|
|
44
|
-
- **完备性**:所有几何命题都能在体系内判定
|
|
45
|
-
|
|
46
|
-
## 皮亚诺算术公理 / Peano Axioms for Arithmetic (1889)
|
|
47
|
-
|
|
48
|
-
皮亚诺给出自然数的五条公理,是算术公理化最经典的形式:
|
|
49
|
-
|
|
50
|
-
> P1. 0 是自然数。 / 0 is a natural number.
|
|
51
|
-
> P2. 每个自然数 n 都有唯一后继 S(n)。 / Every natural number n has a unique successor S(n).
|
|
52
|
-
> P3. 0 不是任何自然数的后继。 / 0 is not the successor of any natural number.
|
|
53
|
-
> P4. 不同自然数有不同的后继。 / Different natural numbers have different successors.
|
|
54
|
-
> P5. (归纳公理)若性质 P 对 0 成立,且对 n 成立则对 S(n) 成立,则 P 对所有自然数成立。 / (Induction) If P(0) and P(n) → P(S(n)), then P holds for all natural numbers.
|
|
55
|
-
|
|
56
|
-
**意义**:一阶皮亚诺公理(PA)是哥德尔不完备定理的标准研究对象——PA 相容但不完备。二阶皮亚诺公理是范畴性的(见下文),唯一刻画自然数结构。
|
|
57
|
-
|
|
58
|
-
## ZFC 公理 / Zermelo-Fraenkel Set Theory with Choice (1908–1922)
|
|
59
|
-
|
|
60
|
-
ZFC 是当代数学的标准公理基础,由 9 条公理组成:
|
|
61
|
-
|
|
62
|
-
> Z1. 外延公理:两个集合相等当且仅当它们有相同的元素。 / Extensionality: sets with the same elements are equal.
|
|
63
|
-
> Z2. 空集公理:存在不含任何元素的集合。 / Empty set: ∅ exists.
|
|
64
|
-
> Z3. 配对公理:对任意 a, b,存在集合 {a, b}。 / Pairing: {a, b} exists.
|
|
65
|
-
> Z4. 并集公理:任意集合族的并集存在。 / Union: the union of any family of sets exists.
|
|
66
|
-
> Z5. 幂集公理:任意集合的所有子集构成一个集合。 / Power set: P(A) exists.
|
|
67
|
-
> Z6. 无穷公理:存在含 0 且对后继封闭的集合。 / Infinity: an infinite set exists.
|
|
68
|
-
> Z7. 替换公理(Fraenkel 补充):函数像在集合范围内。 / Replacement (Fraenkel's addition): images of functions on sets are sets.
|
|
69
|
-
> Z8. 基础公理:每个非空集合有最小元,禁止集合包含自身。 / Foundation: every nonempty set has a minimal element; no set contains itself.
|
|
70
|
-
> Z9. 选择公理(AC):对任意非空集合族,存在选择函数从每个集合中选取一个元素。 / Axiom of Choice: for any family of nonempty sets, a choice function exists.
|
|
71
|
-
|
|
72
|
-
**选择公理争议**:AC 看似直观,却导致反直觉结论——最著名的是 **Banach-Tarski 悖论** (1924):一个球可以被切成五块,经旋转重组后变成两个与原球同样大小的球。Zermelo 用 AC 证明了每个集合都可良序化 (1904),这本身也令人困惑。
|
|
73
|
-
|
|
74
|
-
> "选择公理显然为真,良序定理显然为假,而谁又能分辨?" — Jerry Bona
|
|
75
|
-
> "The Axiom of Choice is obviously true, the Well-Ordering Theorem obviously false, and who can tell the difference?" — Jerry Bona
|
|
76
|
-
|
|
77
|
-
**意义**:ZFC 的 9 条公理足以推导几乎所有现代数学。但 ZFC 本身也是哥德尔不完备定理的适用对象——ZFC 相容但无法在内部证明其相容性。
|
|
78
|
-
|
|
79
|
-
## 连续统假设 / Continuum Hypothesis (Cantor 1878, Gödel 1940, Cohen 1963)
|
|
80
|
-
|
|
81
|
-
康托尔在 1878 年提出:实数集(连续统)的势恰好是 ℵ₁——即不存在介于自然数势 ℵ₀ 与实数势之间的无穷基数。
|
|
82
|
-
|
|
83
|
-
> CH: 2^ℵ₀ = ℵ₁。不存在"中等大小"的无穷集。 / There is no cardinal between ℵ₀ and 2^ℵ₀.
|
|
84
|
-
|
|
85
|
-
- **Gödel** (1940):证明了 CH 与 ZFC 相容——在 ZFC 中无法反驳 CH。构造了可构造集 L,在其中 CH 成立。
|
|
86
|
-
- **Cohen** (1963):用力迫法(forcing)证明了 ¬CH 也与 ZFC 相容——在 ZFC 中无法证明 CH。这是力迫法的诞生。
|
|
87
|
-
|
|
88
|
-
**意义**:CH 是哥德尔不完备定理最具体的实例——一条关于无穷大小的自然命题,在数学的标准公理体系中既不可证也不可驳。这深刻揭示了公理体系的局限:即使是最基本的数学问题,也可能超出公理的力量。
|
|
89
|
-
|
|
90
|
-
## 哥德尔不完备定理 / Gödel's Incompleteness Theorems (1931)
|
|
91
|
-
|
|
92
|
-
> **第一不完备定理**:任何一个包含算术的相容公理体系,都存在既不能证明也不能证伪的命题。
|
|
93
|
-
> **第二不完备定理**:一个相容的公理体系不能在体系内部证明自身的相容性。
|
|
94
|
-
|
|
95
|
-
**对公理化思想的启示**:完美的公理化是不可能的。但这不意味着公理化没有价值——它帮助我们理解理论的边界。
|
|
96
|
-
|
|
97
|
-
## Whitehead & Russell《数学原理》/ *Principia Mathematica* (1910–1913)
|
|
98
|
-
|
|
99
|
-
尝试将所有数学还原为逻辑和集合论公理,是公理化思想的巅峰尝试。虽然哥德尔后来证明了这种完全还原的不可能性,但《原理》展示了公理化方法的巨大力量。
|
|
100
|
-
|
|
101
|
-
## 范畴性 / Categoricity (Veblen 1904)
|
|
102
|
-
|
|
103
|
-
Veblen 在 1904 年引入范畴性概念:一个公理体系称为范畴性的(categorical),如果它的所有模型都同构——即公理唯一地刻画了研究对象。
|
|
104
|
-
|
|
105
|
-
> 范畴性 = 公理体系的所有模型彼此同构。/ Categoricity = all models of the axiom system are isomorphic.
|
|
106
|
-
|
|
107
|
-
**关键例子**:
|
|
108
|
-
- **二阶皮亚诺公理**是范畴性的——所有满足二阶 PA 的模型都是标准自然数结构 ℕ,唯一的。
|
|
109
|
-
- **一阶皮亚诺公理**不是范畴性的——存在非标准模型,其中有"无穷大"的自然数(Skolem 1934)。
|
|
110
|
-
- **一阶实闭域公理**是范畴性的(Tarski)——唯一刻画 ℝ。
|
|
111
|
-
|
|
112
|
-
**意义**:范畴性是公理体系的理想性质——公理真正"钉住"了唯一的数学对象。但 L\"owenheim-Skolem 定理表明,任何一阶公理体系如果有无穷模型,就有任意大小的无穷模型,因此一阶体系永远不可能范畴性(除非只有有限模型)。二阶体系可以范畴性,但二阶逻辑没有完备的证明系统。这是公理化方法中一阶与二阶的根本张力。
|
|
113
|
-
|
|
114
|
-
## 塔斯基几何公理化 / Tarski's Axiomatization of Geometry (1926–1959)
|
|
115
|
-
|
|
116
|
-
塔斯基用一阶逻辑公理化欧几里得平面几何,只使用点(point)与介于(betweenness)、等距(equidistance)两个基本关系。
|
|
117
|
-
|
|
118
|
-
> 塔斯基几何 = 一阶逻辑 + 点 + 介于 + 等距,共约 10 条公理(短版本仅需 7 条)。
|
|
119
|
-
> Tarski's geometry = first-order logic + points + betweenness + equidistance, ~10 axioms (7 in the short version).
|
|
120
|
-
|
|
121
|
-
**决定性与完备性**:塔斯基在 1959 年证明了这个公理体系是**完备且可判定的**——每条几何命题都可在体系内判定真伪,且存在算法自动判定。
|
|
122
|
-
|
|
123
|
-
**对比哥德尔**:这似乎与哥德尔不完备定理矛盾。关键在于:塔斯基几何不含算术——它无法编码自然数,因此哥德尔定理的条件"包含算术"不满足。这深刻说明了:公理体系的完备与否取决于它能否表达足够的算术。
|
|
124
|
-
|
|
125
|
-
**意义**:塔斯基的成果是公理化方法论上的奇迹——存在既完备又可判定的一阶公理体系。代价是必须牺牲对算术的表达能力。
|
|
126
|
-
|
|
127
|
-
## 布尔巴基 / Bourbaki (1935–)
|
|
128
|
-
|
|
129
|
-
布尔巴基是一群法国数学家的集体笔名,致力于以公理化方法系统重构全部数学。其巨著《数学原理》(*Éléments de mathématique*)以集合论为根基,逐层构建代数、分析、拓扑、微分等分支。
|
|
130
|
-
|
|
131
|
-
> "数学不是关于数的,而是关于结构的。" — 布尔巴基的精神
|
|
132
|
-
> "Mathematics is not about numbers, but about structures." — The Bourbaki spirit
|
|
133
|
-
|
|
134
|
-
**三大母结构**:
|
|
135
|
-
- **代数结构**:群、环、域——刻画运算与组合规律。
|
|
136
|
-
- **序结构**:偏序、全序、格——刻画比较与排序规律。
|
|
137
|
-
- **拓扑结构**:拓扑空间、度量空间——刻画连续与邻近规律。
|
|
138
|
-
|
|
139
|
-
布尔巴基认为一切数学结构都可从这三种母结构复合生成。这个纲领深刻影响了现代数学的分类方式与教学方式。
|
|
140
|
-
|
|
141
|
-
**意义**:布尔巴基将公理化从"为单一学科建基础"提升到"为全部数学建统一架构"的宏大尺度。尽管后来范畴论提供了更灵活的视角,布尔巴aki的结构主义仍是数学公理化思想的核心遗产之一。
|
|
142
|
-
|
|
143
|
-
## 构造性数学 / Constructive Mathematics (Brouwer 1908, Heyting 1930, Bishop 1967)
|
|
144
|
-
|
|
145
|
-
构造性数学拒绝经典逻辑中的排中律(Law of Excluded Middle)和选择公理,要求每个存在性证明必须提供具体的构造方法——即"存在 x"必须伴随"如何找到 x"。
|
|
146
|
-
|
|
147
|
-
> "存在即构造。" — 构造性数学的核心信条
|
|
148
|
-
> "To exist is to construct." — Core credo of constructive mathematics
|
|
149
|
-
|
|
150
|
-
**关键人物与体系**:
|
|
151
|
-
- **Brouwer** (1908–):直觉主义创始人,认为数学是心智的自由创造,反对将排中律视为普遍有效。
|
|
152
|
-
- **Heyting** (1930):为直觉主义逻辑建立了形式化公理体系——直觉主义逻辑(Heyting 算术)。
|
|
153
|
-
- **Bishop** (1967):在《构造性分析》中展示了构造性方法可以重建经典分析的大部分内容,无需排中律也无需选择公理。
|
|
154
|
-
|
|
155
|
-
**构造性逻辑与经典逻辑的关键差异**:
|
|
156
|
-
- 排中律 ¬¬P → P 在构造性逻辑中不成立。/ Excluded middle ¬¬P → P is not valid in constructive logic.
|
|
157
|
-
- 选择公理在构造性框架中几乎不可接受。/ AC is nearly unacceptable in constructive frameworks.
|
|
158
|
-
- 证明 ¬P = 构造一个从 P 到矛盾的函数;证明 P ∨ Q = 给出 P 的证明或 Q 的证明。/ Proving ¬P means constructing a function from P to contradiction; proving P ∨ Q means providing a proof of P or a proof of Q.
|
|
159
|
-
|
|
160
|
-
**意义**:构造性数学不仅是哲学立场,更是实际需要——计算机可执行证明必须提供算法(即构造)。这与哥德尔不完备定理也有深刻关联:如果拒绝排中律,许多经典逻辑下的"证明"不再成立,公理体系的"不完备"面目也随之改变。
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: causal-inference
|
|
3
|
-
description: |
|
|
4
|
-
Trigger when a problem concerns correlation vs. causation, intervention/counterfactual reasoning, do-calculus, causal DAG modeling, confounder identification, policy/treatment effect estimation; or needs explicit causal assumptions for model interpretability, out-of-distribution generalization, or data-generating process modeling.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# 🔗 Causal Inference
|
|
8
|
-
|
|
9
|
-
> "Correlation is not causation — but causation can be sorted out. Key distinction: 'how is Y when we see X' is not the same as 'what if we did X.'"
|
|
10
|
-
>
|
|
11
|
-
> — Causal Inference, Structural Causal Models, Counterfactual Reasoning
|
|
12
|
-
|
|
13
|
-
## Core Principle
|
|
14
|
-
|
|
15
|
-
**Causal inference answers questions beyond probability's expressive power: probability answers "how is Y when we see X," not "what if we did X." Pearl's causal hierarchy has three levels, each requiring stronger modeling assumptions.**
|
|
16
|
-
|
|
17
|
-
> **Mathematical Formalization**
|
|
18
|
-
>
|
|
19
|
-
> Pearl's Causal Hierarchy:
|
|
20
|
-
> - **Level 1 — Association**: $P(y|x)$ — Seeing
|
|
21
|
-
> - **Level 2 — Intervention**: $P(y|do(x))$ — Doing
|
|
22
|
-
> - **Level 3 — Counterfactual**: $P(y_x|x',y')$ — Imagining
|
|
23
|
-
>
|
|
24
|
-
> **$do(x) \neq$ conditioning on $x$**: $do(x)$ severs all arrows pointing into $X$ (graph surgery), while conditioning on $x$ severs no arrows. Back-door adjustment: $P(y|do(x)) = \sum_z P(y|x,z)P(z)$
|
|
25
|
-
>
|
|
26
|
-
> **Potential Outcomes (Neyman-Rubin)**: $Y(x)$ denotes "the value $Y$ would take under intervention $X=x$"; individual treatment effect $\tau_i = Y_i(1)-Y_i(0)$; average treatment effect ATE $= E[Y(1)]-E[Y(0)] = E[Y|do(X=1)] - E[Y|do(X=0)]$.
|
|
27
|
-
>
|
|
28
|
-
> **Structural Causal Model (SCM)**: $Y := f(X, Z, U)$, where $U$ is exogenous; the DAG together with structural equations determines the counterfactual $Y_x = f(x, Z, U)$.
|
|
29
|
-
>
|
|
30
|
-
> **d-Separation**: A path is blocked by $Z$ $\iff$ a chain/fork middle node $\in Z$, or a collider $X\to C\leftarrow Y$ has $C$ and its descendants $\notin Z$. d-separation $X\perp_G Y|Z$ implies conditional independence; it is the tool for reading off causal assumptions from the graph.
|
|
31
|
-
>
|
|
32
|
-
> **Do-Calculus — Three Rules** (applied on modified graphs using d-separation):
|
|
33
|
-
> - Rule 1 (Insertion/deletion of observations): If $Y \perp Z \mid X$ in the graph with all arrows into $X$ removed, then $P(y|do(x),z) = P(y|do(x))$
|
|
34
|
-
> - Rule 2 (Exchange of intervention and observation): If $Y \perp Z \mid X$ in the graph with all arrows into $X$ removed and all arrows out of $Z$ removed, then $P(y|do(x),do(z)) = P(y|do(x),z)$
|
|
35
|
-
> - Rule 3 (Insertion/deletion of interventions): If $Y \perp Z \mid X$ in the graph with all arrows into $X$ removed and all arrows from $Z$ to $X$ along paths from $Z$ to $X$ removed, then $P(y|do(x),do(z)) = P(y|do(x))$
|
|
36
|
-
>
|
|
37
|
-
> **Causal reasoning requires an explicit causal model; it cannot be derived from data alone. The DAG encodes causal assumptions, and do-calculus transforms interventional expressions into observable quantities.**
|
|
38
|
-
>
|
|
39
|
-
> See `original-texts.md` for detailed mathematical foundations.
|
|
40
|
-
|
|
41
|
-
## GPU-Friendliness (Cross-Cutting Check)
|
|
42
|
-
|
|
43
|
-
When causal inference is used for **model interpretability / out-of-distribution generalization / data-generating process modeling** at scale, the methods themselves must pass through the eight-dimensional gate in `../../references/gpu-friendly-math.md`:
|
|
44
|
-
|
|
45
|
-
- **Effect estimation / adjustment regression**: Back-door adjustment, IPW, doubly-robust ML — conditional expectations and regression are all batch GEMM, tensorizable, fusible, low-precision viable — **friendly** (see `../../references/books/optimization-ml.md`).
|
|
46
|
-
- **Conditional independence testing**: High-dimensional conditional independence tests involve precision matrix (covariance inverse) inversion $O(p^3)$; can be reformed via **low-rank / diagonal approximation** or iterative solvers — **retrofittable** (see `../../references/books/matrix-analysis.md`).
|
|
47
|
-
- **Exact causal discovery (DAG search)**: DAG space grows super-exponentially with node count; exact score-based search is NP-hard, non-differentiable, serial — a classic "beautiful but intractable" anti-pattern.
|
|
48
|
-
- **Reform approach**: NOTEARS-style **continuous relaxation** (acyclicity constraint $h(W)=\text{tr}(e^{W\circ W})-p=0$) transforms discrete graph search into differentiable optimization; alternatively, MCMC / greedy + scoring as heuristic approximation.
|
|
49
|
-
- **Counterfactual / SCM simulation**: Forward simulation of structural equations is batch-parallelizable; however, individual counterfactuals depend on identifying exogenous $U$ — watch for serial dependencies.
|
|
50
|
-
|
|
51
|
-
Eight-dimensional minimum assessment (formal terms): **Tensorization** — whether samples / interventions / candidate graphs admit batched processing; **GEMM-mappability** — whether adjustment regression and representation learning fall into matrix multiplication; **Complexity** — whether causal discovery avoids super-exponential DAG search; **Memory and KV-Cache** — whether precision matrices, candidate graphs, and intermediate counterfactuals are compressible; **Low-precision stability** — whether IPW weights, covariance inverses, and logits are numerically robust; **Parallelism and communication** — whether multi-environment / multi-intervention estimation is parallelizable; **Sparse structure** — whether the DAG / SCM is structurally sparse; **Operator fusion** — whether scoring, masking, and loss can be fused.
|
|
52
|
-
|
|
53
|
-
> Use in conjunction with `../../references/books/optimization-ml.md` (intervention estimation / regression) and `../../references/books/matrix-analysis.md` (conditional independence / low-rank precision matrices).
|
|
54
|
-
|
|
55
|
-
## When NOT to Use
|
|
56
|
-
|
|
57
|
-
- **Pure prediction tasks with no causal question** (only $P(y|x)$ is needed, no interest in "why") — association is sufficient; causation is superfluous.
|
|
58
|
-
- **No encodable causal assumptions** (cannot draw a reasonable DAG; causal directions are uncertain) — without explicit assumptions, no causal conclusions can be drawn.
|
|
59
|
-
- **Deterministic systems with no variation** (inputs map strictly uniquely to outputs) — causation is fully described by the mechanism; the probabilistic causal framework is unnecessary.
|
|
60
|
-
|
|
61
|
-
## When to Use
|
|
62
|
-
|
|
63
|
-
- Need to know the effect of an intervention ("If we do X, what happens to Y?") — requires $P(y|do(x))$, not $P(y|x)$.
|
|
64
|
-
- Need to distinguish causes from confounders (Does X cause Y, or does Z cause both X and Y?) — DAGs identify confounding paths.
|
|
65
|
-
- Need counterfactual reasoning ("What would have happened if we had not done A?") — Level 3 requires structural equations.
|
|
66
|
-
- Need policy / treatment effect evaluation (back-door adjustment, IV, difference-in-differences when RCTs are infeasible).
|
|
67
|
-
- Need mediation analysis (decomposing direct and indirect effects along $X\to M\to Y$).
|
|
68
|
-
- Need to model the data-generating process (DGP) for **model interpretability / out-of-distribution generalization**, transforming predictor associations into actionable causal mechanisms.
|
|
69
|
-
|
|
70
|
-
## Method
|
|
71
|
-
|
|
72
|
-
### Step 1: Construct the Causal DAG
|
|
73
|
-
Identify all variables explicitly; draw causal arrows encoding direct-cause assumptions; verify acyclicity. Identify the cause variable $X$ (intervention target), outcome $Y$ (effect), confounders $Z$ (common causes of $X$ and $Y$), and mediators $M$ ($X\to M\to Y$). An arrow $X\to Y$ means "$X$ is a direct cause of $Y$"; the direction encodes a causal assumption. The DAG must be directed and acyclic — cycles indicate uncertain causal direction and require re-modeling. **Key question**: Is there sufficient domain knowledge to encode causal directions? Conclusions depend entirely on DAG correctness.
|
|
74
|
-
|
|
75
|
-
### Step 2: Identify Confounders
|
|
76
|
-
Confounders simultaneously affect $X$ and $Y$, creating spurious association — without adjustment, effect estimates are biased. **Definition**: $Z$ is a confounder $\iff$ $Z$ is a common cause of $X$ and $Y$ ($Z\to X$ and $Z\to Y$). **DAG identification**: find all common ancestors of $X$ and $Y$. **Back-door paths** $X\leftarrow Z\to Y$ create non-causal associations that must be blocked. **Key question**: Are all confounders observable? If unobserved confounders exist, back-door adjustment is unavailable and front-door criterion or instrumental variables are needed.
|
|
77
|
-
|
|
78
|
-
### Step 3: Choose Identification Strategy
|
|
79
|
-
Based on confounder observability, select a strategy for computing $P(y|do(x))$ from observational data:
|
|
80
|
-
- **Back-door criterion**: If $\exists S$ blocking all back-door paths from $X$ to $Y$ and $S$ contains no descendants of $X$, then $P(y|do(x)) = \sum_s P(y|x,S=s)\cdot P(S=s)$.
|
|
81
|
-
- **Front-door criterion**: Confounders are unobservable but mediator $M$ is observable, $X\to M$ has no back-door paths, and $M$ blocks all back-door paths from $X$ to $Y$; then $P(y|do(x)) = \sum_m P(m|x)\cdot\sum_z P(y|m,z)P(z)$.
|
|
82
|
-
- **Do-calculus**: Three rules transform do-expressions among observable quantities (see the Mathematical Formalization block in Core Principle).
|
|
83
|
-
|
|
84
|
-
### Step 4: Compute Intervention Effects
|
|
85
|
-
Use the adjustment formula to compute $P(y|do(x))$ and compare with the observational $P(y|x)$ to quantify confounding bias:
|
|
86
|
-
- Back-door adjustment: $P(y|do(x)) = \sum_z P(y|x,z)\cdot P(z)$ — weighted average over all values of $Z$.
|
|
87
|
-
- Confounding bias: $|P(y|do(x)) - P(y|x)|$ — larger bias indicates more severe confounding.
|
|
88
|
-
- Average treatment effect: ATE $= E[Y|do(X=1)] - E[Y|do(X=0)] = E[Y(1)] - E[Y(0)]$.
|
|
89
|
-
|
|
90
|
-
**Key question**: Are $P(y|do(x))$ and $P(y|x)$ significantly different? If so, observational analysis suffers from confounding bias.
|
|
91
|
-
|
|
92
|
-
### Step 5: Counterfactual Analysis
|
|
93
|
-
Individual-level retrospective reasoning: If $X$ had been $x_1$ instead of $x_0$, what would $Y$ have been?
|
|
94
|
-
- **SCM**: $Y = f(X, Z, U)$, where $U$ is exogenous.
|
|
95
|
-
- **Counterfactual computation**: Given observation $(x_0,y_0,z_0)$, the counterfactual $Y_{x_1} = f(x_1, z_0, u_0)$.
|
|
96
|
-
- **Individual causal effect**: $Y_{x_1} - Y_{x_0}$ — requires structural equations.
|
|
97
|
-
|
|
98
|
-
**Key point**: Counterfactuals depend on the specific form of the structural equations and are highly sensitive to model assumptions.
|
|
99
|
-
|
|
100
|
-
### Step 6: Experimental Design
|
|
101
|
-
- **RCT (gold standard)**: Randomization severs all arrows into $X$; treatment and control groups are equal in expectation on all variables; ATE $= E[Y|do(X=1)] - E[Y|do(X=0)]$.
|
|
102
|
-
- **Natural experiments**: Exploit naturally occurring quasi-random events (earthquakes, policy changes).
|
|
103
|
-
- **Instrumental variables (IV)**: $V\to X$ with no direct path from $V$ to $Y$ and no common cause of $V$ and $Y$ — use the variation in $X$ created by $V$ to estimate the causal effect.
|
|
104
|
-
- **Difference-in-differences (DD)**: $(Y_1^{\text{post}}-Y_1^{\text{pre}}) - (Y_0^{\text{post}}-Y_0^{\text{pre}})$.
|
|
105
|
-
|
|
106
|
-
### Step 7: Sensitivity Analysis
|
|
107
|
-
Quantify the vulnerability of conclusions to unobserved confounding:
|
|
108
|
-
- **Rosenbaum $\Gamma$**: For confounding strength $\Gamma$, compute the maximum $p$-value at which the conclusion could be overturned — larger $\Gamma$ means more vulnerable.
|
|
109
|
-
- **E-value**: The minimum confounding strength required to nullify the effect estimate — larger values indicate greater robustness.
|
|
110
|
-
|
|
111
|
-
**Key question**: How strong must an unobserved confounder $U$ be to overturn the conclusion?
|
|
112
|
-
|
|
113
|
-
## Common Errors
|
|
114
|
-
|
|
115
|
-
| Error | Critique | Correct Approach |
|
|
116
|
-
|---|---|---|
|
|
117
|
-
| Inferring causation directly from correlation | $P(y\|x)\neq P(y\|do(x))$; correlation may be created by confounding | Draw a DAG to identify confounders; use back-door adjustment to compute $P(y\|do(x))$ |
|
|
118
|
-
| Ignoring confounders | Without adjustment, $\|P(y\|do(x))-P(y\|x)\|$ equals confounding bias | Find all common ancestors of $X$ and $Y$; adjust for observable confounders |
|
|
119
|
-
| Confusing $do(x)$ with conditioning $P(y\|x)$ | $do(x)$ severs arrows into $X$; conditioning does not | Clearly distinguish intervention (forced setting) from observation (passive seeing) |
|
|
120
|
-
| Ignoring mediation effects | $X\to M\to Y$: total effect = direct + indirect | Perform mediation analysis to decompose direct / indirect effects; front-door criterion may apply |
|
|
121
|
-
| Over-reliance on a single DAG | If the DAG is wrong, all conclusions are wrong; different DAGs can yield opposite conclusions | Validate DAG plausibility; compare multiple candidate DAGs |
|
|
122
|
-
| Skipping sensitivity analysis | Unobserved confounders may overturn conclusions | Quantify vulnerability using Rosenbaum $\Gamma$ or E-value |
|
|
123
|
-
| Intractable exact causal graph search | DAG space is super-exponential, NP-hard, non-differentiable | Use continuous relaxation (NOTEARS) / heuristic approximation; pass through the GPU eight-dimensional gate |
|
|
124
|
-
|
|
125
|
-
## Operating Procedure
|
|
126
|
-
|
|
127
|
-
When this skill is triggered, the output must include:
|
|
128
|
-
|
|
129
|
-
1. **[DAG]**: Directed acyclic graph of all variables, with justification for each arrow's causal assumption.
|
|
130
|
-
2. **[Confounders]**: List all common ancestors of $X$ and $Y$; label each as observable / unobservable.
|
|
131
|
-
3. **[Identification Strategy]**: Back-door / front-door / do-calculus, with justification for the choice.
|
|
132
|
-
4. **[Intervention Effect]**: $P(y|do(x))$ = [value], computed via the adjustment formula and compared with $P(y|x)$.
|
|
133
|
-
5. **[Counterfactuals]**: Counterfactual reasoning for key individuals / subgroups, specifying the required structural equations.
|
|
134
|
-
6. **[Validation Method]**: RCT / natural experiment / IV / DD — how to validate causal conclusions.
|
|
135
|
-
7. **[Sensitivity]**: Rosenbaum $\Gamma$ or E-value, quantifying vulnerability to unobserved confounding.
|
|
136
|
-
8. **[GPU Feasibility]** (if used for large-scale estimation in interpretability / OOD / DGP modeling): Causal discovery / estimation method passes through the eight-dimensional gate; label friendly / retrofittable / unfriendly with reform suggestions.
|
|
137
|
-
|
|
138
|
-
**Output must not consist of analysis alone without conclusions.**
|
|
139
|
-
|
|
140
|
-
## Relations to Other Skills
|
|
141
|
-
|
|
142
|
-
- **Probability and Statistics**: Statistics is the foundation of causation but is insufficient — $P(y|x)$ is association, $P(y|do(x))$ is causal effect; causation requires additional assumptions.
|
|
143
|
-
- **Modeling Thinking**: Causal DAGs are structural models — they encode hypotheses about causal mechanisms among variables; causal modeling is the causal version of modeling.
|
|
144
|
-
- **Logical Deduction**: Starting from DAG assumptions, causal conclusions are deduced through the three rules of do-calculus.
|
|
145
|
-
- **Information Theory Thinking**: Confounders create spurious signals; causal inference extracts true causal signals from noise.
|
|
146
|
-
- **Game Theory Thinking**: Players' choices in strategic interaction constitute causal interventions; equilibrium analysis requires causal reasoning.
|
|
147
|
-
- **Modern Mathematics Activation**: `../../references/books/optimization-ml.md` (intervention estimation / regression, double ML), `../../references/books/matrix-analysis.md` (conditional independence testing, low-rank precision matrix approximation).
|