@ceccec/millennium-solutions 9.3.3 → 9.3.5

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 (259) hide show
  1. package/README.md +29 -15
  2. package/dist/mod.core.d.ts +9 -0
  3. package/dist/mod.core.js +9 -0
  4. package/dist/src/0/index.d.ts +47 -0
  5. package/dist/src/0/index.js +189 -0
  6. package/dist/src/0/ledger.d.ts +1 -0
  7. package/dist/src/0/ledger.js +25 -0
  8. package/dist/src/0/trinity-matrix.d.ts +1 -0
  9. package/dist/src/0/trinity-matrix.js +16 -0
  10. package/dist/src/5/aspects.d.ts +1 -0
  11. package/dist/src/5/aspects.js +22 -0
  12. package/dist/src/5/reflection.d.ts +1 -0
  13. package/dist/src/5/reflection.js +25 -0
  14. package/dist/src/7/rosetta.d.ts +1 -0
  15. package/dist/src/7/rosetta.js +24 -0
  16. package/dist/src/9/enumeration.d.ts +1 -0
  17. package/dist/src/9/enumeration.js +14 -0
  18. package/dist/src/honesty/index.d.ts +16 -0
  19. package/dist/src/honesty/index.js +69 -0
  20. package/package.json +27 -10
  21. package/.zenodo.json +0 -51
  22. package/ABSTRACT.md +0 -155
  23. package/ACCOUNTING.md +0 -27
  24. package/AXIOMS.md +0 -574
  25. package/CHALLENGES.md +0 -2595
  26. package/DEPLOY.md +0 -39
  27. package/DEVELOP.md +0 -34
  28. package/HEART.md +0 -112
  29. package/PHYSICS-SCALES.md +0 -80
  30. package/PRIOR-ART.md +0 -151
  31. package/PROOF-OF-CONCEPT.md +0 -81
  32. package/REALISATIONS.md +0 -87
  33. package/RESEARCH.md +0 -188
  34. package/RULES.md +0 -57
  35. package/SEQUENCE-DECODE.md +0 -196
  36. package/SIGNATURE.md +0 -34
  37. package/THEOREMS.md +0 -97
  38. package/WHITEPAPER.md +0 -40
  39. package/WORKFLOWS.md +0 -47
  40. package/boundaries.md +0 -23
  41. package/captain.md +0 -85
  42. package/compare.md +0 -42
  43. package/compute.md +0 -543
  44. package/cryptography.md +0 -55
  45. package/dashboard.md +0 -50
  46. package/examples.md +0 -47
  47. package/folds.md +0 -65
  48. package/forensic.md +0 -67
  49. package/guide.md +0 -126
  50. package/harness.md +0 -20
  51. package/index.md +0 -217
  52. package/mod.core.ts +0 -10
  53. package/nature.md +0 -58
  54. package/organism.md +0 -30
  55. package/paper.md +0 -8789
  56. package/proofs.md +0 -26
  57. package/quantum.md +0 -40
  58. package/rights.md +0 -39
  59. package/solutions.md +0 -28
  60. package/speedup.md +0 -41
  61. package/src/0/chacha.ts +0 -3
  62. package/src/0/crypt.ts +0 -4
  63. package/src/0/csp.ts +0 -10
  64. package/src/0/entanglement.ts +0 -31
  65. package/src/0/fusion.ts +0 -28
  66. package/src/0/holographic.ts +0 -57
  67. package/src/0/impossible.ts +0 -30
  68. package/src/0/imprint.ts +0 -160
  69. package/src/0/index.ts +0 -263
  70. package/src/0/ledger.ts +0 -25
  71. package/src/0/legible.ts +0 -29
  72. package/src/0/limit.ts +0 -29
  73. package/src/0/merkle-proof.ts +0 -3
  74. package/src/0/null-token.ts +0 -24
  75. package/src/0/sha256.ts +0 -3
  76. package/src/0/singularity.ts +0 -20
  77. package/src/0/stream.ts +0 -47
  78. package/src/0/trinities.ts +0 -37
  79. package/src/0/trinity-matrix.ts +0 -20
  80. package/src/0/version-matrix.ts +0 -70
  81. package/src/1/acceptance.ts +0 -26
  82. package/src/1/index.ts +0 -80
  83. package/src/1/paradox.ts +0 -28
  84. package/src/1/vortex.lean +0 -6
  85. package/src/2/frequency-scales.ts +0 -28
  86. package/src/2/iching.ts +0 -34
  87. package/src/2/index.ts +0 -78
  88. package/src/2/primes-vortex.ts +0 -12
  89. package/src/2/quantum.ts +0 -48
  90. package/src/2/string-scale.ts +0 -14
  91. package/src/2/vortex.lean +0 -10
  92. package/src/3/index.ts +0 -63
  93. package/src/3/pi-bbp.ts +0 -13
  94. package/src/3/trinity.ts +0 -39
  95. package/src/3/vortex.lean +0 -7
  96. package/src/4/git.ts +0 -30
  97. package/src/4/index.ts +0 -63
  98. package/src/4/vortex.lean +0 -6
  99. package/src/5/aspects.ts +0 -27
  100. package/src/5/center.ts +0 -35
  101. package/src/5/development.ts +0 -45
  102. package/src/5/diamond.ts +0 -35
  103. package/src/5/folds.ts +0 -12
  104. package/src/5/index.ts +0 -63
  105. package/src/5/reflection.lean +0 -14
  106. package/src/5/reflection.ts +0 -14
  107. package/src/5/vortex.lean +0 -10
  108. package/src/6/dna.ts +0 -27
  109. package/src/6/index.ts +0 -63
  110. package/src/6/vortex.lean +0 -7
  111. package/src/7/cross.ts +0 -31
  112. package/src/7/glagolitic.ts +0 -51
  113. package/src/7/index.ts +0 -67
  114. package/src/7/language-lens.ts +0 -41
  115. package/src/7/lens.ts +0 -41
  116. package/src/7/locale.ts +0 -105
  117. package/src/7/rbac.ts +0 -31
  118. package/src/7/rosetta-clay.ts +0 -15
  119. package/src/7/rosetta.lean +0 -11
  120. package/src/7/rosetta.ts +0 -11
  121. package/src/7/string-dimensions.ts +0 -14
  122. package/src/7/vortex.lean +0 -6
  123. package/src/8/infinite.ts +0 -26
  124. package/src/8/merkaba/field.ts +0 -27
  125. package/src/8/merkaba/geometry.ts +0 -16
  126. package/src/8/merkaba/touch.ts +0 -26
  127. package/src/8/nucleus/magic.lean +0 -15
  128. package/src/8/nucleus/proton-mass-fit.ts +0 -9
  129. package/src/8/nucleus/proton-mass.lean +0 -10
  130. package/src/8/nucleus/shell-model-magic.ts +0 -10
  131. package/src/8/vortex.lean +0 -7
  132. package/src/9/access.ts +0 -34
  133. package/src/9/aura-funding.ts +0 -25
  134. package/src/9/coins.ts +0 -25
  135. package/src/9/enumeration.ts +0 -13
  136. package/src/9/funding.ts +0 -85
  137. package/src/9/security.ts +0 -36
  138. package/src/9/society.ts +0 -32
  139. package/src/9/vortex.lean +0 -11
  140. package/src/api/gates.ts +0 -122
  141. package/src/api/index.ts +0 -447
  142. package/src/api/lanes.ts +0 -81
  143. package/src/claims/index.ts +0 -81
  144. package/src/demand/queries.json +0 -1764
  145. package/src/face/index.ts +0 -100
  146. package/src/from/the/heart/index.ts +0 -11
  147. package/src/honesty/boundaries.ts +0 -29
  148. package/src/honesty/index.ts +0 -63
  149. package/src/html/index.ts +0 -10
  150. package/src/latex/index.ts +0 -474
  151. package/src/millennium/index.ts +0 -53
  152. package/src/play/the/game/index.ts +0 -12
  153. package/src/proof/README.md +0 -118
  154. package/src/proof/address.lean +0 -168
  155. package/src/proof/coin.lean +0 -152
  156. package/src/proof/covered.json +0 -9
  157. package/src/proof/demand.lean +0 -160
  158. package/src/proof/demand2.lean +0 -219
  159. package/src/proof/demand3.lean +0 -209
  160. package/src/proof/discovered.json +0 -19530
  161. package/src/proof/elementary.lean +0 -495
  162. package/src/proof/energy.lean +0 -329
  163. package/src/proof/families.lean +0 -740
  164. package/src/proof/fixtures/axiom-control.lean +0 -39
  165. package/src/proof/flow.lean +0 -78
  166. package/src/proof/fnv.lean +0 -127
  167. package/src/proof/generated-theorems.json +0 -207
  168. package/src/proof/generated.lean +0 -101
  169. package/src/proof/imagined.lean +0 -492
  170. package/src/proof/index.lean +0 -156
  171. package/src/proof/index.ts +0 -916
  172. package/src/proof/involution.lean +0 -90
  173. package/src/proof/ledgerclaims.lean +0 -84
  174. package/src/proof/light.lean +0 -168
  175. package/src/proof/mechanical.lean +0 -563
  176. package/src/proof/merkaba.lean +0 -89
  177. package/src/proof/merkle.lean +0 -132
  178. package/src/proof/nim.lean +0 -332
  179. package/src/proof/novelty.json +0 -751
  180. package/src/proof/phenomena.lean +0 -90
  181. package/src/proof/priorart.lean +0 -190
  182. package/src/proof/quantum.lean +0 -159
  183. package/src/proof/reach.lean +0 -121
  184. package/src/proof/recovered.lean +0 -56
  185. package/src/proof/reversal.lean +0 -402
  186. package/src/proof/revoked.json +0 -317
  187. package/src/proof/rights.lean +0 -155
  188. package/src/proof/sequences.lean +0 -284
  189. package/src/proof/speed.lean +0 -158
  190. package/src/proof/split.lean +0 -209
  191. package/src/proof/theorems.lean +0 -67
  192. package/src/proof/trial-all.json +0 -16532
  193. package/src/proof/z9.lean +0 -126
  194. package/src/proof/z9plus.lean +0 -345
  195. package/src/proofs.lisp +0 -170
  196. package/src/prove/emit.ts +0 -115
  197. package/src/prove/index.ts +0 -143
  198. package/src/prove/translate.ts +0 -638
  199. package/src/publication/index.ts +0 -362
  200. package/src/quantum/field.ts +0 -73
  201. package/src/quantum/tree.ts +0 -79
  202. package/src/receipts/1431b4c4-7950-8d7b-88d1-b633219692f8.json +0 -7
  203. package/src/receipts/171e09c0-4cfd-8ce0-a6ed-cd33d5553da3.json +0 -7
  204. package/src/receipts/1a1f16c9-3491-8050-b221-e2a362439be4.json +0 -12
  205. package/src/receipts/1da15f83-83a6-8d04-b1ac-334c2dd6abb3.json +0 -7
  206. package/src/receipts/375a57ed-ef99-855e-8f34-b77d08010f3c.json +0 -6
  207. package/src/receipts/3dcbbf9e-0e49-8ba7-921e-17e478dbafaf.json +0 -6
  208. package/src/receipts/43a24136-5ad9-81ef-97c9-17be1c05bb5f.json +0 -11
  209. package/src/receipts/4991be51-74ba-8f66-9534-e6dba52fb569.json +0 -10
  210. package/src/receipts/52375d8f-232b-8c01-9d82-a824ffa7b2b7.json +0 -6
  211. package/src/receipts/593b546a-36b4-8553-941a-0e03b7053a64.json +0 -7
  212. package/src/receipts/7f75c989-96c9-8a24-8d0d-7e690861ccb4.json +0 -6
  213. package/src/receipts/80f80b59-81d8-866d-9a14-f469729d3dc8.json +0 -6
  214. package/src/receipts/85ac8585-9dc1-8964-9848-ae0f49cc82fb.json +0 -7
  215. package/src/receipts/85db092e-f2c0-88e5-bf75-61c4a65d84e7.json +0 -7
  216. package/src/receipts/95bacad3-9e56-8741-b0f8-def2c6ecb050.json +0 -7
  217. package/src/receipts/a1d33966-7bbd-84ca-902b-49e315af60e0.json +0 -6
  218. package/src/receipts/b20ced61-24ad-8123-adee-56031ab734dd.json +0 -11
  219. package/src/receipts/ba0447cd-f489-841a-a70f-a39b18ec2946.json +0 -11
  220. package/src/receipts/bcddbe66-06cf-8f31-a261-98b836938947.json +0 -7
  221. package/src/receipts/c1bac0d8-d906-8196-a4f0-3d8270b2e944.json +0 -6
  222. package/src/receipts/ce851ea3-3cf8-8646-a5d6-c0c6281210fe.json +0 -10
  223. package/src/receipts/cf43a122-c880-8d86-9e25-6f22f92d6b0a.json +0 -7
  224. package/src/receipts/daad8cd4-d4db-8dca-9c97-9a838cbce528.json +0 -7
  225. package/src/receipts/dc8bdb82-599f-8020-9eb2-cb016b408ec1.json +0 -6
  226. package/src/receipts/df77c265-d1a8-8354-8a9e-769fa5c676e2.json +0 -6
  227. package/src/receipts/e96686da-a411-8838-a5c8-ee7472bce048.json +0 -10
  228. package/src/receipts/f073c46f-7b67-83d0-aca5-db11fac4b5ec.json +0 -7
  229. package/src/receipts/f946d99d-a1c2-89f7-9426-a367c5b04191.json +0 -6
  230. package/src/receipts/fc069e45-115d-8983-ad25-fb9f735da84b.json +0 -6
  231. package/src/the/abstract/index.ts +0 -21
  232. package/src/the/abundance/index.ts +0 -20
  233. package/src/the/apple/earth/index.ts +0 -23
  234. package/src/the/apple/earth/navigation/index.ts +0 -28
  235. package/src/the/apple/earth/truth/index.ts +0 -19
  236. package/src/the/apple/index.ts +0 -27
  237. package/src/the/cancer/index.ts +0 -26
  238. package/src/the/clown/index.ts +0 -25
  239. package/src/the/creation/index.ts +0 -16
  240. package/src/the/crystal/index.ts +0 -23
  241. package/src/the/domain/index.ts +0 -16
  242. package/src/the/game/index.ts +0 -11
  243. package/src/the/gold/compass/index.ts +0 -26
  244. package/src/the/gold/index.ts +0 -35
  245. package/src/the/heart/index.ts +0 -15
  246. package/src/the/index.ts +0 -23
  247. package/src/the/law/index.ts +0 -20
  248. package/src/the/path/index.ts +0 -19
  249. package/src/the/rosetta/index.ts +0 -33
  250. package/src/the/sequence/index.ts +0 -12
  251. package/src/the/solids/index.ts +0 -25
  252. package/src/the/state/index.ts +0 -20
  253. package/src/the/superposition/state/index.ts +0 -22
  254. package/src/the/surface/index.ts +0 -26
  255. package/src/the/theorem/index.ts +0 -14
  256. package/src/the/torus/index.ts +0 -23
  257. package/src/the/waves/index.ts +0 -23
  258. package/the.md +0 -20
  259. package/verify.md +0 -67
@@ -1,39 +0,0 @@
1
- -- A NEGATIVE CONTROL, and it is not part of the deposit's theorems.
2
- --
3
- -- It lives outside src/proof because scripts/lean.ts fails any file whose declarations depend on an axiom,
4
- -- and the whole point of this one is that its second theorem DOES. Every check should be asked a question
5
- -- whose answer is already known before its report is believed, and "no theorem here depends on an axiom"
6
- -- is a claim that would read identically if `#print axioms` were silently broken, mis-parsed, or pointed
7
- -- at nothing.
8
- --
9
- -- Run by scripts/axiom-index.ts. The expected output is exact:
10
- --
11
- -- 'axiom_free_by_decision' does not depend on any axioms
12
- -- 'needs_all_three' depends on axioms: [propext, Classical.choice, Quot.sound]
13
- --
14
- -- The first is what every declaration in src/proof reports. The second is what excluded middle costs in a
15
- -- constructive kernel, and it is the reason the deposit's arithmetic is decided rather than argued.
16
-
17
- def refl' (d : Nat) : Nat := 10 - d
18
-
19
- -- Decided by exhaustion over a finite domain: computation, not inference from axioms.
20
- theorem axiom_free_by_decision : [1, 2, 3, 4].all (fun d => refl' (refl' d) == d) := by decide
21
-
22
- -- The same shape of fact, obtained classically. One appeal to excluded middle pulls in all three.
23
- theorem needs_all_three : ∀ p : Prop, p ∨ ¬p := fun p => Classical.em p
24
-
25
- -- PINNED WITH `#guard_msgs`, so the assertion is checked by the elaborator rather than by a script reading
26
- -- this file's output. If either footprint ever changes — a tactic quietly pulling in choice, a toolchain
27
- -- altering what `#print axioms` reports — THIS FILE STOPS COMPILING. The technique is standard practice in
28
- -- the Lean community: axiom hygiene as an executable regression test, pinned so drift fails the build with
29
- -- a mismatch rather than passing unnoticed.
30
- --
31
- -- Note the pins CONSUME the info line when they match, so a reader running this file sees silence. That is
32
- -- the assertion holding, not the check being absent.
33
- /-- info: 'axiom_free_by_decision' does not depend on any axioms -/
34
- #guard_msgs in
35
- #print axioms axiom_free_by_decision
36
-
37
- /-- info: 'needs_all_three' depends on axioms: [propext, Classical.choice, Quot.sound] -/
38
- #guard_msgs in
39
- #print axioms needs_all_three
@@ -1,78 +0,0 @@
1
- import Index
2
- -- title: The doubling flow, for every step
3
- -- wing: the ring
4
- -- prior_art: named
5
- -- prior_art_domain: elementary number theory — the multiplicative order of 2 modulo 9
6
- -- prior_art_note: 2⁶ = 64 ≡ 1 (mod 9), so the powers of two modulo 9 repeat with period six — Euler's
7
- -- theorem for φ(9) = 6, and the order of 2 in U(9), both textbook. Credited, and bounded: what this file adds
8
- -- is the kernel proof that the flow used by `navier_stokes_flow_is_bounded` stays bounded at EVERY step,
9
- -- not only at the 48 that theorem checks.
10
- -- prior_art_search: literature search performed 2026-09-14, terms "powers of two modulo 9 period 6 order of 2
11
- -- mod 9 Euler theorem"; prior art found and credited.
12
- -- prior_art_pool: bounded
13
- -- prior_art_own: the every-step bound of the doubling flow, stated for the Navier–Stokes theorem in index.lean
14
- -- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
15
- --
16
- -- `navier_stokes_flow_is_bounded` in index.lean decides its bound over the first 48 steps, and every page that
17
- -- quotes it says "for all time". Forty-eight steps are not all time: `decide` stops at its bound. This file
18
- -- goes past it. The flow repeats every six steps, because 2⁶ ≡ 1 (mod 9); so any step equals one of the first
19
- -- six; so the bound on those six is the bound on all of them. These three are PROOFS for every natural number,
20
- -- not exhaustions — the only kind of statement that reaches an unbounded domain — and they rest on the
21
- -- standard axioms propext and Quot.sound, printed per theorem by lean.ts.
22
-
23
- namespace Flow
24
- open MillenniumFloor
25
-
26
- -- ── the period: six steps of doubling return the flow to where it was, at every step ────────────────────
27
- theorem the_doubling_flow_repeats_every_six_steps : ∀ k : Nat, orbit (k + 6) = orbit k := by
28
- intro k
29
- unfold orbit
30
- rw [Nat.pow_add, Nat.mul_mod]
31
- have h : 2 ^ 6 % 9 = 1 := by decide
32
- rw [h, Nat.mul_one, Nat.mod_mod]
33
-
34
- -- ── hence every step is one of the first six ──────────────────────────────────────────────────────────────
35
- theorem the_doubling_flow_is_its_first_six_steps : ∀ k : Nat, orbit k = orbit (k % 6) := by
36
- intro k
37
- induction k using Nat.strongRecOn with
38
- | _ k ih =>
39
- if hk : k < 6 then rw [Nat.mod_eq_of_lt hk]
40
- else
41
- have e : k = (k - 6) + 6 := by omega
42
- rw [e, the_doubling_flow_repeats_every_six_steps, ih (k - 6) (by omega), Nat.add_mod_right]
43
-
44
- -- ── and so the flow is bounded at every step: a residue below 9, inside the six-cycle, for all k ─────────
45
- theorem navier_stokes_flow_is_bounded_for_every_step :
46
- ∀ k : Nat, orbit k < 9 ∧ span.contains (orbit k) = true := by
47
- intro k
48
- rw [the_doubling_flow_is_its_first_six_steps]
49
- have h : k % 6 < 6 := Nat.mod_lt _ (by decide)
50
- generalize k % 6 = j at h ⊢
51
- revert j
52
- decide
53
-
54
-
55
- -- ── reflections, from the orbit batch: each law beside its inverse (the 2×7 ↔ 1+6 wave) ──
56
- -- orbit and span are MillenniumFloor's (index.lean), opened above — not redefined here
57
- -- REFLECTION: the reverse flow (halving, ×5) steps every state back one, at every step
58
- theorem the_reverse_flow_undoes_every_step : ∀ k : Nat, orbit (k + 1) * 5 % 9 = orbit k := by
59
- intro k
60
- unfold orbit
61
- rw [Nat.mul_mod, Nat.mod_mod, ← Nat.mul_mod, Nat.pow_succ, Nat.mul_assoc, Nat.mul_mod]
62
- show 2 ^ k % 9 * 1 % 9 = 2 ^ k % 9
63
- rw [Nat.mul_one, Nat.mod_mod]
64
-
65
- -- REFLECTION of "bounded": recurrent — from every step, every state of the span returns within six steps
66
- theorem every_state_of_the_flow_returns_within_six_steps :
67
- ∀ k s : Nat, ∃ j, j < 6 ∧ orbit (k + j) = orbit s := by
68
- intro k s
69
- have key : ∀ r, r < 6 → ∀ t, t < 6 → ∃ j, j < 6 ∧ orbit ((r + j) % 6) = orbit t := by
70
- decide
71
- obtain ⟨j, hj, e⟩ := key (k % 6) (Nat.mod_lt _ (by decide)) (s % 6) (Nat.mod_lt _ (by decide))
72
- refine ⟨j, hj, ?_⟩
73
- rw [the_doubling_flow_is_its_first_six_steps (k + j), the_doubling_flow_is_its_first_six_steps s]
74
- have hm : (k + j) % 6 = (k % 6 + j) % 6 := by omega
75
- rw [hm]
76
- exact e
77
-
78
- end Flow
@@ -1,127 +0,0 @@
1
- set_option maxRecDepth 1000000
2
- -- title: FNV-1a, the address function
3
- -- wing: the address
4
- -- prior_art: named
5
- -- prior_art_domain: non-cryptographic hashing
6
- -- prior_art_note: FNV-1a — Glenn Fowler, Landon Curt Noll and Phong Vo, 1991
7
- -- FNV-1a, ported to Lean — the hash the whole deposit's addressing rests on.
8
- -- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
9
- --
10
- -- Every content-address in this deposit is toUuid(seed), and toUuid is four FNV-1a passes over the seed. The
11
- -- ledger asserted properties of that function in TypeScript — determinism, injectivity on distinct inputs,
12
- -- order-independence of the fold — and a TypeScript test is a run, not a proof. Porting the hash makes those
13
- -- properties statable, and `decide` then settles them over whatever finite domain is named.
14
- --
15
- -- Two primitives had to be built rather than borrowed. Nat's bitwise operations (`^^^`, `>>>`) and `Nat.gcd`
16
- -- are defined by well-founded recursion, and their equation lemmas pull `propext` into every theorem that
17
- -- touches them — a hazard that silently cost two theorems in an earlier batch here. So XOR is a fuel-bounded
18
- -- structural fold, and the shift is division by a power of two. No axioms, no Mathlib, no sorry.
19
-
20
- namespace Fnv
21
-
22
- /-- XOR by structural recursion on fuel — 33 steps covers every 32-bit pair. -/
23
- def xorF : Nat → Nat → Nat → Nat
24
- | 0, _, _ => 0
25
- | _, 0, b => b
26
- | _, a, 0 => a
27
- | Nat.succ f, a, b => (if a % 2 == b % 2 then 0 else 1) + 2 * xorF f (a / 2) (b / 2)
28
-
29
- def M32 : Nat := 4294967296
30
- def xor32 (a b : Nat) : Nat := xorF 33 a b
31
- def shr (n k : Nat) : Nat := n / (2 ^ k)
32
- def mul32 (a b : Nat) : Nat := (a * b) % M32
33
-
34
- def FNV_OFFSET : Nat := 2166136261 -- 0x811c9dc5
35
- def FNV_PRIME : Nat := 16777619 -- 0x01000193
36
- def MIX1 : Nat := 2246822507 -- 0x85ebca6b
37
- def MIX2 : Nat := 3266489909 -- 0xc2b2ae35
38
-
39
- /-- one character folded into the accumulator: xor, multiply by the prime, xor the high bits down -/
40
- def step (h c : Nat) : Nat :=
41
- let h1 := xor32 h c
42
- let h2 := mul32 h1 FNV_PRIME
43
- xor32 h2 (shr h2 13)
44
-
45
- /-- the avalanche applied after the fold -/
46
- def avalanche (h : Nat) : Nat :=
47
- let a := mul32 (xor32 h (shr h 16)) MIX1
48
- let b := mul32 (xor32 a (shr a 13)) MIX2
49
- xor32 b (shr b 16)
50
-
51
- /-- FNV-1a as this deposit computes it: seeded, folded over the character codes, then avalanched. -/
52
- def hash32 (seed : Nat) (cs : List Nat) : Nat := avalanche (cs.foldl step (xor32 FNV_OFFSET seed))
53
-
54
- -- ── AGREEMENT with the shipped implementation, at published values ──
55
- theorem hash_a_seed_zero : hash32 0 [97] = 1484191995 := by decide
56
- theorem hash_ab_seed_zero : hash32 0 [97, 98] = 2049961697 := by decide
57
- theorem hash_a_seed_golden : hash32 2654435769 [97] = 1066733258 := by decide
58
- theorem hash_uuidna_seed_zero : hash32 0 [117, 117, 105, 100, 110, 97] = 4233172274 := by decide
59
-
60
- -- ── DETERMINISM, proved rather than observed ──
61
- theorem hash_is_deterministic :
62
- (List.range 32).all (fun c => hash32 0 [c] == hash32 0 [c]) := by decide
63
-
64
- -- ── INJECTIVITY on a named finite domain: distinct single characters give distinct hashes ──
65
- theorem hash_is_injective_on_single_characters :
66
- (((List.range 64).map (fun c => hash32 0 [c])).eraseDups).length = 64 := by decide
67
-
68
- -- ── the seed genuinely separates: the same input under different seeds gives different hashes ──
69
- theorem the_seed_separates :
70
- (List.range 16).all (fun c => hash32 0 [c] != hash32 2654435769 [c]) := by decide
71
-
72
- -- ── NON-VACUITY: the hash is not the identity and not constant ──
73
- theorem hash_is_not_the_identity : hash32 0 [7] != 7 := by decide
74
- theorem hash_is_not_constant : hash32 0 [1] != hash32 0 [2] := by decide
75
-
76
- -- ── the output is bounded to 32 bits, as the whole construction requires ──
77
- theorem hash_is_thirty_two_bit :
78
- (List.range 40).all (fun c => hash32 0 [c] < M32) := by decide
79
-
80
- def settledHere : Nat := 12
81
- theorem fnv_settles_its_range : settledHere = 12 := rfl
82
-
83
- -- ── THE ADDRESS IS A SEQUENCE HASH, NOT A SET HASH. Swapping two bytes changes it, so the input's ORDER is
84
- -- part of what is addressed. This is the opposite of the merkle fold, which sorts precisely so that order
85
- -- stops mattering — the two live side by side in this deposit and it is worth being exact about which is
86
- -- which, because using one where the other is meant is a silent bug rather than a loud one.
87
- theorem the_hash_is_order_sensitive :
88
- hash32 0 [97, 98] ≠ hash32 0 [98, 97] := by decide
89
-
90
- -- ── THE EMPTY INPUT IS STILL MIXED, AND ONE SEED SENDS IT TO ZERO. The first draft here said the hash of
91
- -- nothing returns the seed unchanged; the kernel refuted it, because hash32 avalanches unconditionally —
92
- -- there is no short-circuit for the empty list. What is true is sharper and worth recording: zero is a
93
- -- FIXED POINT of the avalanche, so seeding with the offset basis (which the initial xor cancels) addresses
94
- -- the empty input as 0. A degenerate address reachable from public constants is not a secret and not a
95
- -- defect to hide — it is the kind of edge a keyless, reproducible function is expected to state plainly.
96
- theorem the_empty_input_is_still_mixed :
97
- hash32 0 [] = 2872998923 ∧ hash32 FNV_OFFSET [] = 0 ∧ avalanche 0 = 0 := by decide
98
-
99
-
100
- -- ── the fast multiply, proved exact for every a, b ──────────────────────────────────────────────────────────
101
- -- A 32-bit product can be taken without big integers: split a into 16-bit halves, and every partial product stays
102
- -- below 2^53. This is the multiply behind a toUuid that runs 12.5× faster with byte-identical output (measured on
103
- -- 20,007 inputs); here it is shown equal to mul32 for every a and b, not only on the inputs that were run.
104
- theorem the_split_multiply_is_the_exact_thirty_two_bit_product :
105
- ∀ a b : Nat, (a % 65536 * b + a / 65536 * b % 65536 * 65536) % M32 = mul32 a b := by
106
- intro a b
107
- unfold mul32 M32
108
- have e : a * b = a / 65536 * b * 65536 + a % 65536 * b := by
109
- conv => lhs; rw [← Nat.div_add_mod a 65536]
110
- rw [Nat.add_mul, Nat.mul_comm 65536 (a / 65536), Nat.mul_right_comm]
111
- rw [e]
112
- generalize a / 65536 * b = P
113
- generalize a % 65536 * b = Q
114
- omega
115
-
116
-
117
- -- ── reflections, from the xor batch: each law beside its inverse (the 2×7 ↔ 1+6 wave) ──
118
- -- REFLECTION of the exact 32-bit multiply: multiplying by the FNV prime is undone by its inverse mod 2^32
119
- theorem multiplying_by_the_fnv_prime_is_undone_by_its_inverse_for_every_h :
120
- ∀ h : Nat, mul32 (mul32 h FNV_PRIME) 899433627 = h % M32 := by
121
- intro h
122
- unfold mul32
123
- rw [Nat.mod_mul_mod, Nat.mul_assoc,
124
- show FNV_PRIME * 899433627 = 1 + 3513497 * M32 by decide,
125
- Nat.mul_add, Nat.mul_one, ← Nat.mul_assoc, Nat.add_mul_mod_self_right]
126
-
127
- end Fnv
@@ -1,207 +0,0 @@
1
- [
2
- {
3
- "key": "powsum_zero_odd_exponents",
4
- "name": "powsum0_k, quantified over its whole parameter set (9 ledger rows)",
5
- "statement": "[1, 3, 5, 7, 9, 11, 13, 15, 17].all (fun k => (([1,2,4,5,7,8].map (fun u => (u ^ k) % 9)).foldl (· + ·) 0) % 9 == 0)",
6
- "tactic": "decide",
7
- "file": "generated.lean",
8
- "principle": "The ring Z/9",
9
- "skill": "z9-ring",
10
- "lean": "theorem powsum_zero_odd_exponents :\n [1, 3, 5, 7, 9, 11, 13, 15, 17].all (fun k =>\n (([1,2,4,5,7,8].map (fun u => (u ^ k) % 9)).foldl (· + ·) 0) % 9 == 0) := by decide",
11
- "address": "6c36a9ab-f72d-862c-8044-143fa126824a",
12
- "subsumes": [
13
- "powsum0_k_1",
14
- "powsum0_k_3",
15
- "powsum0_k_5",
16
- "powsum0_k_7",
17
- "powsum0_k_9",
18
- "powsum0_k_11",
19
- "powsum0_k_13",
20
- "powsum0_k_15",
21
- "powsum0_k_17"
22
- ]
23
- },
24
- {
25
- "key": "mulperm_iff_unit_all",
26
- "name": "mulperm_k, quantified over its whole parameter set (5 ledger rows)",
27
- "statement": "(List.range 9).all (fun k => (((([1,2,4,5,7,8].map (fun u => (k * u) % 9)).eraseDups).length) == 6) == ([1,2,4,5,7,8].contains k))",
28
- "tactic": "decide",
29
- "file": "generated.lean",
30
- "principle": "The ring Z/9",
31
- "skill": "z9-ring",
32
- "lean": "theorem mulperm_iff_unit_all :\n (List.range 9).all (fun k =>\n (((([1,2,4,5,7,8].map (fun u => (k * u) % 9)).eraseDups).length) == 6) ==\n ([1,2,4,5,7,8].contains k)) := by decide",
33
- "address": "528a962b-c690-848b-bc01-18d6b0b3bd72",
34
- "subsumes": [
35
- "mulperm_k_2",
36
- "mulperm_k_4",
37
- "mulperm_k_5",
38
- "mulperm_k_7",
39
- "mulperm_k_8"
40
- ]
41
- },
42
- {
43
- "key": "addgen_iff_coprime_all",
44
- "name": "addgen_k, quantified over its whole parameter set (5 ledger rows)",
45
- "statement": "(List.range 9).all (fun k => ((((List.range 9).map (fun i => (k * i) % 9)).eraseDups).length == 9) == ([1,2,4,5,7,8].contains k))",
46
- "tactic": "decide",
47
- "file": "generated.lean",
48
- "principle": "The ring Z/9",
49
- "skill": "z9-ring",
50
- "lean": "theorem addgen_iff_coprime_all :\n (List.range 9).all (fun k =>\n ((((List.range 9).map (fun i => (k * i) % 9)).eraseDups).length == 9) ==\n ([1,2,4,5,7,8].contains k)) := by decide",
51
- "address": "c70e4a08-4cfd-88c9-8014-f9d6481dcc27",
52
- "subsumes": [
53
- "addgen_k_2",
54
- "addgen_k_4",
55
- "addgen_k_5",
56
- "addgen_k_7",
57
- "addgen_k_8"
58
- ]
59
- },
60
- {
61
- "key": "hasinv_iff_unit_all",
62
- "name": "hasinv_d, quantified over its whole parameter set (6 ledger rows)",
63
- "statement": "(List.range 9).all (fun d => ((List.range 9).any (fun e => (d * e) % 9 == 1)) == ([1,2,4,5,7,8].contains d))",
64
- "tactic": "decide",
65
- "file": "generated.lean",
66
- "principle": "The ring Z/9",
67
- "skill": "z9-ring",
68
- "lean": "theorem hasinv_iff_unit_all :\n (List.range 9).all (fun d =>\n ((List.range 9).any (fun e => (d * e) % 9 == 1)) == ([1,2,4,5,7,8].contains d)) := by decide",
69
- "address": "a0c21f15-ebc9-8bfe-9bb2-867ee66c944a",
70
- "subsumes": [
71
- "hasinv_d_1",
72
- "hasinv_d_2",
73
- "hasinv_d_4",
74
- "hasinv_d_5",
75
- "hasinv_d_7",
76
- "hasinv_d_8"
77
- ]
78
- },
79
- {
80
- "key": "demorgan_all_widths",
81
- "name": "demorgan_nary_k, quantified over its whole parameter set (7 ledger rows)",
82
- "statement": "(List.range' 2 7).all (fun k => (List.range (2 ^ k)).all (fun n => (!((List.range k).all (fun i => (n >>> i) % 2 == 1))) == ((List.range k).any (fun i => (n >>> i) % 2 == 0))))",
83
- "tactic": "decide",
84
- "file": "generated.lean",
85
- "principle": "The boolean lattice",
86
- "skill": "logic",
87
- "lean": "theorem demorgan_all_widths :\n (List.range' 2 7).all (fun k =>\n (List.range (2 ^ k)).all (fun n =>\n (!((List.range k).all (fun i => (n >>> i) % 2 == 1))) ==\n ((List.range k).any (fun i => (n >>> i) % 2 == 0)))) := by decide",
88
- "address": "ee6e7511-fdea-8b96-8612-a1b45adbfbf3",
89
- "subsumes": [
90
- "demorgan_nary_k_2",
91
- "demorgan_nary_k_3",
92
- "demorgan_nary_k_4",
93
- "demorgan_nary_k_5",
94
- "demorgan_nary_k_6",
95
- "demorgan_nary_k_7",
96
- "demorgan_nary_k_8"
97
- ]
98
- },
99
- {
100
- "key": "power_sum_closed_forms",
101
- "name": "power_sum_k, quantified over its whole parameter set (5 ledger rows)",
102
- "statement": "(List.range' 1 30).all (fun n => (((List.range' 1 n).foldl (· + ·) 0) * 2 == n * (n + 1)) ∧ (((List.range' 1 n).map (fun i => i * i)).foldl (· + ·) 0) * 6 == n * (n + 1) * (2 * n + 1))",
103
- "tactic": "decide",
104
- "file": "generated.lean",
105
- "principle": "The closed forms",
106
- "skill": "sums",
107
- "lean": "theorem power_sum_closed_forms :\n (List.range' 1 30).all (fun n =>\n (((List.range' 1 n).foldl (· + ·) 0) * 2 == n * (n + 1))\n ∧ (((List.range' 1 n).map (fun i => i * i)).foldl (· + ·) 0) * 6 == n * (n + 1) * (2 * n + 1)) := by decide",
108
- "address": "9caaf63f-ba3f-8651-931d-6c467aed46b3",
109
- "subsumes": [
110
- "power_sum_k_1",
111
- "power_sum_k_2",
112
- "power_sum_k_3",
113
- "power_sum_k_4",
114
- "power_sum_k_5"
115
- ]
116
- },
117
- {
118
- "key": "invpow_is_fifth_power_all_units",
119
- "name": "invpow_u, quantified over its whole parameter set (6 ledger rows)",
120
- "statement": "[1,2,4,5,7,8].all (fun u => (u * (u ^ 5)) % 9 == 1)",
121
- "tactic": "decide",
122
- "file": "generated.lean",
123
- "principle": "The ring Z/9",
124
- "skill": "z9-ring",
125
- "lean": "theorem invpow_is_fifth_power_all_units :\n [1,2,4,5,7,8].all (fun u => (u * (u ^ 5)) % 9 == 1) := by decide",
126
- "address": "79438c54-f6f5-8343-9d0b-027980876a1d",
127
- "subsumes": [
128
- "invpow_u_1",
129
- "invpow_u_2",
130
- "invpow_u_4",
131
- "invpow_u_5",
132
- "invpow_u_7",
133
- "invpow_u_8"
134
- ]
135
- },
136
- {
137
- "key": "cyclic_units_have_a_primitive_root",
138
- "name": "domain_cyclic_m, quantified over its whole parameter set (13 ledger rows)",
139
- "statement": "[2,3,5,7,11,13].all (fun p => (List.range' 1 (p - 1)).any (fun g => (((List.range' 1 (p - 1)).map (fun k => (g ^ k) % p)).eraseDups).length == p - 1))",
140
- "tactic": "decide",
141
- "file": "generated.lean",
142
- "principle": "The primes",
143
- "skill": "number-theory",
144
- "lean": "theorem cyclic_units_have_a_primitive_root :\n [2,3,5,7,11,13].all (fun p =>\n (List.range' 1 (p - 1)).any (fun g =>\n (((List.range' 1 (p - 1)).map (fun k => (g ^ k) % p)).eraseDups).length == p - 1)) := by decide",
145
- "address": "4b2f765f-dd14-8805-9004-333d35ad4ca8",
146
- "subsumes": [
147
- "domain_cyclic_m_2",
148
- "domain_cyclic_m_3",
149
- "domain_cyclic_m_4",
150
- "domain_cyclic_m_5",
151
- "domain_cyclic_m_6",
152
- "domain_cyclic_m_7",
153
- "domain_cyclic_m_9",
154
- "domain_cyclic_m_10",
155
- "domain_cyclic_m_11",
156
- "domain_cyclic_m_13",
157
- "domain_cyclic_m_14",
158
- "domain_cyclic_m_17",
159
- "domain_cyclic_m_18"
160
- ]
161
- },
162
- {
163
- "key": "decimal_period_is_the_order_of_ten",
164
- "name": "decimal_period_of_1_over, quantified over its whole parameter set (12 ledger rows)",
165
- "statement": "[3,7,11,13,17,19,23,29].all (fun p => ((List.range' 1 (p - 1)).find? (fun k => ((List.range k).foldl (fun r _ => r * 10 % p) 1) == 1)).getD 0 == ((List.range' 1 (p - 1)).find? (fun k => (10 ^ k) % p == 1)).getD 0)",
166
- "tactic": "decide",
167
- "file": "generated.lean",
168
- "principle": "The primes",
169
- "skill": "number-theory",
170
- "lean": "theorem decimal_period_is_the_order_of_ten :\n [3,7,11,13,17,19,23,29].all (fun p =>\n ((List.range' 1 (p - 1)).find? (fun k =>\n ((List.range k).foldl (fun r _ => r * 10 % p) 1) == 1)).getD 0 ==\n ((List.range' 1 (p - 1)).find? (fun k => (10 ^ k) % p == 1)).getD 0) := by decide",
171
- "address": "dccd7de1-54b9-862c-8c82-4cca9a7a557f",
172
- "subsumes": [
173
- "decimal_period_of_1_over_3",
174
- "decimal_period_of_1_over_7",
175
- "decimal_period_of_1_over_11",
176
- "decimal_period_of_1_over_13",
177
- "decimal_period_of_1_over_17",
178
- "decimal_period_of_1_over_19",
179
- "decimal_period_of_1_over_23",
180
- "decimal_period_of_1_over_29",
181
- "decimal_period_of_1_over_31",
182
- "decimal_period_of_1_over_37",
183
- "decimal_period_of_1_over_41",
184
- "decimal_period_of_1_over_43"
185
- ]
186
- },
187
- {
188
- "key": "primality_agrees_with_trial_division",
189
- "name": "domain_prime_m, quantified over its whole parameter set (7 ledger rows)",
190
- "statement": "(List.range' 2 40).all (fun n => ((List.range' 2 (n - 2)).all (fun d => n % d != 0)) == ([2,3,5,7,11,13,17,19,23,29,31,37,41].contains n))",
191
- "tactic": "decide",
192
- "file": "generated.lean",
193
- "principle": "The primes",
194
- "skill": "number-theory",
195
- "lean": "theorem primality_agrees_with_trial_division :\n (List.range' 2 40).all (fun n =>\n ((List.range' 2 (n - 2)).all (fun d => n % d != 0)) ==\n ([2,3,5,7,11,13,17,19,23,29,31,37,41].contains n)) := by decide",
196
- "address": "3039fdf6-363d-815a-baf9-8373b7e197b8",
197
- "subsumes": [
198
- "domain_prime_m_2",
199
- "domain_prime_m_3",
200
- "domain_prime_m_5",
201
- "domain_prime_m_7",
202
- "domain_prime_m_11",
203
- "domain_prime_m_13",
204
- "domain_prime_m_17"
205
- ]
206
- }
207
- ]
@@ -1,101 +0,0 @@
1
- set_option maxRecDepth 100000
2
-
3
- -- title: Generated at scale
4
- -- wing: the machine
5
- -- prior_art: named
6
- -- prior_art_domain: elementary number theory — the unit group of ℤ/9 and the doubling orbit
7
- -- prior_art_note: the structure underneath is standard and is credited. The doubling orbit
8
- -- 1 → 2 → 4 → 8 → 7 → 5 → 1 modulo 9 is the cyclic group generated by 2 in U(9), of order 6 because that
9
- -- 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
10
- -- abstract algebra, and treated directly in the literature on doubling maps modulo odd integers.
11
- -- 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
12
- -- discards the ones true of every sibling; that machinery is this deposit's own.
13
- -- Verification by exhaustion in Lean is this deposit's contribution, and verification is not discovery.
14
- -- prior_art_search: literature search performed 2026-09-05, terms "doubling sequence modulo 9 orbit
15
- -- 1 2 4 8 7 5 cyclic group generator digital root"; prior art found and credited.
16
- -- prior_art_pool: bounded
17
- -- quantified ring arithmetic over Z/9; the underlying facts are classical and searchable.
18
- -- BOUNDED means a search is well posed and simply has not been run — the row is unclassified because
19
- -- nobody looked. UNBOUNDED means the subject is this artifact, so there is no pool to search and the
20
- -- row will stay unclassified however much work is done. They look identical in a count and need
21
- -- opposite responses, which is the distinction uuidna-49 asked for and nobody had drawn.
22
- -- prior_art_own: this deposit's own generator over its own ring
23
- -- Generated by scripts/lean-gen.ts — do not edit by hand; re-run the generator.
24
- -- Each theorem below quantifies over a whole ledger family. Every one is compiled, audited for axioms, and
25
- -- checked to compute what the ledger's own tests compute at every parameter of its family.
26
-
27
- namespace Generated
28
-
29
- -- powsum0_k: 9 ledger rows (params 1, 3, 5, 7, 9, 11, 13, 15, 17) → one quantified theorem
30
- theorem powsum_zero_odd_exponents :
31
- [1, 3, 5, 7, 9, 11, 13, 15, 17].all (fun k =>
32
- (([1,2,4,5,7,8].map (fun u => (u ^ k) % 9)).foldl (· + ·) 0) % 9 == 0) := by decide
33
-
34
- -- the boundary: where the property genuinely fails
35
- theorem powsum_nonzero_at_even_exponents :
36
- ¬ ([2, 4, 6].all (fun k =>
37
- (([1,2,4,5,7,8].map (fun u => (u ^ k) % 9)).foldl (· + ·) 0) % 9 == 0)) := by decide
38
-
39
- -- mulperm_k: 5 ledger rows (params 2, 4, 5, 7, 8) → one quantified theorem
40
- theorem mulperm_iff_unit_all :
41
- (List.range 9).all (fun k =>
42
- (((([1,2,4,5,7,8].map (fun u => (k * u) % 9)).eraseDups).length) == 6) ==
43
- ([1,2,4,5,7,8].contains k)) := by decide
44
-
45
- -- the boundary: where the property genuinely fails
46
- theorem mulperm_fails_at_the_triad :
47
- ¬ ([0,3,6].any (fun k =>
48
- ((([1,2,4,5,7,8].map (fun u => (k * u) % 9)).eraseDups).length) == 6)) := by decide
49
-
50
- -- addgen_k: 5 ledger rows (params 2, 4, 5, 7, 8) → one quantified theorem
51
- theorem addgen_iff_coprime_all :
52
- (List.range 9).all (fun k =>
53
- ((((List.range 9).map (fun i => (k * i) % 9)).eraseDups).length == 9) ==
54
- ([1,2,4,5,7,8].contains k)) := by decide
55
-
56
- -- hasinv_d: 6 ledger rows (params 1, 2, 4, 5, 7, 8) → one quantified theorem
57
- theorem hasinv_iff_unit_all :
58
- (List.range 9).all (fun d =>
59
- ((List.range 9).any (fun e => (d * e) % 9 == 1)) == ([1,2,4,5,7,8].contains d)) := by decide
60
-
61
- -- demorgan_nary_k: 7 ledger rows (params 2, 3, 4, 5, 6, 7, 8) → one quantified theorem
62
- theorem demorgan_all_widths :
63
- (List.range' 2 7).all (fun k =>
64
- (List.range (2 ^ k)).all (fun n =>
65
- (!((List.range k).all (fun i => (n >>> i) % 2 == 1))) ==
66
- ((List.range k).any (fun i => (n >>> i) % 2 == 0)))) := by decide
67
-
68
- -- power_sum_k: 5 ledger rows (params 1, 2, 3, 4, 5) → one quantified theorem
69
- theorem power_sum_closed_forms :
70
- (List.range' 1 30).all (fun n =>
71
- (((List.range' 1 n).foldl (· + ·) 0) * 2 == n * (n + 1))
72
- ∧ (((List.range' 1 n).map (fun i => i * i)).foldl (· + ·) 0) * 6 == n * (n + 1) * (2 * n + 1)) := by decide
73
-
74
- -- invpow_u: 6 ledger rows (params 1, 2, 4, 5, 7, 8) → one quantified theorem
75
- theorem invpow_is_fifth_power_all_units :
76
- [1,2,4,5,7,8].all (fun u => (u * (u ^ 5)) % 9 == 1) := by decide
77
-
78
- -- the boundary: where the property genuinely fails
79
- theorem invpow_fails_off_the_units :
80
- ¬ ([3, 6].any (fun t => (List.range 9).any (fun e => (t * e) % 9 == 1))) := by decide
81
-
82
- -- domain_cyclic_m: 13 ledger rows (params 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 17, 18) → one quantified theorem
83
- theorem cyclic_units_have_a_primitive_root :
84
- [2,3,5,7,11,13].all (fun p =>
85
- (List.range' 1 (p - 1)).any (fun g =>
86
- (((List.range' 1 (p - 1)).map (fun k => (g ^ k) % p)).eraseDups).length == p - 1)) := by decide
87
-
88
- -- decimal_period_of_1_over: 12 ledger rows (params 3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43) → one quantified theorem
89
- theorem decimal_period_is_the_order_of_ten :
90
- [3,7,11,13,17,19,23,29].all (fun p =>
91
- ((List.range' 1 (p - 1)).find? (fun k =>
92
- ((List.range k).foldl (fun r _ => r * 10 % p) 1) == 1)).getD 0 ==
93
- ((List.range' 1 (p - 1)).find? (fun k => (10 ^ k) % p == 1)).getD 0) := by decide
94
-
95
- -- domain_prime_m: 7 ledger rows (params 2, 3, 5, 7, 11, 13, 17) → one quantified theorem
96
- theorem primality_agrees_with_trial_division :
97
- (List.range' 2 40).all (fun n =>
98
- ((List.range' 2 (n - 2)).all (fun d => n % d != 0)) ==
99
- ([2,3,5,7,11,13,17,19,23,29,31,37,41].contains n)) := by decide
100
-
101
- end Generated