Skip to content

Commit 7af8545

Browse files
committed
wip
1 parent c4c13e5 commit 7af8545

9 files changed

Lines changed: 54 additions & 59 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Extended interactive studies, each accompanied by documentation describing the u
2424
methods.
2525

2626
| Laboratory | Description |
27-
|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
27+
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
2828
| [Pentagonal Lattice Geometry](experiments/Pentagon_Lattice_Geometry/index.html) | Multi-sheeted covering construction where the pentagon develops fractional dimension (d ≈ 2.37) and spinor-like holonomy |
2929
| [Space-Color Symmetry](experiments/symmetry_simple/index.html) | A pixel canvas where symmetry rewires the diffusion graph, producing kaleidoscope dynamics on a quotient-like manifold |
3030
| [Geometric Entropy](experiments/geometric-entropy/index.html) | A continuous analogue of the Erdős distinct-distance problem via Shannon entropy optimization |
@@ -38,7 +38,7 @@ methods.
3838
Extended written investigations into the foundations of computational mathematics.
3939

4040
| Essay | Description |
41-
|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
41+
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
4242
| [Quadratic Quasi-Newton](essays/QQN/index.html) | A new optimization algorithm interpolating between gradient descent and L-BFGS |
4343
| [Rational Certificate Complexity](essays/RCC/index.html) | A computational taxonomy of mathematical constants, stratified by certificate cost |
4444
| [The Simplest Increment: x + sin(x)](essays/PI_RCC/index.html) | A cubic-convergent iteration for π built from the derivative structure of an analytic function |
@@ -49,7 +49,7 @@ Extended written investigations into the foundations of computational mathematic
4949
Compact, self-contained demonstrations of classical mathematical concepts.
5050

5151
| Demonstration | Description |
52-
|------------------------------------------------------|-----------------------------------------------|
52+
| ---------------------------------------------------- | --------------------------------------------- |
5353
| [Mandelbrot Set](experiments/basic/mandelbrot.html) | Zoom and pan the iconic complex-plane fractal |
5454
| [Prime Number Sieve](experiments/basic/primes.html) | Animated Sieve of Eratosthenes |
5555
| [Fourier Series](experiments/basic/fourier.html) | Build waveforms from rotating circles |
@@ -91,4 +91,4 @@ libraries (MathJax, Mermaid). Deployed as a static site to AWS S3 + CloudFront v
9191

9292
## 📄 License
9393

94-
See [LICENSE](LICENSE).
94+
See [LICENSE](LICENSE).

essays/PI_RCC/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ This gives a rational approximant to the next iterate:
105105
y_m = x + s_m(x)
106106
```
107107

108-
The sequence y_m converges to x + sin(x) as m → ∞. Each y_m is a rational number paired with a computable error bound — a _certificate_ that the true iterate lies within an explicit interval around y_m. This is, in essence, interval arithmetic with rational endpoints: the framework of validated numerics (Moore, Rump, Tucker) applied to a specific transcendental update.
108+
The sequence y*m converges to x + sin(x) as m → ∞. Each y_m is a rational number paired with a computable error bound — a \_certificate* that the true iterate lies within an explicit interval around y_m. This is, in essence, interval arithmetic with rational endpoints: the framework of validated numerics (Moore, Rump, Tucker) applied to a specific transcendental update.
109109

110110
### Inner Convergence Rate
111111

@@ -179,7 +179,7 @@ The x + sin(x) engine fits none of these categories cleanly.
179179

180180
It is not a hypergeometric series — the outer recurrence is nonlinear and cannot be expressed as a ratio of consecutive hypergeometric terms in the iteration index.
181181

182-
It is not a Newton method — Newton's method for sin(x) = 0 gives x\_{n+1} = x_n − tan(x_n), a different map with different structure that requires evaluating _both_ sin and cos and performing a division. The x + sin(x) iteration achieves cubic convergence without division and without derivative evaluation.
182+
It is not a Newton method — Newton's method for sin(x) = 0 gives x\_{n+1} = x*n − tan(x_n), a different map with different structure that requires evaluating \_both* sin and cos and performing a division. The x + sin(x) iteration achieves cubic convergence without division and without derivative evaluation.
183183

184184
It is not an AGM — there is no arithmetic-geometric mean in sight.
185185

essays/PI_RCC/perspectives.details.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ e_{n+1} = (1/6)e_n³ + O(e_n⁵)
2828

2929
is standard. However, several numerical analysis subtleties deserve sharper treatment:
3030

31-
**Basin of Attraction**: The cubic convergence holds only within a neighborhood of π where the Taylor expansion is valid _and_ where the cubic term dominates. Specifically, we need |e_n| small enough that the O(e_n⁵) term is negligible relative to e_n³/6. This requires roughly |e_n| < 1, but the _practical_ basin where cubic behavior is observed requires |e_n| ≲ 0.1 to avoid the quintic correction term contributing more than ~1% of the cubic term. The document glosses over the seed quality requirement.
31+
**Basin of Attraction**: The cubic convergence holds only within a neighborhood of π where the Taylor expansion is valid _and_ where the cubic term dominates. Specifically, we need |e*n| small enough that the O(e_n⁵) term is negligible relative to e_n³/6. This requires roughly |e_n| < 1, but the \_practical* basin where cubic behavior is observed requires |e_n| ≲ 0.1 to avoid the quintic correction term contributing more than ~1% of the cubic term. The document glosses over the seed quality requirement.
3232

3333
**Pre-asymptotic Behavior**: For seeds far from π, the iteration x + sin(x) is not contractive everywhere. The map has derivative 1 + cos(x), which equals 2 at x = 0 and is expansive for x ∈ (−π/2, π/2). A naive seed of x₀ = 3 gives e₀ ≈ 0.14, which is already in the cubic regime. But x₀ = 1 would diverge initially before potentially being captured. The document's claim of "start with a seed sufficiently close to π" needs quantification.
3434

@@ -966,7 +966,7 @@ Option 3 is the correct engineering choice and also reveals a deeper point: **ra
966966

967967
The document glosses over a critical implementation challenge: **the iteration requires a seed sufficiently close to π**. This is a bootstrapping problem.
968968

969-
For cubic convergence to dominate, we need |e_0| < 1 (roughly). But to get a _certified_ rational seed, we need an independent method. Options:
969+
For cubic convergence to dominate, we need |e*0| < 1 (roughly). But to get a \_certified* rational seed, we need an independent method. Options:
970970

971971
| Method | Complexity | Notes |
972972
| ------------------- | ----------------- | ----------------------- |

essays/PI_RCC/socratic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ The convergents p_k/q_k of a continued fraction are generated by the recurrence:
210210
- p*k = a_k · p*{k-1} + p\_{k-2}
211211
- q*k = a_k · q*{k-1} + q\_{k-2}
212212

213-
The best-approximation property — that p_k/q_k satisfies |α - p_k/q_k| < 1/q_k² and that no rational with smaller denominator does better — is _proved_ by induction on the iterative structure. The certificate is not a static object that the iteration merely happens to visit. The iteration _generates_ the certificate inductively. You cannot separate the optimality result from the recursive construction without losing the proof.
213+
The best-approximation property — that p*k/q_k satisfies |α - p_k/q_k| < 1/q_k² and that no rational with smaller denominator does better — is \_proved* by induction on the iterative structure. The certificate is not a static object that the iteration merely happens to visit. The iteration _generates_ the certificate inductively. You cannot separate the optimality result from the recursive construction without losing the proof.
214214

215215
So my claim that certification "points toward static optimality criteria fully separable from any iteration" was wrong in the continued fraction case. I was treating the _statement_ of the theorem as separable from its _proof structure_, which is a mistake.
216216

essays/QQN/papers/intro/paper_rendered.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ This paper makes three primary contributions:
104104
2
105105

106106
3. Benchmarking Framework: A reusable Rust application for optimization algorithm evaluation that
107-
promotes reproducible research and meaningful comparisons.
107+
promotes reproducible research and meaningful comparisons.
108108

109109
Optimal configurations remain problem-dependent, but QQN’s adaptive nature minimizes the need for
110110
extensive hyperparameter tuning. Scaling and convergence properties are theoretically justified, largely
@@ -164,8 +164,7 @@ that traces a path from the current point. We impose three natural boundary cond
164164
descent)
165165
3. Terminal Position: d(1) = dLBFGS (the curve ends at the L-BFGS direction)
166166

167-
168-
The second condition is crucial: by ensuring the path starts tangent to the negative gradient, we guarantee
167+
The second condition is crucial: by ensuring the path starts tangent to the negative gradient, we guarantee
169168

170169
that moving along the path initially decreases the objective function, regardless of where the path eventually
171170
leads. This provides robustness against poor quasi-Newton directions.
@@ -628,23 +627,23 @@ consistently outperformed other optimizer families across the benchmark suite.
628627

629628
12
630629

631-
3. Line Search Critical: Among QQN variants, line search strategy dramatically affects performance:
630+
3. Line Search Critical: Among QQN variants, line search strategy dramatically affects performance:
632631

633632
• Strong Wolfe: Excellent success rate with moderate average evaluations
634633
• Golden Section: 90-100% success rate on 2D problems with relatively few average evaluations
635634
• Bisection: Strong performance on various problems with minimal evaluations
636635
• Bisection: Strong performance on various problems with minimal evaluations
637636
• Cubic-Quadratic Interpolation: 70% success on Rosenbrock 5D, good for ill-conditioned objectives
638637

639-
4. Problem-Specific Excellence: Algorithms show significant specialization:
638+
4. Problem-Specific Excellence: Algorithms show significant specialization:
640639

641-
• QQN-GoldenSection: Achieved strong performance on multimodal problems
642-
• QQN-GoldenSection: Achieved strong performance on multimodal problems
643-
• QQN-CubicQuadraticInterpolation: 70% success on Rosenbrock 5D with strong performance on
644-
ill-conditioned problems
645-
• Adam-WeightDecay: Excellent performance on neural networks vs moderate performance for
646-
standard Adam
647-
• L-BFGS variants: Generally poor performance on ill-conditioned problems like Rosenbrock
640+
• QQN-GoldenSection: Achieved strong performance on multimodal problems
641+
• QQN-GoldenSection: Achieved strong performance on multimodal problems
642+
• QQN-CubicQuadraticInterpolation: 70% success on Rosenbrock 5D with strong performance on
643+
ill-conditioned problems
644+
• Adam-WeightDecay: Excellent performance on neural networks vs moderate performance for
645+
standard Adam
646+
• L-BFGS variants: Generally poor performance on ill-conditioned problems like Rosenbrock
648647

649648
7.2 The Benchmarking and Reporting Framework
650649
7.2.1 Methodological Contributions
@@ -796,15 +795,15 @@ demonstrates:
796795

797796
15
798797

799-
3. Efficiency vs Robustness: QQN shows superior efficiency with strong success rates across problem
800-
types while requiring fewer function evaluations than traditional methods. 4. Theoretical Foundation: Rigorous proofs establish global convergence under mild assumptions and
801-
local superlinear convergence matching quasi-Newton methods.
798+
3. Efficiency vs Robustness: QQN shows superior efficiency with strong success rates across problem
799+
types while requiring fewer function evaluations than traditional methods. 4. Theoretical Foundation: Rigorous proofs establish global convergence under mild assumptions and
800+
local superlinear convergence matching quasi-Newton methods.
802801

803-
5. Practical Impact: The results provide clear guidance for practitioners: use QQN-StrongWolfe for
804-
general optimization, QQN-Bisection variants for high-dimensional problems, QQN-GoldenSection for
805-
multimodal landscapes, and QQN-CubicQuadraticInterpolation for sparse or ill-conditioned problems.
802+
5. Practical Impact: The results provide clear guidance for practitioners: use QQN-StrongWolfe for
803+
general optimization, QQN-Bisection variants for high-dimensional problems, QQN-GoldenSection for
804+
multimodal landscapes, and QQN-CubicQuadraticInterpolation for sparse or ill-conditioned problems.
806805

807-
The simplicity of QQN’s core insight—that quadratic interpolation provides the natural geometry for
806+
The simplicity of QQN’s core insight—that quadratic interpolation provides the natural geometry for
808807

809808
combining optimization directions—contrasts with the complexity of recent developments. Combined with
810809
our evaluation methodology, this work establishes new standards for both algorithm development and em-
@@ -1036,13 +1035,13 @@ We seek a principled method to combine these directions that:
10361035
3. Requires no additional hyperparameters
10371036
4. Maintains computational efficiency
10381037

1039-
14.1.2 B.1.2 Geometric Formulation
1040-
We formulate direction combination as a boundary value problem in parametric space. Consider a parametric
1041-
curve d : [0, 1] → Rn satisfying:
1038+
14.1.2 B.1.2 Geometric Formulation
1039+
We formulate direction combination as a boundary value problem in parametric space. Consider a parametric
1040+
curve d : [0, 1] → Rn satisfying:
10421041

1043-
1. Initial position: d(0) = 0
1044-
2. Initial tangent: d′ (0) = −∇f (x) (ensures descent)
1045-
3. Terminal position: d(1) = dL-BFGS
1042+
5. Initial position: d(0) = 0
1043+
6. Initial tangent: d′ (0) = −∇f (x) (ensures descent)
1044+
7. Terminal position: d(1) = dL-BFGS
10461045

10471046
The minimal polynomial satisfying these constraints is quadratic:
10481047

@@ -1243,8 +1242,8 @@ Proof :
12431242
23
12441243

12451244
1. Path construction: Computing d(t) = t(1−t)(−∇f )+t2 dL-BFGS requires O(n) operations for vector
1246-
arithmetic. 2. L-BFGS direction: The two-loop recursion requires O(mn) operations to compute Hk ∇f (xk ). 3. Line search: Each function evaluation along the path requires O(n) operations to compute xk + d(t),
1247-
plus the cost of evaluating f .
1245+
arithmetic. 2. L-BFGS direction: The two-loop recursion requires O(mn) operations to compute Hk ∇f (xk ). 3. Line search: Each function evaluation along the path requires O(n) operations to compute xk + d(t),
1246+
plus the cost of evaluating f .
12481247

12491248
Total complexity per iteration: O(mn + kn) + k · cost(f ). □
12501249

@@ -1337,5 +1336,3 @@ dquasi-Newton if condition B
13371336
QQN provides continuous interpolation, eliminating discontinuities and the need for switching logic.
13381337

13391338
25
1340-
1341-

essays/QQN/papers/theory/paper_rendered.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -447,34 +447,34 @@ univariate optimization will find t∗ → 1. □
447447
8.2.1 B.1 L-BFGS Direction Computation
448448
The L-BFGS direction is computed using the two-loop recursion:
449449

450-
function compute_lbfgs_direction(gradient, memory):
450+
function compute*lbfgs_direction(gradient, memory):
451451
q = gradient
452452
alphas = []
453453
// First loop (backward)
454454
for i = memory.size-1 down to 0:
455-
rho_i = 1 / (memory.y[i]^T _ memory.s[i])
456-
alpha_i = rho_i _ memory.s[i]^T _ q
455+
rho_i = 1 / (memory.y[i]^T * memory.s[i])
456+
alpha*i = rho_i * memory.s[i]^T _ q
457457
q = q - alpha_i _ memory.y[i]
458-
alphas.append(alpha_i)
458+
alphas.append(alpha*i)
459459
// Apply initial Hessian approximation
460460
if memory.size > 0:
461-
gamma = (memory.s[-1]^T _ memory.y[-1]) / (memory.y[-1]^T _ memory.y[-1])
461+
gamma = (memory.s[-1]^T * memory.y[-1]) / (memory.y[-1]^T _ memory.y[-1])
462462
r = gamma _ q
463463
else:
464464
r = q
465465
// Second loop (forward)
466466
for i = 0 to memory.size-1:
467-
rho_i = 1 / (memory.y[i]^T _ memory.s[i])
468-
beta = rho_i _ memory.y[i]^T _ r
467+
rho*i = 1 / (memory.y[i]^T * memory.s[i])
468+
beta = rho*i * memory.y[i]^T \_ r
469469
r = r + (alphas[memory.size-1-i] - beta) \* memory.s[i]
470470
return -r
471471

472472
8.2.2 B.2 Univariate Optimization Methods
473473
Golden Section Search
474-
function golden_section_search(f, a, b, tol):
474+
function golden*section_search(f, a, b, tol):
475475
phi = (1 + sqrt(5)) / 2
476476
resphi = 2 - phi
477-
x1 = a + resphi _ (b - a)
477+
x1 = a + resphi * (b - a)
478478
x2 = b - resphi _ (b - a)
479479
f1 = f(x1)
480480
f2 = f(x2)
@@ -489,7 +489,7 @@ else:
489489
b = x2
490490
x2 = x1
491491
f2 = f1
492-
x1 = a + resphi _ (b - a)
492+
x1 = a + resphi \_ (b - a)
493493
f1 = f(x1)
494494
return (a + b) / 2
495495

@@ -670,5 +670,3 @@ QQN matches L-BFGS complexity while providing gradient descent robustness and of
670670
function evaluations due to better step selection.
671671

672672
13
673-
674-

experiments/irrational_lattice/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ window.addEventListener('mousemove', (ev) => {
425425
if (!dragging) return;
426426
const cur = clientToFieldPixel(ev);
427427
// Drag moves the view: dragging right pulls content right => pan left.
428-
// Round the pixel delta so panning snaps to whole field-pixel steps.
429-
// This keeps the lattice sampling aligned to the pixel grid and avoids
430-
// sub-pixel resampling jitter while dragging.
431-
const dxPx = Math.round(cur.fx - dragStart.fx);
432-
const dyPx = Math.round(cur.fy - dragStart.fy);
428+
// Round the pixel delta so panning snaps to whole field-pixel steps.
429+
// This keeps the lattice sampling aligned to the pixel grid and avoids
430+
// sub-pixel resampling jitter while dragging.
431+
const dxPx = Math.round(cur.fx - dragStart.fx);
432+
const dyPx = Math.round(cur.fy - dragStart.fy);
433433
const z = effectiveZoom(canvas.width);
434434
view.panX = panStart.x - dxPx * z;
435435
view.panY = panStart.y - dyPx * z;
@@ -694,4 +694,4 @@ regenerate();
694694
window.addEventListener('hashchange', () => {
695695
if (restoringFromHash) return;
696696
if (hashToState()) regenerate();
697-
});
697+
});

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,4 +631,4 @@ <h2 class="modal-title" id="modalTitle"></h2>
631631

632632
<script src="js/home.js"></script>
633633
</body>
634-
</html>
634+
</html>

site_icon.op.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ related:
55
- README.md
66
---
77

8-
Generate a site icon (favicon) for the project.
8+
Generate a site icon (favicon) for the project.
99
The icon should be a simple, recognizable image that represents the project's theme or brand.
1010
Use an aspect ratio of 1:1, and a size of 512x512 pixels
11-
Use a solid color background with a contrasting symbol or letter that can be easily identified even at small sizes (16x16 pixels).
11+
Use a solid color background with a contrasting symbol or letter that can be easily identified even at small sizes (16x16 pixels).
1212
Do not blur, feather, or use a shadow effect, to make it easy to change the background to transparent.
1313
The design should be clean and minimalistic, avoiding intricate details that may not be visible at smaller resolutions.

0 commit comments

Comments
 (0)