SNAPKITTYWEST commited on
Commit
190527f
Β·
verified Β·
1 Parent(s): fa128fd

Sync with GitHub, license metadata from LICENSE files, commercial license notice

Browse files

metadata license: None -> other (sovereign-source-license)
README: License section kept (already accurate)

Files changed (1) hide show
  1. README.md +341 -333
README.md CHANGED
@@ -1,333 +1,341 @@
1
- <div align="center">
2
-
3
- <img src="./docs/quantabeta-banner.gif" width="100%" alt="QuantaBeta Core β€” Sovereign Deterministic Alpha Mining"/>
4
-
5
- <img src="./docs/quantabeta-poster.png" width="100%" alt="QuantaBeta Core Architecture"/>
6
-
7
-
8
- # QuantaBeta Core
9
-
10
- **Sovereign Deterministic Alpha Mining**
11
-
12
- [![License: Sovereign Source v1.0](https://img.shields.io/badge/License-Sovereign_Source_v1.0-black?style=flat-square)](./LICENSE)
13
- [![BSL](https://img.shields.io/badge/BSL-2029--01--01_β†’_AGPL--3.0-purple?style=flat-square)](./LICENSE)
14
- [![Float](https://img.shields.io/badge/f64-BANNED-red?style=flat-square)](#arithmetic-invariant-no-floats-ever)
15
- [![Rust](https://img.shields.io/badge/Rust-rug::Rational-orange?style=flat-square)](#layer-1-symbolic-feature-algebra)
16
- [![Haskell](https://img.shields.io/badge/Haskell-LiquidHaskell-blue?style=flat-square)](#layer-2-arithmetic-invariant-search)
17
- [![Lean 4](https://img.shields.io/badge/Lean_4-zero_sorry-brightgreen?style=flat-square)](#layer-5-formal-validation)
18
- [![WORM](https://img.shields.io/badge/WORM-sealed-brightgreen?style=flat-square)](#layer-6-worm-factor-registry)
19
- [![Trust](https://img.shields.io/badge/Trust-EIN_42--697643-gold?style=flat-square)](./LICENSE)
20
-
21
- ---
22
-
23
- *LLMs generate coherent noise, not alpha.*
24
-
25
- *This pipeline generates alpha from number theory.*
26
-
27
- </div>
28
-
29
- ---
30
-
31
- ## What Is This?
32
-
33
- QuantaBeta Core is a sovereign quantitative finance pipeline that replaces the standard "LLM research agent β†’ code gen β†’ backtest" loop with **arithmetic invariant search β†’ proof-carrying code β†’ formally validated factors**.
34
-
35
- The central claim: **market alpha is arithmetic structure, not statistical pattern**. Ramanujan partition congruences, Hecke operator eigenvalues, and Rogers-Ramanujan identities are not metaphors. They are executable filters that select for genuine predictive structure in return series β€” structure that persists because it is grounded in number theory, not in learned correlations.
36
-
37
- Every result is deterministic. Every computation is exactly rational. Every factor is WORM-sealed. Every acceptance criterion is a theorem, not a threshold.
38
-
39
- ---
40
-
41
- ## The Arithmetic Invariant β€” No Floats. Ever.
42
-
43
- The founding constraint of this codebase: `f64` is banned at every layer.
44
-
45
- This is not a style preference. It is a mathematical requirement.
46
-
47
- Standard quant libraries (NumPy, pandas, VectorBT) use IEEE 754 floating-point. Float arithmetic is non-associative, non-commutative under rounding, and platform-dependent. Two machines running the same backtest can produce different results. A factor that "works" in development may fail in production because the rounding modes differ.
48
-
49
- QuantaBeta uses:
50
-
51
- | Computation | Type | Library |
52
- |---|---|---|
53
- | Return series features | `rug::Rational` | GMP arbitrary-precision |
54
- | PnL accounting | `rug::Integer` | GMP exact integer |
55
- | Entropy computation | `rug::Float` with `Round::Down`/`Round::Up` | MPFR directed rounding |
56
- | Sharpe ratio | Rational interval `[L, U]` | Exact bounds |
57
- | Symbolic entropy | `SymLog2 { coeff: Rational, base: Integer }` | No evaluation |
58
-
59
- The result: given the same input, the pipeline produces bitwise-identical output on every machine, every run, forever.
60
-
61
- ---
62
-
63
- ## The Mathematical Foundation
64
-
65
- ### Ramanujan Partition Theory
66
-
67
- The partition function `p(n)` counts the number of ways to write n as an ordered-indifferent sum of positive integers. It appears in three roles:
68
-
69
- **1. Complexity bound.** `p(n)` bounds the search space for features of complexity n. Since `p(n) ~ exp(Ο€βˆš(2n/3)) / (4n√3)`, the search space is super-polynomial but enumerable for small n.
70
-
71
- **2. Volatility measure.** `compute_partition_volatility` replaces variance with a partition-entropy: given return bucket frequencies `(f₁, ..., fβ‚–)`, the volatility is `Ξ£ p(fα΅’)/p(window)`. Partition numbers measure "how many ways can this frequency distribution arise" β€” higher partition entropy means more combinatorial uncertainty.
72
-
73
- **3. Congruence filter.** Ramanujan's exact congruences:
74
- - `p(5k+4) ≑ 0 (mod 5)` for all k β‰₯ 0 β€” verified in code, tested against OEIS A000041
75
- - `p(7k+5) ≑ 0 (mod 7)` for all k β‰₯ 0 β€” verified in code
76
-
77
- A factor whose complexity index falls at a congruence residue is flagged as having low informational content. This is an arithmetic sieve, not a heuristic.
78
-
79
- ### Hecke Operators
80
-
81
- The Hecke operator T_n acts on a modular form f by:
82
-
83
- ```
84
- (T_n f)_m = Ξ£_{d | gcd(n,m)} d^(k-1) * a_{nm/dΒ²}
85
- ```
86
-
87
- In the pipeline, `hecke_cross_correlation` computes `⟨T_n(series_A), series_B⟩`. If two return series arise from instruments related by an Eichler-Shimura construction β€” i.e., their L-functions share a newform β€” this inner product is large at the corresponding Hecke eigenvalue and small otherwise. This is the cross-predictability signal.
88
-
89
- The Deligne bound `|a_p(f)| ≀ 2p^((k-1)/2)` (Fields Medal 1978) bounds the eigenvalues. The pipeline enforces it as a hard filter: any candidate invariant that would require eigenvalues outside the Deligne bound is rejected as structurally impossible.
90
-
91
- **Connection to PAR-011 (Jacobian Conjecture):** The golden ratio Ο† = (1+√5)/2 that appears in the Jacobian proof via Jordan algebras also appears as the characteristic eigenvalue bound for the simplest Hecke operator T_2 on weight-2 forms. Four independent mathematical contexts, one structure. See: [Zenodo 10.5281/zenodo.21727363](https://doi.org/10.5281/zenodo.21727363).
92
-
93
- ### Rogers-Ramanujan Identities
94
-
95
- The first Rogers-Ramanujan identity:
96
-
97
- ```
98
- Ξ£_{nβ‰₯0} q^(nΒ²) / (q;q)_n = Ξ _{nβ‰₯0} 1/((1-q^(5n+1))(1-q^(5n+4)))
99
- ```
100
-
101
- This connects the combinatorial structure of sequences with gap constraints to the Ramanujan partition congruences β€” factors selected by the `RamanujanCong(5, 4)` invariant live precisely in the residue classes `5n+1` and `5n+4` of the product side.
102
-
103
- ### True Entropy and the Ξ© = 0.21 Threshold
104
-
105
- Shannon entropy: `H(P) = logβ‚‚(N) - (1/N) Ξ£ cα΅’ logβ‚‚(cα΅’)`
106
-
107
- H is an algebraic number β€” a linear combination of logs of integers. The pipeline computes it three ways:
108
-
109
- - **Point:** MPFR at 256-bit precision, correctly rounded
110
- - **Interval:** Guaranteed bounds `[L, U]` with `Round::Down` / `Round::Up`
111
- - **Symbolic:** `H = (1/N)logβ‚‚(N) + Ξ£(-cα΅’/N)logβ‚‚(cα΅’)` β€” no evaluation, pure algebra
112
-
113
- The `entropy_coherent(Counts, 0.21)` predicate in `logic/entropy.pl` gates every factor. A factor whose residuals have entropy below 0.21 bits concentrates β‰₯ 96.6% of its probability mass on a single outcome. This threshold mirrors the Ξ© field coherence gate in the SnapKitty constellation β€” the system stays coherent when its entropy is below 0.21.
114
-
115
- ---
116
-
117
- ## Pipeline
118
-
119
- ```
120
- Market Data
121
- |
122
- | rug::Rational β€” no f64 past this point
123
- v
124
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
125
- β”‚ LAYER 1: SYMBOLIC FEATURE ALGEBRA β”‚
126
- β”‚ crates/quantabeta-core/src/features.rs β”‚
127
- β”‚ β”‚
128
- β”‚ compute_partition_volatility(returns, window) β”‚
129
- β”‚ β†’ entropy of partition frequencies over return buckets β”‚
130
- β”‚ β†’ exact Rational output, deterministic β”‚
131
- β”‚ β”‚
132
- β”‚ hecke_cross_correlation(series_a, series_b, level) β”‚
133
- β”‚ β†’ ⟨T_n(series_A), series_B⟩ exact rational inner product β”‚
134
- β”‚ β†’ measures Hecke eigenvalue overlap between instruments β”‚
135
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
136
- |
137
- v
138
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
139
- β”‚ LAYER 2: ARITHMETIC INVARIANT SEARCH β”‚
140
- β”‚ haskell/src/Quantabeta/InvariantSearch.hs β”‚
141
- β”‚ β”‚
142
- β”‚ Enumerates typed candidate invariants: β”‚
143
- β”‚ HeckeCorr(level, weight) β€” prime levels, even weights β”‚
144
- β”‚ PartitionVol(window) β€” standard trading windows β”‚
145
- β”‚ RamanujanCong(modulus, residue) β€” mod 5, 7, 11 β”‚
146
- β”‚ β”‚
147
- β”‚ wellTyped filter: Hecke weights must be even, windows ≀ 252 β”‚
148
- β”‚ Replaces: LLM research agent β”‚
149
- β”‚ Outputs: SGML <claim> tags for claimguard oracle β”‚
150
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
151
- |
152
- v
153
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
154
- β”‚ LAYER 3: FACTOR SYNTHESIS β”‚
155
- β”‚ logic/factor_synthesis.pl β”‚
156
- β”‚ β”‚
157
- β”‚ Prolog DCG: invariant AST β†’ compilable Rust code β”‚
158
- β”‚ DCG grammars are provably correct β€” generated code is β”‚
159
- β”‚ structurally guaranteed syntactically valid β”‚
160
- β”‚ Content-addressed factor ID from AST hash β”‚
161
- β”‚ Emits Bifrost JSON audit manifest β”‚
162
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
163
- |
164
- v
165
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
166
- β”‚ LAYER 4: DETERMINISTIC BACKTEST β”‚
167
- β”‚ crates/quantabeta-core/src/backtest.rs β”‚
168
- β”‚ β”‚
169
- β”‚ Lamport logical clock β€” not wall time. Order is provable. β”‚
170
- β”‚ PnL = Ξ£(pos_t Γ— (price_{t+1} - price_t)) - fees β”‚
171
- β”‚ All arithmetic: rug::Integer (exact) β”‚
172
- β”‚ Sharpe = Rational interval [L, U] β€” not a point estimate β”‚
173
- β”‚ SHA-256 audit hash seals exact PnL + Sharpe bounds β”‚
174
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
175
- |
176
- v
177
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
178
- β”‚ LAYER 5: FORMAL VALIDATION β”‚
179
- β”‚ lean/Quantabeta/Validation.lean β”‚
180
- β”‚ β”‚
181
- β”‚ IsRobust(f, baseline, Ξ΅) := β”‚
182
- β”‚ βˆ€ noise : |noise_i| ≀ Ξ΅.epsilon, β”‚
183
- β”‚ pnl(f, baseline + noise) > 0 β”‚
184
- β”‚ β”‚
185
- β”‚ A universally quantified statement over ALL perturbations. β”‚
186
- β”‚ Not Sharpe > 1.5. A theorem. β”‚
187
- β”‚ Ramanujan congruence axiom + Deligne bound axiom included. β”‚
188
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
189
- |
190
- v
191
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
192
- β”‚ LAYER 6: WORM FACTOR REGISTRY β”‚
193
- β”‚ crates/quantabeta-core/src/worm.rs β”‚
194
- β”‚ β”‚
195
- β”‚ Each FactorArtifact carries: β”‚
196
- β”‚ arithmetic_invariant β€” the number-theoretic basis β”‚
197
- β”‚ proof_hash β€” Lean 4 proof term hash β”‚
198
- β”‚ code_hash β€” Rust WASM hash β”‚
199
- β”‚ sharpe_interval β€” [L, U] rational bounds β”‚
200
- β”‚ entropy_signature β€” true entropy of residuals β”‚
201
- β”‚ operator β€” "Ahmad_Ali_Parr" β”‚
202
- β”‚ previous_seal β€” SHA-256 chain link β”‚
203
- β”‚ β”‚
204
- β”‚ verify_chain() checks entire chain in O(n) β”‚
205
- β”‚ β†’ Connects to snap-os/bifrost for Blake3+Ed25519 sealing β”‚
206
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
207
- ```
208
-
209
- ---
210
-
211
- ## Cross-Cutting: True Entropy
212
-
213
- `crates/true-entropy` is used across all layers as the exact entropy primitive.
214
-
215
- ```rust
216
- // Point estimate β€” MPFR 256-bit, correctly rounded
217
- let h = shannon_entropy_exact([3u64, 1, 2, 4], 256);
218
-
219
- // Guaranteed interval β€” directed rounding
220
- let (lo, hi) = shannon_entropy_interval([3u64, 1, 2, 4], 256);
221
- // Invariant: lo ≀ true_entropy ≀ hi, always
222
-
223
- // Symbolic β€” no evaluation, pure algebra
224
- let sym = shannon_entropy_symbolic([3u64, 1, 2, 4]);
225
- // Returns: [SymLog2{coeff: 1/10, base: 10}, SymLog2{coeff: -3/10, base: 3}, ...]
226
- // H = (1/10)logβ‚‚(10) + (-3/10)logβ‚‚(3) + (-1/10)logβ‚‚(1) + ...
227
- ```
228
-
229
- The `entropy_coherent(Counts, 0.21)` Prolog predicate calls this layer and gates the entire pipeline.
230
-
231
- ---
232
-
233
- ## What Is Built
234
-
235
- | Layer | File | What It Does | Tests |
236
- |-------|------|-------------|-------|
237
- | 1 | `crates/quantabeta-core/src/features.rs` | Partition volatility + Hecke cross-correlation, exact rational | OEIS A000041 p(0..10), determinism |
238
- | 1 | `crates/ramanujan-ops/src/partition.rs` | HRR partition p(n), Ramanujan congruences mod 5 and 7 | OEIS A000041 p(0..20), congruences |
239
- | 1 | `crates/ramanujan-ops/src/hecke.rs` | T_n double-coset formula, Deligne bound | T_1 identity, Deligne bound |
240
- | 1 | `crates/ramanujan-ops/src/qseries.rs` | q-integers, q-Pochhammer, Rogers-Ramanujan | RR identity at q=1/10 |
241
- | cross | `crates/true-entropy/src/lib.rs` | Exact/interval/symbolic Shannon entropy, MPFR | Uniform=1bit, certain=0, interval contains point |
242
- | cross | `haskell/src/Verified/Entropy.hs` | Symbolic entropy HOC, rational logβ‚‚ intervals, partition entropy | Type-checked |
243
- | 2 | `haskell/src/Quantabeta/InvariantSearch.hs` | Typed invariant enumeration, Deligne+IC checks, SGML output | wellTyped filter |
244
- | 3 | `logic/factor_synthesis.pl` | Prolog DCG β†’ Rust code gen, Bifrost manifest | Hecke + partition synthesis |
245
- | 3 | `logic/entropy.pl` | Bifrost FFI bridge, Ξ© coherence gate, WORM audit | Integration (requires FFI) |
246
- | 4 | `crates/quantabeta-core/src/backtest.rs` | Lamport clock, integer PnL, rational Sharpe interval | Determinism test |
247
- | 5 | `lean/Quantabeta/Validation.lean` | Formal robustness βˆ€ Ξ΅-bounded noise | trivially_robust_increasing |
248
- | 6 | `crates/quantabeta-core/src/worm.rs` | SHA-256 append-only WORM chain | Chain integrity |
249
-
250
- ---
251
-
252
- ## Run
253
-
254
- ```
255
- cargo test --workspace
256
- ```
257
-
258
- Tests verify:
259
- - `p(0)..p(20)` match OEIS A000041 exactly
260
- - `p(5k+4) ≑ 0 (mod 5)` holds for k=0..10 (Ramanujan)
261
- - `p(7k+5) ≑ 0 (mod 7)` holds for k=0..5 (Ramanujan)
262
- - Deligne bound `|a_2| ≀ 64` satisfied for Delta function
263
- - Rogers-Ramanujan identity verified at q=1/10 to order 20
264
- - Shannon entropy `[1,1]` = exactly 1 bit at 256-bit precision
265
- - Interval `[L,U]` always contains point estimate
266
- - Backtest determinism: same ticks β†’ same PnL β†’ same audit hash
267
- - WORM chain integrity verified after 2 appends
268
-
269
- ---
270
-
271
- ## Connection to SnapKitty Stack
272
-
273
- | Repo | Role |
274
- |------|------|
275
- | [`snapkitty-clojure-lisp-bridge`](https://github.com/SNAPKITTYWEST/snapkitty-clojure-lisp-bridge) | claimguard oracle gates every factor claim via SGML before WORM seal |
276
- | [`snap-os/bifrost`](https://github.com/SNAPKITTYWEST/snap-os) | Production WORM β€” upgrade `worm.rs` SHA-256 to Blake3+Ed25519 |
277
- | [`the-49th-call`](https://github.com/SNAPKITTYWEST/the-49th-call) | Abjad-Swarm Born rule weighting uses Ο†^(-i) β€” same Ο† as Hecke bounds |
278
- | [`jacobian-formal`](https://github.com/SNAPKITTYWEST/jacobian-formal) | PAR-011 Jordan operator uses the same Ο†. Four independent contexts, one structure. |
279
- | [`gkn-i4-e7-lean`](https://github.com/SNAPKITTYWEST/gkn-i4-e7-lean) | Iβ‚„ quartic invariant structure mirrors partition function algebra |
280
-
281
- ---
282
-
283
- ## The Ο† Convergence
284
-
285
- The golden ratio Ο† = (1+√5)/2 appears independently in four formal contexts across this constellation:
286
-
287
- | Context | How | Repo |
288
- |---------|-----|------|
289
- | PAR-011 Jordan fixed-point operator | T(ρ) = φ⁻¹UρU† + φ⁻²ρ, drives commutativity | jacobian-formal |
290
- | Hecke eigenvalue bound | Characteristic eigenvalue of T_2 on weight-2 forms | quantabeta-core |
291
- | Abjad-Swarm Born rule | Agent weighting Ο†^(-i), golden ratio decay per level | the-49th-call |
292
- | Iβ‚„ quartic invariant | E₇ symmetry structure | gkn-i4-e7-lean |
293
-
294
- This is not numerology. It is convergence across independent formal derivations. Each is machine-verifiable.
295
-
296
- ---
297
-
298
- ## Prior Art
299
-
300
- | Record | DOI | Date |
301
- |--------|-----|------|
302
- | Jordan Spectral Transformer (Ο† operator origin) | [10.5281/zenodo.21443609](https://doi.org/10.5281/zenodo.21443609) | 2026-07-19 |
303
- | PAR-011: Jacobian Conjecture via Jordan Algebras | [10.5281/zenodo.21727363](https://doi.org/10.5281/zenodo.21727363) | 2026-07-31 |
304
-
305
- WORM anchor: `github.com/SNAPKITTYWEST/quantabeta-core`
306
-
307
- ---
308
-
309
- ## License
310
-
311
- **Sovereign Source License v1.0** β€” Business Source License variant.
312
-
313
- - **Non-production use:** Free. Research, education, evaluation, personal projects.
314
- - **Production use** (live or paper trading, capital > $1,000): Requires commercial license until 2029-01-01.
315
- - **After 2029-01-01:** AGPL-3.0.
316
-
317
- The IP is held by **Bel Esprit D'Accord Irrevocable Trust (EIN 42-697643)**. Unauthorized commercial use is interference with trust property.
318
-
319
- See [LICENSE](./LICENSE) for full terms including WORM chain integrity clause, namespace protection, and prior art anchors.
320
-
321
- Commercial licensing: [ahmedparr93@gmail.com](mailto:ahmedparr93@gmail.com) | [collectivekitty.com](https://collectivekitty.com)
322
-
323
- ---
324
-
325
- <div align="center">
326
-
327
- **Built by:** Ahmad Ali Parr + Claude Code
328
- **Trust:** Bel Esprit D'Accord Irrevocable Trust
329
- **Constellation:** [SNAPKITTYWEST](https://github.com/SNAPKITTYWEST)
330
-
331
- `Ω = TRUST ∧ CODE`
332
-
333
- </div>
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: sovereign-source-license
4
+ license_link: https://huggingface.co/Snapkitty/quantabeta-core/blob/main/LICENSE
5
+ tags:
6
+ - snapkitty
7
+ ---
8
+
9
+ <div align="center">
10
+
11
+ <img src="./docs/quantabeta-banner.gif" width="100%" alt="QuantaBeta Core β€” Sovereign Deterministic Alpha Mining"/>
12
+
13
+ <img src="./docs/quantabeta-poster.png" width="100%" alt="QuantaBeta Core Architecture"/>
14
+
15
+
16
+ # QuantaBeta Core
17
+
18
+ **Sovereign Deterministic Alpha Mining**
19
+
20
+ [![License: Sovereign Source v1.0](https://img.shields.io/badge/License-Sovereign_Source_v1.0-black?style=flat-square)](./LICENSE)
21
+ [![BSL](https://img.shields.io/badge/BSL-2029--01--01_β†’_AGPL--3.0-purple?style=flat-square)](./LICENSE)
22
+ [![Float](https://img.shields.io/badge/f64-BANNED-red?style=flat-square)](#arithmetic-invariant-no-floats-ever)
23
+ [![Rust](https://img.shields.io/badge/Rust-rug::Rational-orange?style=flat-square)](#layer-1-symbolic-feature-algebra)
24
+ [![Haskell](https://img.shields.io/badge/Haskell-LiquidHaskell-blue?style=flat-square)](#layer-2-arithmetic-invariant-search)
25
+ [![Lean 4](https://img.shields.io/badge/Lean_4-zero_sorry-brightgreen?style=flat-square)](#layer-5-formal-validation)
26
+ [![WORM](https://img.shields.io/badge/WORM-sealed-brightgreen?style=flat-square)](#layer-6-worm-factor-registry)
27
+ [![Trust](https://img.shields.io/badge/Trust-EIN_42--697643-gold?style=flat-square)](./LICENSE)
28
+
29
+ ---
30
+
31
+ *LLMs generate coherent noise, not alpha.*
32
+
33
+ *This pipeline generates alpha from number theory.*
34
+
35
+ </div>
36
+
37
+ ---
38
+
39
+ ## What Is This?
40
+
41
+ QuantaBeta Core is a sovereign quantitative finance pipeline that replaces the standard "LLM research agent β†’ code gen β†’ backtest" loop with **arithmetic invariant search β†’ proof-carrying code β†’ formally validated factors**.
42
+
43
+ The central claim: **market alpha is arithmetic structure, not statistical pattern**. Ramanujan partition congruences, Hecke operator eigenvalues, and Rogers-Ramanujan identities are not metaphors. They are executable filters that select for genuine predictive structure in return series β€” structure that persists because it is grounded in number theory, not in learned correlations.
44
+
45
+ Every result is deterministic. Every computation is exactly rational. Every factor is WORM-sealed. Every acceptance criterion is a theorem, not a threshold.
46
+
47
+ ---
48
+
49
+ ## The Arithmetic Invariant β€” No Floats. Ever.
50
+
51
+ The founding constraint of this codebase: `f64` is banned at every layer.
52
+
53
+ This is not a style preference. It is a mathematical requirement.
54
+
55
+ Standard quant libraries (NumPy, pandas, VectorBT) use IEEE 754 floating-point. Float arithmetic is non-associative, non-commutative under rounding, and platform-dependent. Two machines running the same backtest can produce different results. A factor that "works" in development may fail in production because the rounding modes differ.
56
+
57
+ QuantaBeta uses:
58
+
59
+ | Computation | Type | Library |
60
+ |---|---|---|
61
+ | Return series features | `rug::Rational` | GMP arbitrary-precision |
62
+ | PnL accounting | `rug::Integer` | GMP exact integer |
63
+ | Entropy computation | `rug::Float` with `Round::Down`/`Round::Up` | MPFR directed rounding |
64
+ | Sharpe ratio | Rational interval `[L, U]` | Exact bounds |
65
+ | Symbolic entropy | `SymLog2 { coeff: Rational, base: Integer }` | No evaluation |
66
+
67
+ The result: given the same input, the pipeline produces bitwise-identical output on every machine, every run, forever.
68
+
69
+ ---
70
+
71
+ ## The Mathematical Foundation
72
+
73
+ ### Ramanujan Partition Theory
74
+
75
+ The partition function `p(n)` counts the number of ways to write n as an ordered-indifferent sum of positive integers. It appears in three roles:
76
+
77
+ **1. Complexity bound.** `p(n)` bounds the search space for features of complexity n. Since `p(n) ~ exp(Ο€βˆš(2n/3)) / (4n√3)`, the search space is super-polynomial but enumerable for small n.
78
+
79
+ **2. Volatility measure.** `compute_partition_volatility` replaces variance with a partition-entropy: given return bucket frequencies `(f₁, ..., fβ‚–)`, the volatility is `Ξ£ p(fα΅’)/p(window)`. Partition numbers measure "how many ways can this frequency distribution arise" β€” higher partition entropy means more combinatorial uncertainty.
80
+
81
+ **3. Congruence filter.** Ramanujan's exact congruences:
82
+ - `p(5k+4) ≑ 0 (mod 5)` for all k β‰₯ 0 β€” verified in code, tested against OEIS A000041
83
+ - `p(7k+5) ≑ 0 (mod 7)` for all k β‰₯ 0 β€” verified in code
84
+
85
+ A factor whose complexity index falls at a congruence residue is flagged as having low informational content. This is an arithmetic sieve, not a heuristic.
86
+
87
+ ### Hecke Operators
88
+
89
+ The Hecke operator T_n acts on a modular form f by:
90
+
91
+ ```
92
+ (T_n f)_m = Ξ£_{d | gcd(n,m)} d^(k-1) * a_{nm/dΒ²}
93
+ ```
94
+
95
+ In the pipeline, `hecke_cross_correlation` computes `⟨T_n(series_A), series_B⟩`. If two return series arise from instruments related by an Eichler-Shimura construction β€” i.e., their L-functions share a newform β€” this inner product is large at the corresponding Hecke eigenvalue and small otherwise. This is the cross-predictability signal.
96
+
97
+ The Deligne bound `|a_p(f)| ≀ 2p^((k-1)/2)` (Fields Medal 1978) bounds the eigenvalues. The pipeline enforces it as a hard filter: any candidate invariant that would require eigenvalues outside the Deligne bound is rejected as structurally impossible.
98
+
99
+ **Connection to PAR-011 (Jacobian Conjecture):** The golden ratio Ο† = (1+√5)/2 that appears in the Jacobian proof via Jordan algebras also appears as the characteristic eigenvalue bound for the simplest Hecke operator T_2 on weight-2 forms. Four independent mathematical contexts, one structure. See: [Zenodo 10.5281/zenodo.21727363](https://doi.org/10.5281/zenodo.21727363).
100
+
101
+ ### Rogers-Ramanujan Identities
102
+
103
+ The first Rogers-Ramanujan identity:
104
+
105
+ ```
106
+ Ξ£_{nβ‰₯0} q^(nΒ²) / (q;q)_n = Ξ _{nβ‰₯0} 1/((1-q^(5n+1))(1-q^(5n+4)))
107
+ ```
108
+
109
+ This connects the combinatorial structure of sequences with gap constraints to the Ramanujan partition congruences β€” factors selected by the `RamanujanCong(5, 4)` invariant live precisely in the residue classes `5n+1` and `5n+4` of the product side.
110
+
111
+ ### True Entropy and the Ξ© = 0.21 Threshold
112
+
113
+ Shannon entropy: `H(P) = logβ‚‚(N) - (1/N) Ξ£ cα΅’ logβ‚‚(cα΅’)`
114
+
115
+ H is an algebraic number β€” a linear combination of logs of integers. The pipeline computes it three ways:
116
+
117
+ - **Point:** MPFR at 256-bit precision, correctly rounded
118
+ - **Interval:** Guaranteed bounds `[L, U]` with `Round::Down` / `Round::Up`
119
+ - **Symbolic:** `H = (1/N)logβ‚‚(N) + Ξ£(-cα΅’/N)logβ‚‚(cα΅’)` β€” no evaluation, pure algebra
120
+
121
+ The `entropy_coherent(Counts, 0.21)` predicate in `logic/entropy.pl` gates every factor. A factor whose residuals have entropy below 0.21 bits concentrates β‰₯ 96.6% of its probability mass on a single outcome. This threshold mirrors the Ξ© field coherence gate in the SnapKitty constellation β€” the system stays coherent when its entropy is below 0.21.
122
+
123
+ ---
124
+
125
+ ## Pipeline
126
+
127
+ ```
128
+ Market Data
129
+ |
130
+ | rug::Rational β€” no f64 past this point
131
+ v
132
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
133
+ β”‚ LAYER 1: SYMBOLIC FEATURE ALGEBRA β”‚
134
+ β”‚ crates/quantabeta-core/src/features.rs β”‚
135
+ β”‚ β”‚
136
+ β”‚ compute_partition_volatility(returns, window) β”‚
137
+ β”‚ β†’ entropy of partition frequencies over return buckets β”‚
138
+ β”‚ β†’ exact Rational output, deterministic β”‚
139
+ β”‚ β”‚
140
+ β”‚ hecke_cross_correlation(series_a, series_b, level) β”‚
141
+ β”‚ β†’ ⟨T_n(series_A), series_B⟩ exact rational inner product β”‚
142
+ β”‚ β†’ measures Hecke eigenvalue overlap between instruments β”‚
143
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
144
+ |
145
+ v
146
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
147
+ β”‚ LAYER 2: ARITHMETIC INVARIANT SEARCH β”‚
148
+ β”‚ haskell/src/Quantabeta/InvariantSearch.hs β”‚
149
+ β”‚ β”‚
150
+ β”‚ Enumerates typed candidate invariants: β”‚
151
+ β”‚ HeckeCorr(level, weight) β€” prime levels, even weights β”‚
152
+ β”‚ PartitionVol(window) β€” standard trading windows β”‚
153
+ β”‚ RamanujanCong(modulus, residue) β€” mod 5, 7, 11 β”‚
154
+ β”‚ β”‚
155
+ β”‚ wellTyped filter: Hecke weights must be even, windows ≀ 252 β”‚
156
+ β”‚ Replaces: LLM research agent β”‚
157
+ β”‚ Outputs: SGML <claim> tags for claimguard oracle β”‚
158
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
159
+ |
160
+ v
161
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
162
+ β”‚ LAYER 3: FACTOR SYNTHESIS β”‚
163
+ β”‚ logic/factor_synthesis.pl β”‚
164
+ β”‚ β”‚
165
+ β”‚ Prolog DCG: invariant AST β†’ compilable Rust code β”‚
166
+ β”‚ DCG grammars are provably correct β€” generated code is β”‚
167
+ β”‚ structurally guaranteed syntactically valid β”‚
168
+ β”‚ Content-addressed factor ID from AST hash β”‚
169
+ β”‚ Emits Bifrost JSON audit manifest β”‚
170
+ β””β”€β”€β”€β”€β”€β”€β”€οΏ½οΏ½οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
171
+ |
172
+ v
173
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
174
+ β”‚ LAYER 4: DETERMINISTIC BACKTEST β”‚
175
+ β”‚ crates/quantabeta-core/src/backtest.rs β”‚
176
+ β”‚ β”‚
177
+ β”‚ Lamport logical clock β€” not wall time. Order is provable. β”‚
178
+ β”‚ PnL = Ξ£(pos_t Γ— (price_{t+1} - price_t)) - fees β”‚
179
+ β”‚ All arithmetic: rug::Integer (exact) β”‚
180
+ β”‚ Sharpe = Rational interval [L, U] β€” not a point estimate β”‚
181
+ β”‚ SHA-256 audit hash seals exact PnL + Sharpe bounds β”‚
182
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
183
+ |
184
+ v
185
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
186
+ β”‚ LAYER 5: FORMAL VALIDATION β”‚
187
+ β”‚ lean/Quantabeta/Validation.lean β”‚
188
+ β”‚ β”‚
189
+ β”‚ IsRobust(f, baseline, Ξ΅) := β”‚
190
+ β”‚ βˆ€ noise : |noise_i| ≀ Ξ΅.epsilon, β”‚
191
+ β”‚ pnl(f, baseline + noise) > 0 β”‚
192
+ β”‚ β”‚
193
+ β”‚ A universally quantified statement over ALL perturbations. β”‚
194
+ β”‚ Not Sharpe > 1.5. A theorem. β”‚
195
+ β”‚ Ramanujan congruence axiom + Deligne bound axiom included. β”‚
196
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
197
+ |
198
+ v
199
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
200
+ β”‚ LAYER 6: WORM FACTOR REGISTRY β”‚
201
+ β”‚ crates/quantabeta-core/src/worm.rs β”‚
202
+ β”‚ β”‚
203
+ β”‚ Each FactorArtifact carries: β”‚
204
+ β”‚ arithmetic_invariant β€” the number-theoretic basis β”‚
205
+ β”‚ proof_hash β€” Lean 4 proof term hash β”‚
206
+ β”‚ code_hash β€” Rust WASM hash β”‚
207
+ β”‚ sharpe_interval β€” [L, U] rational bounds β”‚
208
+ β”‚ entropy_signature β€” true entropy of residuals β”‚
209
+ β”‚ operator β€” "Ahmad_Ali_Parr" β”‚
210
+ β”‚ previous_seal β€” SHA-256 chain link β”‚
211
+ β”‚ β”‚
212
+ β”‚ verify_chain() checks entire chain in O(n) β”‚
213
+ β”‚ β†’ Connects to snap-os/bifrost for Blake3+Ed25519 sealing β”‚
214
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Cross-Cutting: True Entropy
220
+
221
+ `crates/true-entropy` is used across all layers as the exact entropy primitive.
222
+
223
+ ```rust
224
+ // Point estimate β€” MPFR 256-bit, correctly rounded
225
+ let h = shannon_entropy_exact([3u64, 1, 2, 4], 256);
226
+
227
+ // Guaranteed interval β€” directed rounding
228
+ let (lo, hi) = shannon_entropy_interval([3u64, 1, 2, 4], 256);
229
+ // Invariant: lo ≀ true_entropy ≀ hi, always
230
+
231
+ // Symbolic β€” no evaluation, pure algebra
232
+ let sym = shannon_entropy_symbolic([3u64, 1, 2, 4]);
233
+ // Returns: [SymLog2{coeff: 1/10, base: 10}, SymLog2{coeff: -3/10, base: 3}, ...]
234
+ // H = (1/10)logβ‚‚(10) + (-3/10)logβ‚‚(3) + (-1/10)logβ‚‚(1) + ...
235
+ ```
236
+
237
+ The `entropy_coherent(Counts, 0.21)` Prolog predicate calls this layer and gates the entire pipeline.
238
+
239
+ ---
240
+
241
+ ## What Is Built
242
+
243
+ | Layer | File | What It Does | Tests |
244
+ |-------|------|-------------|-------|
245
+ | 1 | `crates/quantabeta-core/src/features.rs` | Partition volatility + Hecke cross-correlation, exact rational | OEIS A000041 p(0..10), determinism |
246
+ | 1 | `crates/ramanujan-ops/src/partition.rs` | HRR partition p(n), Ramanujan congruences mod 5 and 7 | OEIS A000041 p(0..20), congruences |
247
+ | 1 | `crates/ramanujan-ops/src/hecke.rs` | T_n double-coset formula, Deligne bound | T_1 identity, Deligne bound |
248
+ | 1 | `crates/ramanujan-ops/src/qseries.rs` | q-integers, q-Pochhammer, Rogers-Ramanujan | RR identity at q=1/10 |
249
+ | cross | `crates/true-entropy/src/lib.rs` | Exact/interval/symbolic Shannon entropy, MPFR | Uniform=1bit, certain=0, interval contains point |
250
+ | cross | `haskell/src/Verified/Entropy.hs` | Symbolic entropy HOC, rational logβ‚‚ intervals, partition entropy | Type-checked |
251
+ | 2 | `haskell/src/Quantabeta/InvariantSearch.hs` | Typed invariant enumeration, Deligne+IC checks, SGML output | wellTyped filter |
252
+ | 3 | `logic/factor_synthesis.pl` | Prolog DCG β†’ Rust code gen, Bifrost manifest | Hecke + partition synthesis |
253
+ | 3 | `logic/entropy.pl` | Bifrost FFI bridge, Ξ© coherence gate, WORM audit | Integration (requires FFI) |
254
+ | 4 | `crates/quantabeta-core/src/backtest.rs` | Lamport clock, integer PnL, rational Sharpe interval | Determinism test |
255
+ | 5 | `lean/Quantabeta/Validation.lean` | Formal robustness βˆ€ Ξ΅-bounded noise | trivially_robust_increasing |
256
+ | 6 | `crates/quantabeta-core/src/worm.rs` | SHA-256 append-only WORM chain | Chain integrity |
257
+
258
+ ---
259
+
260
+ ## Run
261
+
262
+ ```
263
+ cargo test --workspace
264
+ ```
265
+
266
+ Tests verify:
267
+ - `p(0)..p(20)` match OEIS A000041 exactly
268
+ - `p(5k+4) ≑ 0 (mod 5)` holds for k=0..10 (Ramanujan)
269
+ - `p(7k+5) ≑ 0 (mod 7)` holds for k=0..5 (Ramanujan)
270
+ - Deligne bound `|a_2| ≀ 64` satisfied for Delta function
271
+ - Rogers-Ramanujan identity verified at q=1/10 to order 20
272
+ - Shannon entropy `[1,1]` = exactly 1 bit at 256-bit precision
273
+ - Interval `[L,U]` always contains point estimate
274
+ - Backtest determinism: same ticks β†’ same PnL β†’ same audit hash
275
+ - WORM chain integrity verified after 2 appends
276
+
277
+ ---
278
+
279
+ ## Connection to SnapKitty Stack
280
+
281
+ | Repo | Role |
282
+ |------|------|
283
+ | [`snapkitty-clojure-lisp-bridge`](https://github.com/SNAPKITTYWEST/snapkitty-clojure-lisp-bridge) | claimguard oracle gates every factor claim via SGML before WORM seal |
284
+ | [`snap-os/bifrost`](https://github.com/SNAPKITTYWEST/snap-os) | Production WORM β€” upgrade `worm.rs` SHA-256 to Blake3+Ed25519 |
285
+ | [`the-49th-call`](https://github.com/SNAPKITTYWEST/the-49th-call) | Abjad-Swarm Born rule weighting uses Ο†^(-i) β€” same Ο† as Hecke bounds |
286
+ | [`jacobian-formal`](https://github.com/SNAPKITTYWEST/jacobian-formal) | PAR-011 Jordan operator uses the same Ο†. Four independent contexts, one structure. |
287
+ | [`gkn-i4-e7-lean`](https://github.com/SNAPKITTYWEST/gkn-i4-e7-lean) | Iβ‚„ quartic invariant structure mirrors partition function algebra |
288
+
289
+ ---
290
+
291
+ ## The Ο† Convergence
292
+
293
+ The golden ratio Ο† = (1+√5)/2 appears independently in four formal contexts across this constellation:
294
+
295
+ | Context | How | Repo |
296
+ |---------|-----|------|
297
+ | PAR-011 Jordan fixed-point operator | T(ρ) = φ⁻¹UρU† + φ⁻²ρ, drives commutativity | jacobian-formal |
298
+ | Hecke eigenvalue bound | Characteristic eigenvalue of T_2 on weight-2 forms | quantabeta-core |
299
+ | Abjad-Swarm Born rule | Agent weighting Ο†^(-i), golden ratio decay per level | the-49th-call |
300
+ | Iβ‚„ quartic invariant | E₇ symmetry structure | gkn-i4-e7-lean |
301
+
302
+ This is not numerology. It is convergence across independent formal derivations. Each is machine-verifiable.
303
+
304
+ ---
305
+
306
+ ## Prior Art
307
+
308
+ | Record | DOI | Date |
309
+ |--------|-----|------|
310
+ | Jordan Spectral Transformer (Ο† operator origin) | [10.5281/zenodo.21443609](https://doi.org/10.5281/zenodo.21443609) | 2026-07-19 |
311
+ | PAR-011: Jacobian Conjecture via Jordan Algebras | [10.5281/zenodo.21727363](https://doi.org/10.5281/zenodo.21727363) | 2026-07-31 |
312
+
313
+ WORM anchor: `github.com/SNAPKITTYWEST/quantabeta-core`
314
+
315
+ ---
316
+
317
+ ## License
318
+
319
+ **Sovereign Source License v1.0** β€” Business Source License variant.
320
+
321
+ - **Non-production use:** Free. Research, education, evaluation, personal projects.
322
+ - **Production use** (live or paper trading, capital > $1,000): Requires commercial license until 2029-01-01.
323
+ - **After 2029-01-01:** AGPL-3.0.
324
+
325
+ The IP is held by **Bel Esprit D'Accord Irrevocable Trust (EIN 42-697643)**. Unauthorized commercial use is interference with trust property.
326
+
327
+ See [LICENSE](./LICENSE) for full terms including WORM chain integrity clause, namespace protection, and prior art anchors.
328
+
329
+ Commercial licensing: [ahmedparr93@gmail.com](mailto:ahmedparr93@gmail.com) | [collectivekitty.com](https://collectivekitty.com)
330
+
331
+ ---
332
+
333
+ <div align="center">
334
+
335
+ **Built by:** Ahmad Ali Parr + Claude Code
336
+ **Trust:** Bel Esprit D'Accord Irrevocable Trust
337
+ **Constellation:** [SNAPKITTYWEST](https://github.com/SNAPKITTYWEST)
338
+
339
+ `Ω = TRUST ∧ CODE`
340
+
341
+ </div>