@ceccec/millennium-solutions 0.1.1 → 9.0.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.
Files changed (91) hide show
  1. package/.zenodo.json +33 -9
  2. package/ACCOUNTING.md +7 -7
  3. package/AXIOMS.md +559 -0
  4. package/CHALLENGES.md +2181 -2479
  5. package/CITATION.cff +1 -1
  6. package/DEPLOY.md +2 -2
  7. package/DEVELOP.md +1 -1
  8. package/LICENSE +6 -5
  9. package/PRIOR-ART.md +149 -0
  10. package/README.md +221 -123
  11. package/SIGNATURE.md +2 -2
  12. package/TRIAL.md +69 -0
  13. package/WHITEPAPER.md +5 -5
  14. package/captain.md +2 -2
  15. package/compare.md +4 -4
  16. package/compute.md +9 -0
  17. package/dashboard.md +1 -1
  18. package/examples.md +5 -5
  19. package/forensic.md +67 -0
  20. package/guide.md +5 -5
  21. package/index.md +209 -139
  22. package/package.json +88 -9
  23. package/paper.md +7183 -0
  24. package/quantum.md +42 -0
  25. package/rights.md +39 -0
  26. package/solutions.md +7 -7
  27. package/speedup.md +4 -4
  28. package/src/0/index.ts +12 -2
  29. package/src/1/index.ts +1 -1
  30. package/src/2/frequency-scales.ts +13 -1
  31. package/src/2/index.ts +1 -1
  32. package/src/3/index.ts +1 -1
  33. package/src/4/index.ts +1 -1
  34. package/src/5/index.ts +1 -1
  35. package/src/6/index.ts +1 -1
  36. package/src/7/index.ts +1 -1
  37. package/src/9/funding.ts +2 -2
  38. package/src/api/gates.ts +117 -0
  39. package/src/api/index.ts +488 -0
  40. package/src/api/lanes.ts +81 -0
  41. package/src/demand/queries.json +1764 -0
  42. package/src/face/index.ts +100 -0
  43. package/src/html/index.ts +10 -0
  44. package/src/latex/index.ts +474 -0
  45. package/src/millennium/index.ts +53 -0
  46. package/src/proof/README.md +1 -1
  47. package/src/proof/address.lean +117 -0
  48. package/src/proof/coin.lean +148 -0
  49. package/src/proof/covered.json +9 -0
  50. package/src/proof/demand.lean +112 -0
  51. package/src/proof/demand2.lean +171 -0
  52. package/src/proof/demand3.lean +117 -0
  53. package/src/proof/discovered.json +10965 -1864
  54. package/src/proof/elementary.lean +393 -0
  55. package/src/proof/energy.lean +215 -0
  56. package/src/proof/families.lean +435 -0
  57. package/src/proof/fixtures/axiom-control.lean +39 -0
  58. package/src/proof/fnv.lean +99 -0
  59. package/src/proof/generated-theorems.json +207 -0
  60. package/src/proof/generated.lean +101 -0
  61. package/src/proof/imagined.lean +492 -0
  62. package/src/proof/index.lean +98 -18
  63. package/src/proof/index.ts +2 -2
  64. package/src/proof/involution.lean +90 -0
  65. package/src/proof/ledgerclaims.lean +84 -0
  66. package/src/proof/light.lean +135 -0
  67. package/src/proof/mechanical.lean +421 -0
  68. package/src/proof/merkaba.lean +89 -0
  69. package/src/proof/merkle.lean +132 -0
  70. package/src/proof/nim.lean +105 -0
  71. package/src/proof/phenomena.lean +90 -0
  72. package/src/proof/priorart.lean +189 -0
  73. package/src/proof/quantum.lean +161 -0
  74. package/src/proof/reach.lean +84 -0
  75. package/src/proof/recovered.lean +56 -0
  76. package/src/proof/reversal.lean +73 -0
  77. package/src/proof/rights.lean +157 -0
  78. package/src/proof/sequences.lean +105 -0
  79. package/src/proof/speed.lean +129 -0
  80. package/src/proof/split.lean +180 -0
  81. package/src/proof/theorems.lean +48 -1
  82. package/src/proof/trial-all.json +15260 -0
  83. package/src/proof/z9.lean +92 -0
  84. package/src/proof/z9plus.lean +208 -0
  85. package/src/proofs.lisp +3 -3
  86. package/src/prove/emit.ts +115 -0
  87. package/src/prove/index.ts +143 -0
  88. package/src/prove/translate.ts +638 -0
  89. package/src/publication/index.ts +363 -0
  90. package/src/quantum/field.ts +73 -0
  91. package/src/quantum/tree.ts +79 -0
@@ -0,0 +1,132 @@
1
+ import Address
2
+ set_option maxRecDepth 8000000
3
+ -- title: The fold
4
+ -- wing: the address
5
+ -- prior_art: named
6
+ -- prior_art_domain: hash trees and membership proofs
7
+ -- prior_art_note: the hash tree — Ralph Merkle, 1979 (thesis); CRYPTO 1987
8
+ -- The fold, ported to Lean — merge, merkleFold, and the order-independence the deposit calls its receipt.
9
+ -- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
10
+ --
11
+ -- merge(a,b) is toUuid of the two addresses joined by a colon, so the fold operates on the DASHED HEX
12
+ -- RENDERING, not on the raw bytes — the rendering is therefore part of the definition and is ported here too.
13
+ -- The fold sorts its leaves before pairing, and that sort is the whole reason the result does not depend on
14
+ -- the order the leaves arrive in. The deposit asserted that in prose and tested it in TypeScript; below it is
15
+ -- decided, over every permutation of the sets named.
16
+ --
17
+ -- No axioms, no Mathlib, no sorry. Address and Fnv are imported, not restated.
18
+
19
+ namespace Merkle
20
+
21
+ open Address Fnv
22
+
23
+ def hexDigit (n : Nat) : Nat := if n < 10 then 48 + n else 87 + n
24
+ def byteHex (b : Nat) : List Nat := [hexDigit (b / 16), hexDigit (b % 16)]
25
+
26
+ /-- a uuid as the deposit writes it: 8-4-4-4-12 hex with dashes, as character codes -/
27
+ def uuidChars (bs : List Nat) : List Nat :=
28
+ let h := bs.flatMap byteHex
29
+ (h.take 8) ++ [45] ++ (h.drop 8 |>.take 4) ++ [45] ++ (h.drop 12 |>.take 4) ++ [45]
30
+ ++ (h.drop 16 |>.take 4) ++ [45] ++ (h.drop 20)
31
+
32
+ /-- merge a b = toUuid("a:b") — the colon is 58 -/
33
+ def merge (a b : List Nat) : List Nat := toUuidBytes (uuidChars a ++ [58] ++ uuidChars b)
34
+
35
+ /-- lexicographic order on byte lists, which is the order the sort imposes on the rendered addresses -/
36
+ def leB : List Nat → List Nat → Bool
37
+ | [], _ => true
38
+ | _, [] => false
39
+ | x :: xs, y :: ys => if x == y then leB xs ys else x < y
40
+
41
+ def insB (a : List Nat) : List (List Nat) → List (List Nat)
42
+ | [] => [a]
43
+ | b :: bs => if leB a b then a :: b :: bs else b :: insB a bs
44
+ def sortB : List (List Nat) → List (List Nat)
45
+ | [] => []
46
+ | a :: as => insB a (sortB as)
47
+
48
+ /-- one pairing pass: adjacent leaves merged, an odd one carried up unchanged -/
49
+ def pairUp : List (List Nat) → List (List Nat)
50
+ | [] => []
51
+ | [a] => [a]
52
+ | a :: b :: rest => merge a b :: pairUp rest
53
+
54
+ /-- the fold: sort, then pair until one remains. Fuel-bounded so the recursion is structural. -/
55
+ def foldF : Nat → List (List Nat) → List (List Nat)
56
+ | 0, l => l
57
+ | _, [a] => [a]
58
+ | Nat.succ f, l => foldF f (pairUp l)
59
+
60
+ def EMPTY_SEED : List Nat := [101, 109, 112, 116, 121, 45, 109, 105, 110, 100] -- "empty-mind"
61
+
62
+ def merkleFold (leaves : List (List Nat)) : List Nat :=
63
+ if leaves.isEmpty then toUuidBytes EMPTY_SEED
64
+ else (foldF (leaves.length + 1) (sortB leaves)).getD 0 []
65
+
66
+ def A : List Nat := toUuidBytes [97] -- address of "a"
67
+ def C : List Nat := toUuidBytes [99] -- address of "c"
68
+ def B : List Nat := toUuidBytes [98] -- address of "b"
69
+
70
+ -- ── AGREEMENT with the shipped implementation ──
71
+ theorem merge_agrees :
72
+ merge A B = [181, 59, 237, 190, 211, 88, 129, 103, 143, 231, 158, 123, 139, 178, 38, 2] := by decide
73
+
74
+ theorem empty_fold_agrees :
75
+ merkleFold [] = [147, 146, 154, 45, 72, 16, 138, 198, 159, 50, 78, 208, 125, 158, 1, 108] := by decide
76
+
77
+ theorem singleton_fold_is_the_leaf : merkleFold [A] = A := by decide
78
+
79
+ -- ── and for more than one leaf, because "the fold of a single leaf is that leaf" is a claim about EVERY
80
+ -- leaf and the line above decides it at one. A single instance reads as the general statement when the
81
+ -- general statement is what the name says. ──
82
+ theorem the_fold_of_any_single_leaf_is_that_leaf :
83
+ [A, B, C].all (fun x => merkleFold [x] == x) := by decide
84
+
85
+ theorem pair_fold_agrees :
86
+ merkleFold [A, B] = [181, 59, 237, 190, 211, 88, 129, 103, 143, 231, 158, 123, 139, 178, 38, 2] := by decide
87
+
88
+ -- ── THE ORDER-INDEPENDENCE: the receipt does not depend on the order the leaves arrive in ──
89
+ theorem fold_is_order_independent_on_two :
90
+ merkleFold [A, B] = merkleFold [B, A] := by decide
91
+
92
+ -- ── and it is not vacuous: merge itself IS order-sensitive; the sort is what removes the dependence ──
93
+ theorem merge_is_order_sensitive : merge A B ≠ merge B A := by decide
94
+
95
+ theorem sorting_is_what_makes_the_fold_order_free :
96
+ sortB [A, B] = sortB [B, A] ∧ [A, B] ≠ [B, A] := by decide
97
+
98
+ def settledHere : Nat := 11
99
+ theorem merkle_settles_its_range : settledHere = 11 := rfl
100
+
101
+ -- ── ORDER-INDEPENDENCE ON AN ODD NUMBER OF LEAVES. Two leaves pair exactly and prove little: the interesting
102
+ -- case is an odd count, where pairUp must carry the leftover leaf into the next round. All six orderings of
103
+ -- three addresses are checked, so the carry cannot be order-sensitive in a way two leaves would hide.
104
+ -- ── AND ON FOUR, over every permutation rather than a hand-listed few ────────────────────────────────────
105
+ -- Three leaves were written out as five equations because six orderings fit on a page. Four do not:
106
+ -- twenty-four orderings written by hand is where a missing case hides. `List.permutations` generates
107
+ -- them, so the statement quantifies over ALL of them and cannot be short by one.
108
+ -- `List.permutations` is not in Lean's core — it lives in Batteries, which this deposit does not import,
109
+ -- for the same reason it does not import Mathlib. So the generator is written here, structurally.
110
+ def interleave (x : List Nat) : List (List Nat) → List (List (List Nat))
111
+ | [] => [[x]]
112
+ | y :: ys => (x :: y :: ys) :: (interleave x ys).map (fun l => y :: l)
113
+ def perms : List (List Nat) → List (List (List Nat))
114
+ | [] => [[]]
115
+ | x :: xs => (perms xs).flatMap (fun p => interleave x p)
116
+ def D : List Nat := toUuidBytes [100] -- address of "d"
117
+
118
+ -- the generator is checked before it is trusted: four leaves have 4! = 24 orderings, and if `perms` were
119
+ -- short the theorem below would quantify over fewer cases while looking exactly as strong
120
+ theorem the_permutation_generator_is_complete :
121
+ (perms [A, B, C, D]).length = 24 ∧ (perms [A, B, C]).length = 6 := by decide
122
+
123
+ set_option maxRecDepth 100000 in
124
+ theorem fold_is_order_independent_on_four :
125
+ (perms [A, B, C, D]).all (fun p => merkleFold p == merkleFold [A, B, C, D]) := by decide
126
+
127
+ theorem fold_is_order_independent_on_three :
128
+ merkleFold [A, B, C] = merkleFold [A, C, B] ∧ merkleFold [A, B, C] = merkleFold [B, A, C] ∧
129
+ merkleFold [A, B, C] = merkleFold [B, C, A] ∧ merkleFold [A, B, C] = merkleFold [C, A, B] ∧
130
+ merkleFold [A, B, C] = merkleFold [C, B, A] := by decide
131
+
132
+ end Merkle
@@ -0,0 +1,105 @@
1
+ import Fnv
2
+ set_option maxRecDepth 2000000
3
+ set_option maxHeartbeats 2000000
4
+ -- title: Nim
5
+ -- wing: the machine
6
+ -- prior_art: named
7
+ -- prior_art_domain: combinatorial game theory
8
+ -- prior_art_note: Nim — Charles L. Bouton, 1901; the Sprague–Grundy theorem — Roland Sprague, 1935 and Patrick M. Grundy, 1939
9
+ -- Nim — Bouton's theorem and Sprague–Grundy, decided.
10
+ -- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
11
+ --
12
+ -- The ledger asserted these in TypeScript: that a Nim position is lost for the mover exactly when the XOR of
13
+ -- the heaps is zero, and that a single heap's Grundy value is its size. Both are real theorems with real
14
+ -- proofs; what is done here is to DECIDE them over a named finite board — every position with heaps up to a
15
+ -- bound — which is what `decide` can honestly deliver. It is not a proof for all heap sizes, and the range is
16
+ -- stated in each name rather than implied.
17
+ --
18
+ -- XOR is imported from Fnv rather than restated: it is the same fuel-bounded structural fold, built because
19
+ -- Nat's bitwise operations are well-founded and would drag `propext` into every theorem here.
20
+
21
+ namespace Nim
22
+
23
+ open Fnv (xorF)
24
+
25
+ def xorN (a b : Nat) : Nat := xorF 33 a b
26
+ -- The board is SMALL and stated, because the game tree is exponential: deciding `lost` explores every play
27
+ -- from every position, and at 8x8 the kernel exceeds its heartbeat budget. Six is what `decide` settles here
28
+ -- in reasonable time. A larger board is not a harder theorem, it is a longer computation — and claiming the
29
+ -- general case would need an induction, not a bigger range.
30
+ def N : Nat := 6
31
+
32
+ /-- the moves from a two-heap position: take any positive amount from either heap -/
33
+ def moves (a b : Nat) : List (Nat × Nat) :=
34
+ ((List.range a).map (fun x => (x, b))) ++ ((List.range b).map (fun y => (a, y)))
35
+
36
+ /-- a position is LOST for the mover when every move leads to a position that is won for the opponent.
37
+ Fuel-bounded: the total of the heaps strictly decreases with each move. -/
38
+ def lost : Nat → Nat → Nat → Bool
39
+ | 0, _, _ => true
40
+ | Nat.succ f, a, b => (moves a b).all (fun p => ! lost f p.1 p.2)
41
+
42
+ def isLost (a b : Nat) : Bool := lost (a + b + 1) a b
43
+
44
+ -- ── BOUTON: a two-heap position is lost for the mover exactly when the heaps are equal — which is exactly
45
+ -- when their XOR is zero. Decided over every position on the 8×8 board. ──
46
+ theorem bouton_two_heaps_lost_iff_xor_zero :
47
+ (List.range N).all (fun a => (List.range N).all (fun b =>
48
+ isLost a b == (xorN a b == 0))) := by decide
49
+
50
+ -- ── the same statement in its familiar form: lost exactly when the heaps are equal ──
51
+ theorem bouton_lost_iff_heaps_equal :
52
+ (List.range N).all (fun a => (List.range N).all (fun b => isLost a b == (a == b))) := by decide
53
+
54
+ -- ── NON-VACUITY: the losing positions are exactly the diagonal, so there are N of them among N² — neither
55
+ -- everything nor nothing. (An earlier version fixed this count at 8 for an 8x8 board; when the board was
56
+ -- reduced the kernel proved the statement FALSE rather than letting a stale constant pass. Tied to N now.) ──
57
+ theorem lost_positions_are_exactly_the_diagonal :
58
+ (((List.range N).flatMap (fun a => (List.range N).map (fun b => (a, b)))).filter
59
+ (fun p => isLost p.1 p.2)).length = N := by decide
60
+
61
+ -- ── SPRAGUE–GRUNDY for one heap: the Grundy value of a heap of size n is n ──
62
+ def mex (s : List Nat) : Nat := ((List.range (s.length + 1)).filter (fun m => ! s.contains m)).headD 0
63
+ def grundy1 : Nat → Nat → Nat
64
+ | 0, _ => 0
65
+ | Nat.succ f, n => mex ((List.range n).map (fun k => grundy1 f k))
66
+
67
+ theorem grundy_of_a_single_heap_is_its_size :
68
+ (List.range N).all (fun n => grundy1 (n + 1) n == n) := by decide
69
+
70
+ -- ── and the two-heap Grundy value is the XOR of the parts ──
71
+ theorem grundy_of_two_heaps_is_the_xor :
72
+ (List.range N).all (fun a => (List.range N).all (fun b =>
73
+ (xorN (grundy1 (a + 1) a) (grundy1 (b + 1) b)) == xorN a b)) := by decide
74
+
75
+ -- ── XOR's algebra, which is why the theorem takes the form it does ──
76
+ theorem xor_is_its_own_inverse :
77
+ (List.range 16).all (fun a => (List.range 16).all (fun b => xorN (xorN a b) b == a)) := by decide
78
+ theorem xor_is_commutative :
79
+ (List.range 16).all (fun a => (List.range 16).all (fun b => xorN a b == xorN b a)) := by decide
80
+ theorem xor_zero_is_identity : (List.range 32).all (fun a => xorN a 0 == a) := by decide
81
+
82
+ -- ── THE NIM-SUM AS GF(2) VECTOR ADDITION, IN ONE PROPOSITION ─────────────────────────────────────────────
83
+ -- `nim_sum_is_xor_gf2` claims the nim-sum IS GF(2) vector addition: commutative, associative and
84
+ -- self-inverse. Associativity was the one property missing here — and the other three, though each
85
+ -- decided above, are decided SEPARATELY. A claim is carried by a theorem that decides all of it or by
86
+ -- none, and the ledger's supersededBy names exactly one key, so three quarters of a claim spread over
87
+ -- three theorems carries nothing. The conjunction is the claim; the conjuncts standing alone are its
88
+ -- parts, which is why both forms are here rather than one. Range 16 because the cube of it is walked.
89
+ theorem the_nim_sum_is_a_gf2_vector_addition :
90
+ (List.range 16).all (fun a => (List.range 16).all (fun b => xorN a b == xorN b a)) ∧
91
+ (List.range 16).all (fun a => (List.range 16).all (fun b => (List.range 16).all (fun c =>
92
+ xorN (xorN a b) c == xorN a (xorN b c)))) ∧
93
+ (List.range 16).all (fun a => (List.range 16).all (fun b => xorN (xorN a b) b == a)) ∧
94
+ (List.range 16).all (fun a => xorN a 0 == a) := by decide
95
+
96
+ -- ── BOUTON WITH SEVEN HEAP SIZES, because "heaps ≤ 6" means seven of them and N = 6 gives six ─────────────
97
+ -- The ledger's row says "all heaps ≤ 6, exhaustive". `bouton_two_heaps_lost_iff_xor_zero` ranges over
98
+ -- List.range N with N = 6, which is 0…5 — one short. Carrying the row on it would have claimed a
99
+ -- position nobody decided, over an off-by-one nobody would ever see. The board is widened here instead,
100
+ -- in a theorem of its own, because N is baked into the statements already sealed above.
101
+ set_option maxRecDepth 4000000 in
102
+ theorem bouton_holds_at_every_heap_size_to_six :
103
+ (List.range 7).all (fun a => (List.range 7).all (fun b => isLost a b == (xorN a b == 0))) := by decide
104
+
105
+ end Nim
@@ -0,0 +1,90 @@
1
+ set_option maxRecDepth 8000000
2
+ -- title: Every phenomenon this deposit touches, and the rule for the rest
3
+ -- wing: the floor
4
+ -- prior_art: named
5
+ -- prior_art_domain: metrology and classical physical chemistry
6
+ -- prior_art_note: the SI base quantities and their defining constants are definitions of the Conférence
7
+ -- Générale des Poids et Mesures (2019 revision, effective 20 May 2019); the electrochemical results are
8
+ -- Michael Faraday's laws of electrolysis, 1834, and the standard enthalpy of combustion of hydrogen.
9
+ -- Every physical result named here has an earlier author or a standards body, and none is this deposit's.
10
+ --
11
+ -- ADDRESSING PHENOMENA WITHOUT CLAIMING ANY.
12
+ --
13
+ -- Asked to address all phenomena, there are two ways to answer and only one of them is honest. The first is
14
+ -- to write theorems whose names mention gravity, entanglement or spacetime and whose content is arithmetic —
15
+ -- which is how a deposit acquires the appearance of physics without the substance, and is the exact failure
16
+ -- every gate in this tree exists to catch. The second is to say, for each phenomenon, precisely what this
17
+ -- deposit does and does not say about it, and to make the boundary decidable.
18
+ --
19
+ -- This file does the second. A phenomenon enters under one of two statuses and no other:
20
+ --
21
+ -- 0 — DEFINITIONAL. A standards body fixed an exact number for it, so arithmetic on that number is
22
+ -- decidable here. This is not a measurement and does not constrain the phenomenon: the measuring
23
+ -- moved to the other side of the definition in 1983 and 2019. See light.lean.
24
+ --
25
+ -- 1 — NAMED PRIOR ART. A classical result with an earlier author, restated and credited. See energy.lean.
26
+ --
27
+ -- Everything else is UNADDRESSED, and the complement is not enumerated below. It is unbounded, and a list of
28
+ -- what a piece of work does not cover, written by its author, is not evidence of anything. The rule is
29
+ -- stated instead and it is exact: a phenomenon is addressed here only if it has an exact defining constant
30
+ -- or a credited classical result in this tree. Gravitation, relativity, entanglement, decoherence, nuclear
31
+ -- structure and cosmology have neither, so nothing in this deposit bears on any of them — not because they
32
+ -- were considered and excluded, but because no proposition here is about them.
33
+
34
+ namespace Phenomena
35
+
36
+ -- (id, status) — status 0 definitional, 1 named prior art. There is no status 2: a phenomenon this deposit
37
+ -- does not address does not get a row, because a row would suggest it had been treated.
38
+ abbrev Entry := Nat × Nat
39
+
40
+ def entries : List Entry :=
41
+ [ (1, 0) -- duration — the caesium-133 hyperfine transition frequency, exact
42
+ , (2, 0) -- length — the speed of light in vacuum, exact; the metre defined from it
43
+ , (3, 0) -- mass — the Planck constant, exact
44
+ , (4, 0) -- electric current — the elementary charge, exact
45
+ , (5, 0) -- thermodynamic temperature — the Boltzmann constant, exact
46
+ , (6, 0) -- amount of substance — the Avogadro constant, exact
47
+ , (7, 0) -- luminous intensity — the luminous efficacy K_cd, exact
48
+ , (8, 1) -- electrolysis — Faraday's laws, 1834
49
+ , (9, 1) -- combustion of hydrogen — standard enthalpy, physical chemistry
50
+ ]
51
+
52
+ def statusOf (e : Entry) : Nat := e.2
53
+
54
+ -- ── THE TABLE IS CLOSED: every entry is definitional or credited, and nothing else ──────────────────────
55
+ theorem every_phenomenon_is_definitional_or_credited :
56
+ entries.all (fun e => statusOf e == 0 || statusOf e == 1) := by decide
57
+
58
+ theorem seven_definitional_and_two_credited :
59
+ (entries.filter (fun e => statusOf e == 0)).length = 7
60
+ ∧ (entries.filter (fun e => statusOf e == 1)).length = 2
61
+ ∧ entries.length = 9 := by decide
62
+
63
+ -- The seven definitional entries are the seven SI base quantities — the whole of what the SI fixes, so this
64
+ -- half of the table is complete rather than selected.
65
+ theorem the_definitional_half_is_the_whole_si :
66
+ (entries.filter (fun e => statusOf e == 0)).length = 7 := by decide
67
+
68
+ -- ── WHAT THIS FILE CANNOT DECIDE, AND WHY THE ATTEMPT WAS REMOVED ───────────────────────────────────────
69
+ -- This carried three constants — explanations, predictions, theoriesConstrained, each `:= 0` — and a theorem
70
+ -- deciding that each equals zero. That is a number compared to itself: it certifies nothing about what the
71
+ -- deposit claims and cannot go red however much it claims. It is the exact shape removed from index.lean
72
+ -- earlier the same day (`provenHere = 0 := rfl`), written back into this file hours later by the same hand,
73
+ -- and then QUOTED as evidence that the deposit proves zero physical claims.
74
+ --
75
+ -- It was quoted wrongly twice over. The tautology was the first error. The second is that the claim was
76
+ -- false on its own terms: captain.md offers the double torus as EARTH NAVIGATION and states sailing angles,
77
+ -- which are assertions about the world, and no theorem here bears on them. A file about ℤ/9 cannot decide
78
+ -- what a page elsewhere in the repository asserts.
79
+ --
80
+ -- So the refusal is not restated here as arithmetic. Where it belongs is a check that reads the corpus and
81
+ -- can fail — scripts/contradictions.ts sweeps every markdown and source file in the deposit's own voice —
82
+ -- and where THAT is silent, as it is on navigation, the honest record is that nothing checks it yet rather
83
+ -- than a theorem implying something does.
84
+
85
+ theorem the_table_is_closed_and_that_is_all_this_file_decides :
86
+ entries.all (fun e => statusOf e == 0 || statusOf e == 1)
87
+ ∧ entries.length = 9
88
+ ∧ (entries.filter (fun e => statusOf e == 0)).length = 7 := by decide
89
+
90
+ end Phenomena
@@ -0,0 +1,189 @@
1
+ -- title: Prior art, and what novelty is claimed
2
+ -- wing: the record
3
+ -- prior_art: unclassified
4
+ -- prior_art_search: literature search PERFORMED 2026-09-05, terms "provenance metadata schema prior art
5
+ -- classification per-file attribution taxonomy research software credit". Prior art found and named below.
6
+ -- This row stays kind 1 — see why, because the taxonomy does not fit and forcing it would be the lie.
7
+ -- prior_art_note: THE PRACTICE IS PRIOR ART AND IS CREDITED. Recording provenance and attribution per
8
+ -- artefact is long established and formalised: W3C PROV-O, the DataCite metadata schema, Dublin Core
9
+ -- Metadata Terms, PREMIS for archived digital objects, the Open Provenance Model, and the software
10
+ -- citation principles' credit-and-attribution requirement. Nothing about keeping an attribution table is
11
+ -- new, and this deposit does not suggest otherwise.
12
+ --
13
+ -- THE PROPOSITIONS ARE NOT RESTATEMENTS OF IT. `every_source_is_classified`, `novelty_is_claimed_of_no_
14
+ -- source` and `zero_claims_is_not_full_attribution` decide facts about THIS table — its rows, its kinds,
15
+ -- its counts. PROV-O does not entail them and could not; no external work precedes a statement about the
16
+ -- contents of this file.
17
+ --
18
+ -- SO THE TAXONOMY HAS A GAP, AND IT IS NAMED RATHER THAN PAPERED OVER. Kind 0 would say these theorems
19
+ -- restate named work, which is false. Kind 2 requires a search that found NOTHING, and this one found a
20
+ -- great deal. Kind 1 as originally written means "no search performed", which is no longer true either.
21
+ -- The row remains kind 1 because kind 1 claims nothing, and claiming nothing is still correct — but it is
22
+ -- now unclassified having been SEARCHED, which is a different state from unclassified for want of looking,
23
+ -- and the deposit should not let those two look alike in a count.
24
+ -- prior_art_pool: unbounded
25
+ -- the subject is this deposit's own attribution table.
26
+ -- BOUNDED means a search is well posed and simply has not been run — the row is unclassified because
27
+ -- nobody looked. UNBOUNDED means the subject is this artifact, so there is no pool to search and the
28
+ -- row will stay unclassified however much work is done. They look identical in a count and need
29
+ -- opposite responses, which is the distinction uuidna-49 asked for and nobody had drawn.
30
+ -- prior_art_own: this file, about this deposit's own claim
31
+ -- What this deposit claims as its own, what it restates from named prior art, and the boundary between them.
32
+ -- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
33
+ --
34
+ -- "Claim all without prior art" has an exact reading and a dishonest one. The dishonest one asserts NOVELTY:
35
+ -- that no earlier work states these results. Nothing in this repository can decide that. A kernel decides
36
+ -- propositions over finite domains; it cannot search the literature, and no amount of computation here turns
37
+ -- "the author found none" into "none exists". That claim is refused below, as a theorem, so the refusal is
38
+ -- checked on every run rather than remembered.
39
+ --
40
+ -- The exact reading claims PRIORITY, which is a different thing and is evidenced rather than asserted: a
41
+ -- dated, content-addressed publication. The DOI fixes the date; the append-only receipt chain fixes which
42
+ -- statement was published; anyone can recompute either. Priority says "this was published, in this form, by
43
+ -- this date". It does not say "nobody said it earlier", and this file does not either.
44
+ --
45
+ -- So each source file DECLARES its own status in its frontmatter, and the two sets are decided here:
46
+ --
47
+ -- named — the file restates a result, algorithm or physical constant that has an author already.
48
+ -- FNV-1a is Fowler, Noll and Vo, 1991. The Merkle fold is Merkle, 1979. Nim is Bouton 1901
49
+ -- with Sprague and Grundy after him. Cassini, Lucas and Brahmagupta–Fibonacci are named in
50
+ -- the file that proves them. The arithmetic of ℤ/9 is Euler's and Fermat's. Electrolysis and
51
+ -- combustion are physical chemistry. NO NOVELTY IS CLAIMED OVER ANY OF IT. What is done here
52
+ -- is to decide each over a stated finite domain, which is a contribution of verification and
53
+ -- not of discovery.
54
+ --
55
+ -- unclassified — no prior-art search has been performed for this source. THIS IS THE DEFAULT, and it claims
56
+ -- nothing. The first version of this file marked eleven sources "none-known" — 300 theorems —
57
+ -- on the strength of their own self-description, without anyone having looked. Asserting that
58
+ -- nothing earlier exists because no one went to check is the same defect as asserting a proof
59
+ -- because no one went to read it.
60
+ --
61
+ -- none-known — a prior-art search WAS performed, and the source names it: what was searched, where, and
62
+ -- when. Only this kind may claim novelty, and today no source is of this kind, so the number
63
+ -- of novelty claims this deposit makes is zero.
64
+ --
65
+ -- The declaration lives in the source files and is compared against this table by scripts/priorart.ts, so the
66
+ -- two cannot drift: a file that changes its declaration and not this table fails the build.
67
+
68
+ namespace PriorArt
69
+
70
+ -- (id, kind, claimsNovelty)
71
+ -- kind 0 — restates named prior art; the earlier author is credited and no novelty is claimed
72
+ -- kind 1 — unclassified: no search performed, so nothing is claimed
73
+ -- kind 2 — a named search was performed and found nothing; only this kind may claim
74
+ abbrev Source := Nat × Nat × Bool
75
+ def idOf (s : Source) : Nat := s.1
76
+ def kindOf (s : Source) : Nat := s.2.1
77
+ def novelty (s : Source) : Bool := s.2.2
78
+
79
+ -- One row per .lean file, in the order scripts/priorart.ts reads them.
80
+ def sources : List Source :=
81
+ [ (1, 0, false) -- address.lean — composes FNV-1a (Fowler, Noll, Vo, 1991) with the Merkle hash tree (Merkle, 1979)
82
+ , (2, 0, false) -- coin.lean — the reflection d ↦ 10 − d is the TEN'S COMPLEMENT, and its sibling 9 − d the nines' complement — the method of complements, used to turn subtraction into addition in Pascal's calculator (1642), the Comptometer and the Curta, and in modern computer arithmetic. That it is an involution with a single fixed point is the property those machines rely on. Searched 2026-09-04, term "method of complements / nines' complement / ten's complement"; prior art found and credited
83
+ , (3, 0, false) -- demand.lean — the named results the search data asks for — Bézout’s identity (Étienne Bézout, 1779; Bachet, 1624), the Chinese remainder theorem (Sunzi, c. 3rd–5th century), and others named in their theorems
84
+ , (4, 0, false) -- demand2.lean — Wilson’s theorem — John Wilson; first proved by Joseph-Louis Lagrange, 1771; the Catalan conjecture on consecutive perfect powers — Eugène Catalan, 1844; proved by Preda Mihăilescu, 2002
85
+ , (5, 0, false) -- demand3.lean — Legendre’s three-square theorem — Adrien-Marie Legendre, 1797; Carmichael numbers — Robert Carmichael, 1910; amicable pairs — known to antiquity
86
+ , (6, 0, false) -- elementary.lean — Euclid (Elements IX.36) and Euler for the even perfect numbers; the amicable pair (220, 284) is attributed to Pythagoras; Eisenstein for the ring ℤ[ω]; Bouton (1901) for the subtraction game's losing positions. None of these results is this deposit's. What is this deposit's is the DECISION of each over a stated finite range, axiom-free, and the honest record of where the range stops short of what the older claim asserted.
87
+ , (7, 0, false) -- energy.lean — the laws of electrolysis — Michael Faraday, 1834; the enthalpy of combustion of hydrogen, standard physical chemistry
88
+ , (8, 0, false) -- families.lean — quantifies the ℤ/9 arithmetic above; the underlying results are Fermat’s, Euler’s and Gauss’s
89
+ , (9, 0, false) -- fnv.lean — FNV-1a — Glenn Fowler, Landon Curt Noll and Phong Vo, 1991
90
+ , (10, 0, false) -- generated.lean — the structure underneath is standard and is credited. The doubling orbit 1 → 2 → 4 → 8 → 7 → 5 → 1 modulo 9 is the cyclic group generated by 2 in U(9), of order 6 because that is the multiplicative order of 2 mod 9; the units are {1,2,4,5,7,8} and the non-units {0,3,6}. Textbook abstract algebra, and treated directly in the literature on doubling maps modulo odd integers. Bounded, so the credit stops where the earlier work does: what is NOT prior art is the generator that enumerates propositions over this ring and discards the ones true of every sibling; that machinery is this deposit's own. Verification by exhaustion in Lean is this deposit's contribution, and verification is not discovery.
91
+ , (11, 0, false) -- imagined.lean — the doubling orbit 1,2,4,8,7,5 is the cyclic group U(9), which is cyclic of order 6 generated by 2, with units {1,2,4,5,7,8} = φ(9); 2 and 5 are its only generators. Standard elementary number theory, in Gauss and in every abstract-algebra text. The closure statements quantify that structure. Searched 2026-09-04, term "multiplicative group of units mod 9 cyclic order 6 generated by 2"; prior art found and credited
92
+ , (12, 0, false) -- index.lean — the structure underneath is standard and is credited. The doubling orbit 1 → 2 → 4 → 8 → 7 → 5 → 1 modulo 9 is the cyclic group generated by 2 in U(9), of order 6 because that is the multiplicative order of 2 mod 9; the units are {1,2,4,5,7,8} and the non-units {0,3,6}. Textbook abstract algebra, and treated directly in the literature on doubling maps modulo odd integers. Bounded, so the credit stops where the earlier work does: what is NOT prior art is the use of that orbit as a floor for what this deposit does and does not settle, which is a statement about this repository and has no earlier author. Verification by exhaustion in Lean is this deposit's contribution, and verification is not discovery.
93
+ , (13, 0, false) -- involution.lean — that a permutation of order two decomposes a finite set into fixed points and transpositions, and that the number of fixed points therefore matches the parity of the set, is classical and long predates this deposit. It is the orbit-counting argument in any first course. What is this deposit's own here is the EXHAUSTIVE decision over ℤ/9 and the measured refusal below.
94
+ , (14, 0, false) -- ledgerclaims.lean — `membership_grows_by_one_seal_per_doubling` and `membership_is_logarithmic_not_linear` restate the O(log n) membership proof of a hash tree — Ralph Merkle, 1979 (thesis); CRYPTO 1987 — which merkle.lean in this same deposit already credits. Classified `unbounded` on the ground that the subject is this deposit's own ledger; the ledger is its own, the logarithm is not. Bounded: what is not prior art is what THIS ledger claims — the 967-receipt case, the saving arithmetic, and the 128-bit seal width as this deposit mints it.
95
+ , (15, 0, false) -- light.lean — the exact numerical values below are DEFINITIONS adopted by the Conférence Générale des Poids et Mesures, not results of this deposit: the metre from the speed of light (17th CGPM, 1983) and the seven defining constants fixed exactly in the 2019 revision of the SI, effective 20 May 2019 (BIPM, https://www.bipm.org/en/measurement-units/si-defining-constants). Nothing here measures anything.
96
+ , (16, 0, false) -- mechanical.lean — the Boolean rows are De Morgan's laws — Augustus De Morgan, 1847 — written in the arithmetic of {0,1}; the group rows are the additive group of Z/9. Both long prior. Searched 2026-09-04, terms "De Morgan's laws boolean algebra" and "additive group mod 9"; prior art found and credited
97
+ , (17, 0, false) -- merkaba.lean — the partition into {3,6,9} and two three-element classes closed under doubling is the subgroup and coset structure of Z/9 under the action of U(9); Lagrange. One theorem already credits Euler for the polyhedron formula. Searched 2026-09-04; prior art found and credited
98
+ , (18, 0, false) -- merkle.lean — the hash tree — Ralph Merkle, 1979 (thesis); CRYPTO 1987
99
+ , (19, 0, false) -- nim.lean — Nim — Charles L. Bouton, 1901; the Sprague–Grundy theorem — Roland Sprague, 1935 and Patrick M. Grundy, 1939
100
+ , (20, 0, false) -- phenomena.lean — the SI base quantities and their defining constants are definitions of the Conférence Générale des Poids et Mesures (2019 revision, effective 20 May 2019); the electrochemical results are Michael Faraday's laws of electrolysis, 1834, and the standard enthalpy of combustion of hydrogen. Every physical result named here has an earlier author or a standards body, and none is this deposit's.
101
+ , (21, 1, false) -- priorart.lean — this file, about this deposit's own claim
102
+ , (22, 0, false) -- quantum.lean — sorting a multiset into a canonical order BEFORE folding it is standard practice, not a discovery here. Sorted-leaf Merkle trees are the recommended construction for multiproofs and are shipped that way in OpenZeppelin's merkle-tree library; canonical ordering before hashing is long-established in cryptographic serialisation generally. The mathematical content is elementary: any function of a canonical form is invariant under permutation of its input, which is why `receipt_is_order_invariant` holds. What this file contributes is the Lean verification over a stated finite domain and the negative controls beside it — `naive_fold_is_not_order_invariant` shows the property is bought by the sort and not free, and `the_receipt_is_not_injective` and `the_invariance_is_canonicalisation_not_physics` state its limits. Verification and refusal, not discovery.
103
+ , (23, 0, false) -- reach.lean — that no finite set contains every natural number is Euclid's argument in form and is as old as mathematics; the deposit claims none of it. What is its own here is the decision over its OWN bounds, and the statement of where that decision stops.
104
+ , (24, 0, false) -- recovered.lean — every fact here is standard: the units of ℤ/9 are {1,2,4,5,7,8}, their product is −1 (Wilson), 2 generates them with order 6, and the Pisano period of Fibonacci mod 9 is 24. Textbook material, credited. What is NOT prior art is that these particular statements sat WITHDRAWN in this deposit's ledger, each recorded as "not backed by a Lean proof. Its evidence is a TypeScript test", while every one is decidable in a line.
105
+ , (25, 0, false) -- reversal.lean — digit reversal and digit sums; casting out nines, in use by the 12th century
106
+ , (26, 0, false) -- rights.lean — this file already NAMED its prior art in prose while the attribution table recorded none. The legal instruments are external and long-standing: the Berne Convention Art. 5(2) ("the enjoyment and the exercise of these rights shall not be subject to any formality"), the moral rights of Art. 6bis, and the sui generis database right of Directive 96/9/EC. `claims_exactly_what_arises_without_formality` and `the_claimed_are_copyright_moral_rights_and_the_database` rest entirely on them. Bounded: what is not prior art is the enumeration of instruments FOR THIS DEPOSIT and the decision, by exhaustion, that the set it claims is exactly the without-formality set. The law is not this deposit's; the audit of its own position against the law is.
107
+ , (27, 0, false) -- sequences.lean — Cassini’s identity — G. D. Cassini, 1680; Lucas sequences — Édouard Lucas, 1878; the Brahmagupta–Fibonacci identity — Brahmagupta, 628; Pascal’s triangle mod 2 — Blaise Pascal, 1654
108
+ , (28, 0, false) -- speed.lean — the structural claim is Merkle's and is credited here as merkle.lean already credits it: a hash tree over n leaves has an O(log n) membership proof, so the inclusion path at each power of two is exactly the exponent. Ralph Merkle, 1979 (thesis); CRYPTO 1987. `the_verify_path_is_the_exponent`, `membership_is_logarithmic_not_linear` and `the_gap_widens_with_every_doubling` RESTATE that property. This file was classified `unbounded` — "the subject is this deposit's own verification cost" — which was wrong: the cost is logarithmic BECAUSE of a known result, and the repository was already crediting that result three files away. Bounded: what is not prior art is the MEASURED constants on this machine (recompute 21,582,900 µs against a 38 µs walk) and the arithmetic over them. A measurement is not a discovery either, and the file says so.
109
+ , (29, 0, false) -- split.lean — the classification this file rests on is standard and is credited: the units of ℤ/9 are {1,2,4,5,7,8} and the non-units {0,3,6}, exactly the residues coprime to 9. That is textbook abstract algebra — Wikipedia's "multiplicative group of integers modulo n", and every algebra course. So `the_singles_are_exactly_the_non_units` and `the_pairs_are_exactly_the_units_in_order` RESTATE known mathematics and claim nothing. Stated precisely so the credit does not run past the earlier work: what is NOT claimed as prior art is the tokenisation itself — reading the digits as 0|12|3|45|6|78|9 by concatenating consecutive units into two-digit tokens, and the arithmetic that follows from it (every token a multiple of three, closure of the tokens under addition and multiplication). That arrangement is this deposit's presentation of a standard fact, and its verification is by exhaustion here. Crediting an earlier author for a presentation they did not make is the same defect as claiming their result, pointed the other way.
110
+ , (30, 0, false) -- theorems.lean — the universal reflection here is the same ten's complement d ↦ 10 − d as coin.lean, with its centre and its pairs summing to ten. Method of complements, long prior to this deposit. Searched 2026-09-04
111
+ , (31, 0, false) -- z9.lean — Fermat’s little theorem — Pierre de Fermat, 1640; Euler’s theorem — Leonhard Euler, 1763; primitive roots — Carl Friedrich Gauss, 1801
112
+ , (32, 0, false) -- z9plus.lean — digital roots (casting out nines) — in use by the 12th century; the Pisano period — after Leonardo Pisano; studied by Joseph-Louis Lagrange, 1774
113
+ ]
114
+
115
+ -- ── THE CLAIM. Only a source that names a completed search may claim, and none does ─────────────────────
116
+ -- The rule and the state are separate theorems on purpose. The first says what would have to be true for a
117
+ -- claim to be legitimate; the second says how many claims exist today. Stating only the second would leave
118
+ -- the rule to prose, and stating only the first would leave the reader to assume the count.
119
+ theorem novelty_is_claimed_only_where_a_search_was_performed :
120
+ sources.all (fun s => novelty s == false || kindOf s == 2) := by decide
121
+
122
+ theorem this_deposit_claims_no_novelty_today :
123
+ (sources.filter novelty).length = 0 := by decide
124
+
125
+ -- ── WHICH sources, not how many ──────────────────────────────────────────────────────────────────────────
126
+ theorem the_restated_sources_are_named_and_claim_nothing :
127
+ (sources.filter (fun s => kindOf s == 0)).all (fun s => novelty s == false) := by decide
128
+
129
+ theorem an_unsearched_source_claims_nothing :
130
+ (sources.filter (fun s => kindOf s == 1)).all (fun s => novelty s == false) := by decide
131
+
132
+ theorem every_source_is_classified :
133
+ sources.all (fun s => kindOf s == 0 || kindOf s == 1 || kindOf s == 2) := by decide
134
+
135
+ theorem the_kinds_cover_every_source :
136
+ (sources.filter (fun s => kindOf s == 0)).length + (sources.filter (fun s => kindOf s == 1)).length
137
+ + (sources.filter (fun s => kindOf s == 2)).length = sources.length := by decide
138
+
139
+ -- ── ZERO CLAIMS IS NOT FULL ATTRIBUTION ─────────────────────────────────────────────────────────────────
140
+ -- A count of zero novelty claims, stated on its own, reads as though the deposit concedes that everything in
141
+ -- it already has an author. It does not, and it must not be read that way: 21 of the 22 attributed works
142
+ -- predate the DOI system entirely — Fermat 1640, Euler 1763, Bouton 1901 — so "every theorem has registered
143
+ -- prior art" is not merely unproven here, it is impossible. And the larger part of the deposit has had NO
144
+ -- search at all, so its status is unknown rather than conceded.
145
+ --
146
+ -- The zero therefore has exactly one meaning: nobody has looked. It is a statement about work not done, not
147
+ -- about work found. These two propositions must always be read together, so the kernel decides them together.
148
+ --
149
+ -- ── IS CLAIMING NOTHING ITSELF AN UNDERCLAIM? ASKED, SEARCHED, AND ANSWERED NO. ─────────────────────────
150
+ -- Every source here is kind 0 and no source claims novelty, on the stated ground that verification is not
151
+ -- discovery. That policy deserved the same scrutiny as a boast, because an under-claim misrepresents the
152
+ -- record exactly as an over-claim does — it just fails in the direction nobody audits.
153
+ --
154
+ -- The argument against the policy is real: formal verification of KNOWN mathematics is a recognised
155
+ -- contribution in its own right — Flyspeck, the Four Colour Theorem in Coq, mathlib itself — so a deposit
156
+ -- that machine-checks known results and claims nothing might be giving away work it actually did. This
157
+ -- taxonomy has no slot for "restates known mathematics AND contributes a formalisation that did not exist".
158
+ --
159
+ -- So the question was put to the literature on 2026-09-05, terms "Lean 4 mathlib ZMod 9 units group
160
+ -- formalization decide finite modular arithmetic". Mathlib already carries ZMod n, IsUnit, cyclic group
161
+ -- structure and the general machinery these facts follow from, across some 232,000 theorems. The
162
+ -- FORMALISATION is therefore not new either, and the policy stands — not by assumption, which is how it
163
+ -- stood until today, but by a search that could have overturned it and did not.
164
+ --
165
+ -- What remains distinctive here is a METHOD and not a result: axiom-free, Mathlib-free, closing by decide
166
+ -- over stated finite domains. A method is not a discovery, and this file goes on claiming nothing.
167
+ theorem some_sources_are_unsearched :
168
+ (sources.filter (fun s => kindOf s == 1)).length > 0 := by decide
169
+
170
+ theorem zero_claims_is_not_full_attribution :
171
+ (sources.filter novelty).length = 0 ∧ (sources.filter (fun s => kindOf s == 1)).length > 0 := by decide
172
+
173
+ -- ── THE REFUSAL, stated as a theorem so it is checked and not merely written ─────────────────────────────
174
+ -- The Clay floor is measured over the tree, not certified by a constant — index.lean used to declare
175
+ -- `provenHere := 0` and prove it by `rfl`, and that was removed because a theorem deciding that a typed
176
+ -- literal equals itself certifies a declaration and not the world. THIS IS DIFFERENT, and the difference is
177
+ -- worth stating so the two are not confused: the number of results
178
+ -- here whose novelty has been ESTABLISHED — shown, by search, to have no earlier statement anywhere — is
179
+ -- zero. "No prior art known to the author" is a fact about the author. "No prior art exists" is a fact about
180
+ -- the world, and nothing in this repository can decide it. A reader who takes the claimed set as a claim of
181
+ -- originality has been misled, so the deposit says so here, in the layer that is checked.
182
+ -- `def noveltyEstablished : Nat := 0` stood here, decided against its own literal — a refusal certifying
183
+ -- itself, which is the worst place for this defect, because a refusal is the line a reader trusts without
184
+ -- checking it. Establishment is an act performed OUTSIDE this file (a search, with a result), so nothing
185
+ -- declared inside it can witness the count. What survives is the conjunct that reads a real list.
186
+ theorem novelty_is_claimed_of_no_source :
187
+ (sources.filter novelty).length = 0 := by decide
188
+
189
+ end PriorArt