math-skill 2.0.1 → 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.
- package/README.en-US.md +40 -7
- package/README.md +40 -7
- package/agents/math-critic.en.md +235 -0
- package/agents/math-critic.md +2 -0
- package/commands/abstraction.md +1 -3
- package/commands/algorithmic-thinking.md +1 -3
- package/commands/ask.md +1 -3
- package/commands/axiomatization.md +1 -3
- package/commands/causal-inference.md +1 -3
- package/commands/discrete-combinatorial.md +1 -3
- package/commands/game-theory.md +1 -3
- package/commands/induction-analogy.md +1 -3
- package/commands/information-theory.md +1 -3
- package/commands/logic-deduction.md +1 -3
- package/commands/modeling.md +1 -3
- package/commands/optimization.md +1 -3
- package/commands/probability-statistics.md +1 -3
- package/commands/symmetry-invariance.md +1 -3
- package/commands/topological-thinking.md +1 -3
- package/commands/transformation.md +1 -3
- package/knowledge-base/overview.en.md +228 -0
- package/knowledge-base/overview.md +2 -0
- package/package.json +4 -2
- package/references/agentic-workflow.en.md +53 -0
- package/references/agentic-workflow.md +2 -0
- package/references/books/abstract-algebra.md +4 -0
- package/references/books/algebraic-geometry-rising-sea.md +4 -0
- package/references/books/differential-geometry.md +4 -0
- package/references/books/matrix-analysis.md +4 -0
- package/references/books/micro-lie-theory.md +4 -0
- package/references/books/optimization-ml.md +4 -0
- package/references/books/smooth-manifolds.md +4 -0
- package/references/gpu-friendly-math.en.md +65 -0
- package/references/gpu-friendly-math.md +2 -0
- package/references/inspiration.en.md +113 -0
- package/references/inspiration.md +2 -0
- package/skills/abstraction/SKILL.en.md +117 -0
- package/skills/abstraction/SKILL.md +2 -0
- package/skills/abstraction/original-texts.en.md +163 -0
- package/skills/algorithmic-thinking/SKILL.en.md +132 -0
- package/skills/algorithmic-thinking/SKILL.md +2 -0
- package/skills/algorithmic-thinking/original-texts.en.md +253 -0
- package/skills/axiomatization/SKILL.en.md +144 -0
- package/skills/axiomatization/SKILL.md +2 -0
- package/skills/axiomatization/original-texts.en.md +154 -0
- package/skills/causal-inference/SKILL.en.md +147 -0
- package/skills/causal-inference/SKILL.md +2 -0
- package/skills/causal-inference/original-texts.en.md +136 -0
- package/skills/discrete-combinatorial/SKILL.en.md +124 -0
- package/skills/discrete-combinatorial/SKILL.md +2 -0
- package/skills/discrete-combinatorial/original-texts.en.md +184 -0
- package/skills/game-theory/SKILL.en.md +117 -0
- package/skills/game-theory/SKILL.md +2 -0
- package/skills/game-theory/original-texts.en.md +131 -0
- package/skills/induction-analogy/SKILL.en.md +145 -0
- package/skills/induction-analogy/SKILL.md +2 -0
- package/skills/induction-analogy/original-texts.en.md +140 -0
- package/skills/information-theory/SKILL.en.md +134 -0
- package/skills/information-theory/SKILL.md +2 -0
- package/skills/information-theory/original-texts.en.md +127 -0
- package/skills/logic-deduction/SKILL.en.md +130 -0
- package/skills/logic-deduction/SKILL.md +2 -0
- package/skills/logic-deduction/original-texts.en.md +160 -0
- package/skills/math-research-activator/SKILL.en.md +132 -0
- package/skills/math-research-activator/SKILL.md +2 -0
- package/skills/math-research-activator/original-texts.en.md +105 -0
- package/skills/modeling/SKILL.en.md +135 -0
- package/skills/modeling/SKILL.md +2 -0
- package/skills/modeling/original-texts.en.md +162 -0
- package/skills/optimization/SKILL.en.md +129 -0
- package/skills/optimization/SKILL.md +2 -0
- package/skills/optimization/original-texts.en.md +167 -0
- package/skills/probability-statistics/SKILL.en.md +146 -0
- package/skills/probability-statistics/SKILL.md +2 -0
- package/skills/probability-statistics/original-texts.en.md +191 -0
- package/skills/symmetry-invariance/SKILL.en.md +135 -0
- package/skills/symmetry-invariance/SKILL.md +2 -0
- package/skills/symmetry-invariance/original-texts.en.md +206 -0
- package/skills/topological-thinking/SKILL.en.md +124 -0
- package/skills/topological-thinking/SKILL.md +2 -0
- package/skills/topological-thinking/original-texts.en.md +134 -0
- package/skills/transformation/SKILL.en.md +120 -0
- package/skills/transformation/SKILL.md +2 -0
- package/skills/transformation/original-texts.en.md +204 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Mathematical Sources and Classic Texts
|
|
2
|
+
|
|
3
|
+
## Group Theory (Galois, 1830s)
|
|
4
|
+
|
|
5
|
+
**Evariste Galois** (1811-1832), on the eve of his death in a duel at age 20, founded group theory:
|
|
6
|
+
|
|
7
|
+
> "Whether an equation can be solved by radicals depends on the structure of the permutation group of its roots."
|
|
8
|
+
|
|
9
|
+
**Definition of a group**: A set G equipped with a binary operation · satisfying:
|
|
10
|
+
1. **Closure**: For all a,b in G, a·b is in G
|
|
11
|
+
2. **Associativity**: For all a,b,c in G, (a·b)·c = a·(b·c)
|
|
12
|
+
3. **Identity element**: There exists e in G such that for all a in G, e·a = a·e = a
|
|
13
|
+
4. **Inverse element**: For all a in G, there exists a^(-1) in G such that a·a^(-1) = a^(-1)·a = e
|
|
14
|
+
|
|
15
|
+
**A group is the mathematical language of symmetry.**
|
|
16
|
+
|
|
17
|
+
## Fundamental Theorem of Galois Theory
|
|
18
|
+
|
|
19
|
+
The heart of Galois theory is the following profound correspondence:
|
|
20
|
+
|
|
21
|
+
> Given a field extension L/K, if L is a Galois extension of K, then there is an order-reversing bijection between subgroups of the Galois group Gal(L/K) and intermediate fields between K and L.
|
|
22
|
+
|
|
23
|
+
This reveals **a deep duality between algebraic structure (groups) and field structure (field extensions)**:
|
|
24
|
+
- Subgroup H corresponds to the fixed field L^H
|
|
25
|
+
- Normal subgroup corresponds to a Galois sub-extension
|
|
26
|
+
- Index of a subgroup corresponds to the degree of the intermediate field
|
|
27
|
+
|
|
28
|
+
**Historical significance**: This correspondence transforms "solvability of equations" into "solvability of groups" -- solvable groups correspond to equations solvable by radicals, thereby completely resolving the question of why equations of degree five and above cannot be solved by radicals.
|
|
29
|
+
|
|
30
|
+
## Klein's Erlangen Program (1872)
|
|
31
|
+
|
|
32
|
+
> "A geometry is the study of invariants under the action of a transformation group."
|
|
33
|
+
|
|
34
|
+
Klein proposed using group theory to unify the various geometries:
|
|
35
|
+
- Euclidean geometry = invariants under isometric transformations
|
|
36
|
+
- Affine geometry = invariants under affine transformations
|
|
37
|
+
- Projective geometry = invariants under projective transformations
|
|
38
|
+
|
|
39
|
+
**Far-reaching impact**: The Erlangen Program not only unified the geometries of its time, but also anticipated the central 20th-century idea that "structure determines geometry" -- from topology to differential geometry, all can be subsumed under the framework of "group + invariants."
|
|
40
|
+
|
|
41
|
+
## Lie Groups and Lie Algebras (1870s)
|
|
42
|
+
|
|
43
|
+
**Sophus Lie** (1842-1899) extended Galois's finite group ideas to continuous transformation groups:
|
|
44
|
+
|
|
45
|
+
> "Continuous symmetries are captured by infinitesimal generators; the Lie algebra is the local linearization of the Lie group."
|
|
46
|
+
|
|
47
|
+
Key concepts:
|
|
48
|
+
- **Lie group**: A structure that is simultaneously a group and a smooth manifold (e.g., SO(n), SU(n), GL(n,R))
|
|
49
|
+
- **Lie algebra**: The tangent space of a Lie group at the identity, equipped with the Lie bracket [X,Y]
|
|
50
|
+
- **Exponential map** exp: g -> G, recovering global symmetry from infinitesimal generators
|
|
51
|
+
|
|
52
|
+
**Classification milestone**: Cartan's classification of semisimple Lie algebras (1894) yields four infinite families A_n, B_n, C_n, D_n and five exceptional algebras G_2, F_4, E_6, E_7, E_8 -- the "periodic table" of the world of continuous symmetries.
|
|
53
|
+
|
|
54
|
+
**Physical significance**: The gauge group SU(3)xSU(2)xU(1) of particle physics is a direct application of Lie group theory.
|
|
55
|
+
|
|
56
|
+
## Noether's Theorem (1915)
|
|
57
|
+
|
|
58
|
+
> **Emmy Noether** (1882-1935): Every continuous symmetry corresponds to a conserved quantity.
|
|
59
|
+
|
|
60
|
+
| Symmetry | Conserved Quantity |
|
|
61
|
+
|----------|-------------------|
|
|
62
|
+
| Time translation invariance | Conservation of energy |
|
|
63
|
+
| Spatial translation invariance | Conservation of momentum |
|
|
64
|
+
| Rotational invariance | Conservation of angular momentum |
|
|
65
|
+
| Gauge invariance | Conservation of electric charge |
|
|
66
|
+
|
|
67
|
+
**Significance**: This is one of the most profound theorems in physics -- it reveals the deep connection between the symmetries of nature and conservation laws. Noether proved this theorem in 1915 to resolve the problem of energy conservation in general relativity for Hilbert; its influence has far exceeded its original motivation.
|
|
68
|
+
|
|
69
|
+
## Representation Theory (Frobenius, Schur, 1896-1905)
|
|
70
|
+
|
|
71
|
+
> "To understand a group, the best way is to see how it acts on vector spaces."
|
|
72
|
+
|
|
73
|
+
**Georg Frobenius** (1849-1917) invented the character theory of groups in 1896; **Issai Schur** (1875-1941) further developed the classification of irreducible representations:
|
|
74
|
+
|
|
75
|
+
- **Group representation**: A homomorphism rho: G -> GL(V), mapping abstract group elements to linear transformations
|
|
76
|
+
- **Character** chi(g) = Tr(rho(g)), the "fingerprint" of a representation -- distinct irreducible representations have distinct characters
|
|
77
|
+
- **Irreducible representation**: A representation that cannot be further decomposed; the fundamental building block of representation theory
|
|
78
|
+
|
|
79
|
+
**Core theorems**:
|
|
80
|
+
- Maschke's theorem: Under appropriate conditions, every representation of a finite group decomposes completely into a direct sum of irreducible representations
|
|
81
|
+
- Schur's lemma: Homomorphisms between irreducible representations are extremely simple (either zero or an isomorphism)
|
|
82
|
+
- Character orthogonality relations: Characters of distinct irreducible representations are mutually orthogonal -- providing arithmetic constraints for classification
|
|
83
|
+
|
|
84
|
+
**Applications span mathematics and physics**: From the classification of finite groups to the theory of angular momentum in quantum mechanics, representation theory is the bridge that transforms abstract symmetry into computable quantities.
|
|
85
|
+
|
|
86
|
+
## Classification of Finite Simple Groups (1980s-2004)
|
|
87
|
+
|
|
88
|
+
> "The classification of finite simple groups is the most enormous theorem in mathematical history -- its proof spans decades, hundreds of papers, and hundreds of mathematicians."
|
|
89
|
+
|
|
90
|
+
**Finite simple groups** are the "atoms" of group theory -- groups that cannot be decomposed into smaller normal subgroups. The classification theorem asserts:
|
|
91
|
+
|
|
92
|
+
**Every finite simple group belongs to one of the following categories**:
|
|
93
|
+
1. **Cyclic groups** Z_p (p prime) -- the simplest simple groups
|
|
94
|
+
2. **Alternating groups** A_n (n >= 5) -- the core of permutation groups
|
|
95
|
+
3. **Groups of Lie type** (16 infinite families) -- including Chevalley groups, twisted groups, etc.
|
|
96
|
+
4. **26 sporadic simple groups** -- the largest being the **Monster group** M, of order approximately 8x10^53
|
|
97
|
+
|
|
98
|
+
The **ATLAS of Finite Groups** (1985) is the standard reference for this classification, recording structural data for all simple groups.
|
|
99
|
+
|
|
100
|
+
**The miracle of the Monster group**: The surprising connection between the Monster and modular forms (McKay's "monstrous moonshine" conjecture, proved by Borcherds in 1998) reveals a deep link between finite groups and number theory -- Borcherds was awarded the Fields Medal for this work.
|
|
101
|
+
|
|
102
|
+
## Burnside's Lemma
|
|
103
|
+
|
|
104
|
+
> A finite group G acts on a set X. The number of orbits = (1/|G|) * Sum|X^g|, where X^g is the set of elements fixed by the transformation g.
|
|
105
|
+
|
|
106
|
+
**Application**: Symmetry simplifies counting problems -- rather than enumerating one by one, one need only compute the average number of fixed points. Although named after Burnside, this result was in fact discovered earlier by Cauchy (1845) and Frobenius (1887) -- mathematical naming conventions are not always just.
|
|
107
|
+
|
|
108
|
+
## Coxeter Groups (1934)
|
|
109
|
+
|
|
110
|
+
**H.S.M. Coxeter** (1907-2003) systematically studied discrete symmetry groups generated by reflections:
|
|
111
|
+
|
|
112
|
+
> "Coxeter groups are generated by reflections, with relations specified only by orders -- the ultimate classification framework for discrete geometric symmetry."
|
|
113
|
+
|
|
114
|
+
Key structures:
|
|
115
|
+
- **Coxeter diagram**: Each node represents a reflection generator; edges are labeled by orders m_ij
|
|
116
|
+
- **Classification of finite Coxeter groups**: Parallel to Cartan's classification of semisimple Lie algebras -- A_n, B_n, D_n, H_3, H_4, I_2(n), etc.
|
|
117
|
+
- The symmetry groups of **regular polyhedra and regular polytopes** are all Coxeter groups
|
|
118
|
+
|
|
119
|
+
The **H_4** group (order 14400) is the symmetry group of the 4-dimensional 120-cell/600-cell, one of the most exquisite examples among finite Coxeter groups.
|
|
120
|
+
|
|
121
|
+
**Impact**: Coxeter group theory unifies the theory of regular polyhedra, crystallography, Weyl groups in Lie theory, and the Bruhat decomposition in combinatorics.
|
|
122
|
+
|
|
123
|
+
## Crystallographic Groups and 230 Space Groups
|
|
124
|
+
|
|
125
|
+
> "The mathematical classification of crystal symmetry -- the 230 space groups exhaust all possible symmetry types for three-dimensional crystals."
|
|
126
|
+
|
|
127
|
+
**History**:
|
|
128
|
+
- **32 crystallographic point groups**: Classified independently by Schoenflies (1891) and Fedorov (1890)
|
|
129
|
+
- **230 space groups**: The complete classification including translational symmetry (screw axes, glide planes), accomplished by Fedorov and Schoenflies
|
|
130
|
+
- **Two-dimensional case**: 17 wallpaper groups, a more concise classification
|
|
131
|
+
|
|
132
|
+
**Mathematical significance**: This is a classic example of "classifying natural structures using group theory" -- crystallography directly validates the spirit of the Erlangen Program. The International Tables for Crystallography serve as the standard reference for this classification.
|
|
133
|
+
|
|
134
|
+
**Four dimensions and beyond**: The number of crystallographic groups grows dramatically in higher dimensions (4783 space groups in 4 dimensions), demonstrating the explosive complexity of symmetric structures as dimension increases.
|
|
135
|
+
|
|
136
|
+
## Spontaneous Symmetry Breaking (Goldstone 1961; Higgs 1964)
|
|
137
|
+
|
|
138
|
+
> "When the ground state of a system does not inherit the symmetry of its laws, the symmetry is spontaneously broken -- the most dramatic manifestation of symmetry in physics."
|
|
139
|
+
|
|
140
|
+
**Goldstone's theorem** (1961): Spontaneous breaking of a continuous symmetry necessarily produces massless excitations (Goldstone bosons).
|
|
141
|
+
|
|
142
|
+
**Higgs mechanism** (1964): When a gauge symmetry is spontaneously broken, Goldstone bosons are "eaten," becoming the mass of gauge fields -- this is precisely the mechanism by which W/Z particles acquire mass in the Standard Model of particle physics. The 2012 discovery of the Higgs boson at the LHC confirmed this theory.
|
|
143
|
+
|
|
144
|
+
**Mathematical structure**: Let a group G act on a potential V(phi). If G is a symmetry but the minimum phi_0 is preserved only by a subgroup H of G, then the symmetry is broken from G to H, producing dim(G/H) Goldstone modes.
|
|
145
|
+
|
|
146
|
+
**Philosophical significance**: The laws of nature are symmetric, but nature itself can be asymmetric -- symmetry guarantees not symmetric reality, only symmetric possibility.
|
|
147
|
+
|
|
148
|
+
## Gauge Symmetry (Yang-Mills, 1954)
|
|
149
|
+
|
|
150
|
+
> "Gauge symmetry is local -- the symmetry transformation can be chosen independently at each spacetime point. This demands the introduction of gauge fields to maintain consistency."
|
|
151
|
+
|
|
152
|
+
**Yang-Mills theory** (1954): Yang Chen-Ning and Mills generalized the electromagnetic gauge principle (U(1)) to non-Abelian groups (SU(2)), founding non-Abelian gauge field theory.
|
|
153
|
+
|
|
154
|
+
**The gauge group of the Standard Model**: SU(3)_C x SU(2)_L x U(1)_Y
|
|
155
|
+
- SU(3): Color symmetry -> strong interaction (QCD)
|
|
156
|
+
- SU(2)xU(1): Electroweak symmetry -> after Higgs breaking, yields electromagnetic U(1)
|
|
157
|
+
|
|
158
|
+
**Yang-Mills existence and mass gap**: One of the seven Millennium Prize Problems of the Clay Mathematics Institute -- proving the mass gap of Yang-Mills theory remains unsolved and is one of the deepest open problems in mathematical physics.
|
|
159
|
+
|
|
160
|
+
## Parity Violation (Wu Experiment, 1957)
|
|
161
|
+
|
|
162
|
+
> "Physical laws may not hold in the mirror world -- this shatters one of the most intuitive symmetries of nature."
|
|
163
|
+
|
|
164
|
+
**History**: Lee Tsung-Dao and Yang Chen-Ning (1956) proposed that the weak interaction might not conserve parity; **Chien-Shiung Wu** confirmed this prediction in 1957 with a Co-60 beta-decay experiment.
|
|
165
|
+
|
|
166
|
+
**Significance**: Before this, physicists universally believed that parity conservation (left-right symmetry) was a fundamental principle of nature. The Wu experiment demonstrated that the weak interaction distinguishes left from right -- the first experimental evidence that symmetry is not universally valid, profoundly altering physicists' worldview.
|
|
167
|
+
|
|
168
|
+
**Aftermath**: Parity violation led to the introduction of CP symmetry; in 1964, the Cronin-Fitch experiment discovered that CP is also violated, further narrowing the symmetries of nature.
|
|
169
|
+
|
|
170
|
+
## CPT Symmetry in Particle Physics
|
|
171
|
+
|
|
172
|
+
> "The CPT theorem asserts: any Lorentz-invariant local quantum field theory must be invariant under the combined C (charge conjugation), P (parity), and T (time reversal) transformation."
|
|
173
|
+
|
|
174
|
+
**Components of CPT**:
|
|
175
|
+
- **C** (charge conjugation): particle <-> antiparticle
|
|
176
|
+
- **P** (parity): spatial inversion (mirror image)
|
|
177
|
+
- **T** (time reversal): reversal of the direction of time flow
|
|
178
|
+
|
|
179
|
+
Individually, C, P, and T can each be violated (the weak interaction violates P and C; K-meson decay violates CP), but the **combined CPT must be conserved** -- this is the most robust symmetry bulwark of quantum field theory. If CPT were experimentally violated, the foundational framework of quantum field theory would need to be rebuilt.
|
|
180
|
+
|
|
181
|
+
## Weyl's Symmetry (1952)
|
|
182
|
+
|
|
183
|
+
**Hermann Weyl** (1885-1955), in his later work *Symmetry* (1952), offered philosophical reflections on symmetry:
|
|
184
|
+
|
|
185
|
+
> "Symmetry, as wide or as narrow as you may define its meaning, is one idea by which man through the ages has tried to comprehend and create order, beauty, and perfection."
|
|
186
|
+
|
|
187
|
+
Weyl explores this theme from four perspectives: art (decorative patterns, architecture), nature (crystals, flowers), mathematics (group theory), and physics (relativity, quantum mechanics). This book fuses mathematical rigor with philosophical depth, and stands as an exemplary work of the "humanistic tradition in mathematics."
|
|
188
|
+
|
|
189
|
+
## The Power of Invariants
|
|
190
|
+
|
|
191
|
+
> "Finding what does not change amid change is the shortcut to understanding the world."
|
|
192
|
+
|
|
193
|
+
Classic examples:
|
|
194
|
+
- **Euler characteristic**: No matter how a polyhedron is continuously deformed, V - E + F = 2 remains invariant
|
|
195
|
+
- **Topological genus**: A donut and a coffee cup share the same topological structure (one hole)
|
|
196
|
+
- **Undecidability of the halting problem**: No matter how algorithms are improved, certain problems are inherently uncomputable
|
|
197
|
+
|
|
198
|
+
## Symmetry and Everyday Life
|
|
199
|
+
|
|
200
|
+
- **Temporal symmetry**: If the structure of one's day exhibits symmetry (e.g., a cycle of waking early, working, and resting), life becomes more efficient
|
|
201
|
+
- **Information symmetry**: Symmetry of information is a prerequisite for fairness in games; asymmetry of information is the source of strategy
|
|
202
|
+
- **Structural symmetry**: Symmetry in organizational structures (e.g., symmetric reporting relationships) typically implies stability
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**Summary**: Symmetry and invariants form the central thread of mathematics and physics. From Galois's finite groups to Lie's continuous groups, from Klein's geometric program to Noether's conservation laws, from the abstract structures of representation theory to the gauge symmetries of particle physics -- group theory provides a unified syntax, and invariants provide the semantics. This thread runs through pure mathematics and applied science alike, and stands as one of humanity's most powerful tools for understanding the order of the world.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: topological-thinking
|
|
3
|
+
description: |
|
|
4
|
+
Trigger for topological data analysis (TDA), persistent homology, homology/fundamental group computation, simplicial complexes & filtrations; or designing connectivity/robustness/cohomology-consistency criteria (e.g. Čech cohomology as hallucination regularizer, sheaf attention) for algorithms.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 🌀 Topological Thinking
|
|
8
|
+
|
|
9
|
+
> "You can stretch and bend but never tear — truly important properties survive continuous deformation."
|
|
10
|
+
>
|
|
11
|
+
> — Topology, Homology, Topological Data Analysis
|
|
12
|
+
|
|
13
|
+
## Core Principle
|
|
14
|
+
|
|
15
|
+
Topology studies properties invariant under continuous deformation. A donut and a coffee cup are topologically equivalent — both have one hole. The core insight: when exact distances are unimportant, topology captures essential structure — connectivity, holes, dimension. In the context of this skill set, topological thinking directly underpins cellular-layer diffusion attention and Čech cohomology regularization (see the activator examples).
|
|
16
|
+
|
|
17
|
+
> **Mathematical Formalization**
|
|
18
|
+
>
|
|
19
|
+
> **Homeomorphism**: A continuous bijection with continuous inverse $h: X\to Y$; the standard for topological equivalence. **Homotopy**: The deformation process itself is continuous; coarser than homeomorphism. **Diffeomorphism**: A smooth bijection with smooth inverse; the standard of differential topology.
|
|
20
|
+
>
|
|
21
|
+
> **Euler characteristic** $\chi=V-E+F$: For convex polyhedra $\chi=2$, for the torus $\chi=0$; together with orientability, it is a complete topological invariant for surfaces.
|
|
22
|
+
>
|
|
23
|
+
> **Fundamental group** $\pi_1(X)$: Based loops modulo homotopy deformation; $\pi_1(S^1)=\mathbb{Z}$ (winding number), $\pi_1(S^2)=0$ (all loops are contractible), $\pi_1(\text{torus})=\mathbb{Z}\times\mathbb{Z}$.
|
|
24
|
+
>
|
|
25
|
+
> **Homology groups** $H_n(X)$: Count $n$-dimensional "holes": $H_0$ = connected components, $H_1$ = 1-dimensional holes (loops), $H_2$ = 2-dimensional voids. **Betti numbers** $\beta_n=\text{rank}\, H_n$: $\beta_0$ = number of connected components, $\beta_1$ = number of 1-dimensional holes, $\beta_2$ = number of 2-dimensional voids.
|
|
26
|
+
>
|
|
27
|
+
> **Simplicial complex**: A topological space model assembled from simplices (points / line segments / triangles). **Filtration**: Progressively increase the neighborhood radius; at each radius, construct a simplicial complex. **Persistent homology**: Compute homology groups along the filtration; long bars = genuine topological features, short bars = noise.
|
|
28
|
+
>
|
|
29
|
+
> **Cohomology** $H^n(X)$: The dual of homology (functorial, carries a ring structure). Čech cohomology detects global consistency obstructions from local data — $H^1\neq 0$ means local fragments cannot be assembled into a globally consistent object (this is precisely the algebraic criterion for "hallucination").
|
|
30
|
+
>
|
|
31
|
+
> See `original-texts.md` for details.
|
|
32
|
+
|
|
33
|
+
## GPU-Friendliness (Cross-Cutting Check)
|
|
34
|
+
|
|
35
|
+
Whether topological structures can run on GPU depends on "locality" and "tensorizability" — pass through the eight-dimensional gate in `../../references/gpu-friendly-math.md`:
|
|
36
|
+
|
|
37
|
+
- **Local topological quantities → friendly**: Local homology or restriction maps per edge / per patch are small computations; batch-parallelizable and map to small GEMM operations.
|
|
38
|
+
- **Čech cohomology regularization**: Used as a local consistency loss — cheap, fusible (friendly); this is the key component of Tropical Sheaf Attention.
|
|
39
|
+
- **Persistent homology (TDA)**: Constructing simplicial complexes and boundary matrix reduction often involves irregular sparsity / serial reduction — a classic "beautiful but intractable" case → reform via approximation / sampling / distributed computation.
|
|
40
|
+
- **Global exact homology computation**: Symbolic computation, non-trainable, not friendly.
|
|
41
|
+
- **Anti-pattern**: Embedding structures requiring global exact topological determination into the forward pass — intractable.
|
|
42
|
+
|
|
43
|
+
Eight-dimensional minimum assessment (formal terms): **Tensorization** — whether topological quantities admit local batching; **GEMM-mappability** — whether restriction maps, boundary operators, and local Laplacians fall into matrix multiplication; **Complexity** — whether persistent homology / boundary matrix reduction is superlinear; **Memory and KV-Cache** — whether simplicial complexes, boundary matrices, and cover overlaps are compressible; **Low-precision stability** — whether small singular values, sorting, and thresholding are numerically robust; **Parallelism and communication** — whether cover patches / local complexes are independent; **Sparse structure** — whether the complex / graph is structurally sparse; **Operator fusion** — whether local consistency losses can be fused.
|
|
44
|
+
|
|
45
|
+
> Use in conjunction with `../../references/books/algebraic-geometry-rising-sea.md` (sheaves / Čech cohomology → attention and hallucination regularization), `smooth-manifolds.md`, `differential-geometry.md`.
|
|
46
|
+
|
|
47
|
+
## When NOT to Use
|
|
48
|
+
|
|
49
|
+
- **Exact measurements are needed** — topology only captures qualitative structure (connectivity, holes); it provides no distances or angles.
|
|
50
|
+
- **Metric properties are central** — topologically equivalent spaces can have completely different metric behavior.
|
|
51
|
+
- **Purely discrete structures with no continuity** — topology is grounded in continuity.
|
|
52
|
+
- **Precise numerical decisions are required** (the question is "how much" rather than "is it connected") — the topological perspective is too coarse.
|
|
53
|
+
|
|
54
|
+
## When to Use
|
|
55
|
+
|
|
56
|
+
- Need qualitative classification (not "how large" or "how far," but "is it connected" or "how many holes"); shape matters more than size.
|
|
57
|
+
- Need robustness analysis (invariants guarantee that properties do not vanish under continuous perturbation).
|
|
58
|
+
- Data has shape features that standard statistics cannot capture (clusters, voids, ring structures).
|
|
59
|
+
- Need invariants that survive deformation (topological insulators, topological error correction).
|
|
60
|
+
- **Design global consistency criteria for attention / representation learning** (Čech cohomology as hallucination regularizer, sheaf diffusion).
|
|
61
|
+
|
|
62
|
+
## Method
|
|
63
|
+
|
|
64
|
+
### Step 1: Identify Continuity Requirements
|
|
65
|
+
Specify the equivalence standard: homeomorphism / homotopy / diffeomorphism. Determine what may vary (distances, angles, sizes) and what must remain fixed (number of holes, connectivity, dimension). Core distinction: variable (surface / metric) vs. invariant (structure / topology).
|
|
66
|
+
|
|
67
|
+
### Step 2: Find Topological Invariants
|
|
68
|
+
- **Euler characteristic** $\chi=V-E+F$ (together with orientability, a complete invariant for surfaces).
|
|
69
|
+
- **Connectivity** (path-connectedness): Number of connected components $= \text{rank}\, H_0$; **Compactness** (Heine-Borel: compact in $\mathbb{R}^n$ $\iff$ bounded and closed).
|
|
70
|
+
- **Fundamental group** $\pi_1(X)$; **Homology groups** $H_n$ ($H_0$ = components, $H_1$ = 1-dimensional holes, $H_2$ = 2-dimensional voids); **Betti numbers** $\beta_n=\text{rank}\, H_n$.
|
|
71
|
+
- **Cohomology** $H^n$ (dual of homology, functorial; Čech cohomology detects global consistency obstructions).
|
|
72
|
+
|
|
73
|
+
### Step 3: Classify Using Invariants
|
|
74
|
+
Same $\chi$ → same surface type; same $\pi_1$ → same homotopy type; compact surfaces are completely classified by orientability + $\chi$. Classification relies on invariants — look past the surface to the structure.
|
|
75
|
+
|
|
76
|
+
### Step 4: Construct Topological Models
|
|
77
|
+
- **Data**: For point clouds, construct a filtration; compute the simplicial complex and homology at each radius; extract persistent homology (barcode / persistence diagram; long bars = genuine features, short bars = noise).
|
|
78
|
+
- **Networks**: Connected components (reachability), cycles (redundant paths), clustering coefficients; network topology determines information propagation and robustness.
|
|
79
|
+
- **Systems**: Phase-space attractor topology — fixed points (points), limit cycles ($S^1$), chaotic attractors (fractals).
|
|
80
|
+
- **Algorithms**: Use sheaves / Čech cohomology to make the question "can local fragments be assembled into a globally consistent object" into a computable algebraic obstruction.
|
|
81
|
+
|
|
82
|
+
### Step 5: Verify Topological Equivalence
|
|
83
|
+
Attempt to construct an explicit homeomorphism / homotopy equivalence; check that invariants match. Different invariants → topologically distinct (reliable negative); all invariants match → possibly equivalent (invariants may be incomplete; cannot confirm).
|
|
84
|
+
|
|
85
|
+
### Step 6: Topological Reasoning and Applications
|
|
86
|
+
- "$\pi_1(X)\neq 0$ → non-contractible loops exist → the system has unreachable states"
|
|
87
|
+
- "$X$ is connected → paths exist → transitions are always possible"
|
|
88
|
+
- "$\beta_1=3$ → the data has 3 significant ring structures"
|
|
89
|
+
- "$H^1\neq 0$ → local fragments are globally inconsistent → hallucination / inconsistency signal"
|
|
90
|
+
|
|
91
|
+
## Common Errors
|
|
92
|
+
|
|
93
|
+
| Error | Critique | Correct Approach |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| Confusing topological equivalence with geometric similarity | Topological equivalence only requires homeomorphism, not metric proximity | Distinguish "topologically identical" from "geometrically similar" |
|
|
96
|
+
| Ignoring dimensional differences | $\mathbb{R}^1$ and $\mathbb{R}^2$ are not homeomorphic (invariance of domain, Brouwer) | Dimensional invariance is a mandatory check |
|
|
97
|
+
| Confusing connected with path-connected | Connected $\neq$ path-connected (topologist's sine curve); path-connected $\Rightarrow$ connected, but not vice versa | Explicitly label which notion of connectivity is used |
|
|
98
|
+
| Over-reliance on a single invariant | $\chi$ alone cannot distinguish all spaces (many spaces share $\chi=0$) | Use combinations of invariants; annotate uncertainty when incomplete |
|
|
99
|
+
| Ignoring local vs. global topology | Local connectivity does not guarantee global connectivity; local homeomorphism $\neq$ global homeomorphism | Check local and global invariants separately |
|
|
100
|
+
| Confusing homology with homotopy | $H_1(X)$ is the abelianization of $\pi_1(X)$; homology is a coarsening of homotopy | Specify whether $\pi_1$ (homotopy) or $H_1$ (homology) is used |
|
|
101
|
+
| Embedding global exact homology into training | Persistent homology / symbolic homology involves irregular sparsity and serial reduction; intractable | Use local cohomology losses / approximation / sampling; pass through the GPU eight-dimensional gate |
|
|
102
|
+
|
|
103
|
+
## Operating Procedure
|
|
104
|
+
|
|
105
|
+
The output must include:
|
|
106
|
+
|
|
107
|
+
1. **Continuity requirements**: `[Homeomorphism / Homotopy / Diffeomorphism], variable: [distances / angles / sizes], invariant: [hole count / connectivity / dimension]`
|
|
108
|
+
2. **Invariants**: `$\chi=$ , $\pi_1=$ , $\beta_n=$ , $H_0=$ , $H_1=$ , $H_2=$ , compactness = [yes / no]`
|
|
109
|
+
3. **Classification**: `[Orientable / Non-orientable], $\chi=$ → [surface type]; $\pi_1=$ → [homotopy type]`
|
|
110
|
+
4. **Topological model**: `[Simplicial complex / Filtration / Network graph / Phase space / Sheaf-Čech], construction method: [description]`
|
|
111
|
+
5. **Equivalence verification**: `[Invariants all match / differences found], conclusion: [equivalent / distinct / uncertain]`
|
|
112
|
+
6. **Reasoning**: `Because [topological property] → [conclusion]`
|
|
113
|
+
7. **[GPU Feasibility]** (if used for algorithm design) — whether topological quantities are local and batchable / GEMM-mappable; pass through the eight-dimensional gate; reform global exact homology via approximation.
|
|
114
|
+
|
|
115
|
+
**Output must not consist of analysis alone without conclusions.**
|
|
116
|
+
|
|
117
|
+
## Relations to Other Skills
|
|
118
|
+
|
|
119
|
+
- **Symmetry and Invariance**: Topological invariants are invariants under continuous transformations — sharing the "find the invariants" logic, but topology focuses on continuous deformation rather than group actions.
|
|
120
|
+
- **Abstraction Thinking**: Topology is the abstraction of spatial structure — remove the metric, keep only open sets and continuity.
|
|
121
|
+
- **Transformation Thinking**: Continuous deformation is a special class of transformations; homeomorphisms and homotopies are both transformations.
|
|
122
|
+
- **Modeling Thinking**: TDA is data modeling — use persistent homology to build topological models of point clouds and discover shapes that statistics misses.
|
|
123
|
+
- **Probability and Statistics**: TDA complements statistical shape analysis — statistics focuses on means and variances (quantities), TDA focuses on connectivity and voids (qualities); they are complementary.
|
|
124
|
+
- **Modern Mathematics Activation**: `../../references/books/algebraic-geometry-rising-sea.md` (sheaves / Čech cohomology → sheaf attention and hallucination regularization), `smooth-manifolds.md`, `differential-geometry.md`.
|
|
@@ -5,6 +5,8 @@ description: |
|
|
|
5
5
|
English: Trigger for topological data analysis (TDA), persistent homology, homology/fundamental group computation, simplicial complexes & filtrations; or designing connectivity/robustness/cohomology-consistency criteria (e.g. Čech cohomology as hallucination regularizer, sheaf attention) for algorithms.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **语言路由**:若用户消息为英文,请读取并遵循同目录下的 `SKILL.en.md`,按其操作规程以英文输出;中文消息则继续使用本文件。
|
|
9
|
+
|
|
8
10
|
# 🌀 拓扑思想 / Topological Thinking
|
|
9
11
|
|
|
10
12
|
> "可以拉伸弯曲但不能撕裂——真正重要的性质在连续变形中不变。"
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Mathematical Sources and Classic Texts
|
|
2
|
+
|
|
3
|
+
## Euler Characteristic (Euler, 1752)
|
|
4
|
+
|
|
5
|
+
> "For any convex polyhedron, the number of vertices minus edges plus faces equals 2."
|
|
6
|
+
|
|
7
|
+
**Leonhard Euler** (1707-1783) discovered this invariant of polyhedra in 1752:
|
|
8
|
+
|
|
9
|
+
V - E + F = 2
|
|
10
|
+
|
|
11
|
+
This formula seems simple but is profound — it holds for all convex polyhedra, whether cube (8-12+6=2), tetrahedron (4-6+4=2), or dodecahedron (20-30+12=2). The Euler characteristic is a topological invariant of surfaces: continuous deformations do not change χ. Sphere χ = 2, torus χ = 0, double torus χ = -2 — each additional hole reduces χ by 2.
|
|
12
|
+
|
|
13
|
+
**Generalization**: for any surface S, χ(S) = 2 - 2g (orientable, genus g) or χ(S) = 2 - g (non-orientable, genus g). The Euler characteristic and orientability together form a complete set of classification invariants for compact surfaces.
|
|
14
|
+
|
|
15
|
+
## Poincaré Conjecture & Perelman's Proof (2004)
|
|
16
|
+
|
|
17
|
+
> "Every simply-connected closed 3-manifold is homeomorphic to the 3-sphere S³."
|
|
18
|
+
|
|
19
|
+
**Henri Poincaré** (1854-1912) proposed this conjecture in 1904 — it became one of the most famous unsolved problems in the history of mathematics, confounding mathematicians for a full century.
|
|
20
|
+
|
|
21
|
+
**Grigori Perelman** (1966-) posted three papers online in 2002-2003, completing the proof using **Ricci flow** (a differential geometric tool introduced by Hamilton) combined with surgery techniques. Perelman declined the 2006 Fields Medal and the 2010 Clay Millennium Prize of one million dollars — the most dramatic episode in the history of mathematics.
|
|
22
|
+
|
|
23
|
+
**Intuition behind Ricci flow**: the metric on a manifold evolves over time so that curvature tends toward uniformity — much like heat diffusion makes temperature distribution uniform. When curvature concentrates at a "neck," surgery cuts it out and caps it with a standard sphere, then Ricci flow continues. The manifold is eventually decomposed into geometric pieces (Thurston's geometrization conjecture), each with a standard metric — the Poincaré conjecture is a special case of the geometrization conjecture.
|
|
24
|
+
|
|
25
|
+
## Fundamental Group (Poincaré, 1895)
|
|
26
|
+
|
|
27
|
+
> "The fundamental group π₁(X) consists of equivalence classes of loops based at a point modulo homotopic deformation — it captures the 'non-contractible loops' structure of a space."
|
|
28
|
+
|
|
29
|
+
**Poincaré** introduced the concept of the fundamental group in his 1895 paper *Analysis Situs* — the foundational work of algebraic topology.
|
|
30
|
+
|
|
31
|
+
Core examples:
|
|
32
|
+
- **π₁(S¹) = Z** — loops on the circle are classified by winding number: a loop winding n times cannot be continuously deformed into one winding m times (n ≠ m)
|
|
33
|
+
- **π₁(S²) = 0** — all loops on the sphere are contractible to a point — the sphere "has no holes"
|
|
34
|
+
- **π₁(torus) = Z × Z** — winding in two independent directions, combined as (m, n) winding numbers
|
|
35
|
+
- **π₁(real projective plane RP²) = Z₂** — only two classes of loops: contractible (even winding) and non-contractible (odd winding)
|
|
36
|
+
|
|
37
|
+
**Key property**: homeomorphic spaces have isomorphic fundamental groups (topological invariant); however, the fundamental group is not a complete invariant — different spaces can share the same fundamental group (e.g., S² and S³ both have π₁ = 0, but they are not homeomorphic).
|
|
38
|
+
|
|
39
|
+
## Homology Groups
|
|
40
|
+
|
|
41
|
+
> "Homology groups H_n(X) count n-dimensional 'holes' in a space — translating topological intuition into computable algebraic quantities."
|
|
42
|
+
|
|
43
|
+
**Simplicial homology computation**:
|
|
44
|
+
1. Construct a simplicial complex K (approximating the space with simplices such as triangles and tetrahedra)
|
|
45
|
+
2. Define the boundary operator ∂_n: C_n → C_{n-1} (the boundary of each n-simplex is a combination of (n-1)-simplices)
|
|
46
|
+
3. Key property ∂² = 0 (the boundary of a boundary is zero)
|
|
47
|
+
4. Homology group H_n(K) = ker(∂_n) / im(∂_{n+1}) — "cycles" modulo "boundaries" — true holes are not boundaries of any higher-dimensional simplex
|
|
48
|
+
|
|
49
|
+
**Intuition**: H₀ = number of connected components (zero-dimensional "holes" = separated pieces), H₁ = number of 1-dimensional holes (unfillable loops), H₂ = number of 2-dimensional voids (unfillable cavities). Betti numbers β_n = rank H_n(X) count the holes.
|
|
50
|
+
|
|
51
|
+
**Homology vs homotopy**: H₁(X) is the abelianization of π₁(X) (H₁ = π₁/[π₁, π₁], quotienting out the commutator subgroup). Homology is easier to compute (linear algebra) but less informative (non-abelian structure is lost); homotopy is richer in information but harder to compute. The choice depends on the problem at hand — π₁ for fine classification, H₁ for fast computation.
|
|
52
|
+
|
|
53
|
+
## Topological Data Analysis (Carlsson, 2009)
|
|
54
|
+
|
|
55
|
+
> "Persistent homology lets data 'speak' — it discovers not means and variances, but the shape of data."
|
|
56
|
+
|
|
57
|
+
**Gunnar Carlsson** (Stanford) founded Ayasdi in 2009, bringing persistent homology into applications.
|
|
58
|
+
|
|
59
|
+
**Persistent homology computation**:
|
|
60
|
+
1. Starting from point cloud data, construct a filtration by varying the neighborhood radius ε from small to large
|
|
61
|
+
2. For each ε, construct the Vietoris-Rips complex VR_ε (connecting point pairs at distance ≤ ε, filling triangles when three points are mutually within distance ≤ ε)
|
|
62
|
+
3. Compute the homology groups H_n(VR_ε) for each ε
|
|
63
|
+
4. Record the "birth time" (ε_birth) and "death time" (ε_death) of each topological feature
|
|
64
|
+
5. Output a barcode diagram or persistence diagram (points (ε_birth, ε_death))
|
|
65
|
+
|
|
66
|
+
**Stability theorem**: the Wasserstein distance between persistence diagrams ≤ the Hausdorff distance between data sets — small perturbations of the data produce only small changes in the persistence diagram. This guarantees the robustness of TDA: noise produces short bars, real features produce long bars.
|
|
67
|
+
|
|
68
|
+
**Applications**: topological structure in tumor genomic data revealing new cancer subtypes; sensor network coverage hole detection; topological signatures of phase transitions in materials science; topological early warning of market crashes in finance.
|
|
69
|
+
|
|
70
|
+
## Brouwer Fixed Point Theorem (1911)
|
|
71
|
+
|
|
72
|
+
> "Every continuous map f: Dⁿ → Dⁿ has a fixed point — there exists x₀ such that f(x₀) = x₀."
|
|
73
|
+
|
|
74
|
+
**L.E.J. Brouwer** (1881-1966) proved this theorem in 1911 — ironically, Brouwer later became the founder of intuitionism, opposing the law of excluded middle on which his own theorem relies.
|
|
75
|
+
|
|
76
|
+
**Intuition**: stir coffee in a cup, then stop — at least one point must have returned to its original position, since stirring is a continuous map on a disk, which must have a fixed point.
|
|
77
|
+
|
|
78
|
+
**Applications**:
|
|
79
|
+
- **Game theory** (Nash, 1950): the existence of Nash equilibrium relies on the Brouwer fixed point theorem — every finite game has at least one mixed-strategy Nash equilibrium
|
|
80
|
+
- **Economics**: the fixed-point proof of general equilibrium theory (Arrow-Debreu) — existence of market equilibrium
|
|
81
|
+
- **Differential equations**: the Peano existence theorem uses fixed-point methods
|
|
82
|
+
|
|
83
|
+
## Jordan Curve Theorem
|
|
84
|
+
|
|
85
|
+
> "Every simple closed curve in R² divides the plane into two regions — interior and exterior."
|
|
86
|
+
|
|
87
|
+
**Seemingly obvious yet extremely hard to prove** — Jordan's original proof (1892) had gaps; Veblen (1905) gave the first rigorous proof. The difficulty lies in the fact that closed curves can exhibit extremely complex topological behavior (e.g., Osgood curves with arbitrarily large area); what seems "obvious" intuitively requires fine topological argumentation mathematically.
|
|
88
|
+
|
|
89
|
+
**Generalization**: Jordan-Brouwer separation theorem — every subset of Rⁿ homeomorphic to S^{n-1} divides Rⁿ into two connected components. Higher dimensions entail more complex proofs.
|
|
90
|
+
|
|
91
|
+
## Knot Theory
|
|
92
|
+
|
|
93
|
+
> "Knot classification relies on invariants — Jones polynomial, Alexander polynomial, etc. distinguish different knot types."
|
|
94
|
+
|
|
95
|
+
Knot theory studies equivalence classes of simple closed curves in R³ under isotopy (classification up to continuous deformation). The central question: can two knots be transformed into each other by continuous deformation (without cutting or gluing)?
|
|
96
|
+
|
|
97
|
+
**Key invariants**:
|
|
98
|
+
- **Alexander polynomial** (1928): the first polynomial knot invariant, but incomplete (different knots can share the same Alexander polynomial)
|
|
99
|
+
- **Jones polynomial** (1984): Vaughan Jones's discovery — deep connections to statistical mechanics and quantum field theory; Jones received the 1990 Fields Medal for this work
|
|
100
|
+
- **Knot group** π₁(R³ - K): the fundamental group of the knot complement in three-dimensional space
|
|
101
|
+
|
|
102
|
+
**Applications**: DNA topology — supercoiling, knotted DNA, and catenanes affect DNA replication and transcription; enzymes (topoisomerases) alter the topological structure of DNA, effectively performing "topological surgery." Molecular knot chemistry — synthesizing topologically complex molecular structures.
|
|
103
|
+
|
|
104
|
+
## Classification of Surfaces
|
|
105
|
+
|
|
106
|
+
> "Compact surfaces are completely classified by orientability and Euler characteristic — the paradigm of topological classification."
|
|
107
|
+
|
|
108
|
+
**Classification theorem** (Möbius 1861, Dyck 1888, completed):
|
|
109
|
+
|
|
110
|
+
Orientable surfaces: S² (χ=2), torus T² (χ=0), double torus (χ=-2), triple torus (χ=-4), ... — genus g surface has χ = 2 - 2g
|
|
111
|
+
|
|
112
|
+
Non-orientable surfaces: RP² (χ=1), Klein bottle (χ=0), ... — genus g non-orientable surface has χ = 2 - g
|
|
113
|
+
|
|
114
|
+
**Standard form**: every compact surface is homeomorphic to a connected sum of tori or projective planes. Orientable: #g T² (connected sum of g tori); non-orientable: #g RP² (connected sum of g projective planes).
|
|
115
|
+
|
|
116
|
+
**Completeness of classification**: (orientability, χ) is a complete invariant set — two compact surfaces are homeomorphic if and only if they share the same orientability and the same Euler characteristic.
|
|
117
|
+
|
|
118
|
+
## Morse Theory
|
|
119
|
+
|
|
120
|
+
> "Critical points of a smooth function encode the manifold's topology — Morse theory bridges analysis and topology."
|
|
121
|
+
|
|
122
|
+
**Marston Morse** (1892-1977) established this theory:
|
|
123
|
+
|
|
124
|
+
A **Morse function** f: M → R has the property that every critical point p (where df(p) = 0) is non-degenerate (the determinant of the Hessian matrix ≠ 0). The index of a critical point = the number of negative eigenvalues of the Hessian = the dimension of the "downward directions" at the critical point.
|
|
125
|
+
|
|
126
|
+
**Core theorem**: Morse inequalities relate critical point counts to Betti numbers:
|
|
127
|
+
- c_k ≥ β_k (number of k-dimensional critical points ≥ k-th Betti number)
|
|
128
|
+
- c_k - c_{k-1} + ... ± c_0 ≥ β_k - β_{k-1} + ... ± β_0
|
|
129
|
+
|
|
130
|
+
**Intuition**: scanning M from low to high values of f, each critical point of index k triggers a "k-dimensional attachment" — equivalent to gluing a k-cell. The entire topology of the manifold is completely determined by all critical points and their indices.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
**Summary**: Topological ideas pervade the core of mathematics — from Euler's characteristic to Poincaré's fundamental group, from the computability of homology groups to the data applications of persistent homology, from the applied power of fixed point theorems to the biological relevance of knot theory. Topology provides a unified perspective on "what remains invariant under continuous deformation." It tells us: what truly matters is not precise measurement, but the essence of structure — connectedness, holes, dimension, orientability. These properties survive stretching and bending, and change only under tearing and gluing — this is precisely the fundamental boundary that distinguishes topology from geometry.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transformation
|
|
3
|
+
description: |
|
|
4
|
+
Trigger when a problem is intractable in its current representation and needs a mathematical transform into an equivalent simpler problem; or finding an equivalent but more GPU-friendly representation (e.g. convolution->GEMM, spectral transform) for algorithm/operator design.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Transformation
|
|
8
|
+
|
|
9
|
+
> "Complex problem -> equivalent simple problem; the key is finding the right transformation and its inverse."
|
|
10
|
+
>
|
|
11
|
+
> -- Fourier, Laplace, Coordinate Transform
|
|
12
|
+
|
|
13
|
+
## Core Principle
|
|
14
|
+
|
|
15
|
+
**The same problem can have different representations. Choosing a good representation (or transformation) can make a difficult problem simple.** The essence of a transformation is not to change the problem itself, but to change the perspective from which it is viewed.
|
|
16
|
+
|
|
17
|
+
> **Mathematical Formalization**
|
|
18
|
+
>
|
|
19
|
+
> Let a transformation $T: D_1 \to D_2$. $T$ is useful if and only if three conditions hold simultaneously: (1) **Computability**: $T(x)$ can be explicitly computed; (2) **Simplification**: the problem is more tractable in $D_2$ (e.g., differentiation -> multiplication, convolution -> multiplication); (3) **$T^{-1}$ exists**: the solution in $D_2$ can be mapped back to the original solution in $D_1$.
|
|
20
|
+
>
|
|
21
|
+
> Core question: **Under what conditions does $T^{-1}$ exist?** Existence determines equivalence, and the domain of convergence determines validity. Properties: equivalence (no information loss, requiring $T^{-1}$ to exist), simplification, invertibility (when $T^{-1}$ exists and is computable, the transformation is exact rather than approximate).
|
|
22
|
+
|
|
23
|
+
## GPU-Friendliness (Cross-Cutting Check)
|
|
24
|
+
|
|
25
|
+
In algorithm design, the value of a transformation often manifests as "converting an unfriendly operation into a GPU-friendly one" -- pass the eight-dimensional gate in `../../references/gpu-friendly-math.md`:
|
|
26
|
+
|
|
27
|
+
- **Convolution -> GEMM** (im2col / Winograd): Converts irregular convolution into matrix multiplication, fully utilizing Tensor Cores (friendly, but watch for memory expansion).
|
|
28
|
+
- **Spectral transforms (FFT / DCT)**: $O(N^2)\to O(N\log N)$, batch-parallelizable; but butterfly communication patterns require attention to memory access.
|
|
29
|
+
- **Duality transforms (Legendre / Fenchel)**: Converts constrained optimization into a dual problem -- friendly if the dual is more GEMM-amenable.
|
|
30
|
+
- **Transforms as compression**: Frequency-domain sparsity means only significant coefficients need to be stored (KV / activation compression, friendly).
|
|
31
|
+
- **Anti-patterns**: The transform itself requires $O(n^2)$ global rearrangement and cannot be fused -- "beautiful but incomputable"; the inverse transform is not numerically stable (ill-conditioned).
|
|
32
|
+
|
|
33
|
+
Eight-dimensional minimum assessment (formal terms): **Tensorization** -- whether the transform / inverse transform can be batched; **GEMM-mappability** -- whether it can be rewritten as GEMM / convolution / FFT / batched solve; **Complexity** -- the transform must reduce, not increase, the computational order; **Memory & KV-Cache** -- whether im2col, frequency-domain caches, and block summaries save memory rather than explode it; **Low-precision stability** -- inverse transform, orthogonalization, normalization; **Parallelism & communication** -- butterfly / scan / block communication patterns; **Sparse structure** -- whether frequency-domain / block sparsity is structured; **Operator fusion** -- whether the transform-core operation-inverse transform chain can be fused or recomputed.
|
|
34
|
+
|
|
35
|
+
> Cross-reference `../../references/books/matrix-analysis.md` (spectral / low-rank), `optimization-ml.md` (duality).
|
|
36
|
+
|
|
37
|
+
## When NOT to Use
|
|
38
|
+
|
|
39
|
+
- **The problem is already simple enough** -- no transformation is needed.
|
|
40
|
+
- **The transformation loses critical information** (irreversible, and the lost information is precisely what matters) -- choose an information-preserving transformation.
|
|
41
|
+
- **Only qualitative understanding is needed** -- transformations are typically quantitative tools.
|
|
42
|
+
- **Convergence conditions are not satisfied** -- forcing a transformation produces meaningless results.
|
|
43
|
+
|
|
44
|
+
## When to Use
|
|
45
|
+
|
|
46
|
+
- The problem is difficult to analyze or solve in its current form; revealing hidden structure in data (periodic signals -> frequency spectrum).
|
|
47
|
+
- Simplifying complex operations into simpler ones (convolution -> multiplication); linearizing nonlinear problems; decoupling coupled variables.
|
|
48
|
+
- **Finding an equivalent but more GPU-friendly representation for an operator** (convolution -> GEMM, sparse -> structured, frequency-domain compression).
|
|
49
|
+
|
|
50
|
+
## Method
|
|
51
|
+
|
|
52
|
+
### Step 1: Analyze the Difficulty of the Current Representation
|
|
53
|
+
Why is the current form hard to work with? Is the computation complex (e.g., ODEs are hard to solve directly)? Is the structure opaque (periodicity is invisible in the time domain)? Are variables coupled? Identifying "where the difficulty lies" is a prerequisite for choosing a transformation; selecting a transform without diagnosis is blind operation.
|
|
54
|
+
|
|
55
|
+
### Step 2: Select the Transformation
|
|
56
|
+
Choose based on the type of difficulty; for each candidate, verify the formula, domain mapping, convergence conditions, and simplification effect:
|
|
57
|
+
|
|
58
|
+
| Transform | Formula | Domain Mapping | Convergence / Validity | Simplification Effect |
|
|
59
|
+
|---|---|---|---|---|
|
|
60
|
+
| Fourier | $F(\omega)=\int f(t)e^{-i\omega t}\,dt$ | $t\in\mathbb{R}\to\omega\in\mathbb{R}$ | Dirichlet: absolutely integrable, finitely many extrema/discontinuities | Differentiation -> multiplication, convolution -> multiplication |
|
|
61
|
+
| Laplace | $F(s)=\int_0^\infty f(t)e^{-st}\,dt$ | $t\in[0,\infty)\to s\in\mathbb{C},\;\text{Re}(s)>\alpha$ | $\exists\alpha: \int|f(t)|e^{-\alpha t}\,dt<\infty$ | Constant-coefficient ODE -> algebraic equation, incorporates initial conditions |
|
|
62
|
+
| Z-transform | $F(z)=\sum f[n]z^{-n}$ | $n\in\mathbb{N}\to z\in\mathbb{C},\;|z|>R$ | $\exists R: \sum|f[n]|R^{-n}<\infty$ | Difference equation -> algebraic equation |
|
|
63
|
+
| Generating function | $G(x)=\sum a_n x^n$ | $n\in\mathbb{N}\to x,\;|x|<\rho$ | $\exists\rho: \sum|a_n|\rho^n$ converges | Recurrence -> differential equation |
|
|
64
|
+
| Legendre | $f^*(p)=\sup_x(px-f(x))$ | $x\to p=f'(x)$ | When $f$ is convex and differentiable, $p\leftrightarrow x$ is a bijection | Convex optimization -> dual, Lagrangian -> Hamiltonian |
|
|
65
|
+
| Wavelet | $W(a,b)=\int f(t)\psi_{a,b}(t)\,dt$ | $t\in\mathbb{R}\to(a,b)$ | $f\in L^2$, $\psi$ admissible | Time-frequency localization, multi-scale analysis |
|
|
66
|
+
|
|
67
|
+
### Step 3: Execute the Transformation
|
|
68
|
+
Transform the problem into the new representation space, strictly following the formula. A transformation is not an escape from the problem; it is a re-expression of the same problem in a more effective language.
|
|
69
|
+
|
|
70
|
+
### Step 4: Verify Convergence and Domain Conditions
|
|
71
|
+
**Before applying transformation results, one must verify convergence conditions**: For Fourier, check Dirichlet conditions ($\int|f|\,dt<\infty$); for Laplace, determine the region of convergence $\text{Re}(s)>\alpha$ (outside this region $F(s)$ is undefined); for the Z-transform, determine $|z|>R$ (the inverse transform depends on the choice of region of convergence); for generating functions, determine the radius of convergence $\rho$; for wavelets, verify the admissibility condition of the mother wavelet. Skipping this step is the largest source of errors.
|
|
72
|
+
|
|
73
|
+
### Step 5: Solve in the Transformed Space
|
|
74
|
+
In the new representation the problem is often simpler; all operations must be carried out within the valid domain of the transform. The value of the transformed space lies in making originally hidden structure visible.
|
|
75
|
+
|
|
76
|
+
### Step 6: Apply the Inverse Transform to Return to the Original Space
|
|
77
|
+
Map the solution back to the language of the original problem. The existence of the inverse transform requires conditions: Fourier inverse $f(t)=(1/2\pi)\int F(\omega)e^{i\omega t}\,d\omega$ (requires $F$ to be absolutely integrable); Laplace inverse via the Bromwich integral $f(t)=(1/2\pi i)\int F(s)e^{st}\,ds$ ($\gamma>\alpha$, to the right of the region of convergence); Z-inverse $f[n]=(1/2\pi i)\oint F(z)z^{n-1}\,dz$ (contour within the region of convergence); generating function $a_n=G^{(n)}(0)/n!$ or $[x^n]G(x)$. The transformation is merely a means; the final answer must be in the original space.
|
|
78
|
+
|
|
79
|
+
### Step 7: Verify Equivalence
|
|
80
|
+
Confirm that the transformation has not lost critical information and that the inverse-transformed result is indeed a solution of the original problem: Was the inverse transform executed within the correct region of convergence? Does the original function satisfy the prerequisite conditions? Were boundary / initial conditions correctly encoded? Equivalence is the bottom line of transformation theory -- a transformation must be a verifiably equivalent operation, not an approximation or an evasion.
|
|
81
|
+
|
|
82
|
+
## Common Errors
|
|
83
|
+
|
|
84
|
+
| Error | Critique | Correct Approach |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| Choosing an inappropriate transformation | Fails to simplify and instead increases complexity | Select the transformation based on problem characteristics |
|
|
87
|
+
| Using an irreversible transformation that loses information | Cannot return to the original problem after transformation | Verify invertibility or confirm that the lost information is not critical |
|
|
88
|
+
| Forgetting the inverse transform | After obtaining a solution in the new space, forgetting to transform back | The final answer must be in the original space |
|
|
89
|
+
| Ignoring domain changes after transformation | The transformation may alter the domain or introduce singularities | Check the post-transformation domain and boundary conditions |
|
|
90
|
+
| Treating the transformation as magic | A transformation only changes the representation, not the essence of the problem | A transformation is a tool; understanding is the core competency |
|
|
91
|
+
| Applying Fourier to non-integrable functions | When $\int|f|\,dt=\infty$, $F(\omega)$ may be meaningless | First check Dirichlet conditions; if not satisfied, use generalized functions or Laplace |
|
|
92
|
+
| Ignoring the Laplace region of convergence | $F(s)$ is defined only for $\text{Re}(s)>\alpha$ | Restrict all operations to the region of convergence |
|
|
93
|
+
| Assuming all transformations are invertible | Some transformations are not invertible under certain conditions (e.g., non-convex Legendre) | Verify invertibility conditions before applying the inverse transform |
|
|
94
|
+
| Overlooking discrete transforms (DFT/FFT) | Continuous transforms are not applicable to discrete data | Use the DFT for discrete data: $X[k]=\sum x[n]e^{-i2\pi kn/N}$ |
|
|
95
|
+
| Post-transformation incomputability / non-fusibility | The transform requires $O(n^2)$ global rearrangement or an ill-conditioned inverse | Evaluate the GPU eight-dimensional gate; if necessary, choose a fusible, numerically stable equivalent transformation |
|
|
96
|
+
|
|
97
|
+
## Operating Procedure
|
|
98
|
+
|
|
99
|
+
The output must include:
|
|
100
|
+
|
|
101
|
+
1. **Difficulty of the current representation**: `[Difficulty]: [Description]`
|
|
102
|
+
2. **Transformation selection**: `[Transform]: [Choice] because [Reason], formula [Formula], convergence conditions [Conditions], expected simplification [Effect]`
|
|
103
|
+
3. **Transformation execution**: The problem form after transformation
|
|
104
|
+
4. **Convergence and domain verification**: `[Verification]: [Whether conditions are satisfied, region of convergence]`
|
|
105
|
+
5. **Solution in transformed space**: The solution method under the new representation
|
|
106
|
+
6. **Inverse transform**: The solution translated back to the original space, noting inverse-transform conditions
|
|
107
|
+
7. **Equivalence verification**: Is it invertible? Is information lost? Is the region of convergence correct?
|
|
108
|
+
8. **[GPU viability]** (if used for operator design) -- whether the transformation converts the operation into GEMM / fusible / numerically stable form; pass the eight-dimensional gate
|
|
109
|
+
|
|
110
|
+
**Output must not consist of analysis alone without conclusions.**
|
|
111
|
+
|
|
112
|
+
## Relations to Other Skills
|
|
113
|
+
|
|
114
|
+
- **Abstraction**: A transformation is also an act of abstraction -- representing the same object in a new structure.
|
|
115
|
+
- **Symmetry and invariance**: Properties that remain unchanged under a transformation are precisely the symmetries of that transformation.
|
|
116
|
+
- **Optimization**: Transforming to the dual space sometimes makes optimization easier.
|
|
117
|
+
- **Modeling**: A transformation is often a key step in solving a model.
|
|
118
|
+
- **Algorithmic thinking**: The FFT reduces the DFT from $O(N^2)$ to $O(N\log N)$, exemplifying how transformation ideas serve computational efficiency.
|
|
119
|
+
- **Information theory**: Coding is transformation -- source coding transforms data into an efficient representation; channel coding transforms it into a noise-resistant representation.
|
|
120
|
+
- **Modern mathematics activation**: `../../references/books/matrix-analysis.md` (spectral / low-rank transforms), `algebraic-geometry-rising-sea.md` (Plücker coordinates for KV compression, tropical gating), `optimization-ml.md` (duality transforms).
|
|
@@ -5,6 +5,8 @@ description: |
|
|
|
5
5
|
English: Trigger when a problem is intractable in its current representation and needs a mathematical transform into an equivalent simpler problem; or finding an equivalent but more GPU-friendly representation (e.g. convolution→GEMM, spectral transform) for algorithm/operator design.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **语言路由**:若用户消息为英文,请读取并遵循同目录下的 `SKILL.en.md`,按其操作规程以英文输出;中文消息则继续使用本文件。
|
|
9
|
+
|
|
8
10
|
# 🔄 变换思想 / Transformation
|
|
9
11
|
|
|
10
12
|
> "复杂问题→等价简单问题,关键是找到合适的变换和逆变换。"
|