@ceccec/millennium-solutions 9.2.6 → 9.2.8
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/ACCOUNTING.md +6 -6
- package/AXIOMS.md +10 -10
- package/CHALLENGES.md +75 -3
- package/PRIOR-ART.md +19 -19
- package/README.md +27 -27
- package/dashboard.md +1 -1
- package/forensic.md +4 -4
- package/index.md +27 -27
- package/package.json +1 -1
- package/paper.md +892 -596
- package/speedup.md +4 -4
- package/src/proof/demand2.lean +36 -0
- package/src/proof/discovered.json +180 -0
- package/src/proof/elementary.lean +20 -0
- package/src/proof/families.lean +166 -0
- package/src/proof/light.lean +8 -0
- package/src/proof/mechanical.lean +69 -0
- package/src/proof/reach.lean +13 -0
- package/src/proof/sequences.lean +31 -0
- package/src/proof/trial-all.json +216 -0
- package/src/proof/z9plus.lean +92 -0
package/speedup.md
CHANGED
|
@@ -7,7 +7,7 @@ head:
|
|
|
7
7
|
|
|
8
8
|
# The real uuidna advantage — measured, in all domains
|
|
9
9
|
|
|
10
|
-
> Generated from the **
|
|
10
|
+
> Generated from the **2643** ledger entries and **59** domains, recomputed each build. The advantage is
|
|
11
11
|
> real and **measured**, and honestly bounded: a **verification and reuse** complexity reduction — **not**
|
|
12
12
|
> faster original compute, **not** faster than light, **not** quantum.
|
|
13
13
|
|
|
@@ -33,9 +33,9 @@ theorems verify in `⌈log₂N⌉`. So one proof covers the whole [rosetta](/):
|
|
|
33
33
|
|
|
34
34
|
## Discovery lead — a lead, never a verdict
|
|
35
35
|
|
|
36
|
-
Grouping the
|
|
37
|
-
**3** (
|
|
38
|
-
at **
|
|
36
|
+
Grouping the 2643 receipts by the digital root of their address, the **sparsest** region is digit
|
|
37
|
+
**3** (268) — a candidate area to examine, not a finding. The ledger is currently held
|
|
38
|
+
at **2643** (the captain's cap): improving a theorem's name or proof heals the record without changing the
|
|
39
39
|
count; discovering a new one would require lifting the cap.
|
|
40
40
|
|
|
41
41
|
A content-address proves **integrity, not truth**.
|
package/src/proof/demand2.lean
CHANGED
|
@@ -168,4 +168,40 @@ theorem two_twenty_and_two_eighty_four_are_the_smallest_amicable_pair :
|
|
|
168
168
|
(List.range' 2 218).all (fun a => ¬ (aliquot (aliquot a) == a && ¬ (aliquot a == a))) ∧
|
|
169
169
|
(List.range' 2 218).filter (fun a => aliquot a == a) = [6, 28] := by decide
|
|
170
170
|
|
|
171
|
+
|
|
172
|
+
-- ── the capped rows above, proved for every value — no bound ─────────────────────────────────────────────────
|
|
173
|
+
-- sumPow is Families.powSum written as a single fold, so the Faulhaber laws proved there carry
|
|
174
|
+
-- nicomachus_sum_of_cubes_is_the_square_of_the_triangular_number (n ≤ 40) and
|
|
175
|
+
-- the_sum_of_fifth_powers_has_the_closed_form_asked_for (n ≤ 20) to every n.
|
|
176
|
+
theorem the_two_power_sums_are_one_sum : ∀ p n : Nat, sumPow p n = powSum p n := by
|
|
177
|
+
intro p n
|
|
178
|
+
unfold sumPow powSum
|
|
179
|
+
rw [List.foldl_map]
|
|
180
|
+
|
|
181
|
+
theorem nicomachus_sum_of_cubes_is_the_square_of_the_triangular_number_for_every_n :
|
|
182
|
+
∀ n : Nat, sumPow 3 n = tri n * tri n := by
|
|
183
|
+
intro n
|
|
184
|
+
have c := the_cubes_sum_to_their_closed_form_for_every_n n
|
|
185
|
+
rw [← the_two_power_sums_are_one_sum] at c
|
|
186
|
+
have ev : n * (n + 1) % 2 = 0 := by
|
|
187
|
+
rcases Nat.mod_two_eq_zero_or_one n with e | e <;> simp [Nat.mul_mod, Nat.add_mod, e]
|
|
188
|
+
have hd : n * (n + 1) / 2 * 2 = n * (n + 1) := Nat.div_mul_cancel (Nat.dvd_of_mod_eq_zero ev)
|
|
189
|
+
unfold tri
|
|
190
|
+
generalize n * (n + 1) / 2 = t at hd ⊢
|
|
191
|
+
generalize sumPow 3 n = s at c ⊢
|
|
192
|
+
have q : 4 * s = 4 * (t * t) := by
|
|
193
|
+
have hsq : (t * 2) * (t * 2) = (n * (n + 1)) * (n * (n + 1)) := by rw [hd]
|
|
194
|
+
clear hd ev
|
|
195
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
196
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
197
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
198
|
+
all_goals omega
|
|
199
|
+
exact Nat.eq_of_mul_eq_mul_left (by decide) q
|
|
200
|
+
|
|
201
|
+
theorem the_sum_of_fifth_powers_has_the_closed_form_for_every_n :
|
|
202
|
+
∀ n : Nat, 12 * sumPow 5 n = n * n * (n + 1) * (n + 1) * (2 * n * n + 2 * n - 1) := by
|
|
203
|
+
intro n
|
|
204
|
+
rw [the_two_power_sums_are_one_sum]
|
|
205
|
+
exact the_fifth_powers_sum_to_their_closed_form_for_every_n n
|
|
206
|
+
|
|
171
207
|
end Demand2
|
|
@@ -18786,5 +18786,185 @@
|
|
|
18786
18786
|
"key": "lean_split_the_coin_step_and_the_coins_are_inverse_for_every_c",
|
|
18787
18787
|
"name": "lean split.lean: the_coin_step_and_the_coins_are_inverse_for_every_c — ∀ c : Nat, 3 * c / 3 = c ∧ (3 * c) % 3 = 0 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18788
18788
|
"receipt": "1c1ebe41-4e80-80ad-b352-e90a09922838"
|
|
18789
|
+
},
|
|
18790
|
+
{
|
|
18791
|
+
"key": "lean_light_the_second_returns_from_the_metre_and_the_period_for_every_s",
|
|
18792
|
+
"name": "lean light.lean: the_second_returns_from_the_metre_and_the_period_for_every_s — ∀ s : Nat, travel s / c = s ∧ periods s / dNuCs = s — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18793
|
+
"receipt": "1de974bb-854a-879c-a8f0-712b59f8d7bc"
|
|
18794
|
+
},
|
|
18795
|
+
{
|
|
18796
|
+
"key": "lean_mechanical_repeated_doubling_is_the_power_of_two_for_every_k",
|
|
18797
|
+
"name": "lean mechanical.lean: repeated_doubling_is_the_power_of_two_for_every_k — ∀ k : Nat, dbl k = 2 ^ k — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18798
|
+
"receipt": "71d6eeaa-fd06-8af1-893f-dfa60297892d"
|
|
18799
|
+
},
|
|
18800
|
+
{
|
|
18801
|
+
"key": "lean_mechanical_relation_digitroot_is_residue_mod9_for_every_n",
|
|
18802
|
+
"name": "lean mechanical.lean: relation_digitroot_is_residue_mod9_for_every_n — ∀ n : Nat, 0 < n → DR n = (n - 1) % 9 + 1 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18803
|
+
"receipt": "22aed33c-e7ff-80ef-aded-b466c40bf0e4"
|
|
18804
|
+
},
|
|
18805
|
+
{
|
|
18806
|
+
"key": "lean_mechanical_the_nine_times_table_always_digital_roots_to_nine_for_every_k",
|
|
18807
|
+
"name": "lean mechanical.lean: the_nine_times_table_always_digital_roots_to_nine_for_every_k — ∀ k : Nat, 0 < k → DR (9 * k) = 9 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18808
|
+
"receipt": "36b3b4ea-25f1-8083-b075-d707f2fb91ea"
|
|
18809
|
+
},
|
|
18810
|
+
{
|
|
18811
|
+
"key": "lean_mechanical_the_digital_root_has_the_residue_of_its_number",
|
|
18812
|
+
"name": "lean mechanical.lean: the_digital_root_has_the_residue_of_its_number — ∀ n : Nat, DR n % 9 = n % 9 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18813
|
+
"receipt": "efc4383f-1f52-8cfc-9d4a-d291f4aa5bd4"
|
|
18814
|
+
},
|
|
18815
|
+
{
|
|
18816
|
+
"key": "lean_mechanical_a_digital_root_lies_between_one_and_nine",
|
|
18817
|
+
"name": "lean mechanical.lean: a_digital_root_lies_between_one_and_nine — ∀ n : Nat, 0 < n → 1 ≤ DR n ∧ DR n ≤ 9 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18818
|
+
"receipt": "298da32e-60d7-8bf9-9135-c6e904ae937f"
|
|
18819
|
+
},
|
|
18820
|
+
{
|
|
18821
|
+
"key": "lean_mechanical_casting_out_nines_is_multiplicative_for_every_a_b",
|
|
18822
|
+
"name": "lean mechanical.lean: casting_out_nines_is_multiplicative_for_every_a_b — ∀ a b : Nat, DR (a * b) = DR (DR a * DR b) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18823
|
+
"receipt": "58842a8d-45b2-8316-b9a6-440b595e6782"
|
|
18824
|
+
},
|
|
18825
|
+
{
|
|
18826
|
+
"key": "lean_mechanical_the_moduli_dimensions_are_three_g_minus_three_and_six_g_minus_six_for_every_g",
|
|
18827
|
+
"name": "lean mechanical.lean: the_moduli_dimensions_are_three_g_minus_three_and_six_g_minus_six_for_every_g — ∀ g : Nat, 3 * g - 3 = (6 * g - 6) / 2 ∧ 6 * g - 6 = 2 * (3 * g - 3) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18828
|
+
"receipt": "633ba212-336a-8600-90d6-836751f6b813"
|
|
18829
|
+
},
|
|
18830
|
+
{
|
|
18831
|
+
"key": "lean_reach_exhaustion_never_reaches_its_own_bound_for_every_n",
|
|
18832
|
+
"name": "lean reach.lean: exhaustion_never_reaches_its_own_bound_for_every_n — ∀ n : Nat, (List.range n).length = n ∧ n ∉ List.range n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18833
|
+
"receipt": "dfc2849f-3870-823b-ade5-f036c5f40166"
|
|
18834
|
+
},
|
|
18835
|
+
{
|
|
18836
|
+
"key": "lean_reach_the_successor_of_every_bound_lies_outside_for_every_n",
|
|
18837
|
+
"name": "lean reach.lean: the_successor_of_every_bound_lies_outside_for_every_n — ∀ n : Nat, n + 1 ∉ List.range n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18838
|
+
"receipt": "1113761c-4967-898e-a9d9-d836a27b42ae"
|
|
18839
|
+
},
|
|
18840
|
+
{
|
|
18841
|
+
"key": "lean_reach_doubling_the_domain_leaves_the_same_hole_for_every_n",
|
|
18842
|
+
"name": "lean reach.lean: doubling_the_domain_leaves_the_same_hole_for_every_n — ∀ n : Nat, 2 * n ∉ List.range (2 * n) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18843
|
+
"receipt": "f57338c8-104b-8058-90f6-b86622f64f86"
|
|
18844
|
+
},
|
|
18845
|
+
{
|
|
18846
|
+
"key": "lean_z9plus_doubling_has_period_six_for_every_k",
|
|
18847
|
+
"name": "lean z9plus.lean: doubling_has_period_six_for_every_k — ∀ k : Nat, pw 2 (k + 6) = pw 2 k — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18848
|
+
"receipt": "2c9ca8bc-08a6-87e8-ba10-0390547c7318"
|
|
18849
|
+
},
|
|
18850
|
+
{
|
|
18851
|
+
"key": "lean_z9plus_orbit_digital_roots_have_period_six_for_every_k",
|
|
18852
|
+
"name": "lean z9plus.lean: orbit_digital_roots_have_period_six_for_every_k — ∀ k : Nat, dr (pw 2 (k + 6)) = dr (pw 2 k) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18853
|
+
"receipt": "e88dfdf8-3c33-87c9-b480-65d2db2769ac"
|
|
18854
|
+
},
|
|
18855
|
+
{
|
|
18856
|
+
"key": "lean_z9plus_the_doubling_orbit_is_read_from_the_exponent_mod_six",
|
|
18857
|
+
"name": "lean z9plus.lean: the_doubling_orbit_is_read_from_the_exponent_mod_six — ∀ k : Nat, pw 2 k = pw 2 (k % 6) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18858
|
+
"receipt": "c688c966-b59f-8e39-91d8-fa1f9fc564a0"
|
|
18859
|
+
},
|
|
18860
|
+
{
|
|
18861
|
+
"key": "lean_z9plus_the_orbit_never_meets_the_triad_for_every_k",
|
|
18862
|
+
"name": "lean z9plus.lean: the_orbit_never_meets_the_triad_for_every_k — ∀ k : Nat, pw 2 k ≠ 0 ∧ pw 2 k ≠ 3 ∧ pw 2 k ≠ 6 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18863
|
+
"receipt": "8c3dfc38-91e6-8a00-9d2f-ac18974cd169"
|
|
18864
|
+
},
|
|
18865
|
+
{
|
|
18866
|
+
"key": "lean_z9plus_fibonacci_residues_mod_nine_repeat_every_twenty_four_steps",
|
|
18867
|
+
"name": "lean z9plus.lean: fibonacci_residues_mod_nine_repeat_every_twenty_four_steps — ∀ k : Nat, fib (k + 24) % 9 = fib k % 9 ∧ fib (k + 25) % 9 = fib (k + 1) % 9 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18868
|
+
"receipt": "04f6a9cd-b19f-8b13-b5d9-7d88fec0139e"
|
|
18869
|
+
},
|
|
18870
|
+
{
|
|
18871
|
+
"key": "lean_z9plus_pisano_period_mod_nine_is_twenty_four_for_every_k",
|
|
18872
|
+
"name": "lean z9plus.lean: pisano_period_mod_nine_is_twenty_four_for_every_k — ∀ k : Nat, fib9 (k + 24) = fib9 k — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18873
|
+
"receipt": "985c1ebe-dc19-877e-8573-82765db72126"
|
|
18874
|
+
},
|
|
18875
|
+
{
|
|
18876
|
+
"key": "lean_z9plus_the_fuelled_gcd_is_the_gcd_when_the_fuel_exceeds_the_second_argument",
|
|
18877
|
+
"name": "lean z9plus.lean: the_fuelled_gcd_is_the_gcd_when_the_fuel_exceeds_the_second_argument — ∀ f a b : Nat, b < f → gcdF f a b = Nat.gcd a b — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18878
|
+
"receipt": "73c32b16-76ca-8bbc-91f3-3d550cd02477"
|
|
18879
|
+
},
|
|
18880
|
+
{
|
|
18881
|
+
"key": "lean_z9plus_consecutive_fibonacci_numbers_are_coprime",
|
|
18882
|
+
"name": "lean z9plus.lean: consecutive_fibonacci_numbers_are_coprime — ∀ n : Nat, Nat.gcd (fib n) (fib (n + 1)) = 1 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18883
|
+
"receipt": "5ae6ebcf-4c89-80d4-bc8c-1e5fed479a69"
|
|
18884
|
+
},
|
|
18885
|
+
{
|
|
18886
|
+
"key": "lean_z9plus_consecutive_fibonacci_are_coprime_for_every_n",
|
|
18887
|
+
"name": "lean z9plus.lean: consecutive_fibonacci_are_coprime_for_every_n — ∀ n : Nat, gcd9 (fib n) (fib (n + 1)) = 1 — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18888
|
+
"receipt": "424d4751-1648-8d01-b6aa-e31be117166a"
|
|
18889
|
+
},
|
|
18890
|
+
{
|
|
18891
|
+
"key": "lean_z9plus_digital_root_agrees_with_the_residue_for_every_n",
|
|
18892
|
+
"name": "lean z9plus.lean: digital_root_agrees_with_the_residue_for_every_n — ∀ n : Nat, 0 < n → (dr n = 9 ↔ m9 n = 0) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18893
|
+
"receipt": "20da0230-2b9f-8735-848e-8009809d9f04"
|
|
18894
|
+
},
|
|
18895
|
+
{
|
|
18896
|
+
"key": "lean_z9plus_digital_root_is_the_digit_sum_residue_for_every_n",
|
|
18897
|
+
"name": "lean z9plus.lean: digital_root_is_the_digit_sum_residue_for_every_n — ∀ n : Nat, m9 (digitSum n) = m9 n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18898
|
+
"receipt": "694fefdf-a71b-8019-84e5-04477e7be3d8"
|
|
18899
|
+
},
|
|
18900
|
+
{
|
|
18901
|
+
"key": "lean_demand2_the_two_power_sums_are_one_sum",
|
|
18902
|
+
"name": "lean demand2.lean: the_two_power_sums_are_one_sum — ∀ p n : Nat, sumPow p n = powSum p n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18903
|
+
"receipt": "6551630b-4917-8c1c-999f-4728c266cfd1"
|
|
18904
|
+
},
|
|
18905
|
+
{
|
|
18906
|
+
"key": "lean_demand2_nicomachus_sum_of_cubes_is_the_square_of_the_triangular_number_for_every_n",
|
|
18907
|
+
"name": "lean demand2.lean: nicomachus_sum_of_cubes_is_the_square_of_the_triangular_number_for_every_n — ∀ n : Nat, sumPow 3 n = tri n * tri n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18908
|
+
"receipt": "7aa0bbe0-b4ae-82e8-8319-7aed7047d654"
|
|
18909
|
+
},
|
|
18910
|
+
{
|
|
18911
|
+
"key": "lean_demand2_the_sum_of_fifth_powers_has_the_closed_form_for_every_n",
|
|
18912
|
+
"name": "lean demand2.lean: the_sum_of_fifth_powers_has_the_closed_form_for_every_n — ∀ n : Nat, 12 * sumPow 5 n = n * n * (n + 1) * (n + 1) * (2 * n * n + 2 * n - 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18913
|
+
"receipt": "6916652f-bda2-80d1-882e-009dee2d791d"
|
|
18914
|
+
},
|
|
18915
|
+
{
|
|
18916
|
+
"key": "lean_elementary_the_lucas_numbers_are_the_sum_of_the_neighbouring_fibonaccis_for_every_n",
|
|
18917
|
+
"name": "lean elementary.lean: the_lucas_numbers_are_the_sum_of_the_neighbouring_fibonaccis_for_every_n — ∀ n : Nat, lucas (n + 1) = fib n + fib (n + 2) — proved by the Lean kernel for every value (by\n have), standard axioms only — checked by lean.ts",
|
|
18918
|
+
"receipt": "cacb33f1-2fc1-8887-87a8-67aa352b3ac6"
|
|
18919
|
+
},
|
|
18920
|
+
{
|
|
18921
|
+
"key": "lean_families_cassinis_identity_for_every_m",
|
|
18922
|
+
"name": "lean families.lean: cassinis_identity_for_every_m — ∀ m : Nat, fib (2 * m + 1) * fib (2 * m + 3) = fib (2 * m + 2) * fib (2 * m + 2) + 1 ∧ fib (2 * m) * fib (2 * m + 2) + 1 = fib (2 * m + 1) * fib (2 * m + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18923
|
+
"receipt": "75a810f1-ae27-8fb7-b4d3-b257c0c917c7"
|
|
18924
|
+
},
|
|
18925
|
+
{
|
|
18926
|
+
"key": "lean_families_a_sum_over_one_to_n_plus_one_adds_the_last_term",
|
|
18927
|
+
"name": "lean families.lean: a_sum_over_one_to_n_plus_one_adds_the_last_term — ∀ (g : Nat → Nat) (n : Nat), ((List.range' 1 (n + 1)).map g).foldl (· + ·) 0 = ((List.range' 1 n).map g).foldl (· + ·) 0 + g (n + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18928
|
+
"receipt": "f664ca1d-8371-8bd5-a369-060e34e5baaf"
|
|
18929
|
+
},
|
|
18930
|
+
{
|
|
18931
|
+
"key": "lean_families_the_numbers_sum_to_their_closed_form_for_every_n",
|
|
18932
|
+
"name": "lean families.lean: the_numbers_sum_to_their_closed_form_for_every_n — ∀ n : Nat, 2 * powSum 1 n = n * (n + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18933
|
+
"receipt": "34fa9fc8-b8ed-8895-bb81-c92f4515e9fe"
|
|
18934
|
+
},
|
|
18935
|
+
{
|
|
18936
|
+
"key": "lean_families_the_squares_sum_to_their_closed_form_for_every_n",
|
|
18937
|
+
"name": "lean families.lean: the_squares_sum_to_their_closed_form_for_every_n — ∀ n : Nat, 6 * powSum 2 n = n * (n + 1) * (2 * n + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18938
|
+
"receipt": "0b7a0569-fb3f-8ba7-a49a-900c19bf369d"
|
|
18939
|
+
},
|
|
18940
|
+
{
|
|
18941
|
+
"key": "lean_families_the_cubes_sum_to_their_closed_form_for_every_n",
|
|
18942
|
+
"name": "lean families.lean: the_cubes_sum_to_their_closed_form_for_every_n — ∀ n : Nat, 4 * powSum 3 n = n * n * (n + 1) * (n + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18943
|
+
"receipt": "96b0047e-cf09-8755-be28-1cb49080d466"
|
|
18944
|
+
},
|
|
18945
|
+
{
|
|
18946
|
+
"key": "lean_families_the_fourth_powers_sum_to_their_closed_form_for_every_n",
|
|
18947
|
+
"name": "lean families.lean: the_fourth_powers_sum_to_their_closed_form_for_every_n — ∀ n : Nat, 30 * powSum 4 n = n * (n + 1) * (2 * n + 1) * (3 * n * n + 3 * n - 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18948
|
+
"receipt": "3419aabd-970f-8738-ae26-0adbfd4cf7fb"
|
|
18949
|
+
},
|
|
18950
|
+
{
|
|
18951
|
+
"key": "lean_families_the_fifth_powers_sum_to_their_closed_form_for_every_n",
|
|
18952
|
+
"name": "lean families.lean: the_fifth_powers_sum_to_their_closed_form_for_every_n — ∀ n : Nat, 12 * powSum 5 n = n * n * (n + 1) * (n + 1) * (2 * n * n + 2 * n - 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18953
|
+
"receipt": "790310ea-f06d-875d-89aa-2aba93d133e3"
|
|
18954
|
+
},
|
|
18955
|
+
{
|
|
18956
|
+
"key": "lean_families_power_sums_match_their_closed_forms_for_every_n",
|
|
18957
|
+
"name": "lean families.lean: power_sums_match_their_closed_forms_for_every_n — ∀ k n : Nat, 1 ≤ k → k ≤ 5 → powSum k n = faulhaber k n — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18958
|
+
"receipt": "04b04822-598b-8529-a44c-7881174ec382"
|
|
18959
|
+
},
|
|
18960
|
+
{
|
|
18961
|
+
"key": "lean_families_the_sums_of_triangular_numbers_are_the_tetrahedral_numbers_for_every_n",
|
|
18962
|
+
"name": "lean families.lean: the_sums_of_triangular_numbers_are_the_tetrahedral_numbers_for_every_n — ∀ n : Nat, ((List.range' 1 n).map (fun i => i * (i + 1) / 2)).foldl (· + ·) 0 = n * (n + 1) * (n + 2) / 6 — proved by the Lean kernel for every value (by\n have), standard axioms only — checked by lean.ts",
|
|
18963
|
+
"receipt": "43b9cdd8-7110-8f6f-887b-297d0262ae80"
|
|
18964
|
+
},
|
|
18965
|
+
{
|
|
18966
|
+
"key": "lean_sequences_cassinis_identity_for_every_m",
|
|
18967
|
+
"name": "lean sequences.lean: cassinis_identity_for_every_m — ∀ m : Nat, fib (2 * m + 1) * fib (2 * m + 3) = fib (2 * m + 2) * fib (2 * m + 2) + 1 ∧ fib (2 * m) * fib (2 * m + 2) + 1 = fib (2 * m + 1) * fib (2 * m + 1) — proved by the Lean kernel for every value (by\n intro), standard axioms only — checked by lean.ts",
|
|
18968
|
+
"receipt": "3b815427-42b8-8b8c-abf3-423b1e268af3"
|
|
18789
18969
|
}
|
|
18790
18970
|
]
|
|
@@ -423,4 +423,24 @@ theorem eight_times_a_triangular_number_plus_one_is_an_odd_square_for_every_n :
|
|
|
423
423
|
rw [hexp]
|
|
424
424
|
omega
|
|
425
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
|
+
|
|
426
446
|
end Elementary
|
package/src/proof/families.lean
CHANGED
|
@@ -479,4 +479,170 @@ theorem the_first_n_odd_numbers_sum_to_n_squared_for_every_n :
|
|
|
479
479
|
rw [square_of_successor]
|
|
480
480
|
omega
|
|
481
481
|
|
|
482
|
+
|
|
483
|
+
-- ── the capped rows above, proved for every value by induction — no bound ──────────────────────────────────
|
|
484
|
+
-- cassinis_identity_holds_across_the_range (n ≤ 30), power_sums_match_their_closed_forms (k = 1..5, n ≤ 40),
|
|
485
|
+
-- the_first_three_power_sums_hold_to_two_hundred (n ≤ 200) and the_sums_of_triangular_numbers_are_the_tetrahedral_
|
|
486
|
+
-- numbers (n ≤ 100) were checked up to a bound; these prove them for every value. Core Lean has no ring tactic, so each
|
|
487
|
+
-- polynomial step is expanded, each monomial sorted, its numeral moved to the front, and omega closes what is left.
|
|
488
|
+
theorem cassinis_identity_for_every_m :
|
|
489
|
+
∀ m : Nat, fib (2 * m + 1) * fib (2 * m + 3) = fib (2 * m + 2) * fib (2 * m + 2) + 1 ∧
|
|
490
|
+
fib (2 * m) * fib (2 * m + 2) + 1 = fib (2 * m + 1) * fib (2 * m + 1) := by
|
|
491
|
+
intro m
|
|
492
|
+
induction m with
|
|
493
|
+
| zero => decide
|
|
494
|
+
| succ m ih =>
|
|
495
|
+
have r3 : fib (2 * m + 3) = fib (2 * m + 1) + fib (2 * m + 2) := rfl
|
|
496
|
+
have r4 : fib (2 * m + 4) = fib (2 * m + 2) + fib (2 * m + 3) := rfl
|
|
497
|
+
have r5 : fib (2 * m + 5) = fib (2 * m + 3) + fib (2 * m + 4) := rfl
|
|
498
|
+
show fib (2 * m + 3) * fib (2 * m + 5) = fib (2 * m + 4) * fib (2 * m + 4) + 1 ∧
|
|
499
|
+
fib (2 * m + 2) * fib (2 * m + 4) + 1 = fib (2 * m + 3) * fib (2 * m + 3)
|
|
500
|
+
have h := ih.1
|
|
501
|
+
rw [r5, r4, r3]
|
|
502
|
+
rw [r3] at h
|
|
503
|
+
generalize fib (2 * m + 1) = a at h ⊢
|
|
504
|
+
generalize fib (2 * m + 2) = b at h ⊢
|
|
505
|
+
constructor
|
|
506
|
+
· try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
507
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
508
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
509
|
+
all_goals omega
|
|
510
|
+
· try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
511
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
512
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
513
|
+
all_goals omega
|
|
514
|
+
|
|
515
|
+
theorem a_sum_over_one_to_n_plus_one_adds_the_last_term :
|
|
516
|
+
∀ (g : Nat → Nat) (n : Nat),
|
|
517
|
+
((List.range' 1 (n + 1)).map g).foldl (· + ·) 0 = ((List.range' 1 n).map g).foldl (· + ·) 0 + g (n + 1) := by
|
|
518
|
+
intro g n
|
|
519
|
+
rw [List.range'_concat, List.map_append, List.foldl_append]
|
|
520
|
+
simp only [List.map, List.foldl, Nat.one_mul, Nat.add_comm 1 n]
|
|
521
|
+
|
|
522
|
+
theorem the_numbers_sum_to_their_closed_form_for_every_n : ∀ n : Nat, 2 * powSum 1 n = n * (n + 1) := by
|
|
523
|
+
intro n
|
|
524
|
+
induction n with
|
|
525
|
+
| zero => rfl
|
|
526
|
+
| succ n ih =>
|
|
527
|
+
unfold powSum at *
|
|
528
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
529
|
+
generalize ((List.range' 1 n).map (fun i => i ^ 1)).foldl (· + ·) 0 = s at ih ⊢
|
|
530
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
531
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
532
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
533
|
+
all_goals omega
|
|
534
|
+
|
|
535
|
+
theorem the_squares_sum_to_their_closed_form_for_every_n : ∀ n : Nat, 6 * powSum 2 n = n * (n + 1) * (2 * n + 1) := by
|
|
536
|
+
intro n
|
|
537
|
+
induction n with
|
|
538
|
+
| zero => rfl
|
|
539
|
+
| succ n ih =>
|
|
540
|
+
unfold powSum at *
|
|
541
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
542
|
+
generalize ((List.range' 1 n).map (fun i => i ^ 2)).foldl (· + ·) 0 = s at ih ⊢
|
|
543
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
544
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
545
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
546
|
+
all_goals omega
|
|
547
|
+
|
|
548
|
+
theorem the_cubes_sum_to_their_closed_form_for_every_n : ∀ n : Nat, 4 * powSum 3 n = n * n * (n + 1) * (n + 1) := by
|
|
549
|
+
intro n
|
|
550
|
+
induction n with
|
|
551
|
+
| zero => rfl
|
|
552
|
+
| succ n ih =>
|
|
553
|
+
unfold powSum at *
|
|
554
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
555
|
+
generalize ((List.range' 1 n).map (fun i => i ^ 3)).foldl (· + ·) 0 = s at ih ⊢
|
|
556
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
557
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
558
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
559
|
+
all_goals omega
|
|
560
|
+
|
|
561
|
+
set_option maxRecDepth 200000 in
|
|
562
|
+
set_option maxHeartbeats 4000000 in
|
|
563
|
+
theorem the_fourth_powers_sum_to_their_closed_form_for_every_n :
|
|
564
|
+
∀ n : Nat, 30 * powSum 4 n = n * (n + 1) * (2 * n + 1) * (3 * n * n + 3 * n - 1) := by
|
|
565
|
+
intro n
|
|
566
|
+
induction n with
|
|
567
|
+
| zero => rfl
|
|
568
|
+
| succ n ih =>
|
|
569
|
+
unfold powSum at *
|
|
570
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
571
|
+
generalize ((List.range' 1 n).map (fun i => i ^ 4)).foldl (· + ·) 0 = s at ih ⊢
|
|
572
|
+
have e2 : 3 * (n + 1) * (n + 1) + 3 * (n + 1) - 1 = 3 * n * n + 9 * n + 5 := by
|
|
573
|
+
simp only [Nat.mul_add, Nat.add_mul, Nat.mul_one, Nat.one_mul]; omega
|
|
574
|
+
rw [e2]
|
|
575
|
+
cases n with
|
|
576
|
+
| zero => simp at ih ⊢; omega
|
|
577
|
+
| succ m =>
|
|
578
|
+
have e1 : 3 * (m + 1) * (m + 1) + 3 * (m + 1) - 1 = 3 * m * m + 9 * m + 5 := by
|
|
579
|
+
simp only [Nat.mul_add, Nat.add_mul, Nat.mul_one, Nat.one_mul]; omega
|
|
580
|
+
rw [e1] at ih
|
|
581
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
582
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
583
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
584
|
+
all_goals omega
|
|
585
|
+
|
|
586
|
+
set_option maxRecDepth 200000 in
|
|
587
|
+
set_option maxHeartbeats 4000000 in
|
|
588
|
+
theorem the_fifth_powers_sum_to_their_closed_form_for_every_n :
|
|
589
|
+
∀ n : Nat, 12 * powSum 5 n = n * n * (n + 1) * (n + 1) * (2 * n * n + 2 * n - 1) := by
|
|
590
|
+
intro n
|
|
591
|
+
induction n with
|
|
592
|
+
| zero => rfl
|
|
593
|
+
| succ n ih =>
|
|
594
|
+
unfold powSum at *
|
|
595
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
596
|
+
generalize ((List.range' 1 n).map (fun i => i ^ 5)).foldl (· + ·) 0 = s at ih ⊢
|
|
597
|
+
have e2 : 2 * (n + 1) * (n + 1) + 2 * (n + 1) - 1 = 2 * n * n + 6 * n + 3 := by
|
|
598
|
+
simp only [Nat.mul_add, Nat.add_mul, Nat.mul_one, Nat.one_mul]; omega
|
|
599
|
+
rw [e2]
|
|
600
|
+
cases n with
|
|
601
|
+
| zero => simp at ih ⊢; omega
|
|
602
|
+
| succ m =>
|
|
603
|
+
have e1 : 2 * (m + 1) * (m + 1) + 2 * (m + 1) - 1 = 2 * m * m + 6 * m + 3 := by
|
|
604
|
+
simp only [Nat.mul_add, Nat.add_mul, Nat.mul_one, Nat.one_mul]; omega
|
|
605
|
+
rw [e1] at ih
|
|
606
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
607
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
608
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
609
|
+
all_goals omega
|
|
610
|
+
|
|
611
|
+
theorem power_sums_match_their_closed_forms_for_every_n :
|
|
612
|
+
∀ k n : Nat, 1 ≤ k → k ≤ 5 → powSum k n = faulhaber k n := by
|
|
613
|
+
intro k n h1 h5
|
|
614
|
+
have c : k = 1 ∨ k = 2 ∨ k = 3 ∨ k = 4 ∨ k = 5 := by omega
|
|
615
|
+
rcases c with rfl | rfl | rfl | rfl | rfl
|
|
616
|
+
· show powSum 1 n = n * (n + 1) / 2
|
|
617
|
+
rw [← the_numbers_sum_to_their_closed_form_for_every_n n, Nat.mul_div_cancel_left _ (by decide)]
|
|
618
|
+
· show powSum 2 n = n * (n + 1) * (2 * n + 1) / 6
|
|
619
|
+
rw [← the_squares_sum_to_their_closed_form_for_every_n n, Nat.mul_div_cancel_left _ (by decide)]
|
|
620
|
+
· show powSum 3 n = n * n * (n + 1) * (n + 1) / 4
|
|
621
|
+
rw [← the_cubes_sum_to_their_closed_form_for_every_n n, Nat.mul_div_cancel_left _ (by decide)]
|
|
622
|
+
· show powSum 4 n = n * (n + 1) * (2 * n + 1) * (3 * n * n + 3 * n - 1) / 30
|
|
623
|
+
rw [← the_fourth_powers_sum_to_their_closed_form_for_every_n n, Nat.mul_div_cancel_left _ (by decide)]
|
|
624
|
+
· show powSum 5 n = n * n * (n + 1) * (n + 1) * (2 * n * n + 2 * n - 1) / 12
|
|
625
|
+
rw [← the_fifth_powers_sum_to_their_closed_form_for_every_n n, Nat.mul_div_cancel_left _ (by decide)]
|
|
626
|
+
|
|
627
|
+
theorem the_sums_of_triangular_numbers_are_the_tetrahedral_numbers_for_every_n :
|
|
628
|
+
∀ n : Nat, ((List.range' 1 n).map (fun i => i * (i + 1) / 2)).foldl (· + ·) 0 = n * (n + 1) * (n + 2) / 6 := by
|
|
629
|
+
have six : ∀ n : Nat, 6 * ((List.range' 1 n).map (fun i => i * (i + 1) / 2)).foldl (· + ·) 0 = n * (n + 1) * (n + 2) := by
|
|
630
|
+
intro n
|
|
631
|
+
induction n with
|
|
632
|
+
| zero => rfl
|
|
633
|
+
| succ n ih =>
|
|
634
|
+
rw [a_sum_over_one_to_n_plus_one_adds_the_last_term]
|
|
635
|
+
have ev : (n + 1) * (n + 1 + 1) % 2 = 0 := by
|
|
636
|
+
rcases Nat.mod_two_eq_zero_or_one n with e | e <;> simp [Nat.mul_mod, Nat.add_mod, e]
|
|
637
|
+
have hd : (n + 1) * (n + 1 + 1) / 2 * 2 = (n + 1) * (n + 1 + 1) := Nat.div_mul_cancel (Nat.dvd_of_mod_eq_zero ev)
|
|
638
|
+
generalize ((List.range' 1 n).map (fun i => i * (i + 1) / 2)).foldl (· + ·) 0 = s at ih ⊢
|
|
639
|
+
generalize (n + 1) * (n + 1 + 1) / 2 = t at hd ⊢
|
|
640
|
+
rw [Nat.mul_two] at hd
|
|
641
|
+
try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
642
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
643
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
644
|
+
all_goals omega
|
|
645
|
+
intro n
|
|
646
|
+
rw [← six n, Nat.mul_div_cancel_left _ (by decide)]
|
|
647
|
+
|
|
482
648
|
end Families
|
package/src/proof/light.lean
CHANGED
|
@@ -147,4 +147,12 @@ theorem the_root_moves_with_the_unit_so_it_is_not_about_light :
|
|
|
147
147
|
theorem the_definitions_are_seven_and_travel_fixes_zero :
|
|
148
148
|
defining.length = 7 ∧ travel 0 = 0 := by decide
|
|
149
149
|
|
|
150
|
+
|
|
151
|
+
-- ── the capped row above, proved for every whole number of seconds — no bound ───────────────────────────────
|
|
152
|
+
-- the second reads back from the metre and from the caesium period at every s, not only s < 100.
|
|
153
|
+
theorem the_second_returns_from_the_metre_and_the_period_for_every_s :
|
|
154
|
+
∀ s : Nat, travel s / c = s ∧ periods s / dNuCs = s := by
|
|
155
|
+
intro s
|
|
156
|
+
exact ⟨Nat.mul_div_cancel_left s (by decide), Nat.mul_div_cancel_left s (by decide)⟩
|
|
157
|
+
|
|
150
158
|
end Light
|
|
@@ -452,4 +452,73 @@ theorem the_product_of_any_three_consecutive_integers_is_divisible_by_six_for_ev
|
|
|
452
452
|
have h3 := the_product_of_three_consecutive_numbers_is_a_multiple_of_three n
|
|
453
453
|
omega
|
|
454
454
|
|
|
455
|
+
|
|
456
|
+
-- ── the capped rows above, proved for every value — no bound ─────────────────────────────────────────────────
|
|
457
|
+
-- relation_digitroot_is_residue_mod9 (n ≤ 200), the_nine_times_table_always_digital_roots_to_nine (k ≤ 60),
|
|
458
|
+
-- casting_out_nines_is_multiplicative (a, b ≤ 60), repeated_doubling_is_the_power_of_two (k ≤ 20) and
|
|
459
|
+
-- the_moduli_dimensions (g ≤ 20) were checked up to a bound; these prove them for every value.
|
|
460
|
+
theorem repeated_doubling_is_the_power_of_two_for_every_k : ∀ k : Nat, dbl k = 2 ^ k := by
|
|
461
|
+
intro k
|
|
462
|
+
induction k with
|
|
463
|
+
| zero => rfl
|
|
464
|
+
| succ k ih =>
|
|
465
|
+
show 2 * dbl k = 2 ^ (k + 1)
|
|
466
|
+
rw [ih, Nat.pow_succ, Nat.mul_comm]
|
|
467
|
+
|
|
468
|
+
theorem relation_digitroot_is_residue_mod9_for_every_n : ∀ n : Nat, 0 < n → DR n = (n - 1) % 9 + 1 := by
|
|
469
|
+
intro n hn
|
|
470
|
+
unfold DR
|
|
471
|
+
rw [if_neg (show ¬ ((n == 0) = true) by simp; omega)]
|
|
472
|
+
omega
|
|
473
|
+
|
|
474
|
+
theorem the_nine_times_table_always_digital_roots_to_nine_for_every_k : ∀ k : Nat, 0 < k → DR (9 * k) = 9 := by
|
|
475
|
+
intro k hk
|
|
476
|
+
rw [relation_digitroot_is_residue_mod9_for_every_n (9 * k) (by omega)]
|
|
477
|
+
omega
|
|
478
|
+
|
|
479
|
+
theorem the_digital_root_has_the_residue_of_its_number : ∀ n : Nat, DR n % 9 = n % 9 := by
|
|
480
|
+
intro n
|
|
481
|
+
cases n with
|
|
482
|
+
| zero => rfl
|
|
483
|
+
| succ m =>
|
|
484
|
+
rw [relation_digitroot_is_residue_mod9_for_every_n (m + 1) (Nat.succ_pos m)]
|
|
485
|
+
omega
|
|
486
|
+
|
|
487
|
+
theorem a_digital_root_lies_between_one_and_nine : ∀ n : Nat, 0 < n → 1 ≤ DR n ∧ DR n ≤ 9 := by
|
|
488
|
+
intro n hn
|
|
489
|
+
rw [relation_digitroot_is_residue_mod9_for_every_n n hn]
|
|
490
|
+
have := Nat.mod_lt (n - 1) (show 0 < 9 by decide)
|
|
491
|
+
exact ⟨by omega, by omega⟩
|
|
492
|
+
|
|
493
|
+
theorem casting_out_nines_is_multiplicative_for_every_a_b : ∀ a b : Nat, DR (a * b) = DR (DR a * DR b) := by
|
|
494
|
+
intro a b
|
|
495
|
+
cases a with
|
|
496
|
+
| zero => rw [Nat.zero_mul, show DR 0 = 0 from rfl, Nat.zero_mul]; rfl
|
|
497
|
+
| succ a =>
|
|
498
|
+
cases b with
|
|
499
|
+
| zero => rw [Nat.mul_zero, show DR 0 = 0 from rfl, Nat.mul_zero]; rfl
|
|
500
|
+
| succ b =>
|
|
501
|
+
have hab : 0 < (a + 1) * (b + 1) := Nat.mul_pos (Nat.succ_pos a) (Nat.succ_pos b)
|
|
502
|
+
have ha := a_digital_root_lies_between_one_and_nine (a + 1) (Nat.succ_pos a)
|
|
503
|
+
have hb := a_digital_root_lies_between_one_and_nine (b + 1) (Nat.succ_pos b)
|
|
504
|
+
have hp : 0 < DR (a + 1) * DR (b + 1) := Nat.mul_pos (by omega) (by omega)
|
|
505
|
+
have r1 := the_digital_root_has_the_residue_of_its_number ((a + 1) * (b + 1))
|
|
506
|
+
have r2 := the_digital_root_has_the_residue_of_its_number (DR (a + 1) * DR (b + 1))
|
|
507
|
+
have r3 : DR (a + 1) * DR (b + 1) % 9 = (a + 1) * (b + 1) % 9 := by
|
|
508
|
+
rw [Nat.mul_mod, the_digital_root_has_the_residue_of_its_number,
|
|
509
|
+
the_digital_root_has_the_residue_of_its_number, ← Nat.mul_mod]
|
|
510
|
+
obtain ⟨b1l, b1r⟩ := a_digital_root_lies_between_one_and_nine _ hab
|
|
511
|
+
obtain ⟨b2l, b2r⟩ := a_digital_root_lies_between_one_and_nine _ hp
|
|
512
|
+
clear ha hb
|
|
513
|
+
generalize DR ((a + 1) * (b + 1)) = x at *
|
|
514
|
+
generalize DR (DR (a + 1) * DR (b + 1)) = y at *
|
|
515
|
+
generalize (a + 1) * (b + 1) = m at *
|
|
516
|
+
generalize DR (a + 1) * DR (b + 1) = p at *
|
|
517
|
+
omega
|
|
518
|
+
|
|
519
|
+
theorem the_moduli_dimensions_are_three_g_minus_three_and_six_g_minus_six_for_every_g :
|
|
520
|
+
∀ g : Nat, 3 * g - 3 = (6 * g - 6) / 2 ∧ 6 * g - 6 = 2 * (3 * g - 3) := by
|
|
521
|
+
intro g
|
|
522
|
+
exact ⟨by omega, by omega⟩
|
|
523
|
+
|
|
455
524
|
end Mechanical
|
package/src/proof/reach.lean
CHANGED
|
@@ -89,4 +89,17 @@ theorem the_predecessor_returns_every_successor : ∀ n : Nat, (n + 1) - 1 = n :
|
|
|
89
89
|
-- named for one it cannot observe is worse than no theorem: it reads as a kernel-checked proof of a
|
|
90
90
|
-- statement the kernel never saw.
|
|
91
91
|
|
|
92
|
+
|
|
93
|
+
-- ── the three bounded rows above, proved for every bound — no list of bounds ─────────────────────────────────
|
|
94
|
+
-- the file's own point, now without a range: no exhaustion over 0..n-1 contains n, n + 1, or (at 2n) 2n.
|
|
95
|
+
theorem exhaustion_never_reaches_its_own_bound_for_every_n : ∀ n : Nat, (List.range n).length = n ∧ n ∉ List.range n := by
|
|
96
|
+
intro n
|
|
97
|
+
exact ⟨List.length_range n, fun h => Nat.lt_irrefl n (List.mem_range.mp h)⟩
|
|
98
|
+
theorem the_successor_of_every_bound_lies_outside_for_every_n : ∀ n : Nat, n + 1 ∉ List.range n := by
|
|
99
|
+
intro n h
|
|
100
|
+
exact Nat.lt_irrefl n (Nat.lt_trans (Nat.lt_succ_self n) (List.mem_range.mp h))
|
|
101
|
+
theorem doubling_the_domain_leaves_the_same_hole_for_every_n : ∀ n : Nat, 2 * n ∉ List.range (2 * n) := by
|
|
102
|
+
intro n h
|
|
103
|
+
exact Nat.lt_irrefl (2 * n) (List.mem_range.mp h)
|
|
104
|
+
|
|
92
105
|
end Reach
|
package/src/proof/sequences.lean
CHANGED
|
@@ -102,4 +102,35 @@ theorem the_sequence_takes_both_values :
|
|
|
102
102
|
((List.range 200).filter (fun n => tm n == 0)).length = 100
|
|
103
103
|
∧ ((List.range 200).filter (fun n => tm n == 1)).length = 100 := by decide
|
|
104
104
|
|
|
105
|
+
|
|
106
|
+
-- ── the capped rows above, proved for every value — no bound ─────────────────────────────────────────────────
|
|
107
|
+
-- cassini_at_even_indices, cassini_at_odd_indices and cassini_deviation_is_exactly_one were checked n ≤ 20; one law
|
|
108
|
+
-- carries all three: at every index the product of the neighbours is the square, plus or minus one.
|
|
109
|
+
theorem cassinis_identity_for_every_m :
|
|
110
|
+
∀ m : Nat, fib (2 * m + 1) * fib (2 * m + 3) = fib (2 * m + 2) * fib (2 * m + 2) + 1 ∧
|
|
111
|
+
fib (2 * m) * fib (2 * m + 2) + 1 = fib (2 * m + 1) * fib (2 * m + 1) := by
|
|
112
|
+
intro m
|
|
113
|
+
induction m with
|
|
114
|
+
| zero => decide
|
|
115
|
+
| succ m ih =>
|
|
116
|
+
have r3 : fib (2 * m + 3) = fib (2 * m + 1) + fib (2 * m + 2) := rfl
|
|
117
|
+
have r4 : fib (2 * m + 4) = fib (2 * m + 2) + fib (2 * m + 3) := rfl
|
|
118
|
+
have r5 : fib (2 * m + 5) = fib (2 * m + 3) + fib (2 * m + 4) := rfl
|
|
119
|
+
show fib (2 * m + 3) * fib (2 * m + 5) = fib (2 * m + 4) * fib (2 * m + 4) + 1 ∧
|
|
120
|
+
fib (2 * m + 2) * fib (2 * m + 4) + 1 = fib (2 * m + 3) * fib (2 * m + 3)
|
|
121
|
+
have h := ih.1
|
|
122
|
+
rw [r5, r4, r3]
|
|
123
|
+
rw [r3] at h
|
|
124
|
+
generalize fib (2 * m + 1) = a at h ⊢
|
|
125
|
+
generalize fib (2 * m + 2) = b at h ⊢
|
|
126
|
+
constructor
|
|
127
|
+
· try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
128
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
129
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
130
|
+
all_goals omega
|
|
131
|
+
· try simp only [Nat.mul_add, Nat.add_mul, Nat.pow_succ, Nat.pow_zero, Nat.one_mul, Nat.mul_one, Nat.reduceMul, Nat.reduceAdd] at *
|
|
132
|
+
try simp only [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.reduceMul] at *
|
|
133
|
+
try simp only [Nat.mul_comm _ (OfNat.ofNat _), Nat.mul_left_comm _ (OfNat.ofNat _), Nat.reduceMul] at *
|
|
134
|
+
all_goals omega
|
|
135
|
+
|
|
105
136
|
end Sequences
|