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.
Files changed (244) hide show
  1. package/README.en-US.md +165 -198
  2. package/README.md +165 -198
  3. package/agents/math-critic.en.md +28 -26
  4. package/agents/math-critic.md +33 -33
  5. package/commands/ask.en.md +10 -0
  6. package/commands/ask.md +3 -10
  7. package/design-patterns/attention/equivariant-attention.en.md +72 -0
  8. package/design-patterns/attention/equivariant-attention.md +72 -0
  9. package/design-patterns/attention/geometry-aware-attention.en.md +73 -0
  10. package/design-patterns/attention/geometry-aware-attention.md +72 -0
  11. package/design-patterns/attention/information-bottleneck-attention.en.md +72 -0
  12. package/design-patterns/attention/information-bottleneck-attention.md +72 -0
  13. package/design-patterns/attention/projection-attention.en.md +68 -0
  14. package/design-patterns/attention/projection-attention.md +68 -0
  15. package/design-patterns/attention/spectral-attention.en.md +71 -0
  16. package/design-patterns/attention/spectral-attention.md +71 -0
  17. package/design-patterns/compression/leverage-score-selection.en.md +71 -0
  18. package/design-patterns/compression/leverage-score-selection.md +71 -0
  19. package/design-patterns/compression/low-rank-kv-cache.en.md +60 -0
  20. package/design-patterns/compression/low-rank-kv-cache.md +60 -0
  21. package/design-patterns/compression/spectral-token-pruning.en.md +61 -0
  22. package/design-patterns/compression/spectral-token-pruning.md +61 -0
  23. package/design-patterns/compression/topology-preserving-compression.en.md +64 -0
  24. package/design-patterns/compression/topology-preserving-compression.md +64 -0
  25. package/design-patterns/loss/constraint-penalty.en.md +67 -0
  26. package/design-patterns/loss/constraint-penalty.md +78 -0
  27. package/design-patterns/loss/contrastive-loss.en.md +59 -0
  28. package/design-patterns/loss/contrastive-loss.md +68 -0
  29. package/design-patterns/loss/information-bottleneck-loss.en.md +69 -0
  30. package/design-patterns/loss/information-bottleneck-loss.md +74 -0
  31. package/design-patterns/loss/orthogonality-loss.en.md +56 -0
  32. package/design-patterns/loss/orthogonality-loss.md +60 -0
  33. package/design-patterns/loss/variational-loss.en.md +61 -0
  34. package/design-patterns/loss/variational-loss.md +71 -0
  35. package/design-patterns/representation/equivariant-split.en.md +87 -0
  36. package/design-patterns/representation/equivariant-split.md +89 -0
  37. package/design-patterns/representation/manifold-representation.en.md +85 -0
  38. package/design-patterns/representation/manifold-representation.md +87 -0
  39. package/design-patterns/representation/shared-private-decomposition.en.md +84 -0
  40. package/design-patterns/representation/shared-private-decomposition.md +86 -0
  41. package/design-patterns/representation/subspace-alignment.en.md +90 -0
  42. package/design-patterns/representation/subspace-alignment.md +92 -0
  43. package/design-patterns/routing/graph-routing.en.md +79 -0
  44. package/design-patterns/routing/graph-routing.md +81 -0
  45. package/design-patterns/routing/moe-routing.en.md +85 -0
  46. package/design-patterns/routing/moe-routing.md +87 -0
  47. package/design-patterns/routing/optimal-transport-routing.en.md +68 -0
  48. package/design-patterns/routing/optimal-transport-routing.md +72 -0
  49. package/design-patterns/routing/spectral-clustering-routing.en.md +88 -0
  50. package/design-patterns/routing/spectral-clustering-routing.md +90 -0
  51. package/knowledge-base/differential-geometry/connection.en.md +51 -0
  52. package/knowledge-base/differential-geometry/connection.md +51 -0
  53. package/knowledge-base/differential-geometry/curvature.en.md +49 -0
  54. package/knowledge-base/differential-geometry/curvature.md +49 -0
  55. package/knowledge-base/differential-geometry/geodesic.en.md +51 -0
  56. package/knowledge-base/differential-geometry/geodesic.md +51 -0
  57. package/knowledge-base/differential-geometry/manifold.en.md +47 -0
  58. package/knowledge-base/differential-geometry/manifold.md +47 -0
  59. package/knowledge-base/differential-geometry/metric-tensor.en.md +50 -0
  60. package/knowledge-base/differential-geometry/metric-tensor.md +50 -0
  61. package/knowledge-base/differential-geometry/tangent-space.en.md +48 -0
  62. package/knowledge-base/differential-geometry/tangent-space.md +48 -0
  63. package/knowledge-base/information-geometry/fisher-metric.en.md +56 -0
  64. package/knowledge-base/information-geometry/fisher-metric.md +56 -0
  65. package/knowledge-base/information-geometry/natural-gradient.en.md +54 -0
  66. package/knowledge-base/information-geometry/natural-gradient.md +54 -0
  67. package/knowledge-base/lie-theory/equivariance.en.md +54 -0
  68. package/knowledge-base/lie-theory/equivariance.md +54 -0
  69. package/knowledge-base/lie-theory/group-action.en.md +51 -0
  70. package/knowledge-base/lie-theory/group-action.md +51 -0
  71. package/knowledge-base/lie-theory/lie-algebra.en.md +51 -0
  72. package/knowledge-base/lie-theory/lie-algebra.md +51 -0
  73. package/knowledge-base/lie-theory/lie-group.en.md +51 -0
  74. package/knowledge-base/lie-theory/lie-group.md +51 -0
  75. package/knowledge-base/lie-theory/representation.en.md +52 -0
  76. package/knowledge-base/lie-theory/representation.md +52 -0
  77. package/knowledge-base/matrix-analysis/low-rank-approximation.en.md +49 -0
  78. package/knowledge-base/matrix-analysis/low-rank-approximation.md +49 -0
  79. package/knowledge-base/matrix-analysis/matrix-perturbation.en.md +49 -0
  80. package/knowledge-base/matrix-analysis/matrix-perturbation.md +49 -0
  81. package/knowledge-base/matrix-analysis/positive-semidefinite.en.md +50 -0
  82. package/knowledge-base/matrix-analysis/positive-semidefinite.md +50 -0
  83. package/knowledge-base/matrix-analysis/projection.en.md +47 -0
  84. package/knowledge-base/matrix-analysis/projection.md +47 -0
  85. package/knowledge-base/matrix-analysis/spectral-decomposition.en.md +48 -0
  86. package/knowledge-base/matrix-analysis/spectral-decomposition.md +48 -0
  87. package/knowledge-base/optimization/constrained-optimization.en.md +53 -0
  88. package/knowledge-base/optimization/constrained-optimization.md +53 -0
  89. package/knowledge-base/optimization/convex-optimization.en.md +50 -0
  90. package/knowledge-base/optimization/convex-optimization.md +50 -0
  91. package/knowledge-base/optimization/lagrangian-duality.en.md +50 -0
  92. package/knowledge-base/optimization/lagrangian-duality.md +50 -0
  93. package/knowledge-base/optimization/proximal-method.en.md +52 -0
  94. package/knowledge-base/optimization/proximal-method.md +52 -0
  95. package/knowledge-base/optimization/riemannian-optimization.en.md +51 -0
  96. package/knowledge-base/optimization/riemannian-optimization.md +51 -0
  97. package/knowledge-base/overview.en.md +29 -218
  98. package/knowledge-base/overview.md +29 -220
  99. package/knowledge-base/probability/concentration-inequality.en.md +45 -0
  100. package/knowledge-base/probability/concentration-inequality.md +45 -0
  101. package/knowledge-base/probability/entropy.en.md +47 -0
  102. package/knowledge-base/probability/entropy.md +47 -0
  103. package/knowledge-base/probability/fisher-information.en.md +48 -0
  104. package/knowledge-base/probability/fisher-information.md +48 -0
  105. package/knowledge-base/probability/information-bottleneck.en.md +49 -0
  106. package/knowledge-base/probability/information-bottleneck.md +49 -0
  107. package/knowledge-base/probability/kl-divergence.en.md +51 -0
  108. package/knowledge-base/probability/kl-divergence.md +51 -0
  109. package/knowledge-base/topology/euler-characteristic.en.md +54 -0
  110. package/knowledge-base/topology/euler-characteristic.md +54 -0
  111. package/knowledge-base/topology/fundamental-group.en.md +52 -0
  112. package/knowledge-base/topology/fundamental-group.md +52 -0
  113. package/knowledge-base/topology/persistent-homology.en.md +54 -0
  114. package/knowledge-base/topology/persistent-homology.md +54 -0
  115. package/lenses/algorithmic.en.md +49 -0
  116. package/lenses/algorithmic.md +49 -0
  117. package/lenses/axiomatization.en.md +48 -0
  118. package/lenses/axiomatization.md +48 -0
  119. package/lenses/categorical.en.md +48 -0
  120. package/lenses/categorical.md +48 -0
  121. package/lenses/causal.en.md +49 -0
  122. package/lenses/causal.md +49 -0
  123. package/lenses/duality.en.md +47 -0
  124. package/lenses/duality.md +47 -0
  125. package/lenses/game.en.md +50 -0
  126. package/lenses/game.md +50 -0
  127. package/lenses/geometric.en.md +53 -0
  128. package/lenses/geometric.md +53 -0
  129. package/lenses/local-to-global.en.md +52 -0
  130. package/lenses/local-to-global.md +52 -0
  131. package/lenses/perturbation.en.md +51 -0
  132. package/lenses/perturbation.md +51 -0
  133. package/lenses/probabilistic.en.md +48 -0
  134. package/lenses/probabilistic.md +48 -0
  135. package/lenses/projection.en.md +50 -0
  136. package/lenses/projection.md +50 -0
  137. package/lenses/spectral.en.md +52 -0
  138. package/lenses/spectral.md +52 -0
  139. package/lenses/symmetry.en.md +49 -0
  140. package/lenses/symmetry.md +49 -0
  141. package/lenses/topological.en.md +48 -0
  142. package/lenses/topological.md +48 -0
  143. package/lenses/variational.en.md +48 -0
  144. package/lenses/variational.md +48 -0
  145. package/package.json +9 -3
  146. package/references/agentic-workflow.en.md +1 -1
  147. package/references/agentic-workflow.md +1 -1
  148. package/references/books/abstract-algebra.en.md +124 -0
  149. package/references/books/abstract-algebra.md +22 -22
  150. package/references/books/algebraic-geometry-rising-sea.en.md +171 -0
  151. package/references/books/algebraic-geometry-rising-sea.md +11 -11
  152. package/references/books/differential-geometry.en.md +140 -0
  153. package/references/books/differential-geometry.md +19 -19
  154. package/references/books/matrix-analysis.en.md +146 -0
  155. package/references/books/matrix-analysis.md +10 -10
  156. package/references/books/micro-lie-theory.en.md +116 -0
  157. package/references/books/micro-lie-theory.md +17 -17
  158. package/references/books/optimization-ml.en.md +163 -0
  159. package/references/books/optimization-ml.md +7 -8
  160. package/references/books/smooth-manifolds.en.md +105 -0
  161. package/references/books/smooth-manifolds.md +14 -14
  162. package/references/gpu-friendly-math.en.md +23 -10
  163. package/references/gpu-friendly-math.md +17 -4
  164. package/references/inspiration.en.md +1 -1
  165. package/references/inspiration.md +2 -2
  166. package/skills/math-research-activator/SKILL.en.md +195 -114
  167. package/skills/math-research-activator/SKILL.md +194 -119
  168. package/skills/math-research-activator/original-texts.en.md +9 -9
  169. package/skills/math-research-activator/original-texts.md +11 -11
  170. package/commands/abstraction.md +0 -11
  171. package/commands/algorithmic-thinking.md +0 -11
  172. package/commands/axiomatization.md +0 -11
  173. package/commands/causal-inference.md +0 -11
  174. package/commands/discrete-combinatorial.md +0 -11
  175. package/commands/game-theory.md +0 -11
  176. package/commands/induction-analogy.md +0 -11
  177. package/commands/information-theory.md +0 -11
  178. package/commands/logic-deduction.md +0 -11
  179. package/commands/modeling.md +0 -11
  180. package/commands/optimization.md +0 -11
  181. package/commands/probability-statistics.md +0 -11
  182. package/commands/symmetry-invariance.md +0 -11
  183. package/commands/topological-thinking.md +0 -11
  184. package/commands/transformation.md +0 -11
  185. package/skills/abstraction/SKILL.en.md +0 -117
  186. package/skills/abstraction/SKILL.md +0 -121
  187. package/skills/abstraction/original-texts.en.md +0 -163
  188. package/skills/abstraction/original-texts.md +0 -175
  189. package/skills/algorithmic-thinking/SKILL.en.md +0 -132
  190. package/skills/algorithmic-thinking/SKILL.md +0 -138
  191. package/skills/algorithmic-thinking/original-texts.en.md +0 -253
  192. package/skills/algorithmic-thinking/original-texts.md +0 -256
  193. package/skills/axiomatization/SKILL.en.md +0 -144
  194. package/skills/axiomatization/SKILL.md +0 -151
  195. package/skills/axiomatization/original-texts.en.md +0 -154
  196. package/skills/axiomatization/original-texts.md +0 -160
  197. package/skills/causal-inference/SKILL.en.md +0 -147
  198. package/skills/causal-inference/SKILL.md +0 -151
  199. package/skills/causal-inference/original-texts.en.md +0 -136
  200. package/skills/causal-inference/original-texts.md +0 -167
  201. package/skills/discrete-combinatorial/SKILL.en.md +0 -124
  202. package/skills/discrete-combinatorial/SKILL.md +0 -131
  203. package/skills/discrete-combinatorial/original-texts.en.md +0 -184
  204. package/skills/discrete-combinatorial/original-texts.md +0 -185
  205. package/skills/game-theory/SKILL.en.md +0 -117
  206. package/skills/game-theory/SKILL.md +0 -123
  207. package/skills/game-theory/original-texts.en.md +0 -131
  208. package/skills/game-theory/original-texts.md +0 -131
  209. package/skills/induction-analogy/SKILL.en.md +0 -145
  210. package/skills/induction-analogy/SKILL.md +0 -152
  211. package/skills/induction-analogy/original-texts.en.md +0 -140
  212. package/skills/induction-analogy/original-texts.md +0 -154
  213. package/skills/information-theory/SKILL.en.md +0 -134
  214. package/skills/information-theory/SKILL.md +0 -140
  215. package/skills/information-theory/original-texts.en.md +0 -127
  216. package/skills/information-theory/original-texts.md +0 -127
  217. package/skills/logic-deduction/SKILL.en.md +0 -130
  218. package/skills/logic-deduction/SKILL.md +0 -135
  219. package/skills/logic-deduction/original-texts.en.md +0 -160
  220. package/skills/logic-deduction/original-texts.md +0 -173
  221. package/skills/modeling/SKILL.en.md +0 -135
  222. package/skills/modeling/SKILL.md +0 -139
  223. package/skills/modeling/original-texts.en.md +0 -162
  224. package/skills/modeling/original-texts.md +0 -165
  225. package/skills/optimization/SKILL.en.md +0 -129
  226. package/skills/optimization/SKILL.md +0 -135
  227. package/skills/optimization/original-texts.en.md +0 -167
  228. package/skills/optimization/original-texts.md +0 -168
  229. package/skills/probability-statistics/SKILL.en.md +0 -146
  230. package/skills/probability-statistics/SKILL.md +0 -151
  231. package/skills/probability-statistics/original-texts.en.md +0 -191
  232. package/skills/probability-statistics/original-texts.md +0 -193
  233. package/skills/symmetry-invariance/SKILL.en.md +0 -135
  234. package/skills/symmetry-invariance/SKILL.md +0 -139
  235. package/skills/symmetry-invariance/original-texts.en.md +0 -206
  236. package/skills/symmetry-invariance/original-texts.md +0 -221
  237. package/skills/topological-thinking/SKILL.en.md +0 -124
  238. package/skills/topological-thinking/SKILL.md +0 -128
  239. package/skills/topological-thinking/original-texts.en.md +0 -134
  240. package/skills/topological-thinking/original-texts.md +0 -164
  241. package/skills/transformation/SKILL.en.md +0 -120
  242. package/skills/transformation/SKILL.md +0 -124
  243. package/skills/transformation/original-texts.en.md +0 -204
  244. package/skills/transformation/original-texts.md +0 -216
@@ -1,193 +0,0 @@
1
- # 数学出处与经典文献 / Mathematical Sources and Classic Texts
2
-
3
- ## 贝叶斯定理 / Bayes' Theorem (Bayes, 1763)
4
-
5
- > P(H|E) = P(E|H) × P(H) / P(E)
6
- >
7
- > 后验概率 = 似然 × 先验概率 / 证据
8
-
9
- **含义**:当我们观察到新证据 E 时,我们关于假设 H 的信念从先验 P(H) 更新为后验 P(H|E)。
10
-
11
- **贝叶斯思维的核心**:
12
- 1. 先有信念(先验概率)
13
- 2. 观察数据(证据)
14
- 3. 更新信念(后验概率)
15
- 4. 重复这个过程
16
-
17
- **数学背景**:Thomas Bayes 的论文 "An Essay towards solving a Problem in the Doctrine of Chances" 于 1763 年由 Richard Price 代为发表。贝叶斯定理本质上是条件概率的定义 P(A∩B) = P(A|B)P(B) = P(B|A)P(A) 的重排,但其哲学意义远超数学本身——它为"从数据学习"提供了严格的数学框架。
18
-
19
- ## 大数定律 / Law of Large Numbers (Bernoulli, 1713)
20
-
21
- > 当试验次数 n 趋于无穷时,样本均值依概率收敛于期望值。
22
- > As the number of trials n approaches infinity, the sample mean converges in probability to the expected value.
23
-
24
- **含义**:单次观察不可赖,但大量观察会揭示真实规律。这是统计推断的理论基础。
25
-
26
- **数学背景**:Jacob Bernoulli 在《Ars Conjectandi》(1713) 中证明了弱大数定律:对任意 ε>0, P(|X̄ₙ - μ| ≥ ε) → 0。Borel (1909) 与 Kolmogorov 进一步强化为强大数定律——几乎必然收敛:P(lim X̄ₙ = μ) = 1。
27
-
28
- ## 中心极限定理 / Central Limit Theorem (De Moivre-Laplace, 1733–Lindeberg-Feller, 20世纪)
29
-
30
- > 大量独立同分布随机变量的和近似服从正态分布,无论原始分布是什么。
31
- > The sum of a large number of i.i.d. random variables is approximately normally distributed, regardless of the original distribution.
32
-
33
- **含义**:正态分布之所以普遍,是因为它是"大量小因素叠加"的自然结果。
34
-
35
- **数学背景**:De Moivre (1733) 首先发现二项分布的正态近似;Laplace (1810) 推广到一般情形。Lindeberg-Feller 条件给出最精确的独立但非同分布情形的收敛条件。Lyapunov (1901) 引入特征函数证明方法,成为现代概率论的核心工具。
36
-
37
- ## Kolmogorov 公理化体系 / Kolmogorov Axioms (1933)
38
-
39
- > 概率论的基础公理:
40
- > 1. 非负性:P(A) ≥ 0
41
- > 2. 规范性:P(Ω) = 1
42
- > 3. 可加性:若 A₁, A₂, ... 互不相交,则 P(∪Aₖ) = ΣP(Aₖ)
43
-
44
- **含义**:概率被定义为测度——概率论从此成为严格的数学分支,而非经验规则集合。
45
-
46
- **数学背景**:Andrey Kolmogorov 在《Grundbegriffe der Wahrscheinlichkeitsrechnung》(1933) 中将概率论嵌入测度论框架 (Ω, F, P),即样本空间、事件域(σ-代数)与概率测度三元组。这一公理化使大数定律、条件概率、随机变量等概念获得精确定义,是现代概率论的基石。
47
-
48
- ## Neyman-Pearson 检验理论 / Neyman-Pearson Lemma (1928/1933)
49
-
50
- > 在给定显著性水平 α 下,似然比检验是最强大的检验:
51
- > 拒绝 H₀ 当 L(x|H₁)/L(x|H₀) > k,其中 k 由 α 决定。
52
-
53
- **含义**:统计检验不是主观判断,而是可以在"控制犯错概率"的前提下达到最优。
54
-
55
- **数学背景**:Jerzy Neyman 与 Egon Pearson 在 1928–1933 年间系统化了假设检验理论,引入 Type I 错误(α,假阳性)与 Type II 错误(β,假阴性)、检验功效 (power = 1-β) 等概念。Neyman-Pearson 引理证明了简单假设 vs 简单假设情形下似然比检验的最优性。这一框架成为现代统计检验的标准范式。
56
-
57
- ## Fisher 统计推断体系 / Fisher's Statistical Inference (1920s–1930s)
58
-
59
- - **最大似然估计**:选择使观测数据出现概率最大的参数 θ̂ = argmax L(θ; x)
60
- - **p-value**:在原假设为真的条件下,观察到当前或更极端数据的概率
61
- - **显著性检验**:通过 p-value 判断是否拒绝原假设
62
- - **充分性原则**:统计量 T(X) 是充分的,若 P(X|T) 不依赖于 θ
63
-
64
- **数学背景**:R.A. Fisher 的贡献远不止 p-value。他提出一致性、有效性等估计量评价准则; Fisher 信息量 I(θ) = E[(∂log L/∂θ)²] 度量数据对参数的信息含量,与 Cramér-Rao 下界紧密关联:Var(θ̂) ≥ 1/I(θ)。
65
-
66
- ## Fisher 实验设计 / Fisher's Experimental Design (1935)
67
-
68
- > 随机化不是忽视因果,而是使因果推断成为可能。
69
-
70
- **含义**:科学实验的可信度不来自"精密控制",而来自"随机分配"。
71
-
72
- **数学背景**:Fisher 在《The Design of Experiments》(1935) 中提出三大原则——随机化 (randomization)、区组化 (blocking)、复因子设计 (factorial designs)。随机化使处理效应的估计免受系统偏差;区组化控制已知干扰变量;2²、2³ 等因子设计可同时估计多个主效应与交互效应,效率远超逐一试验。
73
-
74
- ## Student t 分布 / Student's t-Distribution (Gosset, 1908)
75
-
76
- > 当样本量 n 较小且总体标准差未知时:
77
- > t = (X̄ - μ) / (S/√n),服从 t(n-1) 分布。
78
-
79
- **含义**:小样本不能直接用正态近似——t 分布的尾部更厚,反映了估计标准差本身的不确定性。
80
-
81
- **数学背景**:William Sealy Gosset 以 "Student" 为笔名在 1908 年发表此结果。他在 Guinness 啤酒厂工作,因保密要求无法署真名。t 分布是标准正态与 χ²/(n-1) 的比值分布,当 n→∞ 时趋于正态。Fisher (1925) 给出了严格证明并将其推广。
82
-
83
- ## χ² 检验 / Chi-Squared Test (Karl Pearson, 1900)
84
-
85
- > χ² = Σ(Oₖ - Eₖ)² / Eₖ,在原假设下近似服从 χ²(k-1-p) 分布。
86
-
87
- **含义**:观测频率与期望频率之间的差异是否超过随机波动所能解释的范围?
88
-
89
- **数学背景**:Karl Pearson 在 1900 年提出拟合优度检验,这是第一个正式的统计检验方法。自由度 = k-1-p(k 为类别数,p 为估计参数数)的修正由 Fisher (1922) 完成。χ² 检验在列联表独立性检验、分布拟合等领域广泛应用。
90
-
91
- ## 回归与最小二乘法 / Regression and Least Squares (Legendre 1805, Gauss 1809)
92
-
93
- > min Σ(yₖ - (a + bxₖ))² → 最小二乘估计 β̂ = (X'X)⁻¹X'y
94
-
95
- **含义**:在所有拟合直线中,最小二乘使残差平方和最小;在正态误差假设下,它等价于最大似然估计。
96
-
97
- **数学背景**:Legendre (1805) 首先发表最小二乘法;Gauss (1809) 声称自己早在 1795 年就已使用该方法,并给出正态误差假设下的概率论证。"回归"一词由 Galton (1886) 提出,研究身高代际回归现象。现代线性回归模型 Y = Xβ + ε 是统计建模的核心框架。
98
-
99
- ## Markov 链 / Markov Chains (Markov, 1906)
100
-
101
- > P(Xₙ₊₁ = j | Xₙ = i, Xₙ₋₁, ...) = P(Xₙ₊₁ = j | Xₙ = i)
102
- >
103
- > 未来只依赖现在,不依赖过去——无记忆性 (memoryless property)。
104
-
105
- **含义**:许多真实过程具有"当前状态决定未来走向"的性质,历史细节可以忽略。
106
-
107
- **数学背景**:Andrey Markov (1906) 通过研究普希金《叶甫盖尼·奥涅金》中元音/辅音序列,首次定义了 Markov 链。遍历定理保证:对不可约、非周期、正常返链,π(j) = lim P(Xₙ = j) 存在且为唯一平稳分布。Markov 链是 MCMC (Metropolis 1943, Hastings 1970, Gelfand-Smith 1990) 的理论基础,也支撑 Google PageRank (Brin-Page 1998)。
108
-
109
- ## 随机过程 / Stochastic Processes (Brownian Motion, Wiener Process)
110
-
111
- > W(t) 满足:(1) W(0)=0, (2) W(t)-W(s) ~ N(0, t-s), (3) 独立增量, (4) 连续路径
112
-
113
- **含义**:布朗运动是微观随机涨落的宏观数学模型——从花粉运动到股价波动。
114
-
115
- **数学背景**:Brown (1827) 观察花粉微粒的无规则运动;Bachelier (1900) 首先用其模型化股价;Wiener (1923) 给出严格数学构造。Itô (1944) 发展随机积分 dX = μdt + σdW 与 Itô 公式,成为金融数学 (Black-Scholes 1973) 与随机微分方程的理论基石。
116
-
117
- ## Shannon 信息论 / Shannon Information Theory (1948)
118
-
119
- > H(X) = -Σ p(x) log p(x) —— 熵,随机变量的不确定性度量
120
- > I(X;Y) = H(X) - H(X|Y) —— 互信息,Y 对 X 提供的信息量
121
- > C = max I(X;Y) —— 信道容量,可靠通信的速率上限
122
-
123
- **含义**:信息可以被量化;通信的根本限制由数学定律决定,而非工程技术。
124
-
125
- **数学背景**:Claude Shannon 在《A Mathematical Theory of Communication》(1948) 中创立信息论。信源编码定理:平均编码长度 ≥ H(X);信道编码定理:传输速率 R < C 时存在可靠编码。熵与概率的深层联系——H(X) = -E[log p(X)]——使信息论成为概率论的自然延伸。
126
-
127
- ## Pearl 因果推断 / Pearl's Causal Inference (2000)
128
-
129
- > 因果层级:
130
- > 1. 关联 P(y|x) —— 看到
131
- > 2. 干预 P(y|do(x)) —— 做
132
- > 3. 反事实 P(yₓ|x', y') —— 想
133
-
134
- **含义**:因果不是关联的强化版——"do(x)" 与 "observe x" 在数学上截然不同。
135
-
136
- **数学背景**:Judea Pearl 在《Causality》(2000) 中用有向无环图 (DAG) 与 do-演算系统化了因果推断。do-演算三条规则允许在可观测变量间转换干预概率;前门/后门准则给出从观测数据计算因果效应的条件。因果推断回答"若我做了 x,y 会怎样",这超出了概率论本身的表达能力。
137
-
138
- ## Bootstrap 方法 / Bootstrap (Efron, 1979)
139
-
140
- > 从样本 X₁,...,Xₙ 中有放回抽样 B 次,得到 B 个 bootstrap 样本,
141
- > 用 bootstrap 分布近似真实分布。
142
-
143
- **含义**:当理论推导困难时,用数据自身模拟抽样过程——"用自己验证自己"。
144
-
145
- **数学背景**:Bradley Efron (1979) 提出 bootstrap,其理论保证由 Bickel-Freedman (1981) 与 Singh (1981) 建立:在温和条件下,bootstrap 分布一致收敛于真实抽样分布。Bootstrap 可估计标准误、置信区间(百分位法/BCa 法)、p-value 等,是非参数推断的通用工具。
146
-
147
- ## 贝叶斯学派 vs 频率学派 / Bayesian vs Frequentist Debate
148
-
149
- > 贝叶斯:概率是信念度,参数 θ 是随机变量 → P(θ|data)
150
- > 频率学派:概率是长期频率,参数 θ 是固定未知常 → 估计量 θ̂ 的抽样分布
151
-
152
- **含义**:这不是技术分歧,而是"概率是什么"的哲学分歧。
153
-
154
- **核心对比**:
155
- - 贝叶斯:先验 + 似然 → 后验,天然适合序贯更新与小样本
156
- - 频率学派:无偏性、一致性、功效,天然适合大规模可重复实验
157
- - 实践中:贝叶斯方法在机器学习、因果推断中占优;频率方法在临床试验、质量控制中占优
158
-
159
- **数学背景**:争论自 Laplace vs Fisher 延续至今。Jeffreys (1939) 提出无信息先验 p(θ) ∝ |I(θ)|^(1/2);de Finetti (1937) 证明主观概率的一致性等价于可加性;Bernardo-Smith (1994) 发展参考先验理论。
160
-
161
- ## Monty Hall 问题 / Monty Hall Problem
162
-
163
- > 三扇门,一扇有奖品。你选一扇,主持人打开另一扇空门。
164
- > 问:你是否应该换门?答案是:换门胜率 2/3,不换 1/3。
165
-
166
- **含义**:直觉在此失效——主持人的行为传递了信息(他不会打开有奖品的门)。
167
-
168
- **数学背景**:此问题是贝叶斯思维的绝佳入门案例。用贝叶斯定理:P(奖品在剩余门|主持人打开空门) = 2/3,因为主持人选择性地避开奖品,这本身是信息。类似的结构出现在医疗诊断、法律推理中——"选择性观察"改变了概率。
169
-
170
- ## 常见统计谬误与认知偏差
171
-
172
- **幸存者偏差(Survivorship Bias)**:
173
- 二战期间,军方统计返航飞机的弹孔分布,发现机翼上弹孔最多,建议加固机翼。统计学家 Abraham Wald 指出:应该加固没有弹孔的部位——因为被击中那些部位的飞机根本没飞回来。Wald 的洞察本质上是条件概率:我们观察到的数据是在"飞机返航"条件下的数据,而非全部数据。
174
-
175
- **基础率忽视(Base Rate Neglect)**:
176
- 某种罕见病发病率 0.1%,检测准确率 99%。如果检测为阳性,真正患病的概率是多少?
177
- - 直觉回答:99%
178
- - 贝叶斯计算:P(患病|阳性) = 0.99 × 0.001 / (0.99 × 0.001 + 0.01 × 0.999) ≈ 9%
179
- - 先验概率(基础率)被直觉严重低估
180
-
181
- **回归均值(Regression to the Mean)**:
182
- 表现极好的个体在下次测量中倾向于更接近平均水平,不是因为"能力下降",而是极端表现部分来自运气。Galton (1886) 发现高个子父母的子女往往比父母矮——这不是"退化",而是统计规律。
183
-
184
- ## 概率思维的日常生活价值
185
-
186
- > "概率思维的核心不是计算精确概率,而是养成'在不确定性中思考'的习惯。"
187
-
188
- - 不要被单个案例说服——考虑基础概率
189
- - 新信息来了要更新信念——贝叶斯更新
190
- - 区分信号和噪声——大数定律
191
- - 警惕极端值——回归均值
192
- - 区分"看到"与"做了"——因果层级(Pearl)
193
- - 量化不确定性——熵与信息(Shannon)
@@ -1,135 +0,0 @@
1
- ---
2
- name: symmetry-invariance
3
- description: |
4
- Trigger for group theory analysis, invariant computation, Galois theory, Noether's theorem, orbit classification, quotient space reasoning, symmetry breaking; or designing equivariance/conservation/invariant structures (e.g. SO(3)/SE(3) equivariant nets, tropical semiring) for algorithms.
5
- ---
6
-
7
- # ⚛️ Symmetry & Invariance
8
-
9
- > "Finding the properties that remain unchanged under transformations, revealing their underlying laws."
10
- >
11
- > — Group Theory, Invariant Theory, Noether's Theorem
12
- >
13
- > Sophus Lie wanted to forge a dragon-slaying sword — to solve all differential equations. Though not every dragon was slain, the forging technique (the Lie group–Lie algebra correspondence) was passed down and later applied to linearizing nonlinear problems, describing physical symmetries, and robot state estimation. The most fascinating aspect of mathematics is that tools invented for specific problems often reveal far greater value in entirely different domains. This is the archetype of "cross-domain activation."
14
-
15
- ## Core Principle
16
-
17
- **Find what remains unchanged amid change — this is the shortcut to understanding complex systems. Symmetry is not merely "aesthetically pleasing"; it is a manifestation of the deep structure of a system. Every symmetry corresponds to a conserved quantity (Noether's theorem), and every invariant is a key to simplifying a problem.**
18
-
19
- > **Mathematical Formalization**
20
- >
21
- > A group **G** acts on a set **X**: φ: G×X→X (φ(e,x)=x, φ(g,φ(h,x))=φ(gh,x)).
22
- >
23
- > An **invariant** f: X→Y satisfies f(g·x)=f(x) ∀g∈G. Formally: f is G-invariant ⇔ f: X/G → Y is a function on the quotient space. Invariants distinguish only between orbits, not elements within the same orbit.
24
- >
25
- > An **orbit** is O(x)={g·x : g∈G}; the equivalence relation x~y ⇔ ∃g∈G, y=g·x gives X/~ = X/G. The **quotient space** X/G consists of all orbits. Classification is essentially working on X/G; finding invariants means finding functions that are constant on each orbit.
26
- >
27
- > The **stabilizer** is Stab(x)={g∈G : g·x=x}, and |O(x)|=|G|/|Stab(x)| — the larger the orbit, the fewer symmetries remain.
28
- >
29
- > Core intuition: **Invariant = function constant on orbits = function on the quotient space X/G**. A complete set of invariants embeds X/G into a simpler space, achieving full classification.
30
- >
31
- > Hierarchy of symmetries: geometric symmetry (O(n)/E(n), invariants: distance, area); algebraic symmetry (Galois theory, discriminant); physical symmetry (Lie groups, energy/momentum/angular momentum); structural invariance (isomorphism/homotopy equivalence).
32
- >
33
- > **Reynolds operator**: For a finite group G, R(f)=1/|G| Σ f(g·x), R²=R, and the image is precisely the set of all invariants. **Burnside's lemma**: |X/G|=1/|G| Σ |Fix(g)|. **Lie algebra generators**: T_a·f=0 are differential equations whose solutions yield invariants. **Noether's theorem**: Continuous symmetry → conserved current Jμ, ∂_μ Jμ=0. **Galois theory**: An equation is solvable by radicals ⇔ Gal(f) is a solvable group.
34
- >
35
- > See `original-texts.md` for details.
36
-
37
- ## GPU-Friendliness (Cross-Cutting Check)
38
-
39
- Whether symmetry/invariant structures can run on GPU depends on the degree to which group operations can be "tensorized" — evaluated through the eight dimensions in `../../references/gpu-friendly-math.md`:
40
-
41
- - **Group action is tensorizable → friendly**: If the group action is linear (matrix multiplication), then the equivariant layer = GEMM (e.g., SO(3)-equivariant layers use batched GEMM on spherical harmonics / representation matrices).
42
- - **Reynolds averaging**: Averaging over a finite group = summing over |G| transformed results, which can be batched in parallel (friendly); however, when |G| is very large this becomes unfriendly → use continuous approximation via the Lie algebra.
43
- - **Invariants as regularization / constraints**: As loss terms they are local and cheap (friendly); as exact symbolic computations they are unfriendly.
44
- - **Tropical semiring**: The "symmetry" over min/+ algebra can be mapped to GEMM-like structures (friendly; see `../../references/gpu-friendly-math.md` for examples).
45
- - **Anti-pattern**: Forcing exact classification that requires per-orbit symbolic determination into training — intractable.
46
-
47
- Eight-dimension minimum criteria (formal terms): **Tensorization** checks whether the group action can be batched across features; **GEMM-mappability** checks whether representation matrices / spherical harmonics / projections reduce to matrix multiplication; **complexity** examines group order, number of orbits, and integration/quadrature scale; **memory and KV-cache** checks whether multiple replicas / multi-orbit features explode memory; **low-precision stability** checks whether equivariance errors, gauge choices, and normalization remain robust; **parallelism and communication** checks whether group elements / spatial points can be processed in parallel; **sparse structure** checks whether equivariant connections are block-structured; **operator fusion** checks whether group action, aggregation, and projection can be fused.
48
-
49
- > Used together with `../../references/books/micro-lie-theory.md` (SO(3)/SE(3) equivariance), `abstract-algebra.md` (groups/semirings), `differential-geometry.md` (gauge symmetry).
50
-
51
- ## When NOT to Use
52
-
53
- - **The system is completely asymmetric with no regularity** — no group action to exploit.
54
- - **Exact numerical solutions are needed** — symmetry provides structural information, not specific values (it tells you "what is equal" but not "equal to what").
55
- - **Symmetry breaking is the core mechanism** (phase transitions, spontaneous breaking) — one should analyze the breaking pattern G→H rather than search for invariants.
56
- - **The problem scale is very small** — the overhead of symmetry analysis may exceed that of direct computation.
57
- - **The group structure is too complex** — when |G| is very large, X/G is no simpler than X, and the invariants themselves may be more complex.
58
-
59
- ## When to Use
60
-
61
- - Facing a complex system and seeking simplifying clues; needing to classify/identify objects (using orbits X/G).
62
- - Searching for conserved quantities or invariants (functions constant on orbits); reducing variables / dimensionality (quotient space, fundamental domain).
63
- - Determining equation solvability (Galois); counting symmetric configurations (Burnside/Pólya).
64
- - Inferring symmetry from conservation laws (inverse Noether).
65
- - **Designing equivariant/invariant networks or operators** (SO(3)/SE(3) equivariance, tropical semiring routing, conservation regularization).
66
-
67
- ## Method
68
-
69
- ### Step 1: Identify Transformations
70
- List all transformations the system may undergo, organize them into candidate symmetry groups, and verify the four axioms (closure / associativity / identity / inverse). Spatial transformations → E(n)/O(n)/similarity group; temporal → R or Z₂; algebraic → S_n/GL(n)/SL(n); logical → Z₂/Aut; gauge → U(1)/SU(2)/SU(3) (Lie groups, paired with Lie algebras). If the axioms are not satisfied, identify the actual structure (semigroup? groupoid?) — do not blindly treat it as a group. Pitfall: projections are not invertible and thus do not form a group; compositions of reflections yield rotations (closure holds).
71
-
72
- ### Step 2: Find Invariants
73
- For G acting on X, find f such that f(g·x)=f(x).
74
- - **Finite groups**: Reynolds operator R(f)=1/|G| Σ f(g·x) (projection onto invariants, R²=R); Burnside's lemma |X/G|=1/|G| Σ |Fix(g)| counts orbits; elementary symmetric polynomials e_k form a complete set of invariants for S_n acting on R^n.
75
- - **Continuous groups (Lie groups)**: Use Lie algebra generators T_a·f=0 to solve for invariants (each generator removes one degree of freedom); integrating Killing vector fields yields invariant coordinates (e.g., SO(3) → r=√(x²+y²+z²)).
76
- - **Fixed-point analysis**: Stab(x) reveals the local degree of symmetry.
77
- - Common invariants: geometric (length/angle/Euler characteristic), physical (energy/momentum/angular momentum), algebraic (discriminant/trace/determinant/characteristic polynomial coefficients), combinatorial (number of orbits/equivalence class sizes).
78
-
79
- ### Step 3: Use Invariants to Simplify
80
- - **Quotient space reasoning**: Work on X/G rather than X; |X| objects → |X/G| orbits (e.g., 230 space groups → 230 types in X/G).
81
- - **Fundamental domain** D: Each orbit intersects D in exactly one point, so one only needs to analyze D (O(2) → half-plane; SO(3) → spherical triangle; SL(2,Z) → |z|≥1, |Re(z)|≤1/2).
82
- - **Variable reduction**: Replace constrained variables with invariants (energy conservation eliminates one dynamical variable; angular momentum conservation → only the radial part matters; central force field L²=const → one-dimensional radial equation).
83
-
84
- ### Step 4: Classify via Symmetry
85
- **Orbit–Stabilizer** |O(x)|=|G|/|Stab(x)|: the larger the stabilizer, the more symmetric the object and the smaller the orbit. Objects in the same orbit share all G-invariant values. Key question: Are the invariants complete? That is, does f(x)=f(y) ⇒ x and y are in the same orbit? If incomplete, different orbits may share the same invariant values, requiring more invariants or a finer group. Complete examples: S_n → e₁..e_n; O(n) → r²=Σx_i²; SL(2,C) → discriminant Δ=b²-4ac.
86
-
87
- ### Step 5: Check Symmetry Breaking
88
- - **Spontaneous breaking**: The equations possess symmetry G, but solutions satisfy only H⊂G (the vacuum selects a direction, G→H). Goldstone's theorem: continuous G→H breaking produces dim(G/H) massless Goldstone modes (ferromagnet SO(3)→SO(2) yields 2 modes; superfluid U(1)→{e} yields 1 mode).
89
- - **Explicit breaking**: The equations themselves do not satisfy G (external forces / mass terms, e.g., quark masses break chiral symmetry SU(2)_L×SU(2)_R→SU(2)_V).
90
- - **Key analysis points**: Identify G→H, compute the number of Goldstone modes dim(G/H), and ensure the effective theory after breaking remains H-invariant.
91
-
92
- ### Step 6: Algebraic Symmetry (Galois)
93
- Gal(f) is the permutation group of the roots. **An equation is solvable by radicals ⇔ Gal(f) is a solvable group** (subgroup chain G=G₀⊃...⊃G_k={e}, where each quotient is cyclic). Intuition for solvability: each quotient group corresponds to one radical extraction; a non-solvable group means "irreducible complexity." General equations of degree ≥5 have Gal(f)=S_5, which is not solvable (A_5 is the smallest non-solvable simple group); degree 4 has S_4, which is solvable; cyclotomic → cyclic group, solvable. Paradigm: **problem structure → permutation group → group solvability → problem solvability**.
94
-
95
- ### Step 7: Physical Symmetry (Noether)
96
- **Noether's theorem**: The action S=∫L dt is invariant under G ⇒ conserved current Jμ, ∂_μ Jμ=0. Correspondences: time translation → energy; spatial translation → momentum; rotation → angular momentum; gauge U(1) → charge. Quantum: symmetry G → unitary representation on Hilbert space → irreducible representations classify energy levels → Wigner–Eckart theorem → selection rules. Hierarchy: classical (Lagrangian symmetry → Noether → simplified equations) → quantum (selection rules / degeneracies / Wigner–Eckart) → field theory (gauge symmetry → particle classification → Standard Model SU(3)×SU(2)×U(1)).
97
-
98
- ## Common Errors
99
-
100
- | Error | Critique | Correct Approach |
101
- |-------|----------|-----------------|
102
- | Overlooking hidden symmetries | Surface asymmetry may conceal deeper symmetry, leading to unnecessary complexity | Try different representations (coordinate / basis changes) to find deeper symmetries |
103
- | Confusing approximate with exact symmetry | Approximate symmetry yields only approximate "conservation"; errors accumulate over time | Distinguish exact from approximate invariants; annotate the degree of approximation |
104
- | Overextending symmetry arguments | Not every problem has symmetry; forcing it leads to incorrect conclusions | Verify that the symmetry actually exists before using it; check the group axioms |
105
- | Ignoring symmetry breaking | Breaking may be the key mechanism | Attend to both symmetry and breaking; analyze G→H |
106
- | Failing to verify group properties | A candidate set of transformations may not satisfy closure / inverse | Verify all four axioms; if not satisfied, identify the actual structure |
107
- | Confusing orbit invariants with general invariants | f constant on O(x) ≠ f constant on X (the latter is trivially uninformative) | Be explicit that the invariant is G-invariant (constant on each orbit) |
108
- | Confusing discrete and continuous symmetries | Discrete groups do not admit Reynolds averaging (|G| may be infinite); continuous groups require the Lie algebra | Use Burnside counting for discrete groups; use the Lie algebra + Noether for continuous groups |
109
- | Intractable equivariant structures | Forcing exact classification requiring per-orbit symbolic determination into GPU training | Tensorize group actions, use linear representations to map to GEMM, pass the eight-dimension gate |
110
-
111
- ## Operating Procedure
112
-
113
- When this skill is triggered, the output must include:
114
-
115
- 1. **Transformation inventory**: `[Transformation N]: [description] [type]`, organized into candidate groups, noting which axioms were verified (closure ✓/✗ …)
116
- 2. **Invariant discovery**: `[Under group G]: [invariant Y] remains unchanged`; for finite groups write the Reynolds form; use Burnside to count orbits
117
- 3. **Simplification strategy**: `[Using invariant Y]: [how to simplify]`; note whether working on X/G or fundamental domain D, and estimate the dimensionality reduction
118
- 4. **Symmetry classification**: `[Object x]: |O(x)|=, |Stab(x)|=`, orbit classification results, assessment of invariant completeness
119
- 5. **Symmetry breaking check**: `[Symmetry Z]: [present/broken], mode [spontaneous/explicit]`; for continuous breaking note the number of Goldstone modes dim(G/H) and the effective group H
120
- 6. **Algebraic / Physical symmetry**: For equation solving, note Gal(f) and its solvability; for physical systems, note the Noether correspondence `[Symmetry group G]: [Conservation law]`
121
- 7. **Conclusion**: Which invariants were found, how much dimensionality reduction was achieved, and the classification results
122
- 8. **[GPU feasibility]** (if used for algorithm / equivariant design) — whether group actions can be tensorized to GEMM, pass the eight-dimension gate, and annotate as friendly / retrofittable / unfriendly
123
-
124
- **The output must not present analysis alone without a conclusion.**
125
-
126
- ## Relations to Other Skills
127
-
128
- - **Transformation thinking**: Symmetry is precisely invariance under transformations — two sides of the same coin.
129
- - **Abstraction thinking**: Invariants are the highest level of abstraction — independent of any particular representation.
130
- - **Modeling thinking**: Physical models are often guided by symmetry principles.
131
- - **Axiomatic thinking**: Group theory axioms are the mathematical foundation of symmetry.
132
- - **Topological thinking**: Topological invariants (Euler characteristic, homotopy groups) are invariants under continuous transformations.
133
- - **Algorithmic thinking**: Group-theoretic algorithms exploit symmetry for acceleration (e.g., FFT exploits the cyclic group structure).
134
- - **Discrete / Combinatorial thinking**: Pólya counting is the weighted generalization of Burnside's lemma.
135
- - **Modern mathematics activation**: `../../references/books/micro-lie-theory.md` (SO(3)/SE(3) equivariance, Lie group optimization), `abstract-algebra.md` (groups/semirings), `differential-geometry.md` (gauge symmetry/fiber bundles).
@@ -1,139 +0,0 @@
1
- ---
2
- name: symmetry-invariance
3
- description: |
4
- 触发:群论分析、不变量计算、Galois 理论、Noether 定理、轨道分类、商空间推理、对称性破缺分析;或为算法设计等变性/守恒量/不变结构(如 SO(3)/SE(3) 等变网络、热带半环)时调用。
5
- English: Trigger for group theory analysis, invariant computation, Galois theory, Noether's theorem, orbit classification, quotient space reasoning, symmetry breaking; or designing equivariance/conservation/invariant structures (e.g. SO(3)/SE(3) equivariant nets, tropical semiring) for algorithms.
6
- ---
7
-
8
- > **语言路由**:若用户消息为英文,请读取并遵循同目录下的 `SKILL.en.md`,按其操作规程以英文输出;中文消息则继续使用本文件。
9
-
10
- # ⚛️ 对称与不变性 / Symmetry & Invariance
11
-
12
- > "寻找事物在变换下保持不变的性质,揭示其内在规律。"
13
- > "Finding the properties that remain unchanged under transformations, revealing their underlying laws."
14
- >
15
- > —— 群论、不变量理论、Noether 定理 / Group Theory, Invariant Theory, Noether's Theorem
16
- >
17
- > Sophus Lie 想打造一把屠龙刀——解通微分方程。虽未屠尽所有的龙,但这把刀的锻造工艺(李群-李代数对应)流传了下来,后来用于线性化非线性问题、描述物理对称性、机器人状态估计。数学最迷人的地方:为特定问题发明的工具,在完全不同领域展现出远超初衷的价值。这正是「跨领域激活」的原型。
18
-
19
- ## 核心原则 / Core Principle
20
-
21
- **在变化中寻找不变——这是理解复杂系统的捷径。对称性不是'好看',而是系统深层结构的体现。每一个对称性都对应一个守恒量(Noether 定理),每一个不变量都是简化问题的钥匙。**
22
-
23
- > **数学形式化 / Mathematical Formalization**
24
- >
25
- > 群 **G** 作用在集合 **X** 上:φ: G×X→X(φ(e,x)=x, φ(g,φ(h,x))=φ(gh,x))。
26
- >
27
- > **不变量** f: X→Y 使 f(g·x)=f(x) ∀g∈G。形式化:f 是 G-不变量 ⇔ f: X/G → Y 为商空间上的函数。不变量只区分轨道,不区分同轨道内元素。
28
- >
29
- > **轨道** O(x)={g·x : g∈G},等价关系 x~y ⇔ ∃g∈G, y=g·x,X/~ = X/G。**商空间** X/G 由所有轨道构成。分类的本质是在 X/G 上工作;找不变量即找在每条轨道取常值的函数。
30
- >
31
- > **稳定子** Stab(x)={g∈G : g·x=x},|O(x)|=|G|/|Stab(x)|——轨道越大对称越少。
32
- >
33
- > 核心直觉:**不变量 = 轨道上的常值函数 = 商空间 X/G 上的函数**。完备不变量集将 X/G 嵌入更简单空间,实现完全分类。
34
- >
35
- > 对称层次:几何对称(O(n)/E(n),不变量距离面积);代数对称(Galois 理论,判别式);物理对称(Lie 群,能量/动量/角动量);结构不变(同构/同伦等价)。
36
- >
37
- > **Reynolds 算子**:有限群 G,R(f)=1/|G| Σ f(g·x),R²=R,像正是所有不变量。**Burnside 引理**:|X/G|=1/|G| Σ |Fix(g)|。**Lie 代数生成元**:T_a·f=0 为微分方程,解之得不变量。**Noether 定理**:连续对称 → 守恒流 Jμ, ∂_μ Jμ=0。**Galois 理论**:方程可用根式求解 ⇔ Gal(f) 可解群。
38
- >
39
- > 详细见 `original-texts.md`。
40
-
41
- ## GPU 友好性 / GPU-Friendliness(横切检查)
42
-
43
- 对称/不变结构能否上 GPU,取决于群操作的「张量化」程度——过 `../../references/gpu-friendly-math.md` 八维:
44
-
45
- - **群作用可张量化 → 友好**:若群作用是线性(矩阵乘),则等变层 = GEMM(如 SO(3) 等变用球谐/表示矩阵的批量 GEMM)。
46
- - **Reynolds 平均**:有限群平均 = 对 |G| 个变换结果求和,可批量并行(友好);但 |G| 极大时不友好→用 Lie 代数连续近似。
47
- - **不变量作正则/约束**:作损失项时局部、廉价(友好);作精确符号计算时不友好。
48
- - **热带半环**:min/+ 代数上的"对称"可落 GEMM-like 结构(友好,见 `../../references/gpu-friendly-math.md` 范例)。
49
- - **反模式**:把需要逐轨道符号判定的精确分类硬塞进训练——不可算。
50
-
51
- 八维最低判定(正式术语):**张量化**看群作用是否可批量作用于特征;**GEMM 可映射**看表示矩阵/球谐/投影是否落矩阵乘;**复杂度**看群阶、轨道数、积分/求积规模;**显存与 KV-Cache**看多副本/多轨道特征是否爆炸;**低精度稳定**看等变误差、规范选择、归一化是否稳健;**并行与通信**看群元素/空间点能否并行;**稀疏结构**看等变连接是否块结构化;**算子融合**看 group action、聚合、投影能否融合。
52
-
53
- > 配合 `../../references/books/micro-lie-theory.md`(SO(3)/SE(3) 等变)、`abstract-algebra.md`(群/半环)、`differential-geometry.md`(规范对称)。
54
-
55
- ## 不适用场景 / When NOT to Use
56
-
57
- - **系统完全不对称且无规律**——无群作用可利用。
58
- - **需要精确数值解**——对称性给结构信息而非具体数值(告诉你"什么相等"不告诉你"等于多少")。
59
- - **对称破缺是核心机制**(相变、自发破缺)——应转向分析破缺模式 G→H 而非找不变量。
60
- - **问题规模极小**——对称分析开销可能超过直接求解。
61
- - **群结构过于复杂**——|G| 极大时 X/G 不比 X 简单,不变量本身可能更复杂。
62
-
63
- ## 何时使用 / When to Use
64
-
65
- - 面对复杂系统想找简化线索;需要分类/识别对象(利用轨道 X/G)。
66
- - 寻找回滚量或不变量(轨道上常值的函数);减少变量/降维(商空间、基本域)。
67
- - 判断方程可解性(Galois);计数对称构型(Burnside/Pólya)。
68
- - 从守恒律反推对称性(逆 Noether)。
69
- - **设计等变/不变网络或算子**(SO(3)/SE(3) 等变、热带半环路由、守恒正则)。
70
-
71
- ## 方法流程 / Method
72
-
73
- ### 第一步:识别可能的变换 / Identify Transformations
74
- 列出系统可能经历的所有变换,组织为候选对称群,验证四条公理(封闭/结合/单位/逆)。空间变换→E(n)/O(n)/相似群;时间→R 或 Z₂;代数→S_n/GL(n)/SL(n);逻辑→Z₂/Aut;规范→U(1)/SU(2)/SU(3)(Lie 群,配 Lie 代数)。不满足公理则识别实际结构(半群?广群?),不可盲目当群。陷阱:投影不可逆不是群;反射复合为旋转(封闭成立)。
75
-
76
- ### 第二步:寻找不变量 / Find Invariants
77
- 对 G 作用于 X,找 f(g·x)=f(x)。
78
- - **有限群**:Reynolds 算子 R(f)=1/|G| Σ f(g·x)(投影到不变量,R²=R);Burnside 引理 |X/G|=1/|G| Σ |Fix(g)| 计轨道数;初等对称多项式 e_k 是 S_n 作用于 R^n 的完备不变量集。
79
- - **连续群(Lie 群)**:用 Lie 代数生成元 T_a·f=0 解不变量(每个生成元减一自由度);Killing 向量场积分得不变坐标(如 SO(3)→r=√(x²+y²+z²))。
80
- - **不动点分析**:Stab(x) 揭示局部对称程度。
81
- - 常见不变量:几何(长度/角度/欧拉示性数)、物理(能量/动量/角动量)、代数(判别式/迹/行列式/特征多项式系数)、组合(轨道数/等价类大小)。
82
-
83
- ### 第三步:利用不变量简化 / Use Invariants to Simplify
84
- - **商空间推理**:在 X/G 上工作而非 X,|X| 对象→|X/G| 轨道(如 230 空间群→230 种 X/G)。
85
- - **基本域** D:每条轨道恰与 D 交于一点,只分析 D(O(2)→半平面;SO(3)→球面三角;SL(2,Z)→|z|≥1, |Re(z)|≤1/2)。
86
- - **变量缩减**:用不变量替代被约束变量(能量守恒减一动力学变量;角动量守恒→只关心径向;中心力场 L²=常数→一维径向方程)。
87
-
88
- ### 第四步:利用对称性分类 / Classify via Symmetry
89
- **轨道-稳定子** |O(x)|=|G|/|Stab(x)|:稳定子越大对象越对称、轨道越小。同轨道对象共享所有 G-不变量值。关键问题:不变量是否完备?即 f(x)=f(y) ⇒ x,y 同轨道?不完备→不同轨道可有相同不变量值,需更多不变量或更精细群。完备例子:S_n→e₁..e_n;O(n)→r²=Σx_i²;SL(2,C)→判别式 Δ=b²-4ac。
90
-
91
- ### 第五步:检查对称性破缺 / Check Symmetry Breaking
92
- - **自发破缺**:方程有对称 G,解只满足 H⊂G(真空选方向,G→H)。Goldstone 定理:连续 G→H 破缺产生 dim(G/H) 个无质量 Goldstone 模(铁磁 SO(3)→SO(2) 得 2 模;超流 U(1)→{e} 得 1 模)。
93
- - **显式破缺**:方程本身不满足 G(外力/质量项,如夸克质量破手征对称 SU(2)_L×SU(2)_R→SU(2)_V)。
94
- - **分析要点**:识别 G→H,算 Goldstone 模数 dim(G/H),破缺后有效理论仍需 H-不变。
95
-
96
- ### 第六步:代数对称分析 / Algebraic Symmetry (Galois)
97
- Gal(f) 为根的置换群。**方程可用根式求解 ⇔ Gal(f) 可解群**(子群链 G=G₀⊃...⊃G_k={e},每步为循环商群)。可解直觉:每步商群对应一次根式提取;不可解群意味"不可绕过的复杂性"。≥5 次一般方程 Gal(f)=S_5 不可解(A_5 最小非可解单群);4 次 S_4 可解;圆可分→循环群可解。范式:**问题结构→置换群→群可解性→问题可解性**。
98
-
99
- ### 第七步:物理对称分析 / Physical Symmetry (Noether)
100
- **Noether 定理**:作用量 S=∫L dt 在 G 下不变 ⇒ 守恒流 Jμ, ∂_μ Jμ=0。对应:时间平移→能量;空间平移→动量;旋转→角动量;规范 U(1)→电荷。量子:对称 G→Hilbert 空间酉表示→不可约表示分类能级→Wigner-Eckat→选择规则。层次:经典(Lagrangian 对称→Noether→简化方程)→量子(选择规则/简并/Wigner-Eckart)→场论(规范对称→粒子分类→标准模型 SU(3)×SU(2)×U(1))。
101
-
102
- ## 常见错误 / Common Errors
103
-
104
- | 错误 / Error | 数学批评 / Critique | 正确做法 / Correct Approach |
105
- |-------------|-------------------|---------------------------|
106
- | 忽视隐藏对称性 | 表面不对称但深层有对称,遗漏致不必要复杂化 | 尝试不同表示(坐标/基底变换)找深层对称 |
107
- | 混淆近似与精确对称 | 近似对称"守恒"仅近似,误差随时间积累 | 区分精确/近似不变量,标注近似程度 |
108
- | 对称性论证过度 | 不是所有问题都有对称,强行引入得错误结论 | 确认对称确实存在再使用,验证群公理 |
109
- | 忽视对称破缺 | 破缺可能才是关键机制 | 同时关注对称与破缺,分析 G→H |
110
- | 未验证群性质 | 候选变换集未必满足封闭/逆 | 逐一验证四公理,不满足则识别实际结构 |
111
- | 混淆轨道不变量与一般不变量 | f 在 O(x) 常值 ≠ f 在 X 常值(后者平凡无信息) | 明确是 G-不变(每轨道常值) |
112
- | 混淆离散与连续对称 | 离散群无 Reynolds 平均(|G| 或无穷);连续群需 Lie 代数 | 离散用 Burnside 计数;连续用 Lie 代数+Noether |
113
- | 等变结构不可算 | 把需逐轨道符号判定的精确分类塞进 GPU 训练 | 群作用张量化、用线性表示落 GEMM,过八维门 |
114
-
115
- ## 操作规程 / Operating Procedure
116
-
117
- 当本 skill 被触发时,输出必须包含:
118
-
119
- 1. **变换清单**:`[变换N]: [描述] [类型]`,组织为候选群,标注验证了哪些公理(封闭✓/✗…)
120
- 2. **不变量发现**:`[在群G下]: [不变量Y] 保持不变`;有限群写 Reynolds 形式;用 Burnside 计轨道数
121
- 3. **简化策略**:`[利用不变量Y]: [如何简化]`;标注是否在 X/G 或基本域 D 上工作,估计维度缩减
122
- 4. **对称分类**:`[对象x]: |O(x)|=, |Stab(x)|=`,轨道分类结果,评估不变量完备性
123
- 5. **对称破缺检查**:`[对称性Z]: [存在/破缺],方式[自发/显式]`;连续破缺标注 Goldstone 模数 dim(G/H) 与有效群 H
124
- 6. **代数/物理对称**:方程求解标 Gal(f) 及可解性;物理系统标 Noether 对应 `[对称群G]: [守恒律]`
125
- 7. **结论**:发现哪些不变量、实现多少维度缩减、分类结果
126
- 8. **[GPU 可行性]**(若用于算法/等变设计)— 群作用能否张量化落 GEMM,过八维门,标注友好/可改造/不友好
127
-
128
- **输出不得只给分析而无结论。**
129
-
130
- ## 与其他 skill 的关系 / Relations to Other Skills
131
-
132
- - **变换思想**:对称性就是变换下的不变性——一体两面。
133
- - **抽象化思想**:不变量是最高层次的抽象——独立于具体表示。
134
- - **建模思想**:物理模型常以对称性原理为指导。
135
- - **公理化思想**:群论公理是对称性的数学基础。
136
- - **拓扑思想**:拓扑不变量(欧拉示性数、同伦群)是连续变换下的不变量。
137
- - **算法思想**:群算法利用对称加速(如 FFT 利用循环群结构)。
138
- - **离散/组合思想**:Pólya 计数是 Burnside 引理的加权推广。
139
- - **现代数学激活**:`../../references/books/micro-lie-theory.md`(SO(3)/SE(3) 等变、李群优化)、`abstract-algebra.md`(群/半环)、`differential-geometry.md`(规范对称/纤维丛)。