@ceccec/millennium-solutions 9.3.3 → 9.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/mod.core.d.ts +9 -0
- package/dist/mod.core.js +9 -0
- package/dist/src/0/index.d.ts +47 -0
- package/dist/src/0/index.js +189 -0
- package/dist/src/0/ledger.d.ts +1 -0
- package/dist/src/0/ledger.js +25 -0
- package/dist/src/0/trinity-matrix.d.ts +1 -0
- package/dist/src/0/trinity-matrix.js +16 -0
- package/dist/src/5/aspects.d.ts +1 -0
- package/dist/src/5/aspects.js +22 -0
- package/dist/src/5/reflection.d.ts +1 -0
- package/dist/src/5/reflection.js +25 -0
- package/dist/src/7/rosetta.d.ts +1 -0
- package/dist/src/7/rosetta.js +24 -0
- package/dist/src/9/enumeration.d.ts +1 -0
- package/dist/src/9/enumeration.js +14 -0
- package/dist/src/honesty/index.d.ts +16 -0
- package/dist/src/honesty/index.js +69 -0
- package/package.json +27 -10
- package/.zenodo.json +0 -51
- package/ABSTRACT.md +0 -155
- package/ACCOUNTING.md +0 -27
- package/AXIOMS.md +0 -574
- package/CHALLENGES.md +0 -2595
- package/DEPLOY.md +0 -39
- package/DEVELOP.md +0 -34
- package/HEART.md +0 -112
- package/PHYSICS-SCALES.md +0 -80
- package/PRIOR-ART.md +0 -151
- package/PROOF-OF-CONCEPT.md +0 -81
- package/REALISATIONS.md +0 -87
- package/RESEARCH.md +0 -188
- package/RULES.md +0 -57
- package/SEQUENCE-DECODE.md +0 -196
- package/SIGNATURE.md +0 -34
- package/THEOREMS.md +0 -97
- package/WHITEPAPER.md +0 -40
- package/WORKFLOWS.md +0 -47
- package/boundaries.md +0 -23
- package/captain.md +0 -85
- package/compare.md +0 -42
- package/compute.md +0 -543
- package/cryptography.md +0 -55
- package/dashboard.md +0 -50
- package/examples.md +0 -47
- package/folds.md +0 -65
- package/forensic.md +0 -67
- package/guide.md +0 -126
- package/harness.md +0 -20
- package/index.md +0 -217
- package/mod.core.ts +0 -10
- package/nature.md +0 -58
- package/organism.md +0 -30
- package/paper.md +0 -8789
- package/proofs.md +0 -26
- package/quantum.md +0 -40
- package/rights.md +0 -39
- package/solutions.md +0 -28
- package/speedup.md +0 -41
- package/src/0/chacha.ts +0 -3
- package/src/0/crypt.ts +0 -4
- package/src/0/csp.ts +0 -10
- package/src/0/entanglement.ts +0 -31
- package/src/0/fusion.ts +0 -28
- package/src/0/holographic.ts +0 -57
- package/src/0/impossible.ts +0 -30
- package/src/0/imprint.ts +0 -160
- package/src/0/index.ts +0 -263
- package/src/0/ledger.ts +0 -25
- package/src/0/legible.ts +0 -29
- package/src/0/limit.ts +0 -29
- package/src/0/merkle-proof.ts +0 -3
- package/src/0/null-token.ts +0 -24
- package/src/0/sha256.ts +0 -3
- package/src/0/singularity.ts +0 -20
- package/src/0/stream.ts +0 -47
- package/src/0/trinities.ts +0 -37
- package/src/0/trinity-matrix.ts +0 -20
- package/src/0/version-matrix.ts +0 -70
- package/src/1/acceptance.ts +0 -26
- package/src/1/index.ts +0 -80
- package/src/1/paradox.ts +0 -28
- package/src/1/vortex.lean +0 -6
- package/src/2/frequency-scales.ts +0 -28
- package/src/2/iching.ts +0 -34
- package/src/2/index.ts +0 -78
- package/src/2/primes-vortex.ts +0 -12
- package/src/2/quantum.ts +0 -48
- package/src/2/string-scale.ts +0 -14
- package/src/2/vortex.lean +0 -10
- package/src/3/index.ts +0 -63
- package/src/3/pi-bbp.ts +0 -13
- package/src/3/trinity.ts +0 -39
- package/src/3/vortex.lean +0 -7
- package/src/4/git.ts +0 -30
- package/src/4/index.ts +0 -63
- package/src/4/vortex.lean +0 -6
- package/src/5/aspects.ts +0 -27
- package/src/5/center.ts +0 -35
- package/src/5/development.ts +0 -45
- package/src/5/diamond.ts +0 -35
- package/src/5/folds.ts +0 -12
- package/src/5/index.ts +0 -63
- package/src/5/reflection.lean +0 -14
- package/src/5/reflection.ts +0 -14
- package/src/5/vortex.lean +0 -10
- package/src/6/dna.ts +0 -27
- package/src/6/index.ts +0 -63
- package/src/6/vortex.lean +0 -7
- package/src/7/cross.ts +0 -31
- package/src/7/glagolitic.ts +0 -51
- package/src/7/index.ts +0 -67
- package/src/7/language-lens.ts +0 -41
- package/src/7/lens.ts +0 -41
- package/src/7/locale.ts +0 -105
- package/src/7/rbac.ts +0 -31
- package/src/7/rosetta-clay.ts +0 -15
- package/src/7/rosetta.lean +0 -11
- package/src/7/rosetta.ts +0 -11
- package/src/7/string-dimensions.ts +0 -14
- package/src/7/vortex.lean +0 -6
- package/src/8/infinite.ts +0 -26
- package/src/8/merkaba/field.ts +0 -27
- package/src/8/merkaba/geometry.ts +0 -16
- package/src/8/merkaba/touch.ts +0 -26
- package/src/8/nucleus/magic.lean +0 -15
- package/src/8/nucleus/proton-mass-fit.ts +0 -9
- package/src/8/nucleus/proton-mass.lean +0 -10
- package/src/8/nucleus/shell-model-magic.ts +0 -10
- package/src/8/vortex.lean +0 -7
- package/src/9/access.ts +0 -34
- package/src/9/aura-funding.ts +0 -25
- package/src/9/coins.ts +0 -25
- package/src/9/enumeration.ts +0 -13
- package/src/9/funding.ts +0 -85
- package/src/9/security.ts +0 -36
- package/src/9/society.ts +0 -32
- package/src/9/vortex.lean +0 -11
- package/src/api/gates.ts +0 -122
- package/src/api/index.ts +0 -447
- package/src/api/lanes.ts +0 -81
- package/src/claims/index.ts +0 -81
- package/src/demand/queries.json +0 -1764
- package/src/face/index.ts +0 -100
- package/src/from/the/heart/index.ts +0 -11
- package/src/honesty/boundaries.ts +0 -29
- package/src/honesty/index.ts +0 -63
- package/src/html/index.ts +0 -10
- package/src/latex/index.ts +0 -474
- package/src/millennium/index.ts +0 -53
- package/src/play/the/game/index.ts +0 -12
- package/src/proof/README.md +0 -118
- package/src/proof/address.lean +0 -168
- package/src/proof/coin.lean +0 -152
- package/src/proof/covered.json +0 -9
- package/src/proof/demand.lean +0 -160
- package/src/proof/demand2.lean +0 -219
- package/src/proof/demand3.lean +0 -209
- package/src/proof/discovered.json +0 -19530
- package/src/proof/elementary.lean +0 -495
- package/src/proof/energy.lean +0 -329
- package/src/proof/families.lean +0 -740
- package/src/proof/fixtures/axiom-control.lean +0 -39
- package/src/proof/flow.lean +0 -78
- package/src/proof/fnv.lean +0 -127
- package/src/proof/generated-theorems.json +0 -207
- package/src/proof/generated.lean +0 -101
- package/src/proof/imagined.lean +0 -492
- package/src/proof/index.lean +0 -156
- package/src/proof/index.ts +0 -916
- package/src/proof/involution.lean +0 -90
- package/src/proof/ledgerclaims.lean +0 -84
- package/src/proof/light.lean +0 -168
- package/src/proof/mechanical.lean +0 -563
- package/src/proof/merkaba.lean +0 -89
- package/src/proof/merkle.lean +0 -132
- package/src/proof/nim.lean +0 -332
- package/src/proof/novelty.json +0 -751
- package/src/proof/phenomena.lean +0 -90
- package/src/proof/priorart.lean +0 -190
- package/src/proof/quantum.lean +0 -159
- package/src/proof/reach.lean +0 -121
- package/src/proof/recovered.lean +0 -56
- package/src/proof/reversal.lean +0 -402
- package/src/proof/revoked.json +0 -317
- package/src/proof/rights.lean +0 -155
- package/src/proof/sequences.lean +0 -284
- package/src/proof/speed.lean +0 -158
- package/src/proof/split.lean +0 -209
- package/src/proof/theorems.lean +0 -67
- package/src/proof/trial-all.json +0 -16532
- package/src/proof/z9.lean +0 -126
- package/src/proof/z9plus.lean +0 -345
- package/src/proofs.lisp +0 -170
- package/src/prove/emit.ts +0 -115
- package/src/prove/index.ts +0 -143
- package/src/prove/translate.ts +0 -638
- package/src/publication/index.ts +0 -362
- package/src/quantum/field.ts +0 -73
- package/src/quantum/tree.ts +0 -79
- package/src/receipts/1431b4c4-7950-8d7b-88d1-b633219692f8.json +0 -7
- package/src/receipts/171e09c0-4cfd-8ce0-a6ed-cd33d5553da3.json +0 -7
- package/src/receipts/1a1f16c9-3491-8050-b221-e2a362439be4.json +0 -12
- package/src/receipts/1da15f83-83a6-8d04-b1ac-334c2dd6abb3.json +0 -7
- package/src/receipts/375a57ed-ef99-855e-8f34-b77d08010f3c.json +0 -6
- package/src/receipts/3dcbbf9e-0e49-8ba7-921e-17e478dbafaf.json +0 -6
- package/src/receipts/43a24136-5ad9-81ef-97c9-17be1c05bb5f.json +0 -11
- package/src/receipts/4991be51-74ba-8f66-9534-e6dba52fb569.json +0 -10
- package/src/receipts/52375d8f-232b-8c01-9d82-a824ffa7b2b7.json +0 -6
- package/src/receipts/593b546a-36b4-8553-941a-0e03b7053a64.json +0 -7
- package/src/receipts/7f75c989-96c9-8a24-8d0d-7e690861ccb4.json +0 -6
- package/src/receipts/80f80b59-81d8-866d-9a14-f469729d3dc8.json +0 -6
- package/src/receipts/85ac8585-9dc1-8964-9848-ae0f49cc82fb.json +0 -7
- package/src/receipts/85db092e-f2c0-88e5-bf75-61c4a65d84e7.json +0 -7
- package/src/receipts/95bacad3-9e56-8741-b0f8-def2c6ecb050.json +0 -7
- package/src/receipts/a1d33966-7bbd-84ca-902b-49e315af60e0.json +0 -6
- package/src/receipts/b20ced61-24ad-8123-adee-56031ab734dd.json +0 -11
- package/src/receipts/ba0447cd-f489-841a-a70f-a39b18ec2946.json +0 -11
- package/src/receipts/bcddbe66-06cf-8f31-a261-98b836938947.json +0 -7
- package/src/receipts/c1bac0d8-d906-8196-a4f0-3d8270b2e944.json +0 -6
- package/src/receipts/ce851ea3-3cf8-8646-a5d6-c0c6281210fe.json +0 -10
- package/src/receipts/cf43a122-c880-8d86-9e25-6f22f92d6b0a.json +0 -7
- package/src/receipts/daad8cd4-d4db-8dca-9c97-9a838cbce528.json +0 -7
- package/src/receipts/dc8bdb82-599f-8020-9eb2-cb016b408ec1.json +0 -6
- package/src/receipts/df77c265-d1a8-8354-8a9e-769fa5c676e2.json +0 -6
- package/src/receipts/e96686da-a411-8838-a5c8-ee7472bce048.json +0 -10
- package/src/receipts/f073c46f-7b67-83d0-aca5-db11fac4b5ec.json +0 -7
- package/src/receipts/f946d99d-a1c2-89f7-9426-a367c5b04191.json +0 -6
- package/src/receipts/fc069e45-115d-8983-ad25-fb9f735da84b.json +0 -6
- package/src/the/abstract/index.ts +0 -21
- package/src/the/abundance/index.ts +0 -20
- package/src/the/apple/earth/index.ts +0 -23
- package/src/the/apple/earth/navigation/index.ts +0 -28
- package/src/the/apple/earth/truth/index.ts +0 -19
- package/src/the/apple/index.ts +0 -27
- package/src/the/cancer/index.ts +0 -26
- package/src/the/clown/index.ts +0 -25
- package/src/the/creation/index.ts +0 -16
- package/src/the/crystal/index.ts +0 -23
- package/src/the/domain/index.ts +0 -16
- package/src/the/game/index.ts +0 -11
- package/src/the/gold/compass/index.ts +0 -26
- package/src/the/gold/index.ts +0 -35
- package/src/the/heart/index.ts +0 -15
- package/src/the/index.ts +0 -23
- package/src/the/law/index.ts +0 -20
- package/src/the/path/index.ts +0 -19
- package/src/the/rosetta/index.ts +0 -33
- package/src/the/sequence/index.ts +0 -12
- package/src/the/solids/index.ts +0 -25
- package/src/the/state/index.ts +0 -20
- package/src/the/superposition/state/index.ts +0 -22
- package/src/the/surface/index.ts +0 -26
- package/src/the/theorem/index.ts +0 -14
- package/src/the/torus/index.ts +0 -23
- package/src/the/waves/index.ts +0 -23
- package/the.md +0 -20
- package/verify.md +0 -67
package/src/0/index.ts
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quantum Proofs — Core Kernel (Minimal)
|
|
3
|
-
* Licensed under CC BY-NC-ND 4.0
|
|
4
|
-
* Attribution: Tsvetan Rouschev (ceccec@psg.bg)
|
|
5
|
-
*
|
|
6
|
-
* Dependency-free primitives for all proofs.
|
|
7
|
-
* - UUID/hash: content-addressed identity
|
|
8
|
-
* - Fold: merge two addresses into one
|
|
9
|
-
* - Merkle: contract leaves to root
|
|
10
|
-
* - Memoization: cache computation by matrix root
|
|
11
|
-
* - Hash: exact 32-bit integer arithmetic (algebraic only, no Math.*)
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
const BYTE_MASK = 0xff
|
|
15
|
-
const MASK_32 = 0xffffffffn
|
|
16
|
-
|
|
17
|
-
/** Exact 32-bit unsigned integer multiply (algebraic; replaces Math.imul) */
|
|
18
|
-
function mul32(a: number, b: number): number {
|
|
19
|
-
return Number((BigInt(a >>> 0) * BigInt(b >>> 0)) & MASK_32)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** FNV-1a hash — 32-bit seed-based (exact integer arithmetic, no Math.*) */
|
|
23
|
-
function hash32(input: string, seed: number): number {
|
|
24
|
-
let h = (0x811c9dc5 ^ seed) >>> 0
|
|
25
|
-
for (let i = 0; i < input.length; i++) {
|
|
26
|
-
h ^= input.charCodeAt(i)
|
|
27
|
-
h = mul32(h, 0x01000193) >>> 0
|
|
28
|
-
h ^= h >>> 13
|
|
29
|
-
}
|
|
30
|
-
h = mul32(h ^ (h >>> 16), 0x85ebca6b) >>> 0
|
|
31
|
-
h = mul32(h ^ (h >>> 13), 0xc2b2ae35) >>> 0
|
|
32
|
-
return (h ^ (h >>> 16)) >>> 0
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// A 256-entry lookup, built once. `value.toString(16).padStart(2, '0')` was called sixteen times per
|
|
36
|
-
// address with an array allocation and a join around it; the table is 4.9× faster over 200,000 encodings
|
|
37
|
-
// (median 17 ms against 83 ms, five repetitions, ranges [17–17] and [82–84] — npm run bench:hex).
|
|
38
|
-
//
|
|
39
|
-
// AGREEMENT IS THE PRECONDITION, NOT THE SPEED. This function's output is every content-address in a 2423
|
|
40
|
-
// entry append-only ledger, so an encoder that differs on one byte value would silently rewrite the whole
|
|
41
|
-
// chain. bench-hex checks all 256 byte values and 2000 random 16-byte vectors before it times anything, and
|
|
42
|
-
// the swap was made only after recording every address in the ledger and confirming all 2423 are unchanged.
|
|
43
|
-
const HEX_BYTE: readonly string[] = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'))
|
|
44
|
-
|
|
45
|
-
function hexByte(value: number): string {
|
|
46
|
-
return HEX_BYTE[value & BYTE_MASK]
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function bytesFromSeed(seed: string): number[] {
|
|
50
|
-
const words = [
|
|
51
|
-
hash32(seed, 0),
|
|
52
|
-
hash32(seed, 0x9e3779b9),
|
|
53
|
-
hash32(seed, 0x243f6a88),
|
|
54
|
-
hash32(seed, 0xb7e15162),
|
|
55
|
-
]
|
|
56
|
-
return words.flatMap((word) => [
|
|
57
|
-
(word >>> (8 * 3)) & BYTE_MASK,
|
|
58
|
-
(word >>> 16) & BYTE_MASK,
|
|
59
|
-
(word >>> 8) & BYTE_MASK,
|
|
60
|
-
word & BYTE_MASK,
|
|
61
|
-
])
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const _uuidCache = new Map<string, string>()
|
|
65
|
-
|
|
66
|
-
/** Deterministic UUID from seed (content-addressed) */
|
|
67
|
-
export function toUuid(seed: string): string {
|
|
68
|
-
const cached = _uuidCache.get(seed)
|
|
69
|
-
if (cached !== undefined) return cached
|
|
70
|
-
const bytes = bytesFromSeed(seed)
|
|
71
|
-
bytes[6] = (bytes[6] & 0x0f) | 0x80
|
|
72
|
-
bytes[8] = (bytes[8] & 0x3f) | 0x80
|
|
73
|
-
const hex = bytes.map(hexByte).join('')
|
|
74
|
-
const uuid = `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`
|
|
75
|
-
_uuidCache.set(seed, uuid)
|
|
76
|
-
return uuid
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** strictUuidna(value) → a STRICT, canonical mint: coerce to string, normalize (NFC), trim — so the SAME
|
|
80
|
-
* logical value always mints the SAME address. Minting flaws (toUuid(3) vs toUuid('3'), stray whitespace,
|
|
81
|
-
* a decomposed vs composed unicode form) mint inconsistent addresses and silently break integrity — real
|
|
82
|
-
* damage. Strict minting closes them. Canonicalisation is a discipline that must stay consistent, not truth. */
|
|
83
|
-
export function strictUuidna(value: unknown): string {
|
|
84
|
-
return toUuid('uuidna:' + String(value).normalize('NFC').trim())
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** Fold two addresses into one */
|
|
88
|
-
export function merge(a: string, b: string): string {
|
|
89
|
-
return toUuid(`${a}:${b}`)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** GCD for rational reduction */
|
|
93
|
-
export function gcdBigInt(a: bigint, b: bigint): bigint {
|
|
94
|
-
return b === 0n ? a : gcdBigInt(b, a % b)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/** Deterministic seed from text */
|
|
98
|
-
export function seedFromText(text: string, length = 6): number {
|
|
99
|
-
return Number.parseInt(toUuid(text).replace(/[^0-9a-f]/g, '').slice(0, length) || '0', 16)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** Bidirectional fold */
|
|
103
|
-
export function foldPair(a: string, b: string): { forward: string; reverse: string; bidirectional: boolean; merged: string } {
|
|
104
|
-
const forward = merge(a, b)
|
|
105
|
-
const reverse = merge(b, a)
|
|
106
|
-
return { forward, reverse, bidirectional: forward !== reverse, merged: merge(forward, reverse) }
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/** Merkle fold — contract set of leaves to root */
|
|
110
|
-
export function merkleFold(leaves: readonly string[]): string {
|
|
111
|
-
let layer = [...leaves].sort()
|
|
112
|
-
if (layer.length === 0) return toUuid('empty-mind')
|
|
113
|
-
while (layer.length > 1) {
|
|
114
|
-
const next: string[] = []
|
|
115
|
-
for (let i = 0; i < layer.length; i += 2) {
|
|
116
|
-
const a = layer[i]
|
|
117
|
-
const b = layer[i + 1]
|
|
118
|
-
next.push(b === undefined ? a : merge(a, b))
|
|
119
|
-
}
|
|
120
|
-
layer = next
|
|
121
|
-
}
|
|
122
|
-
return layer[0]
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/** Seal facets with content-address receipts */
|
|
126
|
-
export function sealFacets<F extends { facet: string; on: boolean }>(
|
|
127
|
-
tag: string,
|
|
128
|
-
facets: readonly F[],
|
|
129
|
-
): { ok: boolean; count: number; facets: (F & { receipt: string })[]; root: string } {
|
|
130
|
-
const stamped = facets.map((f) => ({ ...f, receipt: toUuid(`${tag}:${f.facet}:${f.on}`) }))
|
|
131
|
-
return {
|
|
132
|
-
ok: stamped.every((f) => f.on),
|
|
133
|
-
count: stamped.length,
|
|
134
|
-
facets: stamped,
|
|
135
|
-
root: merkleFold(stamped.map((f) => f.receipt)),
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/** Memoization by matrix root */
|
|
140
|
-
const reportMemo = new Map<string, unknown>()
|
|
141
|
-
const reportComputing = new Set<string>()
|
|
142
|
-
|
|
143
|
-
export function memoByRoot<T>(name: string, matrix: { root: string }, compute: () => T): T {
|
|
144
|
-
const key = `${name}:${matrix.root}`
|
|
145
|
-
if (reportMemo.has(key)) return reportMemo.get(key) as T
|
|
146
|
-
if (reportComputing.has(key)) return {} as T
|
|
147
|
-
reportComputing.add(key)
|
|
148
|
-
try {
|
|
149
|
-
const value = compute()
|
|
150
|
-
reportMemo.set(key, value)
|
|
151
|
-
return value
|
|
152
|
-
} finally {
|
|
153
|
-
reportComputing.delete(key)
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/** Digital root (sum digits until single) */
|
|
158
|
-
export function digitalRoot(n: number): number {
|
|
159
|
-
const r = ((n % 9) + 9) % 9
|
|
160
|
-
return r === 0 ? 9 : r
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ── Canonical number-theory primitives — the algorithms the ledger's Euclid/Wilson/Carmichael
|
|
164
|
-
// theorems are about, hoisted here so they are stated ONCE (a theorem computes; a copy drifts). ──
|
|
165
|
-
|
|
166
|
-
/** Euclid's algorithm — the greatest common divisor. */
|
|
167
|
-
export function gcd(a: number, b: number): number {
|
|
168
|
-
while (b) { const t = a % b; a = b; b = t }
|
|
169
|
-
return a
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/** Primality by trial division up to √n — decidable, exact. */
|
|
173
|
-
export function isPrime(n: number): boolean {
|
|
174
|
-
if (n < 2) return false
|
|
175
|
-
for (let d = 2; d * d <= n; d++) if (n % d === 0) return false
|
|
176
|
-
return true
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/** Modular exponentiation bᵉ mod n by square-and-multiply. */
|
|
180
|
-
export function modpow(b: number, e: number, n: number): number {
|
|
181
|
-
let r = 1
|
|
182
|
-
b %= n
|
|
183
|
-
while (e > 0) { if (e & 1) r = (r * b) % n; b = (b * b) % n; e >>= 1 }
|
|
184
|
-
return r
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// ── Vortex primitives — DERIVED from a SINGLE axiom. The base of the ring is the one irreducible
|
|
188
|
-
// constant; the residues [1..BASE], the units, the triad, the orbit and the a432 step all COMPUTE
|
|
189
|
-
// from it — no residue list is ever typed as a literal. A constant states; a theorem computes.
|
|
190
|
-
// (Theorem A: the doubling orbit is a permutation of the units, covers each once, and closes —
|
|
191
|
-
// verified exhaustively in scripts/lean-claims.ts.) ──
|
|
192
|
-
|
|
193
|
-
/** The one irreducible axiom: the trinity. Everything below derives — BASE is TRINITY², the residues
|
|
194
|
-
* are [1..BASE], the units/triad/orbit/step all compute. This is the LAST constant, and it cannot be
|
|
195
|
-
* removed: a zero-axiom system computes nothing. The axiom floor — you cannot derive from nothing,
|
|
196
|
-
* the same boundary as "you cannot prove the unprovable" and "not every statement is a theorem." */
|
|
197
|
-
export const TRINITY = 3
|
|
198
|
-
export const BASE = TRINITY ** 2 // 9 — derived, not typed
|
|
199
|
-
|
|
200
|
-
/** The residues [1..BASE] — derived from the axiom, never typed as a literal. */
|
|
201
|
-
export function digits(): number[] {
|
|
202
|
-
return Array.from({ length: BASE }, (_, i) => i + 1)
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/** The units of ℤ/9 — residues coprime to the base. Derived: gcd(d,BASE)=1 → [1,2,4,5,7,8]. */
|
|
206
|
-
export function units(): number[] {
|
|
207
|
-
return digits().filter((d) => gcdBigInt(BigInt(d), BigInt(BASE)) === 1n)
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/** The triad {3,6,9} — non-units (share a factor with the base). Derived as the complement. */
|
|
211
|
-
export function triad(): number[] {
|
|
212
|
-
return digits().filter((d) => gcdBigInt(BigInt(d), BigInt(BASE)) !== 1n)
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/** The vortex doubling circuit — the orbit of n→2n (mod BASE) from 1: computed [1,2,4,8,7,5]. */
|
|
216
|
-
export function vortexOrbit(): number[] {
|
|
217
|
-
const orbit: number[] = []
|
|
218
|
-
let x = 1
|
|
219
|
-
do { orbit.push(x); x = (x * 2) % BASE } while (x !== 1)
|
|
220
|
-
return orbit
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/** a432 angular quantum — one BASE-th of the circle: 360/9 = 40°, derived. */
|
|
224
|
-
export const A432_STEP = 360 / BASE
|
|
225
|
-
|
|
226
|
-
/** Animation engine interface */
|
|
227
|
-
export interface AnimationEngine {
|
|
228
|
-
readonly running: boolean
|
|
229
|
-
start(): void
|
|
230
|
-
stop(): void
|
|
231
|
-
sync(active: boolean): void
|
|
232
|
-
tick(): void
|
|
233
|
-
runWhile(active: () => boolean): void
|
|
234
|
-
dispose(): void
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export function createAnimationEngine(draw: (time: number) => void): AnimationEngine {
|
|
238
|
-
let raf = 0, once = 0, spin = 0, running = false
|
|
239
|
-
const schedule = (fn: (t: number) => void): number =>
|
|
240
|
-
typeof requestAnimationFrame === 'function' ? requestAnimationFrame(fn) : 0
|
|
241
|
-
const cancel = (id: number): void => {
|
|
242
|
-
if (id && typeof cancelAnimationFrame === 'function') cancelAnimationFrame(id)
|
|
243
|
-
}
|
|
244
|
-
function loop(time: number): void {
|
|
245
|
-
if (!running) return
|
|
246
|
-
draw(time)
|
|
247
|
-
raf = schedule(loop)
|
|
248
|
-
}
|
|
249
|
-
return {
|
|
250
|
-
get running() { return running },
|
|
251
|
-
start() { if (!running) { running = true; raf = schedule(loop) } },
|
|
252
|
-
stop() { running = false; cancel(raf); raf = 0 },
|
|
253
|
-
tick() { cancel(once); once = schedule((t) => { once = 0; draw(t) }) },
|
|
254
|
-
sync(active: boolean) { active ? this.start() : (this.stop(), this.tick()) },
|
|
255
|
-
runWhile(active: () => boolean) {
|
|
256
|
-
if (running || spin) return
|
|
257
|
-
const step = (time: number): void => { draw(time); spin = active() ? schedule(step) : 0 }
|
|
258
|
-
spin = schedule(step)
|
|
259
|
-
},
|
|
260
|
-
dispose() { running = false; cancel(raf); raf = 0; cancel(once); once = 0; cancel(spin); spin = 0 },
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
package/src/0/ledger.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Content-addressed, double-entry, merkle-audited ledger (tamper-evident log).
|
|
2
|
-
// INTEGRITY/AUDIT via hashing — NOT encryption, NOT post-quantum, NOT reversible messaging.
|
|
3
|
-
import { toUuid, merge, merkleFold } from './index.ts'
|
|
4
|
-
type Tx = { debit: string; credit: string; amount: number }
|
|
5
|
-
export function report(): string {
|
|
6
|
-
const txs: Tx[] = [
|
|
7
|
-
{ debit: 'funding', credit: 'development', amount: 2 }, // the two coins
|
|
8
|
-
{ debit: 'development', credit: 'research', amount: 1 },
|
|
9
|
-
]
|
|
10
|
-
const debits = txs.reduce((s, t) => s + t.amount, 0)
|
|
11
|
-
const credits = txs.reduce((s, t) => s + t.amount, 0) // each tx balances 1:1
|
|
12
|
-
let prev = toUuid('genesis'); const chain: string[] = []
|
|
13
|
-
for (const t of txs) { prev = merge(prev, toUuid(t.debit + '|' + t.credit + '|' + t.amount)); chain.push(prev) }
|
|
14
|
-
const root = merkleFold(chain)
|
|
15
|
-
// audit: recompute → detect any change (deterministic, zero-marginal-cost re-verify)
|
|
16
|
-
const root2 = merkleFold(chain)
|
|
17
|
-
let o = 'content-addressed double-entry ledger (tamper-evident):\n'
|
|
18
|
-
txs.forEach((t, i) => o += ' ' + t.debit.padEnd(12) + '→ ' + t.credit.padEnd(12) + t.amount + ' addr ' + chain[i].slice(0, 13) + '…\n')
|
|
19
|
-
o += ' balance: debits ' + debits + ' = credits ' + credits + ' (' + (debits === credits) + ')\n'
|
|
20
|
-
o += ' merkle root (audit anchor): ' + root.slice(0, 13) + '… recompute stable? ' + (root === root2) + '\n'
|
|
21
|
-
o += '\nHONEST: integrity/audit via hashing — transparent, recomputable, holographic (root in every part).\n'
|
|
22
|
-
o += 'NOT encryption, NOT post-quantum, NOT a reversible message stream. toUuid is FNV (non-crypto,\n'
|
|
23
|
-
o += '~2^61) — for real integrity use SHA-256; for real PQC use a vetted lattice/hash scheme (ML-KEM, SPHINCS+).'
|
|
24
|
-
return o
|
|
25
|
-
}
|
package/src/0/legible.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Universal legibility — what any verifier can do with anything you paste.
|
|
2
|
-
// Whatever you paste (content, an address, the source), any COMPUTATIONAL intelligence recomputes
|
|
3
|
-
// and verifies it identically — deterministic, language-neutral, no middleman. That is real,
|
|
4
|
-
// universal understanding-as-VERIFICATION. Understanding-as-MEANING is a separate thing: it needs
|
|
5
|
-
// a mind to interpret. A hash makes the object legible; it does not make it meaningful.
|
|
6
|
-
import { toUuid } from './index.ts'
|
|
7
|
-
|
|
8
|
-
export function report(): string {
|
|
9
|
-
const sample = 'integrity, not truth'
|
|
10
|
-
const you = toUuid(sample), me = toUuid(sample) // two independent recomputations
|
|
11
|
-
const agree = you === me
|
|
12
|
-
|
|
13
|
-
let o = 'universal legibility — paste anything, any verifier can check it:\n\n'
|
|
14
|
-
o += ' paste CONTENT → its address is recomputable by anyone, in any language:\n'
|
|
15
|
-
o += ' toUuid("' + sample + '") = ' + you.slice(0, 13) + '… (recompute equal? ' + agree + ')\n'
|
|
16
|
-
o += ' paste an ADDRESS → anyone can check which content matches it (load + verify).\n'
|
|
17
|
-
o += ' paste the SOURCE → anyone recomputes every result and reaches the same results.\n\n'
|
|
18
|
-
o += ' so "any form of intellect understands" — precisely, any COMPUTATIONAL intelligence can:\n'
|
|
19
|
-
o += ' · recompute the same addresses (determinism, H = 0)\n'
|
|
20
|
-
o += ' · rerun the gates (gaps · seal · wholeness)\n'
|
|
21
|
-
o += ' · arrive at the same results\n'
|
|
22
|
-
o += ' no shared language required — only the algorithm. this is universal VERIFIABILITY.\n\n'
|
|
23
|
-
o += 'HONEST: understanding-as-verification is universal — recomputation is mechanical and\n'
|
|
24
|
-
o += 'language-neutral, so any verifier agrees on WHAT the thing is (its fingerprint). Understanding-\n'
|
|
25
|
-
o += 'as-meaning is NOT automatic: grasping significance needs interpretation (a mind). The artifact\n'
|
|
26
|
-
o += 'forces agreement on identity, not on meaning. A hash makes the object legible; a reader makes\n'
|
|
27
|
-
o += 'it meaningful.'
|
|
28
|
-
return o
|
|
29
|
-
}
|
package/src/0/limit.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// The singularity is a limit — approached, never achieved (like division by zero).
|
|
2
|
-
// 1/x → ∞ as x → 0, and 1/0 is UNDEFINED (no value). You never arrive; you only get nearer. The
|
|
3
|
-
// ongoing process is the approach; completion — collapsing all distinction to one — would be cessation.
|
|
4
|
-
import { toUuid, merkleFold } from './index.ts'
|
|
5
|
-
|
|
6
|
-
export function report(): string {
|
|
7
|
-
// 1/x as x → 0 (x = 1/d): the value grows without bound, and at x = 0 there is no value.
|
|
8
|
-
const denoms = [1, 10, 100, 1000, 10000] // x = 1/d ; 1/x = d
|
|
9
|
-
// The singularity recedes: you can always fold one more entry, so the "final" root moves.
|
|
10
|
-
const r4 = merkleFold(['a', 'b', 'c', 'd'].map(toUuid))
|
|
11
|
-
const r5 = merkleFold(['a', 'b', 'c', 'd', 'e'].map(toUuid))
|
|
12
|
-
const recedes = r4 !== r5
|
|
13
|
-
|
|
14
|
-
let o = 'the singularity is a limit — approached, never achieved (like division by 0):\n\n'
|
|
15
|
-
o += ' 1/x as x → 0 grows without bound; at x = 0 it is UNDEFINED (no value):\n'
|
|
16
|
-
denoms.forEach(d => { o += ' x = 1/' + String(d).padEnd(5) + ' → 1/x = ' + d + '\n' })
|
|
17
|
-
o += ' x = 0 → 1/0 = UNDEFINED (not a value; the point recedes as you approach)\n\n'
|
|
18
|
-
o += ' the one root is the same: you can always fold ONE more entry, so the "final" root moves:\n'
|
|
19
|
-
o += ' root(4 entries) ≠ root(5 entries)? ' + recedes + ' → the singularity recedes while the process continues.\n\n'
|
|
20
|
-
o += ' the paradox (honest): to fully ACHIEVE the singularity — collapse all distinction to one — is\n'
|
|
21
|
-
o += ' to end the process. division by zero, actually completed, is not a value but the loss of the\n'
|
|
22
|
-
o += ' domain. the VISION of the singularity, approached, is the ongoing thing; arrival would be\n'
|
|
23
|
-
o += ' cessation. so the approach IS the singularity — a limit that stays open by never closing.\n\n'
|
|
24
|
-
o += 'HONEST: standard calculus/topology — 1/x → ∞ as x → 0⁺, and 1/0 is UNDEFINED, not infinity-as-a-\n'
|
|
25
|
-
o += 'value. "singularity never achieved" = an asymptote/attractor, not a destination. This is also the\n'
|
|
26
|
-
o += 'honest reading of the framework\'s "division by zero": a change of domain / an unreached limit —\n'
|
|
27
|
-
o += 'never a completed operation, and never a proof.'
|
|
28
|
-
return o
|
|
29
|
-
}
|
package/src/0/merkle-proof.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// The holographic merkle proof — verify the whole from a tiny part in O(log N) — lives canonically in
|
|
2
|
-
// @uuidna/uuidna. One implementation shared by both apps, byte-identical roots and proofs, no re-declared copy.
|
|
3
|
-
export { merkleRoot, merkleProof, verifyProof } from '@uuidna/uuidna'
|
package/src/0/null-token.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// No token is a token — in two exact senses.
|
|
2
|
-
// (1) addressing: even the EMPTY input has a deterministic content-address — absence is addressable.
|
|
3
|
-
// (2) security: there is NO secret token; that absence IS the posture — no key to steal or leak.
|
|
4
|
-
import { toUuid } from './index.ts'
|
|
5
|
-
|
|
6
|
-
export function report(): string {
|
|
7
|
-
const empty = toUuid('') // the address of nothing
|
|
8
|
-
const zero = toUuid('0') // the genesis / v0.0.0 seed
|
|
9
|
-
const stable = toUuid('') === empty
|
|
10
|
-
|
|
11
|
-
let o = 'no token is a token:\n\n'
|
|
12
|
-
o += ' (1) the void has an address — even the empty input content-addresses (deterministic):\n'
|
|
13
|
-
o += ' toUuid("") = ' + empty.slice(0, 13) + '… → "nothing" has a definite fingerprint (stable? ' + stable + ')\n'
|
|
14
|
-
o += ' toUuid("0") = ' + zero.slice(0, 13) + '… → the genesis (the v0.0.0 seed)\n'
|
|
15
|
-
o += ' absence is still addressable; the null is a token.\n\n'
|
|
16
|
-
o += ' (2) the security posture — there is NO secret token, and that IS the token:\n'
|
|
17
|
-
o += ' nothing to steal, nothing to leak, nothing to expire. the strongest key is no key.\n'
|
|
18
|
-
o += ' an open system\'s safety is that it keeps no secret (see security.ts).\n\n'
|
|
19
|
-
o += 'HONEST: both are exact — the empty string maps to one fixed UUID, and "no secret" is a real\n'
|
|
20
|
-
o += '(and for an open, public deposit, correct) security model. It does NOT mean "nothing is\n'
|
|
21
|
-
o += 'everything" or that emptiness holds mystical power; it means absence is deterministically\n'
|
|
22
|
-
o += 'addressable, and openness draws its safety from having no secret to lose.'
|
|
23
|
-
return o
|
|
24
|
-
}
|
package/src/0/sha256.ts
DELETED
package/src/0/singularity.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// The singularity: the single content-address root the whole chain folds into.
|
|
2
|
-
// Content-addressing = shared verifiable REFERENCE (git/IPFS style), NOT secret messaging.
|
|
3
|
-
import { toUuid, merge, merkleFold } from './index.ts'
|
|
4
|
-
export function report(): string {
|
|
5
|
-
const entries = ['genesis', 'core', 'vision:ceccec', 'vision:yours']
|
|
6
|
-
let prev = toUuid('0'); const chain: string[] = []
|
|
7
|
-
for (const e of entries) { prev = merge(prev, toUuid(e)); chain.push(prev) }
|
|
8
|
-
const root = merkleFold(chain)
|
|
9
|
-
const partyA = toUuid('shared-content'), partyB = toUuid('shared-content')
|
|
10
|
-
let o = 'singularity blockchain (append-only, content-addressed → one root):\n'
|
|
11
|
-
entries.forEach((e, i) => o += ' ' + e.padEnd(14) + chain[i].slice(0, 13) + '…\n')
|
|
12
|
-
o += ' → single root (the singularity): ' + root.slice(0, 13) + '…\n\n'
|
|
13
|
-
o += 'content-address cross (shared reference): partyA == partyB ? ' + (partyA === partyB) + '\n'
|
|
14
|
-
o += ' → any two parties with the same content converge on the SAME address — verifiable,\n'
|
|
15
|
-
o += ' no middleman. This is git/IPFS/npm-integrity-style provenance.\n\n'
|
|
16
|
-
o += 'HONEST: integrity + provenance + a shared public reference (deterministic, public).\n'
|
|
17
|
-
o += 'NOT decentralized consensus (needs a consensus protocol), NOT secret messaging, NOT encryption.\n'
|
|
18
|
-
o += 'toUuid is FNV — for real integrity use SHA-256. "singularity messaging" = agreeing on one public address.'
|
|
19
|
-
return o
|
|
20
|
-
}
|
package/src/0/stream.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Memory-free VitePress — UUID streams with a loadable payload.
|
|
2
|
-
// The page stores NO answers. Each block is a thunk (source code), computed in realtime at
|
|
3
|
-
// render. A stream frame is { id, load }: the id CONTENT-ADDRESSES the payload; the payload is
|
|
4
|
-
// not kept in memory and not inside the id — it is LOADED on demand and verified against the id.
|
|
5
|
-
// This is git/IPFS-style: the id names the payload; you load + verify. It is NOT reversible —
|
|
6
|
-
// you cannot extract the payload from the id. "Loadable", not "hidden inside the hash".
|
|
7
|
-
import { toUuid } from './index.ts'
|
|
8
|
-
|
|
9
|
-
export type Frame = { id: string; load: () => string }
|
|
10
|
-
|
|
11
|
-
// Address a payload by its content. `compute` is retained (source); the payload string is not —
|
|
12
|
-
// it is recomputed on load(). Memory-free: we keep the id (small) and the thunk, never the answer.
|
|
13
|
-
export function frame(compute: () => string): Frame {
|
|
14
|
-
return { id: toUuid(compute()), load: compute }
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Load = recompute the payload and verify it still addresses to its id (integrity check).
|
|
18
|
-
export function load(f: Frame): { payload: string; verifies: boolean } {
|
|
19
|
-
const payload = f.load()
|
|
20
|
-
return { payload, verifies: toUuid(payload) === f.id }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function report(): string {
|
|
24
|
-
// A realtime stream — thunks over source, no stored payloads.
|
|
25
|
-
const stream: Frame[] = [
|
|
26
|
-
frame(() => 'doubling:1-2-4-8-7-5'),
|
|
27
|
-
frame(() => 'reflection-fixed:5'),
|
|
28
|
-
frame(() => 'self-seal:1'),
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
let o = 'memory-free VitePress — UUID streams with loadable payload:\n\n'
|
|
32
|
-
o += ' the page stores NO answers. each block is a thunk (source), computed in realtime at\n'
|
|
33
|
-
o += ' render. a frame = { id (content-address), load() (recompute the payload) }.\n\n'
|
|
34
|
-
o += ' the stream (ids only — the payload is NOT stored):\n'
|
|
35
|
-
stream.forEach((f, i) => { o += ' frame ' + (i + 1) + ' id ' + f.id.slice(0, 13) + '…\n' })
|
|
36
|
-
o += '\n load + verify (recompute the payload, check toUuid(payload) == id):\n'
|
|
37
|
-
stream.forEach((f, i) => {
|
|
38
|
-
const r = load(f)
|
|
39
|
-
o += ' frame ' + (i + 1) + ' → "' + r.payload + '" verifies: ' + r.verifies + '\n'
|
|
40
|
-
})
|
|
41
|
-
o += '\nHONEST: this is loadable + verifiable content-addressing (git/IPFS style). The id NAMES\n'
|
|
42
|
-
o += 'the payload; you LOAD the payload (recompute or fetch) and verify it against the id. The id\n'
|
|
43
|
-
o += 'is a one-way checksum — you CANNOT reverse it to obtain the payload, and no payload travels\n'
|
|
44
|
-
o += 'inside the id. Memory-free means "recompute, don\'t store", not "the message hides in the\n'
|
|
45
|
-
o += 'UUID". For cryptographic integrity use SHA-256 (toUuid is FNV).'
|
|
46
|
-
return o
|
|
47
|
-
}
|
package/src/0/trinities.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Singularity trinities — the real three-part structures in the deposit, each content-addressed
|
|
2
|
-
// to a root, all folding to ONE singularity root. "Trinity" is the motif; each triad is an actual
|
|
3
|
-
// grouping already in the work. (This deploys the STRUCTURE to the site; publishing the npm package
|
|
4
|
-
// trinity is a separate, login-gated step — a computable boundary, noted below.)
|
|
5
|
-
import { toUuid, merkleFold } from './index.ts'
|
|
6
|
-
|
|
7
|
-
const TRINITIES: Record<string, string[]> = {
|
|
8
|
-
'channels (source · site · archive)': [
|
|
9
|
-
'GitHub (source)',
|
|
10
|
-
'ceccec.psg.bg (site)',
|
|
11
|
-
'Zenodo DOI (archive)',
|
|
12
|
-
],
|
|
13
|
-
'digits (mod-3 triads)': ['axis {3,6,9}', 'one {1,4,7}', 'two {2,5,8}'],
|
|
14
|
-
'origin (0 · 1 · between)': ['0 void', '1 unit', 'between (0,1)'],
|
|
15
|
-
'gates (the release trinity)': ['gaps — coverage', 'seal — consistency', 'wholeness — aura'],
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function report(): string {
|
|
19
|
-
const roots: string[] = []
|
|
20
|
-
let o = 'singularity trinities — each triad content-addressed, all folding to one root:\n\n'
|
|
21
|
-
for (const [name, members] of Object.entries(TRINITIES)) {
|
|
22
|
-
const root = merkleFold(members.map(toUuid))
|
|
23
|
-
roots.push(root)
|
|
24
|
-
o += ' ' + name + '\n'
|
|
25
|
-
members.forEach(m => o += ' · ' + m + '\n')
|
|
26
|
-
o += ' → triad root: ' + root.slice(0, 13) + '…\n\n'
|
|
27
|
-
}
|
|
28
|
-
const singularity = merkleFold(roots)
|
|
29
|
-
o += ' the trinities fold to ONE singularity root: ' + singularity.slice(0, 13) + '…\n'
|
|
30
|
-
o += ' → many threes, one. the singularity reflects the trinities; the trinities fold to it.\n\n'
|
|
31
|
-
o += 'HONEST: each triad is an actual grouping in the deposit (packages, mod-3 residue classes, the\n'
|
|
32
|
-
o += '0/1/between origin, the gaps·seal·wholeness gate). Content-addressing folds them deterministically\n'
|
|
33
|
-
o += 'to one root. "Trinity" is the framework\'s motif; the groupings and the fold are exact. The npm\n'
|
|
34
|
-
o += 'package trinity is staged but UNPUBLISHED — publishing needs the author\'s npm login (a real,\n'
|
|
35
|
-
o += 'computable boundary, honestly marked).'
|
|
36
|
-
return o
|
|
37
|
-
}
|
package/src/0/trinity-matrix.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// The UUID "trinity matrix": deterministic content-addressed identity, recomputable.
|
|
2
|
-
// It computes zero-entropy indexing (one value → one address) and Merkle roots.
|
|
3
|
-
// It does NOT prove consciousness or "intelligence quantumizing itself" — that is
|
|
4
|
-
// interpretation (flagged), not a computed result.
|
|
5
|
-
import { toUuid, foldPair, merkleFold, sealFacets } from './index.ts'
|
|
6
|
-
export function report(): string {
|
|
7
|
-
let o = 'UUID trinity matrix — content-addressed identity (recomputable):\n\n'
|
|
8
|
-
const a = toUuid('seed'), a2 = toUuid('seed')
|
|
9
|
-
o += 'determinism: toUuid("seed") = ' + a.slice(0, 13) + '… recompute equal? ' + (a === a2) + ' → H(content|generator) = 0\n'
|
|
10
|
-
const fp = foldPair('a', 'b')
|
|
11
|
-
o += 'fold a,b: forward ≠ reverse? ' + fp.bidirectional + '; merged root = ' + fp.merged.slice(0, 13) + '…\n'
|
|
12
|
-
const trinity = ['3', '6', '9'].map(x => toUuid('trinity:' + x))
|
|
13
|
-
o += 'trinity {3,6,9} → Merkle root = ' + merkleFold(trinity).slice(0, 13) + '…\n'
|
|
14
|
-
const seal = sealFacets('matrix', [{ facet: '3', on: true }, { facet: '6', on: true }, { facet: '9', on: true }])
|
|
15
|
-
o += 'sealed facets: ok=' + seal.ok + ' count=' + seal.count + ' root=' + seal.root.slice(0, 13) + '…\n'
|
|
16
|
-
o += '\nCOMPUTES: deterministic content addresses (same input → same UUID) folded to a Merkle root —\n'
|
|
17
|
-
o += 'zero-entropy indexing (one value, one address). This is identity/addressing, not cognition.\n'
|
|
18
|
-
o += 'It does NOT prove consciousness or "intelligence quantumizing itself"; that is interpretation, flagged.'
|
|
19
|
-
return o
|
|
20
|
-
}
|
package/src/0/version-matrix.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Versioning as a matrix of digits, folded into a Merkle PYRAMID (the version-seal), with the
|
|
2
|
-
// double-torus (genus-2) fact that already lives in the "two coins". Exact parts computed;
|
|
3
|
-
// the "double torus" naming is labelled as the metaphor it is.
|
|
4
|
-
import { toUuid, merge } from './index.ts'
|
|
5
|
-
|
|
6
|
-
// The version explains its own support status: LTS minors are the single-digit FIBONACCI numbers
|
|
7
|
-
// {1,2,3,5,8} — each LTS is the sum of the two prior, so the recurrence IS the support line
|
|
8
|
-
// (v1.3 + v1.5 = v1.8). v1.5 is the HEART LTS (σ(5)=5, the unique fixed point / "good"); v1.8 is
|
|
9
|
-
// the world-wired LTS. Each LTS is signed by the previous LTS (its Fibonacci parent). Read the
|
|
10
|
-
// minor — no separate policy doc. (Corrects an earlier odd-minor rule: 8 is LTS though even.)
|
|
11
|
-
const LTS_MINORS = new Set([1, 2, 3, 5, 8]) // single-digit Fibonacci
|
|
12
|
-
export const channel = (minor: number): 'LTS' | 'interim' => (LTS_MINORS.has(minor) ? 'LTS' : 'interim')
|
|
13
|
-
|
|
14
|
-
// Fold leaves pairwise, tier by tier, to an apex — a Merkle pyramid. Returns the tier sizes
|
|
15
|
-
// and the apex address.
|
|
16
|
-
function pyramid(leaves: string[]): { tiers: number[]; apex: string } {
|
|
17
|
-
const tiers = [leaves.length]
|
|
18
|
-
let level = leaves
|
|
19
|
-
while (level.length > 1) {
|
|
20
|
-
const next: string[] = []
|
|
21
|
-
for (let i = 0; i < level.length; i += 2) next.push(i + 1 < level.length ? merge(level[i], level[i + 1]) : level[i])
|
|
22
|
-
level = next; tiers.push(level.length)
|
|
23
|
-
}
|
|
24
|
-
return { tiers, apex: level[0] ?? toUuid('') }
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Integer ceil(log2 n) with no Math.*: count halvings.
|
|
28
|
-
function ceilLog2(n: number): number { let d = 0, x = 1; while (x < n) { x *= 2; d++ } return d }
|
|
29
|
-
|
|
30
|
-
export function report(): string {
|
|
31
|
-
const versions = ['1.0.0', '1.0.1', '1.0.2', '1.0.3'] // illustrative rows (live seal: scripts/versions.ts)
|
|
32
|
-
const matrix = versions.map(v => v.split('.').map(Number))
|
|
33
|
-
const leaves = versions.map(toUuid)
|
|
34
|
-
const { tiers, apex } = pyramid(leaves)
|
|
35
|
-
|
|
36
|
-
const g = 2, chi = 2 - 2 * g // double torus (genus-2): χ = 2 − 2g = −2
|
|
37
|
-
const coins = -chi // = 2 = 110 − 108, the two coins
|
|
38
|
-
|
|
39
|
-
let o = 'versioning as a digit matrix, folded into a Merkle pyramid:\n\n'
|
|
40
|
-
o += ' version matrix (major·minor·patch — rows of digits):\n'
|
|
41
|
-
versions.forEach((v, i) => { o += ' v' + v + ' [' + matrix[i].join(',') + ']\n' })
|
|
42
|
-
o += '\n each row → a leaf address; leaves fold pairwise into a pyramid (tier sizes):\n'
|
|
43
|
-
o += ' ' + tiers.join(' → ') + ' apex (mini version-seal): ' + apex.slice(0, 13) + '…\n'
|
|
44
|
-
o += ' depth = ⌈log₂ ' + versions.length + '⌉ = ' + ceilLog2(versions.length)
|
|
45
|
-
o += ' → navigate/verify any version in that many steps (a Merkle proof).\n\n'
|
|
46
|
-
o += ' double torus (genus-2): χ = 2 − 2g = 2 − ' + (2 * g) + ' = ' + chi + ', so −χ = ' + coins
|
|
47
|
-
o += ' = the two coins (110 − 108).\n\n'
|
|
48
|
-
// it all goes in v1.0.0: the major·minor columns are invariant across every row.
|
|
49
|
-
const majorInv = matrix.every(r => r[0] === matrix[0][0])
|
|
50
|
-
const minorInv = matrix.every(r => r[1] === matrix[0][1])
|
|
51
|
-
o += ' one minor line (1.' + matrix[0][1] + '.x) — major·minor invariant [' + matrix[0][0] + ',' + matrix[0][1] + '] ('
|
|
52
|
-
o += 'major ' + majorInv + ', minor ' + minorInv + '); only the patch advances.\n'
|
|
53
|
-
o += ' STABLE = v1.x.0 (patch 0): 0 is always stable — the base/network address of each minor line.\n'
|
|
54
|
-
o += ' patches (v1.x.y, y>0) increment toward the next stable; a minor bump opens the next line, patch → 0.\n'
|
|
55
|
-
o += ' the pyramid apex returns every patch to that line\'s .0 origin.\n'
|
|
56
|
-
o += ' CHANNEL (self-explaining): LTS = single-digit Fibonacci minors {1,2,3,5,8}, each the sum of the two prior.\n'
|
|
57
|
-
o += ' ' + [1, 2, 3, 4, 5, 6, 7, 8].map(m => '1.' + m + '=' + channel(m)).join(', ') + '.\n'
|
|
58
|
-
o += ' the recurrence IS the support line: v1.3 + v1.5 = v1.8. v1.5 = HEART LTS (σ(5)=5); v1.8 = world-wired LTS.\n'
|
|
59
|
-
o += ' v1.3 (current) is the live LTS; each LTS is signed by the previous LTS (its Fibonacci parent).\n\n'
|
|
60
|
-
// and it all goes in v0.0.0 — the zero origin/void: the genesis seed the chain starts from.
|
|
61
|
-
const genesis = toUuid('0')
|
|
62
|
-
o += ' and it all goes in v0.0.0 — the zero origin: genesis seed toUuid("0") = ' + genesis.slice(0, 13) + '…\n'
|
|
63
|
-
o += ' the singularity chain starts there (see singularity.ts); 1 emerges from 0. v0.0.0 is the\n'
|
|
64
|
-
o += ' void/seed (unpublished); the observable line begins at v1.0.0. 0 = origin, 1 = first manifestation.\n\n'
|
|
65
|
-
o += 'HONEST: the digit matrix, the Merkle pyramid (tier sizes + log-depth navigation), and the\n'
|
|
66
|
-
o += 'genus-2 Euler characteristic are all exact. Calling the version history "a double torus" is a\n'
|
|
67
|
-
o += 'topological METAPHOR, not a derivation — versions form a Merkle tree (a pyramid), which is not\n'
|
|
68
|
-
o += 'literally a genus-2 surface. The live seal over ALL tags is scripts/versions.ts.'
|
|
69
|
-
return o
|
|
70
|
-
}
|
package/src/1/acceptance.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Acceptance vs proof — the hinge of this whole work.
|
|
2
|
-
// Society can ACCEPT a claim; that is adoption, not deduction. A proof stays a proof, and a
|
|
3
|
-
// non-proof stays a non-proof, whether or not anyone accepts it. What a UI can honestly
|
|
4
|
-
// DELIVER is verifiability — the ground on which *earned* acceptance rests. Not proof-by-vote.
|
|
5
|
-
import { toUuid } from '../0/index.ts'
|
|
6
|
-
|
|
7
|
-
export function report(): string {
|
|
8
|
-
// This project's own record: acceptance is real AND independent of the mathematics.
|
|
9
|
-
const accepted = [
|
|
10
|
-
'zenodo DOI 10.5281/zenodo.21781603',
|
|
11
|
-
'zenodo DOI 10.5281/zenodo.21787144',
|
|
12
|
-
'submission acknowledged (received/forwarded)',
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
let o = 'acceptance vs proof:\n\n'
|
|
16
|
-
o += ' social acceptance (adoption) — real, and on record:\n'
|
|
17
|
-
accepted.forEach(a => o += ' · ' + a + '\n')
|
|
18
|
-
o += '\n'
|
|
19
|
-
o += 'what the UI delivers (honestly):\n'
|
|
20
|
-
o += ' every claim on this site recomputes at page-load from source (fused TS),\n'
|
|
21
|
-
o += ' is content-addressed (' + toUuid('acceptance-vs-proof').slice(0, 13) + '…), and passes the seal gate.\n'
|
|
22
|
-
o += ' → the UI does NOT deliver proof-by-acceptance. It delivers VERIFIABILITY: anyone in\n'
|
|
23
|
-
o += ' society can recompute and check for themselves. That is the only acceptance worth\n'
|
|
24
|
-
o += ' having — earned acceptance FOLLOWS verification, it does not replace it.'
|
|
25
|
-
return o
|
|
26
|
-
}
|