amari 0.19.1

Advanced mathematical computing library with geometric algebra, tropical algebra, and automatic differentiation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# Amari Learning Paths v0.17.0

Welcome to the Amari educational journey! This guide provides structured pathways for learning geometric algebra, dynamical systems, computational topology, and functional analysis through our comprehensive example suite.

## Overview

Amari v0.17.0 provides learning tracks across multiple mathematical domains. Each path builds upon previous knowledge while providing practical, hands-on experience.

## Core Tracks

### Beginner Track: Foundations
*Prerequisites: Basic linear algebra, calculus*

**Goal**: Understand fundamental concepts of geometric algebra and dual numbers

#### Module 1: Geometric Algebra Basics
1. **Start Here**: `examples/rust/physics-simulation/`
   - Scalar, vector, bivector operations
   - Geometric product fundamentals
   - Basic rotations with rotors

2. **Visualization**: `examples/web/interactive-demos/`
   - 3D Rotations with Rotors demo
   - Compare with traditional approaches

3. **Practice**: `examples/rust/computer-graphics/`
   - Implement basic transformations
   - Understand gimbal lock avoidance

#### Module 2: Dual Numbers Introduction
1. **Automatic Differentiation**: `examples/rust/machine-learning/`
   - Single-variable derivatives
   - Compare with finite differences
   - Error analysis

2. **Interactive**: `examples/web/interactive-demos/`
   - Automatic Differentiation demo
   - Real-time gradient visualization

#### Module 3: First Applications
1. **Simple Physics**: `examples/rust/physics-simulation/`
   - Basic rigid body motion
   - Rotor-based rotations

2. **Basic Optimization**: `examples/rust/machine-learning/`
   - Gradient descent with exact gradients
   - Simple quadratic functions

**Assessment**: Complete beginner exercises and create a simple rotor-based animation.

---

### Intermediate Track: Applications
*Prerequisites: Beginner track completed*

**Goal**: Apply GA and dual numbers to real-world problems

#### Module 1: Advanced Geometric Algebra
1. **Physics Applications**: `examples/rust/physics-simulation/`
   - Electromagnetic fields as multivectors
   - Fluid dynamics with bivector vorticity

2. **Computer Graphics**: `examples/rust/computer-graphics/`
   - Camera systems and projections
   - Mesh operations and normal calculations
   - Ray tracing with natural ray representation

#### Module 2: Machine Learning
1. **Neural Networks**: `examples/rust/machine-learning/`
   - Verified backpropagation
   - XOR learning demonstration
   - Function approximation

2. **Advanced Optimization**
   - Adam optimizer with exact gradients
   - Newton's method with Hessian

#### Module 3: Quantum Mechanics
1. **Quantum GA**: `examples/rust/physics-simulation/`
   - Pauli matrices as bivectors
   - Spin state evolution
   - Bell's inequality demonstration

**Assessment**: Complete a multi-module project showcasing integrated GA/dual number concepts.

---

## Specialized Tracks

### Dynamical Systems Track
*Prerequisites: Calculus, ODEs, linear algebra*

**Goal**: Master analysis of nonlinear dynamical systems

#### Module 1: ODEs and Numerical Methods
**Examples**: `examples/rust/dynamical-systems/`

1. **Lorenz Attractor** (`lorenz_attractor.rs`)
   - Chaotic dynamics fundamentals
   - Numerical integration (RK4, Dormand-Prince)
   - Phase space visualization

2. **Van der Pol Oscillator** (`van_der_pol.rs`)
   - Limit cycles
   - Relaxation oscillations
   - Parameter dependence

Key concepts:
- State space representation
- Numerical integration methods
- Trajectory visualization

#### Module 2: Stability Analysis
**Examples**: `examples/rust/dynamical-systems/`

1. **Stability Analysis** (`stability_analysis.rs`)
   - Fixed point computation
   - Jacobian linearization
   - Eigenvalue classification

2. **Phase Portraits** (`phase_portraits.rs`)
   - Vector field visualization
   - Nullclines
   - Separatrices and basins of attraction

Key concepts:
- Linear stability theory
- Center manifold theorem
- Hartman-Grobman theorem

#### Module 3: Chaos and Bifurcations
**Examples**: `examples/rust/dynamical-systems/`

1. **Bifurcation Analysis** (`bifurcation_analysis.rs`)
   - Saddle-node bifurcations
   - Hopf bifurcations
   - Period-doubling cascades
   - Feigenbaum universality

2. **Lyapunov Exponents** (`lyapunov_exponents.rs`)
   - QR method computation
   - Chaos quantification
   - Kaplan-Yorke dimension

Key concepts:
- Sensitivity to initial conditions
- Strange attractors
- Routes to chaos

#### Module 4: Stochastic Dynamics
**Examples**: `examples/rust/dynamical-systems/stochastic_dynamics.rs`

1. **Langevin Dynamics**
   - Noise modeling
   - Brownian motion

2. **Fokker-Planck Equation**
   - Probability density evolution
   - Stationary distributions

3. **Noise-Induced Transitions**
   - Kramers escape rate
   - Stochastic resonance

**Capstone Project**: Analyze a real-world dynamical system (climate model, neural network dynamics, population dynamics).

---

### Computational Topology Track
*Prerequisites: Linear algebra, basic topology helpful*

**Goal**: Master topological data analysis and computational topology

#### Module 1: Simplicial Complexes
**Examples**: `examples/rust/topology/simplicial_complexes.rs`

1. **Building Simplices**
   - Vertices, edges, triangles, tetrahedra
   - Faces and boundaries
   - f-vectors

2. **Simplicial Complexes**
   - Complex construction
   - Euler characteristic
   - Skeleton and star operations

Key concepts:
- Combinatorial topology
- Chain complexes
- Boundary operator

#### Module 2: Homology
**Examples**: `examples/rust/topology/`

1. **Chain Complexes**
   - Boundary operator ∂
   - ∂² = 0 property
   - Cycles and boundaries

2. **Betti Numbers**
   - β₀: connected components
   - β₁: loops
   - β₂: voids

Key concepts:
- Kernel and image
- Quotient groups
- Rank-nullity

#### Module 3: Persistent Homology
**Examples**: `examples/rust/topology/persistent_homology.rs`

1. **Filtrations**
   - Nested complex sequences
   - Birth and death times
   - Persistence pairs

2. **Persistence Diagrams**
   - (birth, death) representation
   - Persistence = lifetime
   - Stability theorem

Key concepts:
- Multi-scale topology
- Feature significance
- Noise vs signal

#### Module 4: Topological Data Analysis
**Examples**: `examples/rust/topology/topological_data_analysis.rs`

1. **Point Cloud Analysis**
   - Vietoris-Rips complex
   - Alpha complex
   - Distance matrix input

2. **Shape Detection**
   - Clustering via H₀
   - Loop detection via H₁
   - Void detection via H₂

3. **Feature Extraction**
   - Persistence landscapes
   - Persistence images
   - Bottleneck distance

**Capstone Project**: Apply TDA to real dataset (molecular structure, sensor network, image analysis).

---

### Functional Analysis Track
*Prerequisites: Real analysis, linear algebra, basic topology*

**Goal**: Master Hilbert and Banach space theory

#### Module 1: Hilbert Spaces
**Examples**: `examples/rust/functional-analysis/hilbert_spaces.rs`

1. **Inner Product Spaces**
   - Axioms and examples
   - Cauchy-Schwarz inequality
   - Orthogonality

2. **Completeness**
   - Cauchy sequences
   - L² spaces
   - Sequence spaces ℓ²

3. **Orthonormal Bases**
   - Gram-Schmidt process
   - Fourier basis
   - Parseval's identity

Key concepts:
- Projection theorem
- Best approximation
- Riesz representation

#### Module 2: Operators
**Examples**: `examples/rust/functional-analysis/operators.rs`

1. **Bounded Linear Operators**
   - Operator norm
   - Continuity ↔ boundedness

2. **Adjoint Operators**
   - Definition and properties
   - Self-adjoint operators

3. **Special Operators**
   - Compact operators
   - Unitary operators
   - Integral operators

Key concepts:
- Operator algebra
- Commutativity
- Spectrum preview

#### Module 3: Spectral Theory
**Examples**: `examples/rust/functional-analysis/spectral_theory.rs`

1. **Eigenvalue Problems**
   - Eigenvalues and eigenvectors
   - Rayleigh quotient

2. **Spectral Theorem**
   - Self-adjoint decomposition
   - Projection operators

3. **Functional Calculus**
   - f(A) for operators
   - Square roots, exponentials
   - Inverses

Key concepts:
- Point spectrum
- Continuous spectrum
- Spectral radius

#### Module 4: Banach Spaces
**Examples**: `examples/rust/functional-analysis/banach_spaces.rs`

1. **Lᵖ Spaces**
   - Norms for 1 ≤ p ≤ ∞
   - Embeddings
   - Hölder's inequality

2. **Dual Spaces**
   - Bounded linear functionals
   - Reflexivity

3. **Fixed Point Theory**
   - Banach contraction principle
   - Applications

Key concepts:
- Open mapping theorem
- Closed graph theorem
- Hahn-Banach theorem

#### Module 5: Distributions
**Examples**: `examples/rust/functional-analysis/distributions.rs`

1. **Test Functions**
   - Smooth compact support
   - Bump functions

2. **Distributions**
   - Dirac delta
   - Heaviside function
   - Weak derivatives

3. **Applications**
   - PDEs
   - Fourier transforms
   - Signal processing

**Capstone Project**: Implement a PDE solver using spectral methods and distribution theory.

---

## Cross-Domain Tracks

### Research Track: Innovation
*Prerequisites: At least one specialized track + domain expertise*

**Goal**: Push the boundaries of mathematical computing

#### Research Areas
1. **Theoretical Foundations**
   - Novel algebraic structures
   - Formal verification
   - Proof assistants

2. **High-Performance Computing**
   - GPU acceleration
   - SIMD optimization
   - Parallel algorithms

3. **Novel Applications**
   - Topological machine learning
   - Geometric deep learning
   - Physics-informed networks

4. **Educational Innovation**
   - Visualization techniques
   - Interactive learning tools
   - Curriculum development

---

## Practical Learning Tips

### Setting Up Your Environment
```bash
# Clone the repository
git clone https://github.com/justinelliottcobb/amari.git
cd amari

# Run dynamical systems examples
cd examples/rust/dynamical-systems
cargo run --bin lorenz_attractor

# Run topology examples
cd ../topology
cargo run --bin persistent_homology

# Run functional analysis examples
cd ../functional-analysis
cargo run --bin spectral_theory

# Interactive demos
cd ../../web/interactive-demos
npm install
npm run dev
```

### Study Approach
1. **Read First**: Understand the mathematical concepts
2. **Run Examples**: Execute provided code
3. **Modify**: Change parameters and observe results
4. **Implement**: Write your own versions
5. **Apply**: Create novel applications

### Progress Tracking

#### Beginner Milestones
- [ ] Understand geometric product
- [ ] Implement basic rotor rotation
- [ ] Compute exact derivatives with dual numbers
- [ ] Compare GA vs traditional methods

#### Dynamical Systems Milestones
- [ ] Integrate Lorenz system
- [ ] Compute Lyapunov exponents
- [ ] Generate bifurcation diagram
- [ ] Analyze stability of fixed points

#### Topology Milestones
- [ ] Build simplicial complex
- [ ] Compute Betti numbers
- [ ] Generate persistence diagram
- [ ] Apply TDA to dataset

#### Functional Analysis Milestones
- [ ] Implement L² inner product
- [ ] Compute spectral decomposition
- [ ] Apply functional calculus
- [ ] Solve problem using distributions

---

## Recommended Reading

### Core Texts
- **Geometric Algebra**: Doran & Lasenby "Geometric Algebra for Physicists"
- **Dynamical Systems**: Strogatz "Nonlinear Dynamics and Chaos"
- **Topology**: Edelsbrunner & Harer "Computational Topology"
- **Functional Analysis**: Kreyszig "Introductory Functional Analysis"

### Specialized Topics
- **TDA**: Carlsson "Topology and Data"
- **Chaos**: Ott "Chaos in Dynamical Systems"
- **Spectral Theory**: Reed & Simon "Methods of Modern Mathematical Physics"

---

*Happy learning! The journey into mathematical computing opens new ways of thinking about computation, physics, and data. Take your time, experiment freely, and don't hesitate to explore.*