Experiment Index
How to Run
All experiments live in the theorem-proof/ directory alongside the Simplex compiler source.
Run all experiments at once
git clone https://github.com/senuamedia/lab.git
cd simplex && ./build.sh
cd ../theorem-proof
./run_all.sh # Core theorem experiments
./run_math_tests.sh # 188 compiler math tests
Run a single experiment
# Compile
../simplex/build/sxc exp_iratio_proof.sx -o build/exp_iratio_proof.ll
# Link with runtime
OPENSSL_PREFIX=$(brew --prefix openssl)
clang -O2 build/exp_iratio_proof.ll \
../simplex/runtime/standalone_runtime.c \
-o build/exp_iratio_proof \
-lm -lssl -lcrypto -L${OPENSSL_PREFIX}/lib
# Run
./build/exp_iratio_proof
Replace exp_iratio_proof with any experiment filename below. On Linux, omit the OPENSSL_PREFIX line and use -L/usr/lib instead.
Experiments by Category
Navier-Stokes Mode Scaling
Galerkin models of the 3D Navier-Stokes equations at increasing mode counts. The H/H'/H'' framework with doubling time criterion \(P\) achieves 93–96% accuracy and \(\alpha = 2.0\) at every scale. See the complete scaling summary.
| File | Model | Result | Score |
|---|---|---|---|
| exp_ns_6mode_solved.sx | 6-mode (3+3), \(k=1,2,3\) | \(A^* = 1.136\), \(P/\text{truth} = 86.1\%\), \(\alpha = 2.0\) | 17/20 |
| exp_ns_8mode_solve.sx | 8-mode (4+4), forward cascade | \(A^* = 0.290\), \(P/\text{truth} = 95.5\%\), \(\alpha = 2.0\) | 16/16 |
| exp_ns_10mode_solve.sx | 10-mode (5+5), two cascade stages | \(A^* = 0.302\), \(P/\text{truth} = 96.1\%\), \(\alpha = 2.0\) | 13/14 |
| exp_ns_12mode_solve.sx | 12-mode (6+6), triad cascade | \(A^* = 0.328\), \(P/\text{truth} = 93.8\%\), \(\alpha = 2.0\) | 14/14 |
| exp_ns_16mode_solve.sx | 16-mode (8+8), deep cascade \(k=1{-}4\) | \(A^* = 0.347\), \(P/\text{truth} = 94.6\%\), \(\alpha = 2.0\) | 14/14 |
| Mode Scaling Summary | All 5 models compared | \(A^*\) increasing, \(\alpha = 2.0\) universal, P/truth 93–96% | — |
Core Theorem
Direct validations of the main theorem conditions: contraction, Lyapunov stability, interaction matrices, convergence diagnostics, and the I-ratio / B-flow results.
| File | Validates | Result | Theorems / Conjectures |
|---|---|---|---|
| exp_contraction.sx | 5 subsystem types contract in Fisher metric | 5/5 subsystems contract, \(\beta < 1\) | Theorem 1 (Contraction) |
| exp_gradient_interference.sx | Cosine-scaled projection resolves all conflicts | 500/500 conflicts resolved (100%) | Theorem 2 (Cosine Projection) |
| exp_lyapunov.sx | Normalised Lyapunov function never increases | 0% violations over all trials | Theorem 3 (Lyapunov Stability) |
| exp_invariants.sx | Foundational constraints hold under strong gradients | 0 violations / 15,000 steps | Proposition 3.5 |
| exp_timescale.sx | Fast/slow timescale separation maintained | 100% for two-timescale, 95.9%+ for three-timescale | Theorem 1 (Timescale) |
| exp_composition.sx | Full composed system converges | System converges within tolerance | Theorems 1-5 (Composition) |
| exp_interaction_matrix.sx | Interaction matrix discovers coalition topology | Converges in 5 cycles | Theorem 4, Conjecture 6.8 |
| exp_convergence_order.sx | Higher-order convergence score \(S\) decays | \(S \to 0.9997\) | Theorem 5 (Convergence Order) |
| exp_iratio_proof.sx | \(I = -\tfrac{1}{2}\) at equilibrium for \(K = 2 \ldots 20\) | 138/138 tests pass, max error \(2.22 \times 10^{-16}\) | Theorem 13 (I-Ratio) |
| exp_iratio_proof_statistical.sx | \(I = -\tfrac{1}{2}\) for 70 random multi-objective problems | 70/70 pass | Theorem 13 (I-Ratio) |
| exp_balance_residual.sx | B-flow gradient descent on \(B(\theta)\) vs loss-flow | B-flow: \(8.8 \times 10^{-16}\), loss-flow: \(3.3 \times 10^{-4}\) — 375B× precision | Theorem 14 (B-Flow) |
Cognitive / Belief
Experiments on Bayesian belief systems, desire regularisation, skeptical annealing, memory dynamics, and liquid hive architectures.
| File | Validates | Result | Theorems / Conjectures |
|---|---|---|---|
| exp_anima_deep.sx | Belief interaction, consolidation, and desire effects | 31% calibration improvement with desire regularisation | Theorems 6, 7 (Belief, Desire) |
| exp_anima_correlated.sx | Correlated beliefs with misaligned desires | Desire acts as Bayesian regulariser | Theorem 7, Conjecture 7.1 |
| exp_belief_cascade.sx | Chain, circular, and delayed belief topologies | Chain topology partially discovered from data | Conjecture 6.4 (Belief Chain) |
| exp_skeptical_annealing.sx | Skeptic vs believer across all observation horizons | Skeptic wins always (not just early) — refutes annealing conjecture | Conjectures 6.3 (Refuted), 6.5 (Validated) |
| exp_memory_dynamics.sx | Forgetting rate, transfer learning, self-reference, phase | Meta-gradient recovers near-optimal \(\lambda^*\) | Conjectures 6.6–6.10 |
| exp_liquid_hive.sx | Liquid neural network within hive architecture | Dynamic agent reconfiguration converges | Theorems 6, 7 (Hive extension) |
Cross-Domain
Applications of the theorem framework to chaos theory, game theory, GANs, ODE solvers, number theory, and multi-domain I-ratio validation.
| File | Validates | Result | Theorems / Conjectures |
|---|---|---|---|
| exp_chaos_boundary.sx | Convergence score \(S\) detects chaos onset in logistic map | Feigenbaum point located at \(r \approx 3.57\) | Theorem 12 (Chaos Detection) |
| exp_s_vs_lyapunov.sx | \(S\) and Lyapunov exponent \(\lambda\) are complementary | \(S\)-\(\lambda\) complementarity confirmed | Proposition 12.1 |
| exp_nash_equilibrium.sx | Skeptical desire escapes Nash to reach Pareto | 83.5% Pareto-optimal vs 33% Nash | Theorem 11 (Game Theory) |
| exp_gan_convergence.sx | GAN training stabilisation via projection | Generator-discriminator balance achieved | Theorem 2, 11 (GANs) |
| exp_ode_solvers.sx | Learned blending of ODE solver methods | Adaptive solver outperforms fixed methods | Theorems 1, 5 (ODE Application) |
| exp_prime_gaps.sx | Prime gap derivative series analysis | Gap structure aligns with convergence framework | Exploratory (Number Theory) |
| exp_iratio_applications.sx | \(I = -\tfrac{1}{2}\) across 5 distinct domains | 5/5 domains validated | Theorem 13 (I-Ratio Universality) |
| exp_collatz_analysis.sx | Collatz sequence convergence diagnostics | Convergence score tracks trajectory collapse | Exploratory (Number Theory) |
Code / Compiler
Applying the convergence framework to compiler optimisation passes, code structure discovery, and equilibrium mapping in program analysis.
| File | Validates | Result | Theorems / Conjectures |
|---|---|---|---|
| exp_code_gates.sx | Code structure convergence via gating mechanisms | \(S \to 0\) at step 50 | Theorem 8 (Code Gates) |
| exp_compiler_passes.sx | Per-program compiler pass interaction and adaptation | Per-program adaptation confirmed | Theorems 9, 10 (Compiler) |
| exp_structure_discovery.sx | Gradient topology as structural probe | Constraint graph discovered from gradients | Theorem 4 (Topology) |
| exp_equilibrium_mapping.sx | B-flow equilibrium location in optimisation landscape | B-flow equilibrium matches theoretical prediction | Theorem 14 (B-Flow) |
Stress / Robustness
Stress tests, adversarial conditions, high-dimensional landscapes, stochastic projections, and learnable projection variants. These experiments push the theorem to its limits.
| File | Validates | Result | Theorems / Conjectures |
|---|---|---|---|
| exp_sensitivity.sx | Stability across 3 orders of magnitude in learning rate | Stable over 3 OOM | Propositions 7.1–7.4 |
| exp_stress_test.sx | Combined Rosenbrock + Rastrigin stress | Converges under combined stress | Theorems 1–3 (Robustness) |
| exp_stress_rosenbrock.sx | Rosenbrock banana valley at 4–10 dimensions | Convergence in high-D banana valley | Theorems 1, 2 (High-D) |
| exp_stress_adversarial.sx | Anti-parallel gradient objectives | Projection resolves adversarial conflicts | Theorem 2 (Adversarial) |
| exp_symmetry_breaking.sx | Group discovery, perturbation recovery, phase transition | Groups discovered, recovery within \(O(10)\) cycles | Conjectures 6.2, 6.8, 6.9 |
| exp_convergence_ratios.sx | Ratio series, entropy, and dominant pair analysis | Ratios converge but are not universal | Conjecture 6.1 |
| exp_stochastic_projection.sx | Noise injection unnecessary — implicit exploration suffices | Deterministic projection matches stochastic | Theorem 2 (Implicit Exploration) |
| exp_stochastic_rastrigin.sx | Stochastic projection on multimodal Rastrigin landscape | Finds global region despite local minima | Theorem 2 (Multimodal) |
| exp_pcgrad_refinement.sx | PCGrad vs cosine-scaled projection comparison | Cosine projection outperforms PCGrad (100% vs 66.5%) | Theorem 2 (Projection Comparison) |
| exp_lyapunov_refinement.sx | Refined Lyapunov construction and tighter bounds | Tighter Lyapunov bounds achieved | Theorem 3, Conjecture 6.11 |
| exp_learnable_projection.sx | Learnable projection scale parameter | Learned \(\alpha\) converges to stable value | Theorem 2 (Learnable Extension) |
| exp_learnable_projection2.sx | Extended learnable projection with momentum | Momentum-augmented projection improves convergence rate | Theorem 2 (Learnable Extension v2) |
Verification
Four independent verification points confirming the structural foundations of the scaffold framework. All 4 passing.
| Page | Validates | Result | Score |
|---|---|---|---|
| Verification Point 1 | Feedback loop is structural (parameter-independent) | \(L_1 \uparrow\) AND \(L_2 \downarrow\) at all 9 parameter combos | 9/9 |
| Verification Point 2 | \(A^*\) positive universally | \(A^*\) ranges 0.247–0.606 across 12 combos + 3 IC types | 15/15 |
| Verification Point 3 | Scaffold chain complete (all 4 arrows) | Each arrow independently confirmed 5 times | 20/20 |
| Verification Point 4 | Doubling time = BKM criterion | Correct classification: shrinking \(\tau_d \leftrightarrow\) blow-up | 6/6 |
Compiler Math Validation
These tests validate that the Simplex compiler produces correct numerical results for every mathematical operation used by the experiments above. 188 tests total.
| File | Tests | Coverage | Operations |
|---|---|---|---|
| test_math_arithmetic.sx | 75 | f64/i64 arithmetic, casts, edge cases | +, -, *, /, %, int↔float casts |
| test_math_comparisons.sx | 23 | All 6 comparison operators, both types | <, ≤, >, ≥, ==, != for f64 and i64 |
| test_math_transcendental.sx | 66 | Transcendental functions and identities | sqrt, sin, cos, tan, exp, ln, pow, tanh, Pythagorean identity |
| test_math_loops.sx | 10 | Loop-based numerical computation | Accumulation, Newton's method, series, convergence |
| test_math_functions.sx | 14 | Function composition and recursion | Composition, recursion, dot product, nested calls |
Total: 188/188 pass.