Sync with GitHub, license metadata from LICENSE files, commercial license notice
Browse filessync from SNAPKITTYWEST/carry-agent: 2 files
metadata license: None -> agpl-3.0
README: License section kept (already accurate) + commercial notice
README: GitHub source link added
- .gitattributes +5 -7
- README.md +442 -428
.gitattributes
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
-
*.curry linguist-language=Curry
|
| 2 |
-
*.pl linguist-language=Prolog
|
| 3 |
-
*.rs linguist-language=Rust
|
| 4 |
-
Cargo.toml linguist-detectable=false
|
| 5 |
-
Cargo.lock linguist-detectable=false
|
| 6 |
-
docs/carry_brand_banner.png filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
docs/firecarry.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.curry linguist-language=Curry
|
| 2 |
+
*.pl linguist-language=Prolog
|
| 3 |
+
*.rs linguist-language=Rust
|
| 4 |
+
Cargo.toml linguist-detectable=false
|
| 5 |
+
Cargo.lock linguist-detectable=false
|
|
|
|
|
|
README.md
CHANGED
|
@@ -1,428 +1,442 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
</
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
<
|
| 18 |
-
|
| 19 |
-
<
|
| 20 |
-
<
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
</
|
| 25 |
-
|
| 26 |
-
---
|
| 27 |
-
|
| 28 |
-
<
|
| 29 |
-
<img src="
|
| 30 |
-
</
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
β
|
| 133 |
-
|
| 134 |
-
β
|
| 135 |
-
β
|
| 136 |
-
β
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
β
|
| 140 |
-
β
|
| 141 |
-
β
|
| 142 |
-
|
| 143 |
-
β
|
| 144 |
-
β
|
| 145 |
-
|
| 146 |
-
β
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
```
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
β
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
βββ
|
| 194 |
-
β
|
| 195 |
-
|
| 196 |
-
βββ
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
β
|
| 233 |
-
β
|
| 234 |
-
β
|
| 235 |
-
|
| 236 |
-
β
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
```
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
β
|
| 286 |
-
|
| 287 |
-
β
|
| 288 |
-
|
| 289 |
-
β
|
| 290 |
-
β
|
| 291 |
-
β
|
| 292 |
-
β
|
| 293 |
-
β
|
| 294 |
-
β βββ
|
| 295 |
-
β βββ
|
| 296 |
-
β βββ
|
| 297 |
-
β βββ
|
| 298 |
-
β
|
| 299 |
-
β βββ
|
| 300 |
-
β βββ
|
| 301 |
-
β
|
| 302 |
-
β
|
| 303 |
-
βββ
|
| 304 |
-
β
|
| 305 |
-
β
|
| 306 |
-
β
|
| 307 |
-
β
|
| 308 |
-
β
|
| 309 |
-
|
| 310 |
-
β
|
| 311 |
-
|
| 312 |
-
βββ
|
| 313 |
-
β βββ
|
| 314 |
-
β
|
| 315 |
-
βββ
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
```
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
```
|
| 382 |
-
|
| 383 |
-
**
|
| 384 |
-
|
| 385 |
-
```
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
```
|
| 390 |
-
|
| 391 |
-
**
|
| 392 |
-
|
| 393 |
-
```
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
```
|
| 398 |
-
|
| 399 |
-
**
|
| 400 |
-
|
| 401 |
-
```
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: agpl-3.0
|
| 3 |
+
tags:
|
| 4 |
+
- snapkitty
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
> Source: [github.com/SNAPKITTYWEST/carry-agent](https://github.com/SNAPKITTYWEST/carry-agent)
|
| 8 |
+
|
| 9 |
+
<p align="center">
|
| 10 |
+
<img src="docs/firecarry.png" alt="CARRY β CARTO's Evil Twin Made of Curry" width="360px" />
|
| 11 |
+
</p>
|
| 12 |
+
|
| 13 |
+
<h1 align="center">CARRY</h1>
|
| 14 |
+
<h3 align="center">Adversarial Twin of CARTO</h3>
|
| 15 |
+
|
| 16 |
+
<p align="center">
|
| 17 |
+
<strong>CURRY_CRYSTAL_C3 Triad + Braid Topology + Sovereign Quantum Simulator</strong><br />
|
| 18 |
+
7-state DAG-locked pipeline Β· Entropy-gated transitions Β· Tau-Prolog logic kernel<br />
|
| 19 |
+
Fibonacci anyons Β· ICP governance Β· BLAKE3 WORM audit chain<br />
|
| 20 |
+
<em>The FSM tells you WHERE you are. The braid tells you WHETHER you got there honestly.</em>
|
| 21 |
+
</p>
|
| 22 |
+
|
| 23 |
+
<p align="center">
|
| 24 |
+
<img src="https://img.shields.io/badge/lang-Rust-orange?style=flat-square" />
|
| 25 |
+
<img src="https://img.shields.io/badge/logic-Tau--Prolog-blue?style=flat-square" />
|
| 26 |
+
<img src="https://img.shields.io/badge/proof-Braid_Bβ-purple?style=flat-square" />
|
| 27 |
+
<img src="https://img.shields.io/badge/quantum-Fibonacci_Anyons-cyan?style=flat-square" />
|
| 28 |
+
<img src="https://img.shields.io/badge/formal-Lean_4_%2B_Agda-blueviolet?style=flat-square" />
|
| 29 |
+
<img src="https://img.shields.io/badge/tests-14%2F14_PASS-brightgreen?style=flat-square" />
|
| 30 |
+
<img src="https://img.shields.io/badge/sorry-0-brightgreen?style=flat-square" />
|
| 31 |
+
<img src="https://img.shields.io/badge/license-AGPL--3.0-green?style=flat-square" />
|
| 32 |
+
</p>
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
<p align="center">
|
| 37 |
+
<img src="docs/carry_brand_banner.png" alt="CARRY FSM β Adversarial Twin System + Deterministic Compiler Engine" width="100%" />
|
| 38 |
+
</p>
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
βββββββ ββββββ βββββββ βββββββ βββ βββ
|
| 44 |
+
ββββββββββββββββββββββββββββββββββββ ββββ
|
| 45 |
+
βββ ββββββββββββββββββββββββ βββββββ
|
| 46 |
+
βββ ββββββββββββββββββββββββ βββββ
|
| 47 |
+
βββββββββββ ββββββ ββββββ βββ βββ
|
| 48 |
+
ββββββββββ ββββββ ββββββ βββ βββ
|
| 49 |
+
|
| 50 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 51 |
+
β B R A I D T O P O L O G Y R U N T I M E β
|
| 52 |
+
β Οβ Β· Οβ Β· Οβ = Οβ Β· Οβ Β· Οβ β
|
| 53 |
+
β Yang-Baxter holds. The chain is honest. β
|
| 54 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 55 |
+
|
| 56 |
+
strand 0 βββ² β±ββ Οβ crossing
|
| 57 |
+
strand 1 β²β±
|
| 58 |
+
β±β²
|
| 59 |
+
strand 2 βββ± β²ββ Οβ crossing
|
| 60 |
+
β
|
| 61 |
+
βΌ
|
| 62 |
+
[C3 at pos 0]
|
| 63 |
+
writhe = +2
|
| 64 |
+
INVARIANT HOLDS
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## What Is CARRY?
|
| 70 |
+
|
| 71 |
+
CARRY is the **adversarial twin** of [CARTO](https://github.com/SNAPKITTYWEST/cartographer-agent).
|
| 72 |
+
|
| 73 |
+
**CARTO** is the sovereign mapping agent β it models terrain, constructs pipelines, and produces outputs it claims are valid.
|
| 74 |
+
|
| 75 |
+
**CARRY** attacks those outputs. If CARRY cannot break CARTO's pipeline, the pipeline is honest. CARRY is the red team that never sleeps β a formal adversary baked into the architecture itself rather than run as a separate audit process.
|
| 76 |
+
|
| 77 |
+
The relationship:
|
| 78 |
+
|
| 79 |
+
```
|
| 80 |
+
CARTO CARRY
|
| 81 |
+
βββββ βββββ
|
| 82 |
+
Maps terrain ββ Attacks the map
|
| 83 |
+
Claims pipeline is valid ββ Tries to falsify the claim
|
| 84 |
+
Produces WORM output ββ Verifies the WORM seal
|
| 85 |
+
GOTO (push semantics) ββ COME-FROM (pull semantics)
|
| 86 |
+
Forward evolution (U) ββ Reversed evolution (Uβ )
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
The braid topology encodes this duality formally: every GOTO crossing has a matching COME-FROM crossing. The writhe invariant proves that authority was transferred through the correct sequence of crossings β not just that it arrived at the right place, but that it took the right path.
|
| 90 |
+
|
| 91 |
+
If the path is wrong, the braid is wrong. If the braid is wrong, the proof is rejected. No exceptions.
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
## Braid Authority Transfer
|
| 96 |
+
|
| 97 |
+
```
|
| 98 |
+
INITIAL: Curry ββββ Crystal ββββ C3
|
| 99 |
+
[0] [1] [2] (authority = pos 0)
|
| 100 |
+
|
| 101 |
+
After Οβ: Curry ββββ C3 ββββ Crystal
|
| 102 |
+
[0] [1] [2] (C3 crosses OVER Crystal)
|
| 103 |
+
|
| 104 |
+
After Οβ: C3 ββββ Curry ββββ Crystal
|
| 105 |
+
[0] [1] [2] (C3 crosses OVER Curry)
|
| 106 |
+
|
| 107 |
+
Writhe W(Ξ²) = (+1) + (+1) = +2
|
| 108 |
+
C3 at position 0 β AUTHORITY TRANSFERRED
|
| 109 |
+
INVARIANT HOLDS β
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
```
|
| 113 |
+
BRAID WORD: Οβ Β· Οβ
|
| 114 |
+
βββββββββββββββββββββ
|
| 115 |
+
Curry ββββ\ββββββββββββββββ
|
| 116 |
+
\
|
| 117 |
+
Crystal ββββXββ\ββββββββββ Οβ: C3 over Crystal
|
| 118 |
+
/ \
|
| 119 |
+
C3 βββββββ /ββββXββββββββ Οβ: C3 over Curry
|
| 120 |
+
\
|
| 121 |
+
βΌ
|
| 122 |
+
C3 at pos 0
|
| 123 |
+
W = +2 β
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## Architecture
|
| 129 |
+
|
| 130 |
+
```
|
| 131 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 132 |
+
β CARRY STACK β
|
| 133 |
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
| 134 |
+
β FORMAL LAYER Lean 4 + Agda β
|
| 135 |
+
β 13 invariants Β· 0 sorry β
|
| 136 |
+
β state_preservation proved β
|
| 137 |
+
β duality_involution proved β
|
| 138 |
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
| 139 |
+
β QUANTUM LAYER Fibonacci Anyon Simulator β
|
| 140 |
+
β Bβ braid group Β· Ο = 1.6180 β
|
| 141 |
+
β StateVector + DensityMatrix engines β
|
| 142 |
+
β ICP 6-stage governance pipeline β
|
| 143 |
+
β ASP declarative constraint solver β
|
| 144 |
+
β 6052 cycle-accurate emulator β
|
| 145 |
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
| 146 |
+
β GOVERNANCE LAYER Conditional Dual DAG β
|
| 147 |
+
β GOTO β COME-FROM duality β
|
| 148 |
+
β state preserved across ALL transitions β
|
| 149 |
+
β BLAKE3 WORM audit chain β
|
| 150 |
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
| 151 |
+
β RUNTIME LAYER Rust (carry-fsm crate) β
|
| 152 |
+
β 7-state DAG-locked FSM β
|
| 153 |
+
β Entropy β€ 0.20 gate β
|
| 154 |
+
β Tau-Prolog logic kernel β
|
| 155 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 156 |
+
```
|
| 157 |
+
|
| 158 |
+
---
|
| 159 |
+
|
| 160 |
+
## 7-State Quantum FSM
|
| 161 |
+
|
| 162 |
+
```
|
| 163 |
+
ββββββββ βββββββββββ ββββββββββββ βββββββββββ
|
| 164 |
+
β INIT βββββΆβ PREPARE βββββΆβ ENTANGLE βββββΆβ COMPUTE β
|
| 165 |
+
ββββββββ βββββββββββ ββββββββββββ ββββββ¬βββββ
|
| 166 |
+
β
|
| 167 |
+
ββββββββββ ββββββββββ ββββββββββ β
|
| 168 |
+
β COMMIT ββββββ VERIFY ββββββMEASURE βββββββββββββ
|
| 169 |
+
βββββ¬βββββ ββββββββββ ββββββββββ
|
| 170 |
+
β
|
| 171 |
+
ββββΆ PREPARE (loop) βββ or βββ COMMIT (terminal)
|
| 172 |
+
|
| 173 |
+
Any state βββΆ HALTED (emergency)
|
| 174 |
+
Any state βββΆ CYCLE_LIMIT (budget exhausted, absorbing)
|
| 175 |
+
|
| 176 |
+
Theorem (Lean 4, zero sorry):
|
| 177 |
+
Halted and CYCLE_LIMIT are ABSORBING STATES.
|
| 178 |
+
No transition exits them. Ever.
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
---
|
| 182 |
+
|
| 183 |
+
## The Quantum Module
|
| 184 |
+
|
| 185 |
+
CARRY ships a full first-principles quantum simulator:
|
| 186 |
+
|
| 187 |
+
```
|
| 188 |
+
runtime/quantum/
|
| 189 |
+
βββ core.rs StateVector |Οβ© + DensityMatrix Ο engines
|
| 190 |
+
β Born rule measurement Β· noise models
|
| 191 |
+
β H X Y Z S T Rx Ry Rz CNOT CZ SWAP
|
| 192 |
+
βββ fsm.rs 7-state governance FSM (proved absorbing terminals)
|
| 193 |
+
βββ agents.rs Primary + Partner agent pairs
|
| 194 |
+
β Qubit ownership: pairwise disjoint (proved INV-7)
|
| 195 |
+
βββ dag.rs Execution DAG + provenance hash chain
|
| 196 |
+
βββ icp.rs Integrity Constraint Protocol
|
| 197 |
+
β 6 stages: SetupβObserveβValidateβCheckβExecuteβVerify
|
| 198 |
+
β HALT on any constraint breach
|
| 199 |
+
βββ asp.rs Answer Set Programming constraint solver
|
| 200 |
+
β QubitControl Β· Entangled Β· AgentControls rules
|
| 201 |
+
βββ topological.rs Fibonacci anyon simulator
|
| 202 |
+
β Bβ: Οβ Οβ Οββ»ΒΉ Οββ»ΒΉ Β· Ο β 1.6180 (golden ratio)
|
| 203 |
+
β Fusion rules: tauβtau β {vacuum, tau}
|
| 204 |
+
βββ ftb.rs Fibonacci-Taylor Braid synthesis [RESEARCH_HYPOTHESIS]
|
| 205 |
+
βββ gitc.rs Governance Invariant Topological Cycle
|
| 206 |
+
βββ emulator_6052.rs Cycle-accurate 6052 emulator Β· MAX_CYCLE hard budget
|
| 207 |
+
βββ benchmarks.rs Bell Β· GHZ Β· Teleportation Β· Deutsch Β· Grover Β· QFT
|
| 208 |
+
```
|
| 209 |
+
|
| 210 |
+
Reference circuits:
|
| 211 |
+
|
| 212 |
+
```
|
| 213 |
+
Circuit Qubits Gates Expected state
|
| 214 |
+
ββββββββββββ ββββββ βββββ ββββββββββββββββββββββββββ
|
| 215 |
+
Bell 2 2 (|00β© + |11β©) / β2
|
| 216 |
+
GHZ-3 3 3 (|000β© + |111β©) / β2
|
| 217 |
+
Teleportation 3 7 State transfer protocol
|
| 218 |
+
Deutsch-Jozsa 2 5 Constant/balanced oracle
|
| 219 |
+
Grover-2Q 2 12 Amplitude amplification
|
| 220 |
+
QFT-3Q 3 10 Quantum Fourier Transform
|
| 221 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 222 |
+
14/14 tests PASS Β· all circuits SUCCESS
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
---
|
| 226 |
+
|
| 227 |
+
## Formal Verification Layer
|
| 228 |
+
|
| 229 |
+
```
|
| 230 |
+
runtime/quantum/
|
| 231 |
+
βββ QuantumSpec.agda Dependent-type specification
|
| 232 |
+
β Transition s s' encoded in the TYPE
|
| 233 |
+
β Illegal transitions: unrepresentable
|
| 234 |
+
β
|
| 235 |
+
βββ QuantumInvariants.lean 13 machine-checked invariants
|
| 236 |
+
β INV-1: norm preserved by unitary gates
|
| 237 |
+
β INV-3: cycle counter strictly monotone
|
| 238 |
+
β INV-4: FSM confined to DAG edges
|
| 239 |
+
β INV-5: Halted/CycleLimit absorbing β
|
| 240 |
+
β INV-7: agent qubit ownership disjoint
|
| 241 |
+
β INV-9: Fibonacci fusion rules correct
|
| 242 |
+
β INV-12: GITC invariant_holds iff all checks pass
|
| 243 |
+
β ... 13 total Β· 0 sorry
|
| 244 |
+
β
|
| 245 |
+
βββ QuantumReference.fs F# executable reference backend
|
| 246 |
+
7 conformance tests
|
| 247 |
+
Bell state Β· FSM terminal Β· ownership
|
| 248 |
+
```
|
| 249 |
+
|
| 250 |
+
The key post-quantum security property (ADR-002):
|
| 251 |
+
|
| 252 |
+
```
|
| 253 |
+
theorem state_preservation :
|
| 254 |
+
Step P (lβ, sβ) (lβ, sβ) β sβ = sβ
|
| 255 |
+
|
| 256 |
+
The governance layer is FORMALLY INERT with respect to state.
|
| 257 |
+
A quantum adversary with full control of the navigator
|
| 258 |
+
CANNOT touch the cryptographic state.
|
| 259 |
+
Not policy. TYPE.
|
| 260 |
+
```
|
| 261 |
+
|
| 262 |
+
---
|
| 263 |
+
|
| 264 |
+
## Trust Gate Invariants
|
| 265 |
+
|
| 266 |
+
```
|
| 267 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 268 |
+
β GATE RULE BLOCKS β
|
| 269 |
+
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
| 270 |
+
β Entropy entropy β€ 0.20 Acting on noise β
|
| 271 |
+
β Writhe W(Ξ²) β₯ 2 Incomplete transfer β
|
| 272 |
+
β Reidemeister ΟΒ·Οβ»ΒΉ rejected Fake crossings β
|
| 273 |
+
β V1 Trust active β‘ trusted Untrusted execution β
|
| 274 |
+
β Absorbing Halted stays Halted Re-entry after HALT β
|
| 275 |
+
β Cycle cycle β€ max_cycle Infinite loops β
|
| 276 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 277 |
+
```
|
| 278 |
+
|
| 279 |
+
---
|
| 280 |
+
|
| 281 |
+
## Repository Structure
|
| 282 |
+
|
| 283 |
+
```
|
| 284 |
+
carry-agent/
|
| 285 |
+
β
|
| 286 |
+
βββ Cargo.toml carry-fsm crate (AGPL-3.0)
|
| 287 |
+
β
|
| 288 |
+
βββ runtime/
|
| 289 |
+
β βββ carry-fsm.rs Core FSM library (7-state DAG)
|
| 290 |
+
β βββ braid.rs Bβ braid topology module
|
| 291 |
+
β βββ main.rs carry-cli binary
|
| 292 |
+
β β
|
| 293 |
+
β βββ quantum/ β SOVEREIGN QUANTUM SIMULATOR
|
| 294 |
+
β βββ core.rs StateVector + DensityMatrix + gates
|
| 295 |
+
β βββ fsm.rs Quantum governance FSM
|
| 296 |
+
β βββ agents.rs Primary/partner agent pairs
|
| 297 |
+
β βββ dag.rs Execution DAG + provenance
|
| 298 |
+
β βββ icp.rs Integrity Constraint Protocol
|
| 299 |
+
β βββ asp.rs ASP constraint solver
|
| 300 |
+
β βββ topological.rs Fibonacci anyon simulator
|
| 301 |
+
β βββ ftb.rs Fibonacci-Taylor Braids [HYPOTHESIS]
|
| 302 |
+
β βββ gitc.rs Governance Invariant Topological Cycle
|
| 303 |
+
β βββ emulator_6052.rs Cycle-accurate 6052 emulator
|
| 304 |
+
β βββ benchmarks.rs Reference circuit suite
|
| 305 |
+
β βββ mod.rs Module root
|
| 306 |
+
β β
|
| 307 |
+
β βββ QuantumSpec.agda β Dependent-type spec (Agda)
|
| 308 |
+
β βββ QuantumInvariants.lean β 13 invariants, 0 sorry (Lean 4)
|
| 309 |
+
β βββ QuantumReference.fs β F# conformance backend
|
| 310 |
+
β
|
| 311 |
+
βββ kernels/
|
| 312 |
+
β βββ carry-kernel.pl Original Prolog transition table
|
| 313 |
+
β βββ tau-prolog/
|
| 314 |
+
β βββ braid_kernel.pl Braid logic engine (ISO Prolog)
|
| 315 |
+
β βββ crossing_table.pl Crossing-to-DAG lookup
|
| 316 |
+
β
|
| 317 |
+
βββ logic/
|
| 318 |
+
β βββ constraint-graph.xml Constraint graph specification
|
| 319 |
+
β
|
| 320 |
+
βββ modules/
|
| 321 |
+
β βββ carry-manifest.json Full manifest (layers, DAG, rules)
|
| 322 |
+
β
|
| 323 |
+
βββ docs/
|
| 324 |
+
βββ firecarry.png Avatar
|
| 325 |
+
βββ carry_brand_banner.png Architecture diagram
|
| 326 |
+
βββ braid_animation.svg Animated braid crossing proof
|
| 327 |
+
βββ CARRY_ARCHITECTURE.md Architecture specification
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
---
|
| 331 |
+
|
| 332 |
+
## Run It
|
| 333 |
+
|
| 334 |
+
```bash
|
| 335 |
+
# Full pipeline (FSM + braid proof)
|
| 336 |
+
cargo run --bin carry-cli
|
| 337 |
+
|
| 338 |
+
# Quantum benchmark suite
|
| 339 |
+
cargo run --bin carry-cli -- quantum benchmark
|
| 340 |
+
|
| 341 |
+
# Quantum governance verification (ICP + ASP)
|
| 342 |
+
cargo run --bin carry-cli -- quantum verify
|
| 343 |
+
|
| 344 |
+
# Fibonacci anyon topological simulation
|
| 345 |
+
cargo run --bin carry-cli -- quantum topology
|
| 346 |
+
|
| 347 |
+
# All 14 tests
|
| 348 |
+
cargo test
|
| 349 |
+
|
| 350 |
+
# Inspect FSM state
|
| 351 |
+
cargo run --bin carry-cli -- quantum inspect
|
| 352 |
+
```
|
| 353 |
+
|
| 354 |
+
Expected output:
|
| 355 |
+
|
| 356 |
+
```
|
| 357 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 358 |
+
CARRY PIPELINE: BOTH PROOFS DISCHARGE
|
| 359 |
+
FSM: DETERMINISTIC_COMPILATION_COMPLETE
|
| 360 |
+
BRAID: INVARIANT_HOLDS (writhe=2, C3 at pos 0)
|
| 361 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 362 |
+
|
| 363 |
+
ββ QUANTUM BENCHMARK SUITE βββββββββββββββββββββββββββββββββββ
|
| 364 |
+
Circuit: Bell Qubits: 2 | Gates: 2 | Status: SUCCESS
|
| 365 |
+
Circuit: GHZ-3 Qubits: 3 | Gates: 3 | Status: SUCCESS
|
| 366 |
+
Circuit: Teleportation Qubits: 3 | Gates: 7 | Status: SUCCESS
|
| 367 |
+
Circuit: Deutsch Qubits: 2 | Gates: 5 | Status: SUCCESS
|
| 368 |
+
Circuit: Grover-2Q Qubits: 2 | Gates: 12 | Status: SUCCESS
|
| 369 |
+
Circuit: QFT-3Q Qubits: 3 | Gates: 10 | Status: SUCCESS
|
| 370 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 371 |
+
```
|
| 372 |
+
|
| 373 |
+
---
|
| 374 |
+
|
| 375 |
+
## The Math
|
| 376 |
+
|
| 377 |
+
**Bβ braid group** β generators Οβ, Οβ, Yang-Baxter:
|
| 378 |
+
|
| 379 |
+
```
|
| 380 |
+
Οβ Β· Οβ Β· Οβ = Οβ Β· Οβ Β· Οβ
|
| 381 |
+
```
|
| 382 |
+
|
| 383 |
+
**Writhe invariant** for canonical pipeline Ξ² = Οβ Β· Οβ:
|
| 384 |
+
|
| 385 |
+
```
|
| 386 |
+
W(Ξ²) = (+1) + (+1) = +2
|
| 387 |
+
Ο(Ξ²): C3 β position 0
|
| 388 |
+
Invariant: W(Ξ²) β₯ 2 β§ Ο(Ξ²)(C3) = 0
|
| 389 |
+
```
|
| 390 |
+
|
| 391 |
+
**Fibonacci anyons** β golden ratio quantum dimension:
|
| 392 |
+
|
| 393 |
+
```
|
| 394 |
+
Ο = (1 + β5) / 2 β 1.6180
|
| 395 |
+
tau β tau β vacuum w.p. 1/ΟΒ² β 0.382
|
| 396 |
+
tau β tau β tau w.p. 1 - 1/ΟΒ² β 0.618
|
| 397 |
+
```
|
| 398 |
+
|
| 399 |
+
**Zβ duality** (proved in Lean 4 + Agda, from order-of-symmetry):
|
| 400 |
+
|
| 401 |
+
```
|
| 402 |
+
D β D = id (duality is an involution)
|
| 403 |
+
D(P) β P (no fixed points β orbit size exactly 2)
|
| 404 |
+
GOTO β COME-FROM (structural mirrors, Zβ group of order 2)
|
| 405 |
+
```
|
| 406 |
+
|
| 407 |
+
**State preservation** (proved, 0 sorry):
|
| 408 |
+
|
| 409 |
+
```
|
| 410 |
+
Step P (lβ, sβ) (lβ, sβ) β sβ = sβ
|
| 411 |
+
The navigator cannot touch the payload. By type. Not by policy.
|
| 412 |
+
```
|
| 413 |
+
|
| 414 |
+
---
|
| 415 |
+
|
| 416 |
+
```
|
| 417 |
+
βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 418 |
+
β CARRY: The adversarial twin that proves β
|
| 419 |
+
β your pipeline is honest. β
|
| 420 |
+
β β
|
| 421 |
+
β The compiler says it runs. β
|
| 422 |
+
β The braid says it's real. β
|
| 423 |
+
β The Lean proof says it stays real. β
|
| 424 |
+
βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 425 |
+
```
|
| 426 |
+
|
| 427 |
+
---
|
| 428 |
+
|
| 429 |
+
## License
|
| 430 |
+
|
| 431 |
+
AGPL-3.0-only
|
| 432 |
+
Copyright (C) 2026 Ahmad Ali Parr, Jessica L. Williams / SNAPKITTYWEST
|
| 433 |
+
|
| 434 |
+
<p align="center">
|
| 435 |
+
<img src="docs/firecarry.png" alt="Firecarry" width="80px" />
|
| 436 |
+
</p>
|
| 437 |
+
|
| 438 |
+
### πΌ Commercial License
|
| 439 |
+
|
| 440 |
+
Snapkitty code is free and open under **AGPL-3.0** for open-source use. Building a commercial product or service? A **proprietary commercial license** from Snapkitty Collective LLC lets you ship this code without the AGPL's source-sharing and network-use obligations.
|
| 441 |
+
|
| 442 |
+
**[β Get a commercial license](mailto:A.parr@belespritdaccord.uk?subject=Commercial%20license:%20carry-agent)** Β· A.parr@belespritdaccord.uk
|