Skip to content

Commit 0eeec6e

Browse files
neuron7xLabclaude
andcommitted
docs: theory files, README OOS results, gitignore cleanup, v1.1.0 prep
- New theory files: LYAPUNOV_EXPONENT_THEORY.md (Rosenstein algorithm, calibration table, module connections) + CRYPTOBIOSIS_THEORY.md (biological basis, state machine, invariant table, gradient ontology) - README: updated invariant count 53→57, witnesses 44→67, added OOS walk-forward results (+78% alpha, -53% drawdown, 5/5 folds) - .gitignore: exclude 5 stale untracked test artifacts - Self-check: 57 invariants, 38 theory cross-refs, PASSED Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3f58370 commit 0eeec6e

4 files changed

Lines changed: 125 additions & 2 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Cryptobiosis Theory — Phase-Transition Survival
2+
3+
## Biological basis
4+
5+
Tardigrades survive lethal conditions (vacuum, radiation, -272°C, 150°C)
6+
not by resisting them but by **exiting the space where the threat applies**:
7+
vitrifying into a tun state where metabolism drops to zero.
8+
9+
Key properties:
10+
- **O(1) transition**: vitrification is a phase transition, not a gradual process
11+
- **Zero metabolism in dormant state**: not "reduced" — zero
12+
- **Snapshot recovery**: the tun contains all information needed to resume
13+
- **Staged rehydration**: recovery is cautious, multi-phase, abortable
14+
- **Hysteresis**: exit threshold < entry threshold (prevents oscillation)
15+
16+
## GeoSync implementation
17+
18+
State machine: ACTIVE → VITRIFYING → DORMANT → REHYDRATING → ACTIVE
19+
20+
Combined neuromodulator distress T ∈ [0, 1]:
21+
T = 1 - GVS_score (where GVS = Gradient Vital Signs)
22+
23+
When T ≥ entry_threshold (default 0.85):
24+
- System vitrifies in ONE tick (O(1))
25+
- Position multiplier drops to EXACTLY 0.0
26+
- Snapshot is captured for recovery
27+
28+
When T < exit_threshold (default 0.60):
29+
- Rehydration begins (staged ramp-up)
30+
- If T ≥ entry during rehydration → abort back to DORMANT
31+
32+
## Why this matters for trading
33+
34+
Traditional risk management: "reduce position by X% when vol > Y."
35+
This RESISTS the threat — still in the space, still losing money slower.
36+
37+
Cryptobiosis: "exit ALL positions when gradient collapses."
38+
This EXITS the space — zero exposure, zero P&L, wait for recovery.
39+
40+
The key insight: the cost of being in DORMANT during a false alarm
41+
(missed opportunity) is bounded and recoverable. The cost of being
42+
ACTIVE during a true crisis (unbounded loss) is not.
43+
44+
DORMANT multiplier = 0.0 EXACTLY is a SAFETY INVARIANT (INV-CB1).
45+
Not 0.001. Not "close to zero." Zero. Because a discharged gradient
46+
computing its own disappearance is worse than zero.
47+
48+
## Connection to Gradient Ontology (CLAUDE.md Section 0)
49+
50+
Layer 3 of the maintenance hierarchy: Gradient Preserved.
51+
When Layers 0-2 fail (gradient gone, Lyapunov diverging, GABA saturated),
52+
Layer 3 fires: exit the space entirely.
53+
54+
## Invariants
55+
56+
| ID | Statement | Priority |
57+
|----|-----------|----------|
58+
| INV-CB1 | DORMANT ⟹ multiplier == 0.0 EXACTLY | P0 |
59+
| INV-CB2 | Vitrification O(1) — one tick | P0 |
60+
| INV-CB3 | Snapshot non-None in DORMANT | P1 |
61+
| INV-CB4 | Rehydration stages non-decreasing | P0 |
62+
| INV-CB5 | Entry > individual module thresholds | P1 |
63+
| INV-CB6 | T ∈ [0, 1] | P0 |
64+
| INV-CB7 | exit < entry (hysteresis) | P0 |
65+
| INV-CB8 | T ≥ entry during rehydration → DORMANT | P0 |
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Lyapunov Exponent Theory — Chaos/Order Detection for GeoSync
2+
3+
## Core concept
4+
5+
The Maximal Lyapunov Exponent (MLE) measures the average rate of exponential
6+
divergence of nearby trajectories in phase space:
7+
8+
λ_max = lim_{t→∞} (1/t) · ln(|δx(t)| / |δx(0)|)
9+
10+
For a scalar time series (e.g. Kuramoto R(t), portfolio returns):
11+
- **λ > 0** → chaotic / unpredictable (nearby trajectories diverge)
12+
- **λ ≈ 0** → marginal / edge-of-chaos (critical transition zone)
13+
- **λ < 0** → stable / predictable (nearby trajectories converge)
14+
15+
## Algorithm: Rosenstein (1993)
16+
17+
1. Delay-embed scalar series: x_i → (x_i, x_{i+τ}, ..., x_{i+(m-1)τ})
18+
2. For each embedded point, find nearest neighbor (excluding temporal vicinity)
19+
3. Track log-divergence of neighbor pairs over time
20+
4. λ_max = slope of mean(ln(divergence)) vs time (initial linear region)
21+
22+
Key parameters:
23+
- **dim** (embedding dimension): 2 for 1D maps, 3-5 for continuous systems
24+
- **tau** (delay): first minimum of mutual information, or 1 for discrete maps
25+
- **max_divergence_steps**: shorter = captures initial exponential growth better
26+
27+
## Calibration results
28+
29+
| System | Theoretical λ | GeoSync MLE | Accuracy |
30+
|--------|--------------|-------------|----------|
31+
| Logistic map r=4 | ln(2) = 0.693 | 0.689 | 99.5% |
32+
| White noise | 0 | 0.001 ||
33+
| Damped oscillator | < 0 | -0.006 | correct sign |
34+
| Kuramoto R(t) subcritical | > 0 (noisy) | 0.222 | correct sign |
35+
| Kuramoto R(t) supercritical | < subcritical | < subcritical | correct ordering |
36+
37+
## Connection to GeoSync modules
38+
39+
- **R(t) → MLE**: tells you if synchronization dynamics are predictable
40+
- **MLE → Kelly**: λ < 0 → higher conviction → larger fraction
41+
- **MLE → Cryptobiosis**: extreme positive MLE → gradient turbulent → consider DORMANT
42+
- **MLE → GVS**: feeds chaos_health component (|λ| < 0.5 = healthy)
43+
44+
## Invariants
45+
46+
- INV-LE1: MLE finite for any finite bounded input
47+
- INV-LE2: MLE sign matches dynamical regime (noise ≈ 0, stable < 0, chaos > 0)
48+
49+
## References
50+
51+
Rosenstein, Collins & De Luca (1993). Physica D, 65(1-2), 117-134.
52+
Wolf, Swift, Swinney & Vastano (1985). Physica D, 16(3), 285-317.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,8 @@ reports/complexity.*
160160
reports/incidents/
161161
reports/report.html
162162
reports/report.pdf
163+
tests/unit/core/test_idempotency_keys.py
164+
tests/unit/core/test_ml_quantization.py
165+
tests/unit/execution/test_live_loop.py
166+
tests/unit/execution/test_order_ledger_deep.py
167+
tests/unit/execution/test_order_lifecycle_deep.py

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ GeoSync is a **verified physical system**, not a test-coverage theatre. The phys
169169

170170
| Metric | Value |
171171
|--------|-------|
172-
| Physics invariants | **53** (P0: 34 block-release, P1: 15, P2: 4) |
173-
| Grounded witnesses | **44** tests with `INV-*` docstrings and 5-field error messages |
172+
| Physics invariants | **57** across 15 modules (P0: 37, P1: 17, P2: 3) |
173+
| Grounded witnesses | **67** tests with `INV-*` docstrings and 5-field error messages |
174174
| C1/C2 code audit | **0** undocumented physics clamps in `core/` |
175175
| CI gate | `physics-kernel-gate.yml` — self-check + L1-L5 validation + C1/C2 audit |
176+
| OOS walk-forward alpha | **+78%** vs equal-weight, drawdown **-53%** (5/5 folds protected) |
176177

177178
**Key invariants:**
178179

0 commit comments

Comments
 (0)