@ceccec/millennium-solutions 9.3.2 → 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 +54 -40
- 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 -2434
- 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 -8100
- 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 -147
- package/src/proof/coin.lean +0 -152
- package/src/proof/covered.json +0 -9
- package/src/proof/demand.lean +0 -134
- package/src/proof/demand2.lean +0 -207
- package/src/proof/demand3.lean +0 -183
- package/src/proof/discovered.json +0 -19125
- package/src/proof/elementary.lean +0 -446
- package/src/proof/energy.lean +0 -291
- package/src/proof/families.lean +0 -648
- package/src/proof/fixtures/axiom-control.lean +0 -39
- package/src/proof/flow.lean +0 -54
- package/src/proof/fnv.lean +0 -116
- 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 -158
- package/src/proof/mechanical.lean +0 -524
- package/src/proof/merkaba.lean +0 -89
- package/src/proof/merkle.lean +0 -132
- package/src/proof/nim.lean +0 -311
- 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 -105
- package/src/proof/recovered.lean +0 -56
- package/src/proof/reversal.lean +0 -148
- package/src/proof/revoked.json +0 -317
- package/src/proof/rights.lean +0 -155
- package/src/proof/sequences.lean +0 -219
- package/src/proof/speed.lean +0 -152
- package/src/proof/split.lean +0 -199
- package/src/proof/theorems.lean +0 -67
- package/src/proof/trial-all.json +0 -16046
- package/src/proof/z9.lean +0 -99
- package/src/proof/z9plus.lean +0 -300
- 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
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import Families
|
|
2
|
-
-- title: Elementary arithmetic
|
|
3
|
-
-- wing: the ring
|
|
4
|
-
-- prior_art: named
|
|
5
|
-
-- prior_art_domain: elementary number theory and combinatorial game theory
|
|
6
|
-
-- prior_art_note: Euclid (Elements IX.36) and Euler for the even perfect numbers; the amicable pair
|
|
7
|
-
-- (220, 284) is attributed to Pythagoras; Eisenstein for the ring ℤ[ω]; Bouton (1901) for the
|
|
8
|
-
-- subtraction game's losing positions. None of these results is this deposit's. What is this deposit's is
|
|
9
|
-
-- the DECISION of each over a stated finite range, axiom-free, and the honest record of where the range
|
|
10
|
-
-- stops short of what the older claim asserted.
|
|
11
|
-
-- prior_art_search: the results are named in every undergraduate text; no search was needed to find them.
|
|
12
|
-
-- prior_art_pool: named
|
|
13
|
-
-- Elementary arithmetic, decided — the claims the ledger held in TypeScript, given a kernel.
|
|
14
|
-
-- Author: Tsvetan Rouschev · License: CC BY-NC-ND 4.0
|
|
15
|
-
--
|
|
16
|
-
-- This file exists because families.lean had grown to about 140 seconds of kernel time and every theorem
|
|
17
|
-
-- added to it lengthened the tree's critical path. A separate file compiles alongside the others rather
|
|
18
|
-
-- than behind them, and the helpers it needs — gcd', isPrime, unitsMod, ordMod — are imported rather than
|
|
19
|
-
-- copied, because a second copy of gcdFuel would be a second thing to keep true.
|
|
20
|
-
|
|
21
|
-
-- ── WHY THIS IS NOT CALLED `Classical` ──────────────────────────────────────────────────────────────────
|
|
22
|
-
-- It was, for a day, and Lean's own `Classical` namespace shadowed it: `choose` inside this file resolved to
|
|
23
|
-
-- `Classical.choose`, which rests on `Classical.choice` — an AXIOM, in a deposit whose entire standard is
|
|
24
|
-
-- that no theorem depends on one. The compile error is the small cost; the real one is a reader seeing a
|
|
25
|
-
-- file called Classical in an axiom-free record and drawing the obvious wrong conclusion. Thirteen keys were
|
|
26
|
-
-- sealed under `lean_classical_*` before this was noticed and are carried, not withdrawn: the theorems are
|
|
27
|
-
-- unchanged and are decided at their new address.
|
|
28
|
-
namespace Elementary
|
|
29
|
-
|
|
30
|
-
open Families
|
|
31
|
-
|
|
32
|
-
/-- the sum of the proper divisors — every divisor below n itself -/
|
|
33
|
-
def properDivisorSum (n : Nat) : Nat := ((List.range' 1 (n - 1)).filter (fun d => n % d == 0)).foldl (· + ·) 0
|
|
34
|
-
|
|
35
|
-
-- ── EUCLID'S FORM. 2^(p−1)(2^p − 1) is perfect whenever 2^p − 1 is prime ─────────────────────────────────
|
|
36
|
-
-- Stated with its hypothesis attached rather than as a list of four numbers that happen to be perfect.
|
|
37
|
-
-- The range stops at p = 7 for a reason worth stating: the next case, p = 13, is 33 550 336, and the
|
|
38
|
-
-- divisor sum walks every number below it. That is a longer computation, not a harder theorem.
|
|
39
|
-
set_option maxRecDepth 2000000 in
|
|
40
|
-
theorem euclids_form_is_perfect_at_every_mersenne_prime_to_seven :
|
|
41
|
-
[2, 3, 5, 7].all (fun p =>
|
|
42
|
-
!(isPrime (2 ^ p - 1)) || properDivisorSum (2 ^ (p - 1) * (2 ^ p - 1)) == 2 ^ (p - 1) * (2 ^ p - 1)) := by decide
|
|
43
|
-
|
|
44
|
-
-- ── and the hypothesis is not decoration: at p = 11 the Mersenne number is composite ─────────────────────
|
|
45
|
-
-- Without this, the theorem above is four cases where the guard happens to be true, and a reader has no
|
|
46
|
-
-- way to see that the guard ever does anything. 2^11 − 1 = 2047 = 23 · 89.
|
|
47
|
-
theorem the_mersenne_hypothesis_is_real_at_eleven :
|
|
48
|
-
isPrime (2 ^ 11 - 1) = false ∧ 23 * 89 = 2 ^ 11 - 1 := by decide
|
|
49
|
-
|
|
50
|
-
-- ── the amicable pair: each is the other's proper-divisor sum, and NEITHER is its own ────────────────────
|
|
51
|
-
set_option maxRecDepth 2000000 in
|
|
52
|
-
theorem the_amicable_pair_is_mutual_and_neither_is_perfect :
|
|
53
|
-
properDivisorSum 220 = 284 ∧ properDivisorSum 284 = 220 ∧
|
|
54
|
-
properDivisorSum 220 ≠ 220 ∧ properDivisorSum 284 ≠ 284 := by decide
|
|
55
|
-
|
|
56
|
-
-- ── the primitive roots mod nine are exactly two and five ────────────────────────────────────────────────
|
|
57
|
-
-- families.lean decides that a primitive root EXISTS at 9. Which ones they are is a different statement,
|
|
58
|
-
-- and the ledger's row claims the stronger one: a residue is a primitive root exactly when its powers
|
|
59
|
-
-- run through all six units, and only 2 and 5 do.
|
|
60
|
-
theorem the_primitive_roots_mod_nine_are_exactly_two_and_five :
|
|
61
|
-
(unitsMod 9).filter (fun g => ordMod g 9 == 6) = [2, 5] := by decide
|
|
62
|
-
|
|
63
|
-
/-- the norm on the Eisenstein integers a + bω, where ω is a primitive cube root of unity -/
|
|
64
|
-
def eisensteinNorm (a b : Int) : Int := a * a - a * b + b * b
|
|
65
|
-
|
|
66
|
-
-- ── the Eisenstein integers have exactly six units ───────────────────────────────────────────────────────
|
|
67
|
-
-- The units are the norm-1 elements. Searched over the box −3…3 in both coordinates, which is wider than
|
|
68
|
-
-- it needs to be: the norm is a positive definite form, so nothing outside can have norm 1, and finding
|
|
69
|
-
-- exactly six inside a box that could have held more is the content.
|
|
70
|
-
theorem the_eisenstein_units_are_exactly_six :
|
|
71
|
-
(((List.range 7).flatMap (fun (i : Nat) =>
|
|
72
|
-
(List.range 7).map (fun (j : Nat) => (((i : Int) - 3, (j : Int) - 3) : Int × Int)))).filter
|
|
73
|
-
(fun p => eisensteinNorm p.1 p.2 == 1)).length = 6 := by decide
|
|
74
|
-
|
|
75
|
-
-- ── the subtraction game {1,2,3}: the mover loses exactly at the multiples of four ───────────────────────
|
|
76
|
-
-- Both halves, which is what makes it the theorem rather than a pattern: from a multiple of four every
|
|
77
|
-
-- legal move leaves a non-multiple, and from a non-multiple some legal move reaches one.
|
|
78
|
-
theorem the_subtraction_game_loses_exactly_at_the_multiples_of_four :
|
|
79
|
-
(List.range 41).all (fun n =>
|
|
80
|
-
if n % 4 == 0 then [1, 2, 3].all (fun m => !(m ≤ n) || (n - m) % 4 != 0)
|
|
81
|
-
else [1, 2, 3].any (fun m => m ≤ n && (n - m) % 4 == 0)) := by decide
|
|
82
|
-
|
|
83
|
-
-- ── THE UNIT GROUP OF ℤ/9, WHICH IS THE GROUP THIS WHOLE DEPOSIT IS BUILT ON ────────────────────────────
|
|
84
|
-
--
|
|
85
|
-
-- scripts/candidates.ts proposed `units_are_six` as the heir for seven different withdrawn rows, all of
|
|
86
|
-
-- them about (ℤ/9)*, and it was wrong every time: knowing the group has six elements decides none of
|
|
87
|
-
-- what those rows claim. They are real statements and each needed its own theorem. That the ranking
|
|
88
|
-
-- proposed one theorem for seven claims is exactly why it writes nothing.
|
|
89
|
-
|
|
90
|
-
-- ── the six units fall into three additive-inverse pairs, each summing to nine ───────────────────────────
|
|
91
|
-
theorem the_units_of_z9_form_three_pairs_summing_to_nine :
|
|
92
|
-
((unitsMod 9).filter (fun u => u < 9 - u)).length = 3 ∧
|
|
93
|
-
(unitsMod 9).all (fun u => (unitsMod 9).contains (9 - u) && u + (9 - u) == 9) := by decide
|
|
94
|
-
|
|
95
|
-
-- ── the Cayley table is a Latin square: every row AND every column is a permutation of the units ─────────
|
|
96
|
-
-- Rows alone would suffice in an abelian group, but only if commutativity were already stated. Both are
|
|
97
|
-
-- decided here rather than one being inferred from something this theorem does not say.
|
|
98
|
-
theorem the_multiplication_table_of_the_z9_units_is_a_latin_square :
|
|
99
|
-
(unitsMod 9).all (fun a =>
|
|
100
|
-
((unitsMod 9).map (fun b => a * b % 9)).eraseDups.length == (unitsMod 9).length &&
|
|
101
|
-
((unitsMod 9).map (fun b => a * b % 9)).all (fun x => (unitsMod 9).contains x)) ∧
|
|
102
|
-
(unitsMod 9).all (fun b =>
|
|
103
|
-
((unitsMod 9).map (fun a => a * b % 9)).eraseDups.length == (unitsMod 9).length &&
|
|
104
|
-
((unitsMod 9).map (fun a => a * b % 9)).all (fun x => (unitsMod 9).contains x)) := by decide
|
|
105
|
-
|
|
106
|
-
-- ── the count of primitive roots is φ(φ(n)), wherever a primitive root exists at all ────────────────────
|
|
107
|
-
-- Range 2…60, because the row it carries says "over the moduli up to 60" and 18 is not 60. The theorem
|
|
108
|
-
-- moved to the claim rather than the claim being read down to the theorem.
|
|
109
|
-
set_option maxRecDepth 2000000 in
|
|
110
|
-
set_option maxHeartbeats 2000000 in
|
|
111
|
-
theorem the_count_of_primitive_roots_is_phi_of_phi :
|
|
112
|
-
(List.range' 2 59).all (fun n => !(hasPrimitiveRoot n) ||
|
|
113
|
-
((unitsMod n).filter (fun g => ordMod g n == (unitsMod n).length)).length == totient (totient n)) := by decide
|
|
114
|
-
|
|
115
|
-
-- ── the order spectrum realises Gauss's divisor sum: φ(d) units of order d, and the φ's sum to the group ─
|
|
116
|
-
-- The divisors are computed, not listed: a typed [1, 2, 3, 6] would be the answer written into the
|
|
117
|
-
-- question, and the second conjunct is Σ_{d | 6} φ(d) = 6, which is the statement the first one realises.
|
|
118
|
-
theorem the_order_spectrum_of_the_z9_units_realises_gauss_divisor_sum :
|
|
119
|
-
((List.range' 1 6).filter (fun d => 6 % d == 0)).all (fun d =>
|
|
120
|
-
((unitsMod 9).filter (fun g => ordMod g 9 == d)).length == totient d) ∧
|
|
121
|
-
(((List.range' 1 6).filter (fun d => 6 % d == 0)).map totient).foldl (· + ·) 0 = 6 := by decide
|
|
122
|
-
|
|
123
|
-
-- ── Gauss's generalisation of Wilson: the product of the units is −1 exactly where a primitive root exists,
|
|
124
|
-
-- and +1 everywhere else. Wilson's theorem is the prime case of this, and the split is Gauss's. ────────
|
|
125
|
-
set_option maxRecDepth 2000000 in
|
|
126
|
-
set_option maxHeartbeats 2000000 in
|
|
127
|
-
theorem the_product_of_the_units_is_minus_one_exactly_where_gauss_says :
|
|
128
|
-
(List.range' 2 59).all (fun n =>
|
|
129
|
-
((unitsMod n).foldl (fun a u => a * u % n) 1) == (if gaussCyclic n then n - 1 else 1)) := by decide
|
|
130
|
-
|
|
131
|
-
-- ── three is a primitive root mod seven, and seven is six units plus the one non-unit ────────────────────
|
|
132
|
-
theorem three_is_a_primitive_root_mod_seven_and_seven_is_six_plus_one :
|
|
133
|
-
ordMod 3 7 = 6 ∧ (unitsMod 7).length = 6 ∧ (List.range 7).length = (unitsMod 7).length + 1 := by decide
|
|
134
|
-
|
|
135
|
-
-- ── the order-six unit group splits as a reflection times a trinity ──────────────────────────────────────
|
|
136
|
-
-- u ↦ (u³, u⁴) is the splitting, and it works because 3 + 4 = 7 ≡ 1 in the exponent group of order six.
|
|
137
|
-
-- The two factors have two and three values, which is the C2 × C3 the Chinese remainder theorem predicts.
|
|
138
|
-
theorem the_z9_unit_group_splits_as_reflection_times_trinity :
|
|
139
|
-
(unitsMod 9).all (fun u => powMod u 3 9 * powMod u 4 9 % 9 == u) ∧
|
|
140
|
-
((unitsMod 9).map (fun u => powMod u 3 9)).eraseDups.length = 2 ∧
|
|
141
|
-
((unitsMod 9).map (fun u => powMod u 4 9)).eraseDups.length = 3 := by decide
|
|
142
|
-
|
|
143
|
-
-- ── A SIXTH WAVE, AND THE RULE THAT DECIDES WHICH OF THEM CARRY A LEDGER ROW ────────────────────────────
|
|
144
|
-
--
|
|
145
|
-
-- A bounded theorem carries an unbounded claim only when the ROW ITSELF states its bound. "Verified for
|
|
146
|
-
-- all primes ≤ 100" is a claim a range can settle; "for every Pythagorean triple" is not, however wide
|
|
147
|
-
-- the range. Both kinds are worth proving and only the first kind is carried, which is why some of the
|
|
148
|
-
-- theorems below have no carry beside them in scripts/recover.ts.
|
|
149
|
-
|
|
150
|
-
def invUnit (u : Nat) : Nat := ((List.range 9).find? (fun e => u * e % 9 == 1)).getD 0
|
|
151
|
-
|
|
152
|
-
-- ── Fermat, at the primes: a sum of two squares exactly at 2 and the primes one mod four ────────────────
|
|
153
|
-
set_option maxRecDepth 2000000 in
|
|
154
|
-
theorem an_odd_prime_is_a_sum_of_two_squares_exactly_when_it_is_one_mod_four :
|
|
155
|
-
isSumOfTwoSquares 2 ∧
|
|
156
|
-
((List.range' 3 197).filter isPrime).all (fun p => isSumOfTwoSquares p == (p % 4 == 1)) := by decide
|
|
157
|
-
|
|
158
|
-
-- ── the area of an integer right triangle is a multiple of six ──────────────────────────────────────────
|
|
159
|
-
set_option maxRecDepth 2000000 in
|
|
160
|
-
set_option maxHeartbeats 2000000 in
|
|
161
|
-
theorem the_area_of_an_integer_right_triangle_is_a_multiple_of_six :
|
|
162
|
-
(List.range' 1 40).all (fun a => (List.range' 1 40).all (fun b =>
|
|
163
|
-
!((List.range' 1 60).any (fun c => a * a + b * b == c * c)) || (a * b / 2) % 6 == 0)) := by decide
|
|
164
|
-
|
|
165
|
-
-- ── the inverse map permutes the units and is its own inverse ───────────────────────────────────────────
|
|
166
|
-
theorem the_inverse_map_permutes_the_units_and_is_an_involution :
|
|
167
|
-
((unitsMod 9).map invUnit).eraseDups.length = (unitsMod 9).length ∧
|
|
168
|
-
((unitsMod 9).map invUnit).all (fun x => (unitsMod 9).contains x) ∧
|
|
169
|
-
(unitsMod 9).all (fun u => invUnit (invUnit u) == u) := by decide
|
|
170
|
-
|
|
171
|
-
-- ── the hockey stick: a diagonal run of binomials folds into the entry just past its end ────────────────
|
|
172
|
-
set_option maxRecDepth 2000000 in
|
|
173
|
-
theorem the_hockey_stick_identity_holds_across_the_range :
|
|
174
|
-
(List.range 11).all (fun r => (List.range 19).all (fun m =>
|
|
175
|
-
((List.range' r (m + 1)).map (fun i => choose i r)).foldl (· + ·) 0 == choose (r + m + 1) (r + 1))) := by decide
|
|
176
|
-
|
|
177
|
-
-- ── three is the only prime one less than a square, and the reason is the factorisation ─────────────────
|
|
178
|
-
-- n² − 1 = (n−1)(n+1), and above n = 2 both factors exceed one. Decided over a range; the row claims it
|
|
179
|
-
-- for every n, so the range does not carry it — the factorisation is the general argument and this is
|
|
180
|
-
-- the check that the argument has no small counterexample.
|
|
181
|
-
theorem three_is_the_only_prime_one_less_than_a_square_in_this_range :
|
|
182
|
-
((List.range' 2 40).filter (fun n => isPrime (n * n - 1))) = [2] ∧
|
|
183
|
-
(List.range' 3 39).all (fun n => (n - 1) * (n + 1) == n * n - 1 && n - 1 > 1) := by decide
|
|
184
|
-
|
|
185
|
-
-- ── eight triangular numbers and one make an odd square ─────────────────────────────────────────────────
|
|
186
|
-
theorem eight_times_a_triangular_number_plus_one_is_an_odd_square :
|
|
187
|
-
(List.range 60).all (fun n => 8 * (n * (n + 1) / 2) + 1 == (2 * n + 1) * (2 * n + 1)) := by decide
|
|
188
|
-
|
|
189
|
-
-- ── the vortex and the rosette carry the same group: 2^k mod 9 ↦ 3^k mod 7 is an isomorphism ────────────
|
|
190
|
-
-- Both power maps are bijections onto their unit groups, and the map through the exponent sends a
|
|
191
|
-
-- product to a product — which is what "preserves multiplication" means, stated rather than assumed
|
|
192
|
-
-- from both groups merely having six elements.
|
|
193
|
-
theorem the_powers_of_two_mod_nine_and_of_three_mod_seven_are_isomorphic :
|
|
194
|
-
((List.range 6).map (fun k => powMod 2 k 9)).eraseDups.length = 6 ∧
|
|
195
|
-
((List.range 6).map (fun k => powMod 3 k 7)).eraseDups.length = 6 ∧
|
|
196
|
-
((List.range 6).map (fun k => powMod 2 k 9)).all (fun x => (unitsMod 9).contains x) ∧
|
|
197
|
-
((List.range 6).map (fun k => powMod 3 k 7)).all (fun x => (unitsMod 7).contains x) ∧
|
|
198
|
-
(List.range 6).all (fun i => (List.range 6).all (fun j =>
|
|
199
|
-
powMod 2 i 9 * powMod 2 j 9 % 9 == powMod 2 ((i + j) % 6) 9 &&
|
|
200
|
-
powMod 3 i 7 * powMod 3 j 7 % 7 == powMod 3 ((i + j) % 6) 7)) := by decide
|
|
201
|
-
|
|
202
|
-
-- ── LUCAS, PELL, AND THE FAREY SEQUENCE ─────────────────────────────────────────────────────────────────
|
|
203
|
-
|
|
204
|
-
def lucasPair : Nat → Nat × Nat
|
|
205
|
-
| 0 => (2, 1)
|
|
206
|
-
| Nat.succ n => let (a, b) := lucasPair n; (b, a + b)
|
|
207
|
-
def lucas (n : Nat) : Nat := (lucasPair n).1
|
|
208
|
-
|
|
209
|
-
def pellPair : Nat → Nat × Nat
|
|
210
|
-
| 0 => (0, 1)
|
|
211
|
-
| Nat.succ n => let (a, b) := pellPair n; (b, 2 * b + a)
|
|
212
|
-
def pell (n : Nat) : Nat := (pellPair n).1
|
|
213
|
-
|
|
214
|
-
/-- a/b ≤ c/d without division, which over Nat would truncate and decide the wrong order -/
|
|
215
|
-
def leFrac (x y : Nat × Nat) : Bool := x.1 * y.2 ≤ y.1 * x.2
|
|
216
|
-
def insFrac (x : Nat × Nat) : List (Nat × Nat) → List (Nat × Nat)
|
|
217
|
-
| [] => [x]
|
|
218
|
-
| y :: ys => if leFrac x y then x :: y :: ys else y :: insFrac x ys
|
|
219
|
-
def sortFrac : List (Nat × Nat) → List (Nat × Nat)
|
|
220
|
-
| [] => []
|
|
221
|
-
| x :: xs => insFrac x (sortFrac xs)
|
|
222
|
-
/-- the Farey sequence of order n: every reduced a/b in [0,1] with b ≤ n, in order -/
|
|
223
|
-
def farey (n : Nat) : List (Nat × Nat) :=
|
|
224
|
-
sortFrac (((List.range' 1 n).flatMap (fun b =>
|
|
225
|
-
(List.range (b + 1)).map (fun a => (a, b)))).filter (fun x => gcd' x.1 x.2 == 1))
|
|
226
|
-
|
|
227
|
-
-- ── the Lucas numbers: the recurrence, and the two values the row names ─────────────────────────────────
|
|
228
|
-
theorem the_lucas_numbers_follow_their_recurrence_and_reach_their_named_values :
|
|
229
|
-
lucas 0 = 2 ∧ lucas 1 = 1 ∧ lucas 5 = 11 ∧ lucas 7 = 29 ∧
|
|
230
|
-
(List.range' 2 28).all (fun n => lucas n == lucas (n - 1) + lucas (n - 2)) := by decide
|
|
231
|
-
|
|
232
|
-
-- ── and Lucas is Fibonacci's neighbours added: L(n) = F(n−1) + F(n+1) ───────────────────────────────────
|
|
233
|
-
-- Two independently defined sequences meeting, which is more than either recurrence says on its own.
|
|
234
|
-
theorem the_lucas_numbers_are_the_sum_of_the_neighbouring_fibonaccis :
|
|
235
|
-
(List.range' 1 28).all (fun n => lucas n == fib (n - 1) + fib (n + 1)) := by decide
|
|
236
|
-
|
|
237
|
-
-- ── the Pell numbers: doubling recurrence, and the two values the row names ─────────────────────────────
|
|
238
|
-
theorem the_pell_numbers_follow_their_recurrence_and_reach_their_named_values :
|
|
239
|
-
pell 5 = 29 ∧ pell 6 = 70 ∧
|
|
240
|
-
(List.range' 2 24).all (fun n => pell n == 2 * pell (n - 1) + pell (n - 2)) := by decide
|
|
241
|
-
|
|
242
|
-
-- ── Farey: neighbours have unit determinant, and their mediant falls strictly between them ──────────────
|
|
243
|
-
-- F_4 for the determinant and F_6 for the mediant, which are the two rows this carries. Both statements
|
|
244
|
-
-- are cross-multiplied rather than divided: a/b < c/d is a·d < c·b, and Nat division would truncate the
|
|
245
|
-
-- comparison into agreeing with itself.
|
|
246
|
-
set_option maxRecDepth 2000000 in
|
|
247
|
-
theorem consecutive_farey_neighbours_have_unit_determinant_and_bracket_their_mediant :
|
|
248
|
-
(List.range ((farey 4).length - 1)).all (fun i =>
|
|
249
|
-
let x := (farey 4).getD i (0, 1); let y := (farey 4).getD (i + 1) (0, 1)
|
|
250
|
-
x.2 * y.1 == x.1 * y.2 + 1) ∧
|
|
251
|
-
(List.range ((farey 6).length - 1)).all (fun i =>
|
|
252
|
-
let x := (farey 6).getD i (0, 1); let y := (farey 6).getD (i + 1) (0, 1)
|
|
253
|
-
let m := (x.1 + y.1, x.2 + y.2)
|
|
254
|
-
x.1 * m.2 < m.1 * x.2 && m.1 * y.2 < y.1 * m.2) := by decide
|
|
255
|
-
|
|
256
|
-
-- ── IS THIS SPACE VERTEX-TRANSITIVE? A PEER SESSION ASKED, AND THE ANSWER IS HALF YES ───────────────────
|
|
257
|
-
--
|
|
258
|
-
-- A session working on zeropoint-node found a vertex-transitive structure — 6-bit cells doubled by a
|
|
259
|
-
-- polarity bit, 128 states each with 12 neighbours — and offered the mechanism: a sign or orientation bit
|
|
260
|
-
-- carried as METADATA rather than as part of the state may, when folded in, double the neighbourhood and
|
|
261
|
-
-- buy uniform degree. Their suggested test was to compute the degree of every state and see whether the
|
|
262
|
-
-- set of degrees has one element. That is decidable here, so it was computed rather than considered.
|
|
263
|
-
--
|
|
264
|
-
-- The answer is that the mechanism does not apply to this ring, and the reason is a fact this deposit
|
|
265
|
-
-- already decides. Over the whole of ℤ/9 the degrees are not uniform and folding a polarity bit in does
|
|
266
|
-
-- not make them so: the obstruction is the triad, which doubling and reflection cannot move off itself.
|
|
267
|
-
-- Over the UNITS the graph is regular — but it was already regular before any polarity was added, so
|
|
268
|
-
-- nothing was bought. A mechanism that would have been credited for a property already present is worth
|
|
269
|
-
-- saying out loud, because that is how a true story attaches itself to the wrong cause.
|
|
270
|
-
|
|
271
|
-
/-- the deposit's own maps, as an adjacency: doubling, its inverse, and the reflection -/
|
|
272
|
-
def nbrs (S : List Nat) (d : Nat) : List Nat :=
|
|
273
|
-
([(2 * d) % 9, (5 * d) % 9, (9 - d) % 9].filter (fun t => S.contains t && t != d)).eraseDups
|
|
274
|
-
def degreeSet (S : List Nat) : List Nat := (S.map (fun d => (nbrs S d).length)).eraseDups
|
|
275
|
-
|
|
276
|
-
-- ── on the units the graph is regular: every unit has exactly three neighbours ──────────────────────────
|
|
277
|
-
theorem the_units_are_three_regular_under_doubling_halving_and_reflection :
|
|
278
|
-
degreeSet (unitsMod 9) = [3] := by decide
|
|
279
|
-
|
|
280
|
-
-- ── and on the whole ring it is not, with the triad as the exact obstruction ────────────────────────────
|
|
281
|
-
-- Zero is fixed by all three maps and has no neighbours at all; three and six see only each other. The
|
|
282
|
-
-- degree set has more than one element, which is the test the peer proposed, answered in the negative.
|
|
283
|
-
theorem the_whole_ring_is_not_regular_and_the_triad_is_why :
|
|
284
|
-
degreeSet (List.range 9) ≠ [3] ∧
|
|
285
|
-
(nbrs (List.range 9) 0).length = 0 ∧
|
|
286
|
-
([3, 6] : List Nat).all (fun d => (nbrs (List.range 9) d).length == 1) := by decide
|
|
287
|
-
|
|
288
|
-
-- ── FOUR CLAIMS THE LEDGER HELD AND ONE ORPHANED THEOREM RESTORED PROPERLY ──────────────────────────────
|
|
289
|
-
|
|
290
|
-
/-- integer square root by search: the largest s with s² ≤ n, over a range wide enough for the uses below -/
|
|
291
|
-
def isqrt (n : Nat) : Nat := ((List.range 200).filter (fun s => s * s ≤ n)).getLast? |>.getD 0
|
|
292
|
-
|
|
293
|
-
/-- ⌊nφ⌋ and ⌊nφ²⌋ without leaving the naturals: φ = (1 + √5)/2, so nφ = (n + √(5n²))/2 exactly -/
|
|
294
|
-
def lowerWythoff (n : Nat) : Nat := (n + isqrt (5 * n * n)) / 2
|
|
295
|
-
def upperWythoff (n : Nat) : Nat := (3 * n + isqrt (5 * n * n)) / 2
|
|
296
|
-
|
|
297
|
-
/-- the knight's steps, DERIVED: offsets in −2…2 written as 0…4, kept when |dr|·|dc| = 2 -/
|
|
298
|
-
def knightSteps : List (Nat × Nat) :=
|
|
299
|
-
((List.range 5).flatMap (fun a => (List.range 5).map (fun b => (a, b)))).filter (fun p =>
|
|
300
|
-
(if p.1 ≥ 2 then p.1 - 2 else 2 - p.1) * (if p.2 ≥ 2 then p.2 - 2 else 2 - p.2) == 2)
|
|
301
|
-
|
|
302
|
-
/-- the partitions of n into non-increasing parts, enumerated — fuel because n − j is not structural -/
|
|
303
|
-
def partsF : Nat → Nat → Nat → List (List Nat)
|
|
304
|
-
| 0, _, _ => []
|
|
305
|
-
| _, 0, _ => [[]]
|
|
306
|
-
| Nat.succ f, n, k => (List.range' 1 (min n k)).flatMap (fun j => (partsF f (n - j) j).map (fun l => j :: l))
|
|
307
|
-
def partitionsOf (n : Nat) : List (List Nat) := partsF (n + 1) n n
|
|
308
|
-
|
|
309
|
-
/-- restricted growth strings: one per set partition of {0…n−1}, which is what the Bell numbers count -/
|
|
310
|
-
def rgs : Nat → List (List Nat)
|
|
311
|
-
| 0 => [[]]
|
|
312
|
-
| Nat.succ n => (rgs n).flatMap (fun p =>
|
|
313
|
-
(List.range ((p.foldl (fun a x => if x > a then x else a) 0) + (if p.isEmpty then 1 else 2))).map (fun v => p ++ [v]))
|
|
314
|
-
/-- the Bell triangle, built row by row. The textbook recurrence B(n+1) = Σ C(n,k)·B(n−k) recurses on
|
|
315
|
-
`n − k`, which is not structural: Lean falls back to well-founded recursion, `decide` gets stuck on the
|
|
316
|
-
unreduced instance, and the equation lemmas would pull `propext` in and cost this file its axiom-free
|
|
317
|
-
standing. The triangle is structural on the row index and computes the same numbers. -/
|
|
318
|
-
def bellRow : Nat → List Nat
|
|
319
|
-
| 0 => [1]
|
|
320
|
-
| Nat.succ n =>
|
|
321
|
-
let prev := bellRow n
|
|
322
|
-
(List.range (prev.length + 1)).foldl (fun acc i =>
|
|
323
|
-
acc ++ [if i == 0 then prev.getLastD 0 else acc.getD (i - 1) 0 + prev.getD (i - 1) 0]) []
|
|
324
|
-
def bellOf (n : Nat) : Nat := (bellRow n).headD 0
|
|
325
|
-
|
|
326
|
-
-- ── the exterior angles of any regular polygon sum to a full turn ───────────────────────────────────────
|
|
327
|
-
-- `geom_exterior_360` was orphaned holding `[3,5,8].all (fun n => n * (360 / n) == 360)`, which is true
|
|
328
|
-
-- only because 3, 5 and 8 happen to divide 360 — a statement about integer division wearing a geometry
|
|
329
|
-
-- name. The interior angles of an n-gon sum to (n−2)·180 and the exterior to 360, and together they are
|
|
330
|
-
-- n straight angles. That identity needs no division and holds at every n.
|
|
331
|
-
theorem the_interior_and_exterior_angles_are_n_straight_angles :
|
|
332
|
-
(List.range' 3 30).all (fun n => (n - 2) * 180 + 360 == n * 180) ∧
|
|
333
|
-
180 * (3 - 2) / 3 = 60 ∧ 180 * (5 - 2) / 5 = 108 ∧ 180 * (8 - 2) / 8 = 135 := by decide
|
|
334
|
-
|
|
335
|
-
-- ── a knight has exactly eight leaps, and every one changes the colour of its square ────────────────────
|
|
336
|
-
-- Colour is the parity of row + column, and the offsets are written as 0…4 for −2…2. |a−2| ≡ a (mod 2),
|
|
337
|
-
-- so the parity of the shifted pair is the parity of the real step — the check is not an artefact of
|
|
338
|
-
-- the encoding.
|
|
339
|
-
theorem a_knight_has_exactly_eight_leaps_and_every_one_flips_the_colour :
|
|
340
|
-
knightSteps.length = 8 ∧ knightSteps.eraseDups.length = 8 ∧
|
|
341
|
-
knightSteps.all (fun p => (p.1 + p.2) % 2 == 1) := by decide
|
|
342
|
-
|
|
343
|
-
-- ── the Wythoff pair: ⌊nφ²⌋ − ⌊nφ⌋ = n, the golden Beatty identity ──────────────────────────────────────
|
|
344
|
-
theorem the_golden_beatty_identity_holds_across_the_range :
|
|
345
|
-
(List.range' 1 40).all (fun n => upperWythoff n - lowerWythoff n == n) := by decide
|
|
346
|
-
|
|
347
|
-
-- ── and the two sequences PARTITION the positive integers: every m up to fifty is hit by exactly one of the
|
|
348
|
-
-- lower and upper Wythoff sequences, never both, never neither (Beatty's theorem, 1926, at φ and φ²). The
|
|
349
|
-
-- identity above says how the two are paired; this says the pairing loses and duplicates nothing ──
|
|
350
|
-
set_option maxRecDepth 2000000 in
|
|
351
|
-
theorem the_wythoff_sequences_partition_the_integers :
|
|
352
|
-
(List.range' 1 50).all (fun m =>
|
|
353
|
-
((List.range' 1 40).map lowerWythoff).count m + ((List.range' 1 40).map upperWythoff).count m == 1) := by decide
|
|
354
|
-
|
|
355
|
-
-- ── the partition numbers count the partitions, and the Bell numbers count the set partitions ───────────
|
|
356
|
-
-- Both are checked against an ENUMERATION of the objects rather than against another recurrence, which
|
|
357
|
-
-- is the difference between confirming a formula and confirming what it counts.
|
|
358
|
-
set_option maxRecDepth 2000000 in
|
|
359
|
-
theorem the_partition_and_bell_numbers_count_what_they_claim_to_count :
|
|
360
|
-
(partitionsOf 5).length = 7 ∧ (partitionsOf 7).length = 15 ∧ (partitionsOf 10).length = 42 ∧
|
|
361
|
-
(List.range 6).all (fun n => (rgs n).length == bellOf n) ∧
|
|
362
|
-
bellOf 3 = 5 ∧ bellOf 4 = 15 ∧ bellOf 5 = 52 := by decide
|
|
363
|
-
|
|
364
|
-
-- ── WHICH GRAPH, NOT JUST WHAT DEGREE — THE TEST A PEER'S MISTAKE MADE ME RUN ───────────────────────────
|
|
365
|
-
--
|
|
366
|
-
-- The zeropoint-node session came back with two corrections to its own result. The first was the one I
|
|
367
|
-
-- had asked for: its undoubled structure was already vertex-transitive, so the polarity bought nothing.
|
|
368
|
-
-- The second it found on its own and is worse — it had counted TWELVE neighbours and called the
|
|
369
|
-
-- structure a vector equilibrium, and then counted the edges AMONG those twelve and found zero. A
|
|
370
|
-
-- cuboctahedron's twelve vertices carry twenty-four edges between them. It had the vertex count of the
|
|
371
|
-
-- solid and none of its geometry: a name fitted to a count.
|
|
372
|
-
--
|
|
373
|
-
-- `the_units_are_three_regular_…` above proves a DEGREE and nothing else, which is exactly the shape of
|
|
374
|
-
-- that error waiting to happen here. So the same test, run on this ring: what is the neighbourhood of a
|
|
375
|
-
-- unit, and does it carry any edges?
|
|
376
|
-
--
|
|
377
|
-
-- It carries none. Every unit's three neighbours are mutually non-adjacent, so this graph is
|
|
378
|
-
-- triangle-free and has no local geometry either — and the reason is structural rather than accidental.
|
|
379
|
-
-- The neighbourhood of a unit is EXACTLY the opposite tetrahedron: doubling, halving and reflection all
|
|
380
|
-
-- carry a residue across the mod-3 classes, so the graph is the complete bipartite one between them.
|
|
381
|
-
-- The merkaba's two tetrahedra, which this deposit already decides are exchanged by doubling, turn out
|
|
382
|
-
-- to be the bipartition. Nothing here is a solid; it is K(3,3) wearing the ring's own split.
|
|
383
|
-
|
|
384
|
-
/-- the two tetrahedra, DERIVED as the mod-3 classes of the units rather than written out -/
|
|
385
|
-
def tetOf (r : Nat) : List Nat := (unitsMod 9).filter (fun d => d % 3 == r)
|
|
386
|
-
|
|
387
|
-
theorem the_unit_graph_is_complete_bipartite_between_the_two_tetrahedra :
|
|
388
|
-
(tetOf 1).length = 3 ∧ (tetOf 2).length = 3 ∧
|
|
389
|
-
(tetOf 1).all (fun d => (nbrs (unitsMod 9) d).length == 3 &&
|
|
390
|
-
(nbrs (unitsMod 9) d).all (fun t => (tetOf 2).contains t)) ∧
|
|
391
|
-
(tetOf 2).all (fun d => (nbrs (unitsMod 9) d).length == 3 &&
|
|
392
|
-
(nbrs (unitsMod 9) d).all (fun t => (tetOf 1).contains t)) ∧
|
|
393
|
-
-- and every neighbourhood is an INDEPENDENT set: three vertices, no edge among them
|
|
394
|
-
(unitsMod 9).all (fun d => (nbrs (unitsMod 9) d).all (fun x =>
|
|
395
|
-
(nbrs (unitsMod 9) d).all (fun y => x == y || !((nbrs (unitsMod 9) x).contains y)))) := by decide
|
|
396
|
-
|
|
397
|
-
-- ── what these settle ──
|
|
398
|
-
def settledHere : Nat := 32
|
|
399
|
-
theorem elementary_settles_its_range : settledHere = 32 := rfl
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
-- ── the capped rows above, proved for every value — no bound ──────────────────────────────────────────────────
|
|
403
|
-
-- the_interior_and_exterior_angles_are_n_straight_angles checked 3 ≤ n ≤ 32; this proves it for every n ≥ 2.
|
|
404
|
-
theorem the_interior_and_exterior_angles_are_n_straight_angles_for_every_n :
|
|
405
|
-
∀ n : Nat, 2 ≤ n → (n - 2) * 180 + 360 = n * 180 := by
|
|
406
|
-
intro n h
|
|
407
|
-
omega
|
|
408
|
-
|
|
409
|
-
theorem a_product_of_consecutive_numbers_is_even : ∀ n : Nat, n * (n + 1) % 2 = 0 := by
|
|
410
|
-
intro n
|
|
411
|
-
rcases Nat.mod_two_eq_zero_or_one n with h | h <;> simp [Nat.mul_mod, Nat.add_mod, h]
|
|
412
|
-
|
|
413
|
-
-- eight_times_a_triangular_number_plus_one_is_an_odd_square checked n < 60; this proves it for every n.
|
|
414
|
-
theorem eight_times_a_triangular_number_plus_one_is_an_odd_square_for_every_n :
|
|
415
|
-
∀ n : Nat, 8 * (n * (n + 1) / 2) + 1 = (2 * n + 1) * (2 * n + 1) := by
|
|
416
|
-
intro n
|
|
417
|
-
have hdiv : n * (n + 1) / 2 * 2 = n * (n + 1) :=
|
|
418
|
-
Nat.div_mul_cancel (Nat.dvd_of_mod_eq_zero (a_product_of_consecutive_numbers_is_even n))
|
|
419
|
-
have hexp : (2 * n + 1) * (2 * n + 1) = 4 * (n * (n + 1)) + 1 := by
|
|
420
|
-
rw [Nat.mul_add n n 1, Nat.mul_one, Nat.add_mul, Nat.mul_add, Nat.mul_add, Nat.mul_one, Nat.one_mul]
|
|
421
|
-
rw [Nat.mul_assoc 2 n (2 * n), Nat.mul_comm n (2 * n), Nat.mul_assoc 2 n n]
|
|
422
|
-
omega
|
|
423
|
-
rw [hexp]
|
|
424
|
-
omega
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
-- ── the capped row above, proved for every value — no bound ──────────────────────────────────────────────────
|
|
428
|
-
-- the_lucas_numbers_are_the_sum_of_the_neighbouring_fibonaccis was checked n ≤ 28; this proves it for every n.
|
|
429
|
-
theorem the_lucas_numbers_are_the_sum_of_the_neighbouring_fibonaccis_for_every_n :
|
|
430
|
-
∀ n : Nat, lucas (n + 1) = fib n + fib (n + 2) := by
|
|
431
|
-
have key : ∀ n : Nat, lucas (n + 1) = fib n + fib (n + 2) ∧ lucas (n + 2) = fib (n + 1) + fib (n + 3) := by
|
|
432
|
-
intro n
|
|
433
|
-
induction n with
|
|
434
|
-
| zero => decide
|
|
435
|
-
| succ n ih =>
|
|
436
|
-
refine ⟨ih.2, ?_⟩
|
|
437
|
-
have l : lucas (n + 3) = lucas (n + 1) + lucas (n + 2) := rfl
|
|
438
|
-
have f4 : fib (n + 4) = fib (n + 2) + fib (n + 3) := rfl
|
|
439
|
-
have f2 : fib (n + 2) = fib n + fib (n + 1) := rfl
|
|
440
|
-
show lucas (n + 3) = fib (n + 2) + fib (n + 4)
|
|
441
|
-
rw [l, ih.1, ih.2, f4]
|
|
442
|
-
omega
|
|
443
|
-
intro n
|
|
444
|
-
exact (key n).1
|
|
445
|
-
|
|
446
|
-
end Elementary
|