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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SnapKitty: Researcher Explanation
|
| 2 |
+
|
| 3 |
+
**Concise technical brief for a quantum computing or AI systems researcher.**
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
## What problem are we solving?
|
| 8 |
+
|
| 9 |
+
AI systems produce outputs with no verifiable chain of custody. A language model states a fact; there is no connection from that statement back to evidence, proof, or a formal authorization decision. Hallucinations are structurally permitted by the architecture.
|
| 10 |
+
|
| 11 |
+
SnapKitty proposes: build an AI pipeline where every inference step is gated by a formally specified integrity graph, every output carries a cryptographic receipt, and the routing mechanism itself can be formally analyzed.
|
| 12 |
+
|
| 13 |
+
There are two parallel research tracks:
|
| 14 |
+
1. **Governance:** A formally verified DAG that gates all claims and decisions (ICP-DAG). This works now.
|
| 15 |
+
2. **Routing:** An experimental replacement of softmax attention with integer-arithmetic SUBLEQ routing. This is experimental.
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## What is the conventional approach?
|
| 20 |
+
|
| 21 |
+
Softmax-based transformer attention computes a probability distribution over query-key pairs: `softmax(QKᵀ/√d) · V`. This involves three matrix multiplications, exponential operations, and a floating-point normalization step. The routing decision (which context to attend to) is implicit in the probability distribution — not formally specified.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## What does SnapKitty do differently?
|
| 26 |
+
|
| 27 |
+
**In the governance layer (working):** Replaces informal routing with a formally specified DAG. Every claim must be connected to evidence; every decision must have a proof; every execution must have an authorized decision. The ASP solver enforces this statically; the MUMPS runtime enforces it dynamically. UNSAT = governance violation = system halts.
|
| 28 |
+
|
| 29 |
+
**In the routing layer (experimental):** Replaces the softmax probability distribution with a deterministic integer routing mechanism. Input activations are quantized to [0,255] integers, reshaped as [A,B,C] SUBLEQ instruction triads, loaded into a 256-cell integer memory, and executed. The output addresses are aggregated via φ-weighted Born collapse. No matrix multiplication. No exponentials. No normalization. Deterministic.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## What is the role of the DAG?
|
| 34 |
+
|
| 35 |
+
The ICP-DAG is the governance backbone. It has exactly the structure needed:
|
| 36 |
+
- Nodes are typed (evidence, claim, proof, policy, decision, execution)
|
| 37 |
+
- Edges are typed (decides, proves, enforces, executes)
|
| 38 |
+
- Seven hard integrity constraints eliminate invalid paths
|
| 39 |
+
- Implemented in both ASP (declarative, checked by solver) and MUMPS (imperative, checked at runtime)
|
| 40 |
+
|
| 41 |
+
Every SnapKitty output traces back through this DAG or it does not execute.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## What is the role of Resonance Words?
|
| 46 |
+
|
| 47 |
+
Resonance Words are 64-bit elements of GF(2⁶⁴ - 2³² + 1) (Goldilocks prime field). Format: 8-bit class tag | 56-bit payload. Each token in an input string maps to a CLASS_SOVEREIGN Resonance Word via a deterministic hash function (`ordinal * 7 mod 1000 + 1`).
|
| 48 |
+
|
| 49 |
+
Their role: they provide a compact, algebraically structured representation of tokens that can be used for routing in the SUBLEQ attention mechanism (payload determines lattice position) and for agent dispatch (UREF 11 involutions on payload bits).
|
| 50 |
+
|
| 51 |
+
**Status:** Format implemented in J, Python port available. Bug fixed: original J `rw_pack` formula corrected (second term was `payload * 2^56 <. payload`; should be `payload`).
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## What is the role of SUBLEQ?
|
| 56 |
+
|
| 57 |
+
SUBLEQ (SUBtract and branch if Less-or-EQual) is a one-instruction-set computing model: `mem[B] -= mem[A]; if mem[B] ≤ 0: jump to C`.
|
| 58 |
+
|
| 59 |
+
In SnapKitty, SUBLEQ serves two distinct roles:
|
| 60 |
+
|
| 61 |
+
**1. As a VM (production):** `DEVFLOW-FINANCE/snapkitty-wasm/src/subleq_vm.rs` — a complete 65,536-cell SUBLEQ VM exposed via WebAssembly. Working, 4 tests, full execution trace and snapshot/restore.
|
| 62 |
+
|
| 63 |
+
**2. As an attention mechanism (experimental):** `j-matrix-twin/subleq_attention.ijs` — activation vectors are quantized, reshaped as SUBLEQ programs, and executed. The execution trace IS the routing computation. This is the novel combination under investigation.
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## What is the relationship to attention?
|
| 68 |
+
|
| 69 |
+
The proposed relationship is computational substitution:
|
| 70 |
+
|
| 71 |
+
| Conventional | SnapKitty SUBLEQ |
|
| 72 |
+
|---|---|
|
| 73 |
+
| Q, K, V projections | Activation vector (input) |
|
| 74 |
+
| QKᵀ (matmul) | Quantize → [A,B,C] triads |
|
| 75 |
+
| Softmax (exp + normalize) | SUBLEQ execution (subtract-and-branch) |
|
| 76 |
+
| Attention weights × V | Born-collapse output addresses |
|
| 77 |
+
| Continuous probability distribution | Discrete integer address |
|
| 78 |
+
|
| 79 |
+
**What is claimed:** This is an architectural substitution that produces a routing decision without exponentials or matrix multiplication in the SUBLEQ phase.
|
| 80 |
+
|
| 81 |
+
**What is not claimed:** Equivalent output quality, lower latency, lower FLOPs, or superior accuracy. None of these have been measured. The mechanism is demonstrated (J code runs) but not benchmarked.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## What is the topological quantum component?
|
| 86 |
+
|
| 87 |
+
There are three separate topological quantum components, which should not be confused:
|
| 88 |
+
|
| 89 |
+
**1. Fibonacci anyon Lean formalization** (`FibonacciAnyon.lean`, `BraidCompilation.lean`): Correct Lean 4 definitions of the fusion category, R-matrix, braid group. Pentagon and hexagon axioms are empty. Gate synthesis proofs are all `sorry`. This is a formal scaffolding, not a completed proof.
|
| 90 |
+
|
| 91 |
+
**2. Classical topological simulations**: `carry-agent/topological.rs` (Fibonacci anyon simulation with correct fusion probabilities, working) and `quantum-wasm` (vortex lattice with classical topological charge, 44KB compiled WASM binary, working).
|
| 92 |
+
|
| 93 |
+
**3. Braid group as access control** (`carry-agent/braid.rs`): B₃ over authority strands, using writhe as an integrity invariant. Correct braid mathematics, non-quantum application domain.
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
## What exactly is the quantum swarm?
|
| 98 |
+
|
| 99 |
+
A classical multi-agent system where each agent's temperature parameter is derived from real quantum entropy (ANU QRNG vacuum fluctuations).
|
| 100 |
+
|
| 101 |
+
**Precisely:** 512 bytes from ANU QRNG → HKDF → N orthogonal seeds → Born-collapsed temperatures → N concurrent LLM inference calls → quality-weighted aggregation → WORM seal.
|
| 102 |
+
|
| 103 |
+
The only physical quantum component is the ANU QRNG entropy source. Everything else is classical.
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
## Which parts are classical?
|
| 108 |
+
|
| 109 |
+
- ICP-DAG governance (MUMPS + ASP)
|
| 110 |
+
- SUBLEQ VM (Rust)
|
| 111 |
+
- Resonance ISA VM (Rust)
|
| 112 |
+
- SUBLEQ attention mechanism (J)
|
| 113 |
+
- Resonance Word tokenization (J)
|
| 114 |
+
- ERE quality filter (JavaScript + Prolog)
|
| 115 |
+
- Entropy Governor (Python LogitsProcessor)
|
| 116 |
+
- Swarm coordination (JavaScript, Python)
|
| 117 |
+
- Braid group access control (Rust)
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
## Which parts are quantum simulations?
|
| 122 |
+
|
| 123 |
+
- `quantum-wasm`: gate simulation (QuantumState, Ising Hamiltonian, vortex lattice)
|
| 124 |
+
- `carry-agent/topological.rs`: Fibonacci anyon fusion simulation
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## What is mathematically established?
|
| 129 |
+
|
| 130 |
+
All of these have been formally verified (zero sorry, Lean 4 + Mathlib):
|
| 131 |
+
1. Jordan fixed-point commutativity: T(ρ) = φ⁻¹·U·ρ·U† + φ⁻²·ρ → [U, ρ*] = 0
|
| 132 |
+
2. Entropy bound: F ≥ 1 → T(F) ≤ 0.2218 → H < 0.20 nats
|
| 133 |
+
3. R-matrix unitarity: |e^{i4π/5}| = 1
|
| 134 |
+
4. Braid period 5: (e^{i4π/5})^5 = 1
|
| 135 |
+
5. Fibonacci dimension recurrence (Hilbert space)
|
| 136 |
+
6. Boole invariants: 12/12 Agda proofs (100%, WORM-sealed)
|
| 137 |
+
7. Bifrost Bool invariant + Hebrew/Aramaic determinism
|
| 138 |
+
|
| 139 |
+
---
|
| 140 |
+
|
| 141 |
+
## What is experimentally demonstrated?
|
| 142 |
+
|
| 143 |
+
- SUBLEQ VM executes correctly (4 Rust tests)
|
| 144 |
+
- Resonance ISA VM executes with entropy gate (3 Rust tests)
|
| 145 |
+
- ICP-DAG enforces governance invariants (MUMPS TEST entry)
|
| 146 |
+
- Fibonacci anyon fusion simulation with correct probabilities (working + tested)
|
| 147 |
+
- ANU QRNG integration produces real quantum entropy (working, network-dependent)
|
| 148 |
+
- WORM chain is append-only and verifiable (SHA-256 chain)
|
| 149 |
+
- Braid group B₃ access control works with passing tests (4 tests)
|
| 150 |
+
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
## What remains an open hypothesis?
|
| 154 |
+
|
| 155 |
+
1. **SUBLEQ attention quality:** Does SUBLEQ-routed attention produce comparable output quality to softmax attention? Not benchmarked.
|
| 156 |
+
2. **Float elimination:** The SUBLEQ routing phase operates on integers, but the quantization step requires floats. Whether end-to-end float elimination is achievable is unresolved.
|
| 157 |
+
3. **Computational advantage:** Any claim about latency, FLOPs, energy, or memory advantage is unsupported. No comparative benchmark exists.
|
| 158 |
+
4. **Pentagon/hexagon completeness:** Whether the Lean 4 formalization of Fibonacci anyons can be completed to a full modular tensor category (pentagon + hexagon proved) is an open problem in this codebase.
|
| 159 |
+
5. **Braid synthesis:** Solovay-Kitaev approximation and all gate synthesis in `BraidCompilation.lean` are `sorry`. Whether these can be formally proved in Lean 4 + Mathlib is an open question.
|
| 160 |
+
6. **GJW wormhole compilation:** Whether the Prolog braid compiler corresponds to a physically realizable GJW protocol is an open hypothesis.
|
| 161 |
+
7. **θ = 89/2462 optimality:** The role of this constant in free energy optimization is hypothesized but not formally proved beyond the entropy bound.
|