math-skill 1.0.0 → 2.1.0

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 (87) hide show
  1. package/README.en-US.md +313 -0
  2. package/README.md +313 -278
  3. package/agents/math-critic.en.md +235 -0
  4. package/agents/math-critic.md +237 -203
  5. package/commands/abstraction.md +11 -34
  6. package/commands/algorithmic-thinking.md +11 -34
  7. package/commands/ask.md +18 -21
  8. package/commands/axiomatization.md +11 -34
  9. package/commands/causal-inference.md +11 -34
  10. package/commands/discrete-combinatorial.md +11 -34
  11. package/commands/game-theory.md +11 -34
  12. package/commands/induction-analogy.md +11 -34
  13. package/commands/information-theory.md +11 -34
  14. package/commands/logic-deduction.md +11 -34
  15. package/commands/modeling.md +11 -37
  16. package/commands/optimization.md +11 -33
  17. package/commands/probability-statistics.md +11 -36
  18. package/commands/symmetry-invariance.md +11 -34
  19. package/commands/topological-thinking.md +11 -33
  20. package/commands/transformation.md +11 -33
  21. package/knowledge-base/overview.en.md +228 -0
  22. package/knowledge-base/overview.md +230 -230
  23. package/package.json +73 -59
  24. package/references/agentic-workflow.en.md +53 -0
  25. package/references/agentic-workflow.md +55 -0
  26. package/references/books/abstract-algebra.md +124 -0
  27. package/references/books/algebraic-geometry-rising-sea.md +171 -0
  28. package/references/books/differential-geometry.md +140 -0
  29. package/references/books/matrix-analysis.md +146 -0
  30. package/references/books/micro-lie-theory.md +116 -0
  31. package/references/books/optimization-ml.md +164 -0
  32. package/references/books/smooth-manifolds.md +105 -0
  33. package/references/gpu-friendly-math.en.md +65 -0
  34. package/references/gpu-friendly-math.md +67 -0
  35. package/references/inspiration.en.md +113 -0
  36. package/{docs → references}/inspiration.md +2 -0
  37. package/skills/abstraction/SKILL.en.md +117 -0
  38. package/skills/abstraction/SKILL.md +121 -264
  39. package/skills/abstraction/original-texts.en.md +163 -0
  40. package/skills/algorithmic-thinking/SKILL.en.md +132 -0
  41. package/skills/algorithmic-thinking/SKILL.md +138 -371
  42. package/skills/algorithmic-thinking/original-texts.en.md +253 -0
  43. package/skills/axiomatization/SKILL.en.md +144 -0
  44. package/skills/axiomatization/SKILL.md +151 -213
  45. package/skills/axiomatization/original-texts.en.md +154 -0
  46. package/skills/causal-inference/SKILL.en.md +147 -0
  47. package/skills/causal-inference/SKILL.md +151 -374
  48. package/skills/causal-inference/original-texts.en.md +136 -0
  49. package/skills/discrete-combinatorial/SKILL.en.md +124 -0
  50. package/skills/discrete-combinatorial/SKILL.md +131 -286
  51. package/skills/discrete-combinatorial/original-texts.en.md +184 -0
  52. package/skills/game-theory/SKILL.en.md +117 -0
  53. package/skills/game-theory/SKILL.md +123 -318
  54. package/skills/game-theory/original-texts.en.md +131 -0
  55. package/skills/induction-analogy/SKILL.en.md +145 -0
  56. package/skills/induction-analogy/SKILL.md +152 -310
  57. package/skills/induction-analogy/original-texts.en.md +140 -0
  58. package/skills/information-theory/SKILL.en.md +134 -0
  59. package/skills/information-theory/SKILL.md +140 -242
  60. package/skills/information-theory/original-texts.en.md +127 -0
  61. package/skills/logic-deduction/SKILL.en.md +130 -0
  62. package/skills/logic-deduction/SKILL.md +135 -280
  63. package/skills/logic-deduction/original-texts.en.md +160 -0
  64. package/skills/math-research-activator/SKILL.en.md +132 -0
  65. package/skills/math-research-activator/SKILL.md +136 -0
  66. package/skills/math-research-activator/original-texts.en.md +105 -0
  67. package/skills/{meta-selector → math-research-activator}/original-texts.md +104 -104
  68. package/skills/modeling/SKILL.en.md +135 -0
  69. package/skills/modeling/SKILL.md +139 -318
  70. package/skills/modeling/original-texts.en.md +162 -0
  71. package/skills/optimization/SKILL.en.md +129 -0
  72. package/skills/optimization/SKILL.md +135 -292
  73. package/skills/optimization/original-texts.en.md +167 -0
  74. package/skills/probability-statistics/SKILL.en.md +146 -0
  75. package/skills/probability-statistics/SKILL.md +151 -312
  76. package/skills/probability-statistics/original-texts.en.md +191 -0
  77. package/skills/symmetry-invariance/SKILL.en.md +135 -0
  78. package/skills/symmetry-invariance/SKILL.md +139 -358
  79. package/skills/symmetry-invariance/original-texts.en.md +206 -0
  80. package/skills/topological-thinking/SKILL.en.md +124 -0
  81. package/skills/topological-thinking/SKILL.md +128 -273
  82. package/skills/topological-thinking/original-texts.en.md +134 -0
  83. package/skills/transformation/SKILL.en.md +120 -0
  84. package/skills/transformation/SKILL.md +124 -264
  85. package/skills/transformation/original-texts.en.md +204 -0
  86. package/docs/CLAUDE.md +0 -187
  87. package/skills/meta-selector/SKILL.md +0 -188
@@ -1,105 +1,105 @@
1
- # 武器选择器的思想来源 / Intellectual Sources for the Weapon Selector
2
-
3
- ## 问题分类与工具选择的传统 / The Tradition of Problem Classification and Tool Selection
4
-
5
- ### Pólya 的问题求解启发法 / Pólya's Problem-Solving Heuristics
6
-
7
- George Pólya (1887-1985) 在《怎样解题》(How to Solve It, 1945) 中提出了四步求解法,这是现代问题求解方法论的基础:
8
-
9
- 1. **理解问题** (Understanding the problem) — 你必须理解问题
10
- 2. **拟定方案** (Devising a plan) — 找出已知与未知之间的联系
11
- 3. **执行方案** (Carrying out the plan) — 检查每一步
12
- 4. **回顾检验** (Looking back) — 检查所得解答
13
-
14
- Pólya 的核心洞见:**不同类型的问题需要不同的解题策略**。他列举了数十种启发法(heuristic strategies),包括:
15
- - 如果不能解决提出的问题,尝试先解决某个相关的问题
16
- - 回到定义
17
- - 从特殊到一般,从一般到特殊
18
- - 考虑极端情况
19
- - 逆向推理
20
- - 画图
21
- - 引入辅助元素
22
-
23
- > "解题是一种实践技能,就像游泳一样——你可以通过模仿和练习来学习它。" —— Pólya
24
-
25
- Pólya 的启发法分类为我们的武器选择器提供了思想基础:**问题的核心特征(如"是否涉及不确定量""是否有对称性""能否分解为子问题")决定了最合适的解题方法**。
26
-
27
- ### Newell & Simon 的问题空间理论 / Newell & Simon's Problem Space Theory
28
-
29
- Allen Newell 和 Herbert A. Simon 在《人类问题求解》(Human Problem Solving, 1972) 中提出了问题空间理论:
30
-
31
- - **问题空间** (Problem Space):所有可能状态构成的集合,包含初始状态、目标状态和允许的操作
32
- - **搜索策略** (Search Strategy):在问题空间中从初始状态导航到目标状态的方法
33
- - **启发式搜索** (Heuristic Search):不是穷举所有状态,而是用启发规则选择最可能导向目标的方向
34
-
35
- 核心洞见:**问题空间的性质决定了搜索策略的选择**。如果问题空间很小,穷举可行;如果很大,必须用启发式;如果问题空间有特殊结构(如单调性、对称性),可以利用结构加速搜索。
36
-
37
- > "选择搜索策略是问题求解中最关键的决策——策略决定了你将在问题空间中的哪个区域搜索。" —— Newell & Simon
38
-
39
- ### Schoenfeld 的策略选择理论 / Schoenfeld's Strategic Decision Theory
40
-
41
- Alan H. Schoenfeld 在《数学问题求解》(Mathematical Problem Solving, 1985) 中分析了为什么学生即使掌握了解题工具也无法解决问题——关键不是缺少工具,而是缺少**策略选择能力**:
42
-
43
- - **资源** (Resources):知识、技能、工具——相当于我们的15种思想武器
44
- - **启发法** (Heuristics):如何使用资源——相当于每种思想武器的方法流程
45
- - **控制** (Control):何时使用哪个资源——相当于武器选择器的功能
46
- - **信念系统** (Belief Systems):对数学和自我的信念——影响是否选择合适的工具
47
-
48
- 核心洞见:**掌握工具≠能解决问题。关键差异在于'控制'层面——知道何时调用哪个工具**。这正是武器选择器要解决的问题。
49
-
50
- > "学生的问题不是缺乏知识或技能,而是缺乏策略性决策能力——他们不知道何时该用什么方法。" —— Schoenfeld
51
-
52
- ### Rittel & Webber 的棘问题理论 / Wicked Problems Theory
53
-
54
- Horst Rittel 和 Melvin Webber 在 "Dilemmas in a General Theory of Planning" (1973) 中区分了"驯问题"(tame problems) 和"棘问题"(wicked problems):
55
-
56
- 驯问题的特征:
57
- - 有明确的定义
58
- - 有明确的终止条件
59
- - 解可以客观评价为对或错
60
- - 属于特定领域
61
-
62
- 棘问题的特征:
63
- - 没有明确的定义——理解问题本身就是解决问题的一部分
64
- - 没有明确的终止条件
65
- - 解没有对错之分,只有好与更好
66
- - 跨越多个领域
67
-
68
- 核心洞见:**棘问题需要跨领域的思想武器组合,而驯问题可以用单一工具解决**。武器选择器在面对棘问题时推荐多工具组合,面对驯问题时推荐单一聚焦。
69
-
70
- > "棘问题没有对错答案,只有更好或更差的处理方式。" —— Rittel & Webber
71
-
72
- ### Kahneman 的双系统理论 / Kahneman's Dual-System Theory
73
-
74
- Daniel Kahneman 在《思考,快与慢》(Thinking, Fast and Slow, 2011) 中提出了双系统理论:
75
-
76
- - **系统1** (System 1):快速、直觉、自动——日常生活中大部分决策
77
- - **系统2** (System 2):慢速、理性、可控——需要深思熟虑的决策
78
-
79
- 核心洞见:**不是所有问题都需要系统2级别的理性分析**。生活中的许多决策只需要直觉(系统1),强行调用思想武器是过度分析。武器选择器的"不适用场景"清单正是基于这个洞见——简单问题不需要工具,棘问题才需要。
80
-
81
- > "过度思考是决策的敌人——有些决定最好交给直觉。" —— Kahneman
82
-
83
- ### Lakatos 的方法论 / Lakatos's Methodology
84
-
85
- Imre Lakatos 在《证明与反驳》(Proofs and Refutations, 1976) 中展示了数学知识不是线性增长的,而是通过"猜想→反驳→修正"的辩证过程演进:
86
-
87
- - **进步的问题转换** (Progressive Problemshift):每次修正产生新的、更深刻的问题
88
- - **退化的问题转换** (Degenerative Problemshift):修正只是为了应付反例,没有产生新洞见
89
-
90
- 核心洞见:**工具选择本身也应该是一个进步的问题转换**——第一次选择可能不理想,但通过使用后反思,选择能力逐步提升。武器选择器的"组合顺序"和"辅助视角"推荐正是这种辩证思维的体现。
91
-
92
- > "知识不是从天而降的真理,而是在批评与反驳中不断改进的猜想。" —— Lakatos
93
-
94
- ## 从思想到实践的映射 / Mapping Ideas to Practice
95
-
96
- 我们的武器选择器融合了以上思想:
97
-
98
- | 思想来源 | 在武器选择器中的体现 |
99
- |---------|-------------------|
100
- | Pólya 启发法 | 决策树中的11个特征分支——每个分支对应一类启发策略 |
101
- | Newell & Simon 问题空间 | 问题特征维度刻画——互动性、不确定性、约束性、结构性、动态性 |
102
- | Schoenfeld 策略选择 | "选对工具比用力分析更重要"的核心原则 |
103
- | 棘问题理论 | 多工具组合推荐——棘问题需要跨领域工具组合 |
104
- | Kahneman 双系统 | "不适用场景"——简单问题不需要工具,避免过度分析 |
1
+ # 武器选择器的思想来源 / Intellectual Sources for the Weapon Selector
2
+
3
+ ## 问题分类与工具选择的传统 / The Tradition of Problem Classification and Tool Selection
4
+
5
+ ### Pólya 的问题求解启发法 / Pólya's Problem-Solving Heuristics
6
+
7
+ George Pólya (1887-1985) 在《怎样解题》(How to Solve It, 1945) 中提出了四步求解法,这是现代问题求解方法论的基础:
8
+
9
+ 1. **理解问题** (Understanding the problem) — 你必须理解问题
10
+ 2. **拟定方案** (Devising a plan) — 找出已知与未知之间的联系
11
+ 3. **执行方案** (Carrying out the plan) — 检查每一步
12
+ 4. **回顾检验** (Looking back) — 检查所得解答
13
+
14
+ Pólya 的核心洞见:**不同类型的问题需要不同的解题策略**。他列举了数十种启发法(heuristic strategies),包括:
15
+ - 如果不能解决提出的问题,尝试先解决某个相关的问题
16
+ - 回到定义
17
+ - 从特殊到一般,从一般到特殊
18
+ - 考虑极端情况
19
+ - 逆向推理
20
+ - 画图
21
+ - 引入辅助元素
22
+
23
+ > "解题是一种实践技能,就像游泳一样——你可以通过模仿和练习来学习它。" —— Pólya
24
+
25
+ Pólya 的启发法分类为我们的武器选择器提供了思想基础:**问题的核心特征(如"是否涉及不确定量""是否有对称性""能否分解为子问题")决定了最合适的解题方法**。
26
+
27
+ ### Newell & Simon 的问题空间理论 / Newell & Simon's Problem Space Theory
28
+
29
+ Allen Newell 和 Herbert A. Simon 在《人类问题求解》(Human Problem Solving, 1972) 中提出了问题空间理论:
30
+
31
+ - **问题空间** (Problem Space):所有可能状态构成的集合,包含初始状态、目标状态和允许的操作
32
+ - **搜索策略** (Search Strategy):在问题空间中从初始状态导航到目标状态的方法
33
+ - **启发式搜索** (Heuristic Search):不是穷举所有状态,而是用启发规则选择最可能导向目标的方向
34
+
35
+ 核心洞见:**问题空间的性质决定了搜索策略的选择**。如果问题空间很小,穷举可行;如果很大,必须用启发式;如果问题空间有特殊结构(如单调性、对称性),可以利用结构加速搜索。
36
+
37
+ > "选择搜索策略是问题求解中最关键的决策——策略决定了你将在问题空间中的哪个区域搜索。" —— Newell & Simon
38
+
39
+ ### Schoenfeld 的策略选择理论 / Schoenfeld's Strategic Decision Theory
40
+
41
+ Alan H. Schoenfeld 在《数学问题求解》(Mathematical Problem Solving, 1985) 中分析了为什么学生即使掌握了解题工具也无法解决问题——关键不是缺少工具,而是缺少**策略选择能力**:
42
+
43
+ - **资源** (Resources):知识、技能、工具——相当于我们的15种思想武器
44
+ - **启发法** (Heuristics):如何使用资源——相当于每种思想武器的方法流程
45
+ - **控制** (Control):何时使用哪个资源——相当于武器选择器的功能
46
+ - **信念系统** (Belief Systems):对数学和自我的信念——影响是否选择合适的工具
47
+
48
+ 核心洞见:**掌握工具≠能解决问题。关键差异在于'控制'层面——知道何时调用哪个工具**。这正是武器选择器要解决的问题。
49
+
50
+ > "学生的问题不是缺乏知识或技能,而是缺乏策略性决策能力——他们不知道何时该用什么方法。" —— Schoenfeld
51
+
52
+ ### Rittel & Webber 的棘问题理论 / Wicked Problems Theory
53
+
54
+ Horst Rittel 和 Melvin Webber 在 "Dilemmas in a General Theory of Planning" (1973) 中区分了"驯问题"(tame problems) 和"棘问题"(wicked problems):
55
+
56
+ 驯问题的特征:
57
+ - 有明确的定义
58
+ - 有明确的终止条件
59
+ - 解可以客观评价为对或错
60
+ - 属于特定领域
61
+
62
+ 棘问题的特征:
63
+ - 没有明确的定义——理解问题本身就是解决问题的一部分
64
+ - 没有明确的终止条件
65
+ - 解没有对错之分,只有好与更好
66
+ - 跨越多个领域
67
+
68
+ 核心洞见:**棘问题需要跨领域的思想武器组合,而驯问题可以用单一工具解决**。武器选择器在面对棘问题时推荐多工具组合,面对驯问题时推荐单一聚焦。
69
+
70
+ > "棘问题没有对错答案,只有更好或更差的处理方式。" —— Rittel & Webber
71
+
72
+ ### Kahneman 的双系统理论 / Kahneman's Dual-System Theory
73
+
74
+ Daniel Kahneman 在《思考,快与慢》(Thinking, Fast and Slow, 2011) 中提出了双系统理论:
75
+
76
+ - **系统1** (System 1):快速、直觉、自动——日常生活中大部分决策
77
+ - **系统2** (System 2):慢速、理性、可控——需要深思熟虑的决策
78
+
79
+ 核心洞见:**不是所有问题都需要系统2级别的理性分析**。生活中的许多决策只需要直觉(系统1),强行调用思想武器是过度分析。武器选择器的"不适用场景"清单正是基于这个洞见——简单问题不需要工具,棘问题才需要。
80
+
81
+ > "过度思考是决策的敌人——有些决定最好交给直觉。" —— Kahneman
82
+
83
+ ### Lakatos 的方法论 / Lakatos's Methodology
84
+
85
+ Imre Lakatos 在《证明与反驳》(Proofs and Refutations, 1976) 中展示了数学知识不是线性增长的,而是通过"猜想→反驳→修正"的辩证过程演进:
86
+
87
+ - **进步的问题转换** (Progressive Problemshift):每次修正产生新的、更深刻的问题
88
+ - **退化的问题转换** (Degenerative Problemshift):修正只是为了应付反例,没有产生新洞见
89
+
90
+ 核心洞见:**工具选择本身也应该是一个进步的问题转换**——第一次选择可能不理想,但通过使用后反思,选择能力逐步提升。武器选择器的"组合顺序"和"辅助视角"推荐正是这种辩证思维的体现。
91
+
92
+ > "知识不是从天而降的真理,而是在批评与反驳中不断改进的猜想。" —— Lakatos
93
+
94
+ ## 从思想到实践的映射 / Mapping Ideas to Practice
95
+
96
+ 我们的武器选择器融合了以上思想:
97
+
98
+ | 思想来源 | 在武器选择器中的体现 |
99
+ |---------|-------------------|
100
+ | Pólya 启发法 | 决策树中的11个特征分支——每个分支对应一类启发策略 |
101
+ | Newell & Simon 问题空间 | 问题特征维度刻画——互动性、不确定性、约束性、结构性、动态性 |
102
+ | Schoenfeld 策略选择 | "选对工具比用力分析更重要"的核心原则 |
103
+ | 棘问题理论 | 多工具组合推荐——棘问题需要跨领域工具组合 |
104
+ | Kahneman 双系统 | "不适用场景"——简单问题不需要工具,避免过度分析 |
105
105
  | Lakatos 方法论 | 组合顺序建议——先用主工具,再用辅助工具补充视角 |
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: modeling
3
+ description: |
4
+ Trigger when translating real-world problems into mathematics (reality->math->interpretation), building predictive/explanatory models, performing dimensional analysis and model selection, or establishing computable models for algorithms/operators/structures.
5
+ ---
6
+
7
+ # Modeling
8
+
9
+ > "Transforming real-world problems into mathematical problems, solving them mathematically to explain and predict reality. All models are wrong, but some are useful."
10
+ >
11
+ > -- Applied Mathematics, Mathematical Modeling
12
+
13
+ ## Core Principle
14
+
15
+ **A model is a simplified representation of reality, not reality itself. A good model is not one that is "true," but one that makes accurate predictions within its domain of applicability.**
16
+
17
+ The golden cycle of modeling: (1) **Real-world problem -> Mathematical problem** (translation); (2) **Mathematical problem -> Mathematical solution** (solving); (3) **Mathematical solution -> Real-world interpretation** (back-translation); (4) **Real-world interpretation -> Experimental validation** (verification).
18
+
19
+ > **Mathematical Formalization**
20
+ >
21
+ > **Dimensional Analysis & Buckingham Pi Theorem**: Before constructing equations, one must verify dimensional consistency. If a system involves $n$ physical quantities spanning $m$ fundamental dimensions, one can construct $k=n-m$ dimensionless Pi terms, thereby reducing the number of variables and simplifying the equations; dimensionally inconsistent equations are physically inadmissible.
22
+ >
23
+ > **Model Specification**: Let the system output be $y$, with inputs $x_1,\dots,x_p$, and model $y=f(x_1,\dots,x_p;\theta)+\varepsilon$, where $f$ is the model function, $\theta$ is the parameter vector, and $\varepsilon$ is the error term. Model selection amounts to choosing the bias-variance-optimal $f$ from a candidate set $\{f_1,f_2,\dots\}$.
24
+
25
+ ## GPU-Friendliness (Cross-Cutting Check)
26
+
27
+ When a model is used for **algorithm/operator/training design**, model selection and parameterization directly determine GPU viability -- pass the eight-dimensional gate in `../../references/gpu-friendly-math.md`:
28
+
29
+ - **Linear / GEMM-compatible parameterization**: $y=f(x;\theta)$ where $f$ can be expressed as dense tensor algebra or a chain of matrix multiplications (linear regression, MLP) -- friendly, fully utilizes Tensor Cores.
30
+ - **Low-rank parameterization**: $\theta$ uses low-rank / block structure instead of dense representation -- memory-friendly, compressible (see `../../references/books/matrix-analysis.md`).
31
+ - **Operator splitting / block parallelism**: PDE/ODE models decomposed by spatial/temporal blocks, serial recurrence converted to parallel scan -- amenable to adaptation.
32
+ - **Anti-patterns**: Model requires $O(n^2)$ dense global operations (naive full attention), data-dependent branching / scalar loops, ill-conditioned numerics requiring fp64, non-differentiable operations requiring discrete search -- "beautiful but incomputable"; switch to a tensorizable, fusible, numerically stable equivalent parameterization.
33
+
34
+ Eight-dimensional minimum assessment (formal terms): **Tensorization** -- whether model equations can be evaluated in batch; **GEMM-mappability** -- whether the parameterization can be expressed as matrix multiplication / convolution / low-rank factors; **Complexity** -- growth of state dimension, time steps, interaction terms; **Memory & KV-Cache** -- whether hidden states, activations, and caches can be compressed; **Low-precision stability** -- whether equations are ill-conditioned or require fp64; **Parallelism & communication** -- whether the dynamical system can be decomposed into blocks / scans; **Sparse structure** -- whether the coupling graph is structured; **Operator fusion** -- whether model updates and loss computation can be fused.
35
+
36
+ > Cross-reference `../../references/books/optimization-ml.md` (model parameterization and training), `matrix-analysis.md` (low-rank, condition number, compression).
37
+
38
+ ## When NOT to Use
39
+
40
+ - **The problem cannot be quantified or structured** -- modeling requires well-defined variables and relationships.
41
+ - **Only qualitative understanding is needed** (e.g., "roughly how does this phenomenon work") -- modeling would be overly precise.
42
+ - **Fundamental data is lacking** -- a model without data is merely conjecture.
43
+
44
+ ## When to Use
45
+
46
+ - When a real-world problem needs to be precisely formulated in mathematical language (reality -> math -> interpretation).
47
+ - Building predictive / explanatory models to interpret experimental data or predict new phenomena.
48
+ - Understanding interactions and sensitivities among factors in complex systems.
49
+ - Performing dimensional analysis, model selection (AIC/BIC/CV), and sensitivity analysis.
50
+ - **Establishing computable models for algorithms/operators/structures** and evaluating the GPU viability of their parameterizations.
51
+
52
+ ## Method
53
+
54
+ ### Step 1: Define the Real-World Problem
55
+ Describe the problem to be solved in the clearest possible language. Key questions: What are the **inputs** of the system? What are the **outputs**? Is the goal prediction, explanation, or optimization? Without clear direction, modeling goes astray.
56
+
57
+ ### Step 2: State Assumptions
58
+ This is the most critical and most perilous step in modeling. All models require simplification, but one must **explicitly document every assumption**: Which factors are important and which can be neglected? Is the system deterministic or stochastic? Static or dynamic? Are variable relationships linear or nonlinear? Every assumption must be justified.
59
+
60
+ ### Step 3: Establish Mathematical Structure / Dimensional Analysis
61
+ Choose a mathematical framework based on the assumptions:
62
+
63
+ | Phenomenon Characteristics | Mathematical Framework |
64
+ |---|---|
65
+ | Causal relationships among variables | ODE/PDE (ordinary/partial differential equations) |
66
+ | Spatial distribution and propagation | Partial differential equations (heat conduction, wave, diffusion) |
67
+ | Relationships among discrete objects | Graph theory |
68
+ | Decision-making under uncertainty | Probabilistic models |
69
+ | Resource allocation | Optimization models |
70
+ | Population behavior and interactions | Statistical models / Markov chains / Agent-based models |
71
+ | Classification and prediction | Function approximation / Regression |
72
+
73
+ Before constructing equations, one must verify dimensional consistency and construct $k=n-m$ dimensionless Pi terms to reduce variables and simplify equations; dimensionally inconsistent equations are physically inadmissible.
74
+
75
+ ### Step 4: Solve
76
+ Solve the model using mathematical methods: **analytical solutions** (exact but possibly nonexistent), **numerical solutions** (approximate but always obtainable), **qualitative analysis** (seeking properties such as stability and monotonicity rather than explicit solutions).
77
+
78
+ ### Step 5: Interpret and Validate
79
+ Translate the mathematical solution back into real-world language; compare with existing data or experimental results; perform sanity checks to verify whether predictions are reasonable. Conclusions inconsistent with reality are invalid no matter how "elegant" they may be.
80
+
81
+ ### Step 6: Sensitivity Analysis and Model Selection
82
+ **Sensitivity analysis**: If a small perturbation in a parameter causes a large change in output, that parameter is sensitive and its precision must be carefully controlled.
83
+ **Bias-variance trade-off**: Simple models have high bias and low variance (underfitting); complex models have low bias and high variance (overfitting); the optimal model strikes a balance between the two.
84
+ **Model selection criteria**: AIC $= -2\log L + 2k$ (favors slightly more complex models, suitable for prediction); BIC $= -2\log L + k\log n$ (heavier penalty, favors parsimony, suitable for explanation); Cross-validation (CV) evaluates out-of-sample predictive performance and guards against overfitting.
85
+
86
+ ### Step 7: Iterate and Improve
87
+ Models almost always require refinement. If predictions conflict with evidence: Which assumption is at fault? Should new factors be introduced? Should the mathematical framework be changed? When predictions disagree with reality, the response is not to abandon modeling but to revise the model.
88
+
89
+ ### Step 8: Declare Scope of Applicability
90
+ Explicitly state the conditions under which the model is valid and those under which it fails. All models have boundaries -- a scope-of-applicability declaration is the model's "expiration label" and is the key safeguard against misuse.
91
+
92
+ ## Common Errors
93
+
94
+ | Error | Critique | Correct Approach |
95
+ |---|---|---|
96
+ | Overfitting | Model is too complex, fitting noise rather than signal | Apply Occam's razor: do not multiply entities beyond necessity |
97
+ | Underfitting | Model is too simple to capture key phenomena | Inspect residual patterns to identify missing factors |
98
+ | Ignoring assumption validity | Assumptions are made for mathematical convenience rather than physical plausibility | Every assumption must be grounded in real-world justification |
99
+ | Extrapolating beyond the domain of applicability | Model is valid only within a certain range; beyond it, predictions fail | Explicitly declare the model's scope of applicability |
100
+ | Confusing correlation with causation | Relationships in a model do not imply causation | Distinguish descriptive models from causal models |
101
+ | Forgetting validation | Using a model immediately after construction without checking predictions | Validate with independent data |
102
+ | Ignoring dimensional consistency | Dimensions on both sides of an equation do not match; physically inadmissible | Perform dimensional analysis before constructing equations; construct dimensionless Pi terms |
103
+ | Selecting models based only on in-sample fit | In-sample error underestimates true prediction error | Use AIC/BIC or cross-validation to assess out-of-sample performance |
104
+ | Neglecting sensitivity analysis | Not knowing which parameters drive the results | Perform sensitivity analysis on key parameters and focus on sensitive ones |
105
+ | Confusing validation with model selection | Validation tests a given model; selection compares among candidates | First select a model using AIC/BIC/CV, then validate with independent data |
106
+ | Excessively complex model leading to incomputability | Parameterization cannot be tensorized / GEMM-mapped; $O(n^2)$ memory explosion | Choose a tensorizable, fusible, numerically stable equivalent parameterization; pass the GPU eight-dimensional gate |
107
+
108
+ ## Operating Procedure
109
+
110
+ When this skill is triggered, the output must include:
111
+
112
+ 1. **Problem definition**: A one-sentence description of the real-world problem to be solved
113
+ 2. **Assumption list**: `[Assumption N]: [Content] (Plausibility: High/Medium/Low)`
114
+ 3. **Dimensional check**: Perform dimensional analysis on key physical quantities and construct dimensionless Pi terms
115
+ 4. **Model selection**: `[Framework]: [Choice] because [Reason]`
116
+ 5. **Variable definitions**: Define all variables, parameters, and their physical meanings
117
+ 6. **Solution approach**: Specify the solving method (analytical / numerical / qualitative)
118
+ 7. **Sensitivity analysis**: Identify sensitive parameters and assess their impact on the output
119
+ 8. **Model selection criteria**: If candidate models exist, compare them using AIC/BIC/CV and select the best
120
+ 9. **Validation plan**: How will the model's validity be tested?
121
+ 10. **Scope of applicability**: Explicitly state the conditions under which the model is valid and those under which it fails
122
+ 11. **[GPU viability]** (if used for algorithm/operator/structure): Whether the model parameterization is tensorizable / GEMM-mappable, whether complexity and memory are acceptable; pass the eight-dimensional gate in `../../references/gpu-friendly-math.md`; label as friendly / retrofittable / unfriendly, with adaptation recommendations.
123
+
124
+ **Output must not consist of analysis alone without conclusions.**
125
+
126
+ ## Relations to Other Skills
127
+
128
+ - **Axiomatic thinking**: The assumptions of a model are analogous to axioms; their consistency must be verified.
129
+ - **Abstraction**: Modeling is an application of abstraction -- abstracting from reality to a mathematical structure.
130
+ - **Optimization**: The objective function of many models is itself an optimization problem.
131
+ - **Probability and statistics**: Modeling uncertainty requires the tools of probability theory.
132
+ - **Transformation**: Solving a model often requires transforming it into a more tractable representation.
133
+ - **Algorithmic thinking**: Computational models (agent-based, cellular automata) employ algorithms as the modeling framework.
134
+ - **Causal inference**: Causal models (DAGs, structural causal models) explicitly distinguish causation from correlation.
135
+ - **Modern mathematics activation**: `../../references/books/smooth-manifolds.md` (manifold constraints / latent-space geometry), `../../references/books/differential-geometry.md` (metrics / curvature), `../../references/books/optimization-ml.md` (parameterization and training).