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
@@ -0,0 +1,52 @@
1
+ # 近端方法 (Proximal Methods)
2
+
3
+ ## 最小定义
4
+
5
+ 对不可微或非光滑目标函数 $f(x) = g(x) + h(x)$($g$ 光滑、$h$ 可能不可微但"简单"),用近端算子 $\text{prox}_{\eta h}(v) = \arg\min_x \{h(x) + \frac{1}{2\eta}\|x - v\|^2\}$ 代替对 $h$ 的梯度。近端方法将不可微部分封装为一个闭式子问题。
6
+
7
+ ## 核心公式
8
+
9
+ - 近端算子:$\text{prox}_{\eta h}(v) = \arg\min_x \left\{h(x) + \frac{1}{2\eta}\|x - v\|^2\right\}$
10
+ - 近端梯度下降 (ISTA):$x_{k+1} = \text{prox}_{\eta h}(x_k - \eta \nabla g(x_k))$
11
+ - 加速近端梯度 (FISTA):$y_k = x_k + \frac{k-1}{k+2}(x_k - x_{k-1})$,$x_{k+1} = \text{prox}_{\eta h}(y_k - \eta \nabla g(y_k))$,收敛率 $O(1/k^2)$ vs. ISTA 的 $O(1/k)$
12
+ - Soft-thresholding($\ell_1$ 近端):$\text{prox}_{\eta\|\cdot\|_1}(v)_i = \text{sign}(v_i)\max(|v_i| - \eta, 0)$
13
+ - 投影(指示函数近端):$\text{prox}_{\eta \delta_\mathcal{C}}(v) = \text{proj}_\mathcal{C}(v)$
14
+ - 核范数近端(奇异值软阈值):$\text{prox}_{\eta\|\cdot\|_*}(A) = U(\Sigma - \eta I)_+ V^H$
15
+ - Moreau envelope:$h_\eta(v) = \min_x \{h(x) + \frac{1}{2\eta}\|x-v\|^2\}$($h$ 的光滑近似)
16
+ - ADMM 分裂:$\min f(x) + g(z)$ s.t. $Ax + Bz = c$,交替更新 $x, z, u$(对偶变量)
17
+
18
+ ## 适用问题
19
+
20
+ - 稀疏训练 / $\ell_1$ 正则化:权重稀疏化、特征选择
21
+ - 低秩矩阵恢复:核范数正则化(矩阵补全、鲁棒 PCA)
22
+ - 分组稀疏 / Group Lasso:$\sum_g \|w_g\|_2$ 正则化(结构化剪枝)
23
+ - 约束优化的算子分裂:ADMM 将复杂约束分解为简单子问题
24
+ - 量化感知训练:将权重量化建模为近端算子(round + straight-through gradient)
25
+
26
+ ## AI 设计翻译
27
+
28
+ - **Soft-thresholding 做稀疏训练**:$\text{prox}_{\eta\lambda\|\cdot\|_1}(w) = \text{sign}(w) \odot \max(|w| - \eta\lambda, 0)$,实现为 `w.sign() * (w.abs() - eta * lam).clamp(min=0)`,纯 elementwise,$O(d)$,零额外显存。每次 SGD 更新后做一次 soft-thresholding 即可得到稀疏权重。
29
+ - **奇异值软阈值做低秩正则**:$\text{prox}_{\eta\|\cdot\|_*}(W) = U(\Sigma - \eta)_+ V^H$。需 SVD,大矩阵用随机化 SVD 近似:先做 randomized SVD 到 rank $r$,再对 $\Sigma$ 做 elementwise soft-threshold,重构。核心是 matmul 链 + elementwise。
30
+ - **Group Lasso 结构化剪枝**:$\text{prox}_{\eta\sum_g\|w_g\|_2}(w)_g = w_g \cdot \max(1 - \eta/\|w_g\|_2, 0)$。按通道/头分组后,每组独立做 soft-thresholding(norm + elementwise scale),$O(d)$。实现为 reshape + norm(dim) + clamp + mul。
31
+ - **ADMM 做分布式训练**:$\min \sum_i f_i(x_i) + g(z)$ s.t. $x_i = z$。各节点独立更新 $x_i$(本地 SGD),server 更新 $z = \text{prox}_{g/\rho}(\bar{x} + u)$(聚合 + 近端),$u$ 对偶变量更新。通信效率高于 all-reduce(只需传 $x_i$ 和 $z$)。
32
+ - **量化近端算子**:将权重量化建模为 $\text{prox}(w) = \Delta \cdot \text{round}(w/\Delta)$,反向传播用 straight-through estimator(STE):$\partial \text{prox}/\partial w \approx 1$。实现为 `w_q = (w / delta).round() * delta`,forward 是 elementwise round + mul,backward 是 identity。
33
+
34
+ ## 工程可行性
35
+
36
+ - **主要操作**:近端算子多为 elementwise(soft-thresholding、clamp、group norm)或 matmul + 小 SVD(核范数)。梯度步 = 标准反向传播。
37
+ - **GPU 友好度**:极高。$\ell_1$ 近端 = elementwise;group lasso 近端 = reshape + norm + scale = elementwise;核范数近端 = matmul + 小 SVD。FISTA 的动量项也是 elementwise。ADMM 的通信模式适配数据并行。
38
+ - **复杂度**:ISTA/FISTA 每步 = 一次梯度计算 + 一次近端算子($O(d)$ elementwise);核范数近端 = $O(nd^2)$(随机化 SVD 降到 $O(ndk)$);ADMM 每节点 = 本地 SGD + $O(d)$ 通信。
39
+ - **低精度**:elementwise 近端算子在 bf16 下稳定(不涉及精细数值运算)。SVD 类近端需在 fp32 下计算。FISTA 的动量累积在 bf16 下可能丢精度,建议用 fp32 存储 $y_k$。
40
+
41
+ ## 风险与失效条件
42
+
43
+ - **核范数近端的 SVD 开销**:大矩阵每步完整 SVD 是 $O(n^3)$,不可行。解决:(1) 随机化 SVD 近似;(2) 因子化 $\|W\|_* = \min_{W=UV^T} \frac{1}{2}(\|U\|_F^2 + \|V\|_F^2)$ 转为对 $U, V$ 的光滑优化,无需 SVD。
44
+ - **FISTA 的重启问题**:FISTA 的 $y_k$ 序列可能振荡(非单调),导致实际收敛慢于理论。解决:adaptive restart(当 $f(x_{k+1}) > f(x_k)$ 时重置动量 $t_k = 1$),实现为简单的 if 判断。
45
+ - **ADMM 的 $\rho$ 参数敏感**:$\rho$ 过大导致子问题病态,$\rho$ 过小导致对偶收敛慢。解决:adaptive $\rho$(根据 primal/dual residual 比值自动调整),每若干步 $\rho \leftarrow \rho \cdot \tau$($\tau > 1$ 若 primal residual $>$ dual residual)。
46
+ - **近端算子无闭式解**:并非所有 $h(x)$ 都有闭式 prox。复杂正则项(如 TV 正则、重叠 group lasso)需内层迭代求解。解决:用 Dykstra 算法分裂为多个简单 prox 的组合,或改用 ADMM 分裂。
47
+ - **Straight-Through Estimator 的偏差**:量化 prox 的 STE 梯度有偏($\partial \text{round}/\partial w = 0$ 几乎处处),长期训练可能发散。解决:用 learnable scale factor 补偿,或加噪声的量化(stochastic rounding)。
48
+
49
+ ## 深入参考
50
+
51
+ - 蒸馏稿:references/books/optimization-ml.md(Ch 8 梯度法 §8.3 收敛分析、Ch 11 拟牛顿 §11.5 BFGS、Ch 24 约束算法 §24.5 增广 Lagrange)
52
+ - 原书:Chong, Lu, Zak, *An Introduction to Optimization* 5th Ed., Chapter 24 (Constrained Algorithms §24.5 Augmented Lagrangian) + Parikh & Boyd, *Proximal Algorithms*, Foundations and Trends in Optimization, 2014
@@ -0,0 +1,51 @@
1
+ # Riemannian Optimization
2
+
3
+ ## Minimal Definition
4
+
5
+ Optimization on smooth manifolds $\mathcal{M}$ (e.g., the orthogonal group $O(n)$, Stiefel manifold, Grassmann manifold, hyperbolic space). Core idea: project the Euclidean gradient onto the tangent space of the manifold, update along geodesics (or retractions), and ensure iterates remain on the manifold.
6
+
7
+ ## Core Formulas
8
+
9
+ - Riemannian gradient: $\text{grad} f(x) = \text{proj}_{T_x\mathcal{M}}(\nabla f(x))$ (Euclidean gradient projected onto the tangent space)
10
+ - Riemannian gradient descent: $x_{k+1} = R_{x_k}(-\alpha_k \cdot \text{grad} f(x_k))$, where $R$ is a retraction
11
+ - Tangent space of the orthogonal group $O(n)$: $T_Q O(n) = \{Q\Omega : \Omega^T = -\Omega\}$ (left multiplication by skew-symmetric matrices)
12
+ - Cayley retraction for the orthogonal group: $R_Q(\xi) = Q(I + \frac{1}{2}\Omega)^{-1}(I - \frac{1}{2}\Omega)$, $\xi = Q\Omega$
13
+ - Polar decomposition retraction: $R_Q(\xi) = (Q + \xi)(I + \xi^T\xi)^{-1/2}$ (projection onto the nearest orthogonal matrix)
14
+ - Newton-Schulz orthogonalization: $X_{k+1} = \frac{1}{2}X_k(3I - X_k^T X_k)$, converging to the nearest orthogonal matrix
15
+ - Hyperbolic space (Poincaré ball): $\text{grad}_{\mathcal{H}} f = \frac{(1-\|x\|^2)^2}{4} \nabla f(x)$
16
+
17
+ ## Applicable Problems
18
+
19
+ - Orthogonal weight constraints: $W^TW = I$ preserves eigenvalue moduli at 1, stabilizing RNN/SSM training
20
+ - Muon optimizer: projects the gradient onto the nearest orthogonal matrix as the update direction (a cheap surrogate with "second-order flavor")
21
+ - Low-rank subspace tracking: online PCA on the Grassmann manifold
22
+ - Hyperbolic embeddings: Poincaré embeddings for hierarchical structures (trees, taxonomies)
23
+ - Metric learning: distance metrics on the SPD matrix manifold (covariance matrix space)
24
+
25
+ ## AI Design Translation
26
+
27
+ - **Muon optimizer (orthogonalized gradient updates)**: Projects the momentum matrix $M$ onto the nearest orthogonal matrix via Newton-Schulz iteration: $X_{k+1} = \frac{1}{2}X_k(3I - X_k^TX_k)$, converging in 5 steps. Update $W \leftarrow W - \alpha \cdot U$ ($U$ being the orthogonalized result). The core is a pure matmul chain, 2 matmul operations per step, fully tensor-core-friendly, stable under bf16.
28
+ - **Manifold perspective on spectral normalization**: The constraint $\sigma_{\max}(W) = 1$ is equivalent to projection onto a tangent direction of the Stiefel manifold. Power iteration for direction estimation + normalization = an approximate Riemannian gradient projection. Implementation is identical to standard spectral norm.
29
+ - **Orthogonal RNN**: Hidden state recurrence $h_t = \sigma(W h_{t-1} + U x_t)$, constraining $W \in O(n)$ to avoid vanishing/exploding gradients. During training, uses the Cayley parameterization $W = (I-A)(I+A)^{-1}$ ($A$ skew-symmetric), with backpropagation computing unconstrained gradients with respect to $A$. The core is matrix inversion $O(n^3)$ (acceptable for small layer dimensions).
30
+ - **Poincaré embeddings (hyperbolic space)**: Embeds hierarchical data into the Poincaré ball $\mathcal{B}^n = \{x : \|x\| < 1\}$. Distance $d(x,y) = \text{arcosh}(1 + 2\|x-y\|^2 / ((1-\|x\|^2)(1-\|y\|^2)))$. The gradient is simply scaled by the metric factor $(1-\|x\|^2)^2/4$. Implemented as elementwise scaling, $O(d)$.
31
+ - **Subspace learning on the Grassmann manifold**: Treats low-rank subspaces as points on the Grassmann manifold, updated online via Riemannian SGD. More suitable for streaming data than SVD. The projection $P = QQ^T$ update is implemented via QR decomposition, with the core being matmul + thin QR.
32
+
33
+ ## Engineering Feasibility
34
+
35
+ - **Primary operations**: Riemannian gradient projection = matmul ($Q^T \nabla$ to obtain the tangent space component); retraction = matmul + small-matrix inversion / Newton-Schulz (pure matmul); hyperbolic metric = elementwise.
36
+ - **GPU friendliness**: High (Newton-Schulz orthogonalization = pure matmul chain) to moderate (Cayley retraction requires $n \times n$ matrix inversion, where $n$ is the layer dimension; feasible via cuSOLVER when $n \leq 1024$). The metric scaling for hyperbolic embeddings is pure elementwise.
37
+ - **Complexity**: Newton-Schulz per step $O(n^3)$ (where $n$ is the layer dimension, not total model parameters); Cayley $O(n^3)$; hyperbolic gradient $O(d)$; Grassmann QR $O(nd^2)$.
38
+ - **Low precision**: Newton-Schulz is stable under bf16 (pure matmul iteration, no division or square roots); Cayley retraction's matrix inversion may fail under bf16 (fp32 required); the hyperbolic metric's denominator approaches zero as $\|x\| \to 1$, requiring clamping to prevent overflow.
39
+
40
+ ## Risks and Failure Conditions
41
+
42
+ - **Inversion overhead of Cayley / matrix exponential maps**: $O(n^3)$ matrix inversion per step becomes a bottleneck when layer dimension $> 4096$. Solution: switch to Newton-Schulz orthogonalization (pure matmul) or approximate retractions via polar decomposition.
43
+ - **Numerical overflow in hyperbolic space**: As $\|x\| \to 1$, $d(x,y) \to \infty$ and the metric factor $(1-\|x\|^2)^{-2} \to \infty$, causing gradient explosion. Solution: clamp $\|x\| \leq 1 - \epsilon$ ($\epsilon \sim 10^{-5}$), or use the Lorentz model (a numerically more stable hyperbolic parameterization).
44
+ - **Retraction vs. exponential map**: Retraction is a first-order approximation of the exponential map, with reduced accuracy at large step sizes. For learning-rate-sensitive optimization problems, the true exponential map may be needed (at higher cost).
45
+ - **Unboundedness of non-compact manifolds**: SPD manifolds / hyperbolic space are non-compact, and optimization paths may diverge to infinity. Regularization or trust-region constraints are needed.
46
+ - **Conflict between orthogonal constraints and BatchNorm**: The affine transformation in BatchNorm breaks orthogonality. Either disable BN scale/shift after orthogonally constrained layers, or switch to GroupNorm.
47
+
48
+ ## Further References
49
+
50
+ - Distilled notes: references/books/matrix-analysis.md (Section 7.3 Polar Decomposition, Newton-Schulz Iteration, Section 2.6 SVD and Orthogonal Factors)
51
+ - Original text: Horn & Johnson, *Matrix Analysis* 2nd Ed., Chapter 7 Section 7.3 (Polar Decomposition) + Absil, Mahony, Sepulchre, *Optimization Algorithms on Matrix Manifolds*, Princeton University Press, 2008
@@ -0,0 +1,51 @@
1
+ # 黎曼优化 (Riemannian Optimization)
2
+
3
+ ## 最小定义
4
+
5
+ 在光滑流形 $\mathcal{M}$(如正交群 $O(n)$、Stiefel 流形、Grassmann 流形、双曲空间)上做优化。核心思想:将欧氏空间的梯度投影到流形的切空间,沿测地线(或收缩映射)更新,保证迭代始终在流形上。
6
+
7
+ ## 核心公式
8
+
9
+ - 黎曼梯度:$\text{grad} f(x) = \text{proj}_{T_x\mathcal{M}}(\nabla f(x))$(欧氏梯度投影到切空间)
10
+ - 黎曼梯度下降:$x_{k+1} = R_{x_k}(-\alpha_k \cdot \text{grad} f(x_k))$,$R$ 为收缩映射(retraction)
11
+ - 正交群 $O(n)$ 的切空间:$T_Q O(n) = \{Q\Omega : \Omega^T = -\Omega\}$(反对称矩阵左乘)
12
+ - 正交群收缩映射(Cayley):$R_Q(\xi) = Q(I + \frac{1}{2}\Omega)^{-1}(I - \frac{1}{2}\Omega)$,$\xi = Q\Omega$
13
+ - 极分解收缩:$R_Q(\xi) = (Q + \xi)(I + \xi^T\xi)^{-1/2}$(投影到最近正交矩阵)
14
+ - Newton-Schulz 正交化:$X_{k+1} = \frac{1}{2}X_k(3I - X_k^T X_k)$,收敛到最近正交矩阵
15
+ - 双曲空间(Poincaré ball):$\text{grad}_{\mathcal{H}} f = \frac{(1-\|x\|^2)^2}{4} \nabla f(x)$
16
+
17
+ ## 适用问题
18
+
19
+ - 正交权重约束:$W^TW = I$ 保持特征值模长为 1,稳定 RNN/SSM 训练
20
+ - Muon 优化器:将梯度投影到最近正交矩阵作为更新方向("二阶味"的廉价替代)
21
+ - 低秩子空间追踪:Grassmann 流形上的在线 PCA
22
+ - 双曲嵌入:层次结构(树、taxonomy)的 Poincaré 嵌入
23
+ - 度量学习:SPD 矩阵流形(协方差矩阵空间)上的距离度量
24
+
25
+ ## AI 设计翻译
26
+
27
+ - **Muon 优化器 (正交化梯度更新)**:将动量矩阵 $M$ 通过 Newton-Schulz 迭代投影到最近正交矩阵:$X_{k+1} = \frac{1}{2}X_k(3I - X_k^TX_k)$,5 步收敛。更新 $W \leftarrow W - \alpha \cdot U$($U$ 为正交化结果)。核心是纯 matmul 链,每步 2 次 matmul,完全 tensor core 友好,bf16 稳定。
28
+ - **谱归一化的流形视角**:约束 $\sigma_{\max}(W) = 1$ 等价于在 Stiefel 流形的某个切方向上做投影。Power iteration 估计方向 + 归一化 = 一种近似的黎曼梯度投影。实现同标准 spectral norm。
29
+ - **正交 RNN (orthogonal RNN)**:隐藏状态递推 $h_t = \sigma(W h_{t-1} + U x_t)$,约束 $W \in O(n)$ 避免梯度消失/爆炸。训练时用 Cayley 参数化 $W = (I-A)(I+A)^{-1}$($A$ 反对称),反向传播走 $A$ 的无约束梯度。核心是矩阵求逆 $O(n^3)$(层维度小,可接受)。
30
+ - **Poincaré 嵌入 (双曲空间)**:将层次数据嵌入 Poincaré ball $\mathcal{B}^n = \{x : \|x\| < 1\}$。距离 $d(x,y) = \text{arcosh}(1 + 2\|x-y\|^2 / ((1-\|x\|^2)(1-\|y\|^2)))$。梯度乘以度量因子 $(1-\|x\|^2)^2/4$ 即可。实现为 elementwise 缩放,$O(d)$。
31
+ - **Grassmann 流形上的子空间学习**:将低秩子空间视为 Grassmann 流形上的点,用黎曼 SGD 在线更新。比 SVD 更适合 streaming 数据。投影 $P = QQ^T$ 的更新通过 QR 分解实现,核心是 matmul + thin QR。
32
+
33
+ ## 工程可行性
34
+
35
+ - **主要操作**:黎曼梯度投影 = matmul($Q^T \nabla$ 得切空间分量);收缩映射 = matmul + 小矩阵求逆 / Newton-Schulz(纯 matmul);双曲度量 = elementwise。
36
+ - **GPU 友好度**:高(Newton-Schulz 正交化 = 纯 matmul 链)到中等(Cayley 映射需 $n \times n$ 矩阵求逆,$n$ 为层维度,$n \leq 1024$ 时 cuSOLVER 可行)。双曲嵌入的度量缩放是纯 elementwise。
37
+ - **复杂度**:Newton-Schulz 每步 $O(n^3)$(但 $n$ 为层维度,非模型总参数量);Cayley $O(n^3)$;双曲梯度 $O(d)$;Grassmann QR $O(nd^2)$。
38
+ - **低精度**:Newton-Schulz 在 bf16 下稳定(纯 matmul 迭代,不涉及除法/开方);Cayley 映射的求逆在 bf16 下可能失败(需 fp32);双曲度量在 $\|x\| \to 1$ 时分母趋零,需 clamp 防溢出。
39
+
40
+ ## 风险与失效条件
41
+
42
+ - **Cayley / 矩阵指数映射的求逆开销**:每步 $O(n^3)$ 矩阵求逆,层维度 $> 4096$ 时成为瓶颈。解决:改用 Newton-Schulz 正交化(纯 matmul)或 polar decomposition 的近似收缩。
43
+ - **双曲空间的数值溢出**:$\|x\| \to 1$ 时 $d(x,y) \to \infty$,度量因子 $(1-\|x\|^2)^{-2} \to \infty$,梯度爆炸。解决:clamp $\|x\| \leq 1 - \epsilon$($\epsilon \sim 10^{-5}$),或用 Lorentz 模型(数值更稳定的双曲参数化)。
44
+ - **收缩映射 vs. 指数映射**:收缩映射(retraction)是指数映射的一阶近似,大步长时精度下降。对学习率敏感的优化问题,可能需要真正的指数映射(更贵)。
45
+ - **非紧凑流形的无界性**:SPD 流形 / 双曲空间非紧,优化路径可能跑到无穷远。需加正则化或信赖域约束。
46
+ - **正交约束与 BatchNorm 冲突**:BatchNorm 的仿射变换破坏正交性。需在正交约束层后禁用 BN 的 scale/shift,或改用 GroupNorm。
47
+
48
+ ## 深入参考
49
+
50
+ - 蒸馏稿:references/books/matrix-analysis.md(§7.3 极分解、Newton-Schulz 迭代、§2.6 SVD 与正交因子)
51
+ - 原书:Horn & Johnson, *Matrix Analysis* 2nd Ed., Chapter 7 §7.3 (Polar Decomposition) + Absil, Mahony, Sepulchre, *Optimization Algorithms on Matrix Manifolds*, Princeton University Press, 2008
@@ -1,228 +1,39 @@
1
- # Mathematical Knowledge System Overview
1
+ # Knowledge Base Navigation
2
2
 
3
- ## Overview
3
+ > This file is the v3 knowledge base index, helping you find specific knowledge cards from problem types.
4
4
 
5
- The mathematical knowledge system is the structured framework of the discipline of mathematics, spanning from foundational concepts to cutting-edge subfields. It describes not only the hierarchical relationships among sub-disciplines, but also how mathematical methods complement and synergize across different problem domains.
5
+ ## Knowledge Base Structure
6
6
 
7
- This overview is designed to help you:
7
+ The knowledge base is organized by mathematical domain, with 7 domains and 31 knowledge cards. Each card contains: minimal definition, core formulas, applicable problems, AI design translation, engineering feasibility, risks and failure conditions.
8
8
 
9
- - Quickly locate the discipline and method area to which a mathematical problem belongs;
10
- - Understand the correspondence between the 16 thinking weapons in this project (15 weapons + math-research-activator) and mathematical sub-disciplines;
11
- - Build a holistic understanding from problem to tool, from concept to application.
9
+ | Domain | Directory | Cards | Typical Applications |
10
+ |--------|-----------|-------|---------------------|
11
+ | Matrix Analysis | `matrix-analysis/` | projection, spectral-decomposition, low-rank-approximation, positive-semidefinite, matrix-perturbation | LoRA, spectral normalization, condition number monitoring |
12
+ | Optimization | `optimization/` | lagrangian-duality, convex-optimization, constrained-optimization, riemannian-optimization, proximal-method | GAN minimax, weight constraints, Muon optimizer |
13
+ | Differential Geometry | `differential-geometry/` | manifold, tangent-space, metric-tensor, geodesic, curvature, connection | Natural gradient, manifold optimization, K-FAC |
14
+ | Lie Theory | `lie-theory/` | group-action, lie-group, lie-algebra, representation, equivariance | Equivariant networks, SO(3) parameterization, spherical harmonics |
15
+ | Topology | `topology/` | persistent-homology, euler-characteristic, fundamental-group | Topological regularization, latent space monitoring |
16
+ | Probability & Information | `probability/` | concentration-inequality, entropy, kl-divergence, information-bottleneck, fisher-information | VAE, knowledge distillation, generalization bounds |
17
+ | Information Geometry | `information-geometry/` | natural-gradient, fisher-metric | Natural gradient descent, Fisher-Rao metric |
12
18
 
13
- The development of mathematics has been jointly driven by logical reasoning, scientific needs, and cross-disciplinary applications.
19
+ ## From Problem to Knowledge Card
14
20
 
15
- ## 1. The Three Foundational Pillars of Mathematics
21
+ | Problem Type | Recommended Cards |
22
+ |-------------|-------------------|
23
+ | Need dimensionality reduction/compression | low-rank-approximation, projection |
24
+ | Need constrained optimization | constrained-optimization, lagrangian-duality |
25
+ | Need equivariance/symmetry | group-action, equivariance, representation |
26
+ | Need stable training | matrix-perturbation, positive-semidefinite, fisher-information |
27
+ | Need manifold parameterization | manifold, riemannian-optimization, tangent-space |
28
+ | Need information compression | information-bottleneck, entropy, kl-divergence |
29
+ | Need topological regularization | persistent-homology, euler-characteristic |
16
30
 
17
- The edifice of modern mathematics is built on **set theory** and **mathematical logic**. The three foundational disciplines are:
31
+ ## Relationship to Thinking Lenses
18
32
 
19
- ### Algebra
33
+ Thinking lenses (`../lenses/`) handle "what perspective to use"; the knowledge base provides "concrete mathematical tools." Typical chain:
20
34
 
21
- The study of numbers, structures, relationships, and symbolic operations.
35
+ ```
36
+ Lens diagnosis → Knowledge card provides tools → Design pattern translates to AI module
37
+ ```
22
38
 
23
- | Level | Content | Core Concepts |
24
- |-------|---------|--------------|
25
- | Elementary Algebra | Equations, inequalities, polynomial operations | Variables, identities, operation laws |
26
- | Advanced Algebra (Linear Algebra) | Vector spaces, linear transformations, matrices | Linear spaces, bases, dimension, eigenvalues |
27
- | Abstract Algebra | Groups, rings, fields | Algebraic structures, homomorphisms, isomorphisms |
28
- | Category Theory | Abstract theory of objects and morphisms | Functors, natural transformations, universal properties |
29
-
30
- ### Geometry
31
-
32
- The study of space, shape, structure, and their relationships.
33
-
34
- | Level | Content | Core Concepts |
35
- |-------|---------|--------------|
36
- | Euclidean Geometry | Plane and solid geometry | Points, lines, planes, angles, distances |
37
- | Analytic Geometry | Studying geometry via algebraic methods | Coordinate systems, equations, curves |
38
- | Non-Euclidean Geometry | Geometries with modified parallel postulates | Hyperbolic geometry, elliptic geometry |
39
- | Differential Geometry | Studying geometry via calculus | Curvature, geodesics, manifolds |
40
- | Fractal Geometry | Self-similar geometric structures | Fractal dimension, iterated function systems |
41
-
42
- ### Analysis
43
-
44
- The study of functions, limits, continuity, differentiation, and integration.
45
-
46
- | Level | Content | Core Concepts |
47
- |-------|---------|--------------|
48
- | Calculus | Limits, derivatives, integrals | Continuity, differentiability, integrability |
49
- | Mathematical Analysis | Rigorous limit theory | $\varepsilon$-$\delta$ language, uniform convergence |
50
- | Real Analysis | Measure theory, Lebesgue integration | Measure spaces, $L^p$ spaces |
51
- | Complex Analysis | Theory of complex functions | Analytic functions, residues, conformal mappings |
52
- | Functional Analysis | Analysis on infinite-dimensional spaces | Banach spaces, Hilbert spaces, operators |
53
- | Differential Equations | ODEs and PDEs | Existence, uniqueness, stability, numerical methods |
54
-
55
- ## 2. Major Branches
56
-
57
- ### 1. Number Theory
58
-
59
- The study of integer properties, such as prime distribution, congruences, and Diophantine equations.
60
-
61
- - **Elementary Number Theory**: Divisibility, congruences, primes
62
- - **Analytic Number Theory**: Using analytical methods for number-theoretic problems (e.g., the Prime Number Theorem)
63
- - **Algebraic Number Theory**: Using algebraic methods for number-theoretic problems (e.g., algebraic number fields)
64
- - **Geometric Number Theory**: Using geometric methods for number-theoretic problems
65
-
66
- ### 2. Probability & Statistics
67
-
68
- The study of random phenomena and data analysis, widely applied in finance, biology, and social sciences. Corresponding thinking weapons: **Probability & Statistics**, **Information Theory**, **Causal Inference**.
69
-
70
- - **Probability Theory**: Random variables, distributions, limit theorems → See **Probability & Statistics** (Kolmogorov axioms)
71
- - **Mathematical Statistics**: Parameter estimation, hypothesis testing, regression analysis → See **Probability & Statistics** (regression modeling, experimental design)
72
- - **Stochastic Processes**: Markov chains, Brownian motion, martingale theory
73
- - **Bayesian Statistics**: Priors, posteriors, MCMC → See **Information Theory** (maximum entropy principle)
74
-
75
- ### 3. Topology
76
-
77
- The study of invariant properties of spaces under continuous deformation. Corresponding thinking weapon: **Topological Thinking**.
78
-
79
- - **Point-Set Topology**: Open sets, closed sets, connectedness, compactness → See **Symmetry & Invariance** (invariant perspective)
80
- - **Algebraic Topology**: Homotopy, homology, cohomology → See **Topological Thinking** (fundamental group, Betti numbers)
81
- - **Differential Topology**: Manifolds, tangent spaces, differential forms
82
-
83
- ### 4. Discrete Mathematics
84
-
85
- Set theory, graph theory, mathematical logic, etc. — the mathematical foundation of computer science. Corresponding thinking weapons: **Algorithmic & Computational Thinking**, **Discrete & Combinatorial Thinking**.
86
-
87
- - **Set Theory**: Sets, relations, functions, cardinality, ordinals
88
- - **Graph Theory**: Graphs, paths, connectivity, coloring, network flows
89
- - **Mathematical Logic**: Propositional logic, predicate logic, computability → See **Axiomatic Thinking**, **Logical Deduction**
90
- - **Combinatorics**: Counting, permutations and combinations, generating functions → See **Discrete & Combinatorial Thinking**
91
- - **Algorithms & Complexity**: Sorting, searching, P/NP, decidability → See **Algorithmic & Computational Thinking**
92
-
93
- ### 5. Applied Mathematics Branches
94
-
95
- Applying mathematical methods to real-world problems. Corresponding thinking weapons: **Optimization**, **Information Theory**, **Game Theory**, **Algorithmic & Computational Thinking**, **Causal Inference**.
96
-
97
- - **Operations Research**: Linear programming, integer programming, dynamic programming, queueing theory → See **Optimization** (LP/IP/DP taxonomy), **Algorithmic & Computational Thinking** (solution algorithms)
98
- - **Control Theory**: System control, optimal control, robust control → See **Optimization** (optimal control as variational optimization)
99
- - **Information Theory**: Entropy, channel capacity, data compression, coding theory → See **Information Theory** (Shannon entropy, coding theorems)
100
- - **Game Theory**: Strategic interaction, equilibrium analysis, mechanism design → See **Game Theory** (Nash equilibrium, minimax)
101
- - **Causal Inference**: Causal graph models, intervention analysis, counterfactual reasoning → See **Causal Inference** (DAGs, do-calculus)
102
- - **Financial Mathematics**: Option pricing, risk management, stochastic calculus → See **Modeling** (Black-Scholes), **Probability & Statistics**
103
- - **Computational Mathematics**: Numerical analysis, finite elements, Monte Carlo methods → See **Algorithmic & Computational Thinking** (numerical algorithms)
104
- - **Mathematical Foundations of Machine Learning**: Optimization, statistical learning theory, kernel methods → See **Optimization**, **Probability & Statistics**, **Information Theory** (MDL/AIC)
105
-
106
- ## 3. Hierarchical Structure of the Knowledge System
107
-
108
- From a learning-path perspective, mathematical knowledge can be organized into levels:
109
-
110
- ### Foundation Level
111
-
112
- Number sense, logic and classification, arithmetic, and basic geometry.
113
-
114
- - Concepts and operations of numbers
115
- - Basic logical reasoning
116
- - Arithmetic operations (addition, subtraction, multiplication, division)
117
- - Basic geometric shapes and properties
118
-
119
- ### Algebra Level
120
-
121
- Variables, equations, functions, geometric proofs.
122
-
123
- - Algebraic expressions and equations
124
- - Function concepts and basic function families
125
- - Plane geometry proofs
126
- - Vectors and coordinates
127
-
128
- ### Synthesis Level
129
-
130
- Functions and derivatives, calculus, sequences, solid geometry, advanced probability and statistics.
131
-
132
- - Limits and continuity
133
- - Differentiation and integration
134
- - Sequences and series
135
- - Solid geometry
136
- - Probability distributions and statistical inference
137
-
138
- ### Frontier Level
139
-
140
- Mathematical analysis, advanced algebra, analytic/differential geometry, number theory, topology, etc.
141
-
142
- - Rigorous analytical theory ($\varepsilon$-$\delta$)
143
- - Abstract algebraic structures (groups, rings, fields)
144
- - Manifolds and differential geometry
145
- - Algebraic/analytic number theory
146
- - Point-set/algebraic topology
147
- - Functional analysis and operator theory
148
-
149
- ## 4. Levels of Mathematical Thinking Methods
150
-
151
- | Level | Thinking Method | Description |
152
- |-------|----------------|-------------|
153
- | Foundation | Logical deduction, inductive analogy | The basis of all mathematical thinking |
154
- | Method | Axiomatization, abstraction, modeling | Methods for constructing mathematical theories |
155
- | Tool | Optimization, transformation, probability & statistics | Tools for solving concrete problems |
156
- | Extension | Algorithms & computation, information theory, game theory, causal inference | Tools applied to computation, information, interaction, and causation |
157
- | Philosophy | Symmetry & invariance, topological thinking, discrete & combinatorial thinking | Philosophical perspectives for understanding structure and essence |
158
-
159
- ## 5. Connections Between Mathematics and Other Disciplines
160
-
161
- | Discipline | Mathematical Tools Used | Typical Applications |
162
- |-----------|------------------------|---------------------|
163
- | Physics | Calculus, linear algebra, group theory | Mechanics, quantum mechanics, relativity |
164
- | Computer Science | Discrete mathematics, graph theory, probability | Algorithm analysis, cryptography, AI |
165
- | Economics | Optimization, game theory, differential equations | Market equilibrium, pricing models |
166
- | Biology | Differential equations, statistics, graph theory | Population dynamics, systems biology |
167
- | Engineering | Differential equations, Fourier analysis, numerical methods | Control systems, signal processing |
168
- | Social Sciences | Statistics, game theory, network analysis | Social networks, decision analysis |
169
-
170
- ## 6. Mapping Thinking Weapons to Mathematical Branches
171
-
172
- The 16 thinking weapons in this project (15 specialized weapons + 1 math-research-activator auto-trigger entry point) do not exist in isolation; they form a complementary toolkit with mathematical branches. Below is a simplified mapping to help you find suitable mathematical methods directly from problem types. v2 also includes `references/books/*.md` × 7 volumes covering algebraic geometry / differential geometry / Lie theory / abstract algebra / matrix analysis / optimization / manifolds and other modern mathematical structures, activated on demand into algorithm design (see README "Three-Layer Progressive Disclosure").
173
-
174
- | Thinking Weapon | Corresponding Mathematical Branch | Typical Methods / Concepts |
175
- |----------------|----------------------------------|---------------------------|
176
- | 🧭 Math Research Activator | Meta-cognition, problem classification, modern math mapping | Diagnosis → Mapping → Routing → GPU Filtering, dual acceptance gates |
177
- | 📐 Axiomatic Thinking | Mathematical logic, set theory | Axiomatic systems, formal languages, consistency, independence |
178
- | 🧩 Abstraction | Algebra, category theory, topology | Abstract structures, isomorphisms, universal properties |
179
- | 🧠 Logical Deduction | Mathematical logic, proof theory | Propositional logic, predicate logic, inference rules |
180
- | 🌉 Modeling | Applied mathematics, statistics | Equation-based modeling, dimensional analysis, validation |
181
- | ⚖️ Optimization | Optimization theory, operations research | Convex optimization, KKT conditions, dynamic programming |
182
- | 🎲 Probability & Statistics | Probability theory, mathematical statistics | Random variables, hypothesis testing, regression analysis |
183
- | 🔄 Transformation | Analysis, generating functions | Fourier, Laplace, algebraic transformations |
184
- | ⚛️ Symmetry & Invariance | Group theory, geometry | Group actions, invariants, quotient spaces |
185
- | 📈 Induction & Analogy | Elementary mathematics, number theory | Inductive proofs, analogical reasoning, pattern recognition |
186
- | 🖥️ Algorithmic & Computational Thinking | Computation theory, discrete mathematics | Complexity, computability, algorithm paradigms |
187
- | 📡 Information Theory | Information theory, statistical learning | Entropy, mutual information, coding limits |
188
- | 🎯 Game Theory | Mathematical economics, mechanism design | Nash equilibrium, incentive compatibility, optimal strategy |
189
- | 🔗 Causal Inference | Causal inference, statistics | DAGs, do-calculus, intervention analysis |
190
- | 🌀 Topological Thinking | Topology, algebraic topology | Homotopy, homology, topological invariants |
191
- | 🧮 Discrete & Combinatorial Thinking | Combinatorics, graph theory | Pigeonhole principle, generating functions, enumeration |
192
-
193
- ## 7. How to Choose a Thinking Weapon
194
-
195
- When facing a problem, the most important first step is not "analyze hard," but "choose the right tool." Here is a selection guide:
196
-
197
- ### Quick Selection Guide
198
-
199
- | Core Problem Characteristic | Most Likely Suitable Thinking Weapon |
200
- |----------------------------|-------------------------------------|
201
- | Multi-party interaction; my optimum depends on others | 🎯 Game Theory |
202
- | Uncertainty / randomness | 🎲 Probability & Statistics |
203
- | Optimal choice under constraints | ⚖️ Optimization |
204
- | Difficult to handle from current perspective | 🔄 Transformation |
205
- | Need to extract essential structure | 🧩 Abstraction |
206
- | Need rigorous reasoning and verification | 🧠 Logical Deduction |
207
- | Need to discover patterns from experience | 📈 Induction & Analogy |
208
- | Need to build a predictive model | 🌉 Modeling |
209
- | Invariance amid change | ⚛️ Symmetry & Invariance |
210
- | Need executable steps | 🖥️ Algorithmic & Computational Thinking |
211
- | Counting / structure over finite objects | 🧮 Discrete & Combinatorial Thinking |
212
-
213
- ### Using the Activator
214
-
215
- If you are unsure which tool to use, simply invoke the math-research-activator via the `/ask` command. It will diagnose the problem, map to modern mathematical structures, recommend the 1–3 most suitable thinking weapons, and perform GPU feasibility filtering. When algorithm / kernel / model code appears in the workspace, the activator will also intervene automatically.
216
-
217
- ### Path
218
-
219
- v2 has removed the "research / life dual-path" and unified into a single research / algorithm path: preserving complete mathematical notation and derivations, and enforcing the GPU 8-dimension gate when used for algorithm / operator design.
220
-
221
- ## 8. How to Use This Overview
222
-
223
- - Start from the problem characteristics: determine whether it is "structural," "dynamic," "stochastic," "interactive," or "countable."
224
- - Consult the Quick Selection Guide or use the `/ask` command to find the closest thinking weapon.
225
- - Combined with the "Hierarchical Structure of the Knowledge System," judge whether the current problem is better suited to foundational approaches or frontier methods.
226
- - If the problem spans multiple categories, invoke multiple thinking weapons simultaneously — e.g., "Modeling + Optimization," "Probability + Causation," "Abstraction + Algorithms."
227
- - For algorithm / operator design problems, let the activator transfer modern mathematical structures (algebraic geometry / Lie theory / topology, etc.) into the design and pass them through the GPU 8-dimension gate.
228
- - When studying or reading literature, use this overview as an organizing framework to place scattered concepts into a unified knowledge map.
39
+ For deeper study, `../references/books/*.md` provides 7 book distillations.