@ceccec/millennium-solutions 9.2.5 → 9.2.7
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 +7 -7
- package/AXIOMS.md +14 -14
- package/CHALLENGES.md +101 -3
- package/PRIOR-ART.md +25 -25
- package/README.md +30 -30
- package/dashboard.md +1 -1
- package/forensic.md +4 -4
- package/index.md +30 -30
- package/package.json +1 -1
- package/paper.md +988 -578
- package/speedup.md +4 -4
- package/src/proof/demand.lean +22 -0
- package/src/proof/demand3.lean +60 -0
- package/src/proof/discovered.json +245 -0
- package/src/proof/elementary.lean +25 -0
- package/src/proof/energy.lean +9 -0
- package/src/proof/families.lean +35 -3
- package/src/proof/light.lean +8 -0
- package/src/proof/mechanical.lean +103 -0
- package/src/proof/reach.lean +13 -0
- package/src/proof/reversal.lean +75 -0
- package/src/proof/split.lean +8 -0
- package/src/proof/trial-all.json +294 -0
- package/src/proof/z9plus.lean +92 -0
package/src/proof/reversal.lean
CHANGED
|
@@ -70,4 +70,79 @@ theorem reversal_is_involutive_exactly_off_the_trailing_zeros :
|
|
|
70
70
|
def settledHere : Nat := 8
|
|
71
71
|
theorem reversal_settles_its_range : settledHere = 8 := rfl
|
|
72
72
|
|
|
73
|
+
|
|
74
|
+
-- ── the capped rows above, proved for every value by induction — no bound ────────────────────────────────────
|
|
75
|
+
-- casting out nines, in general: a number, its digit sum and its reversal share their residue mod 9.
|
|
76
|
+
theorem foldl_add_start : ∀ (l : List Nat) (a : Nat), l.foldl (· + ·) a = a + l.foldl (· + ·) 0 := by
|
|
77
|
+
intro l
|
|
78
|
+
induction l with
|
|
79
|
+
| nil => intro a; simp
|
|
80
|
+
| cons x xs ih =>
|
|
81
|
+
intro a
|
|
82
|
+
simp only [List.foldl]
|
|
83
|
+
rw [ih (a + x), ih (0 + x)]
|
|
84
|
+
omega
|
|
85
|
+
|
|
86
|
+
theorem the_digits_sum_to_the_number_mod_nine_when_the_fuel_covers_them :
|
|
87
|
+
∀ f n : Nat, n < 10 ^ f → (digitsF f n).foldl (· + ·) 0 % 9 = n % 9 := by
|
|
88
|
+
intro f
|
|
89
|
+
induction f with
|
|
90
|
+
| zero =>
|
|
91
|
+
intro n h
|
|
92
|
+
have : n = 0 := by simp at h; omega
|
|
93
|
+
subst this
|
|
94
|
+
simp [digitsF]
|
|
95
|
+
| succ f ih =>
|
|
96
|
+
intro n h
|
|
97
|
+
cases n with
|
|
98
|
+
| zero => simp [digitsF]
|
|
99
|
+
| succ m =>
|
|
100
|
+
simp only [digitsF, List.foldl]
|
|
101
|
+
rw [foldl_add_start]
|
|
102
|
+
have hlt : (m + 1) / 10 < 10 ^ f := by
|
|
103
|
+
rw [Nat.pow_succ] at h
|
|
104
|
+
omega
|
|
105
|
+
have := ih ((m + 1) / 10) hlt
|
|
106
|
+
omega
|
|
107
|
+
|
|
108
|
+
theorem a_number_is_below_ten_to_its_own_successor : ∀ n : Nat, n < 10 ^ (n + 1) := by
|
|
109
|
+
intro n
|
|
110
|
+
induction n with
|
|
111
|
+
| zero => decide
|
|
112
|
+
| succ n ih =>
|
|
113
|
+
rw [Nat.pow_succ]
|
|
114
|
+
omega
|
|
115
|
+
|
|
116
|
+
theorem the_digit_sum_has_the_residue_of_the_number_mod_nine_for_every_n :
|
|
117
|
+
∀ n : Nat, digitSum n % 9 = n % 9 := by
|
|
118
|
+
intro n
|
|
119
|
+
unfold digitSum digits
|
|
120
|
+
split
|
|
121
|
+
· rename_i h
|
|
122
|
+
have : n = 0 := by simpa using h
|
|
123
|
+
subst this
|
|
124
|
+
rfl
|
|
125
|
+
· exact the_digits_sum_to_the_number_mod_nine_when_the_fuel_covers_them (n + 1) n (a_number_is_below_ten_to_its_own_successor n)
|
|
126
|
+
|
|
127
|
+
theorem folding_by_ten_keeps_the_residue_of_the_digit_sum :
|
|
128
|
+
∀ (l : List Nat) (a : Nat), (l.foldl (fun a d => a * 10 + d) a) % 9 = (a + l.foldl (· + ·) 0) % 9 := by
|
|
129
|
+
intro l
|
|
130
|
+
induction l with
|
|
131
|
+
| nil => intro a; simp
|
|
132
|
+
| cons x xs ih =>
|
|
133
|
+
intro a
|
|
134
|
+
simp only [List.foldl]
|
|
135
|
+
rw [ih (a * 10 + x), foldl_add_start xs (0 + x)]
|
|
136
|
+
omega
|
|
137
|
+
|
|
138
|
+
-- digital_root_is_invariant_under_reversal checked 1 ≤ n ≤ 300; this proves it for every n.
|
|
139
|
+
theorem reversal_keeps_the_residue_mod_nine_for_every_n :
|
|
140
|
+
∀ n : Nat, reverseNum n % 9 = n % 9 := by
|
|
141
|
+
intro n
|
|
142
|
+
have h1 : reverseNum n % 9 = digitSum n % 9 := by
|
|
143
|
+
unfold reverseNum digitSum
|
|
144
|
+
rw [folding_by_ten_keeps_the_residue_of_the_digit_sum]
|
|
145
|
+
simp
|
|
146
|
+
rw [h1, the_digit_sum_has_the_residue_of_the_number_mod_nine_for_every_n]
|
|
147
|
+
|
|
73
148
|
end Reversal
|
package/src/proof/split.lean
CHANGED
|
@@ -188,4 +188,12 @@ theorem the_orbit_turns_once_per_budget :
|
|
|
188
188
|
((List.range 60).all (fun n => 2 ^ (n + 6) % 9 == 2 ^ n % 9)) ∧ 2 ^ 6 = sealBits / coins := by decide
|
|
189
189
|
|
|
190
190
|
|
|
191
|
+
|
|
192
|
+
-- ── the capped row above, proved for every value — no bound ───────────────────────────────────────────────────
|
|
193
|
+
-- the_coin_step_and_the_coins_are_inverse checked c < 20; this proves tripling and dividing by three undo each other for every c.
|
|
194
|
+
theorem the_coin_step_and_the_coins_are_inverse_for_every_c :
|
|
195
|
+
∀ c : Nat, 3 * c / 3 = c ∧ (3 * c) % 3 = 0 := by
|
|
196
|
+
intro c
|
|
197
|
+
exact ⟨Nat.mul_div_cancel_left c (by decide), Nat.mul_mod_right 3 c⟩
|
|
198
|
+
|
|
191
199
|
end Split
|
package/src/proof/trial-all.json
CHANGED
|
@@ -15478,5 +15478,299 @@
|
|
|
15478
15478
|
"verdict": "UNVERIFIED",
|
|
15479
15479
|
"ground": "no candidate in the current space — nothing to recompute",
|
|
15480
15480
|
"receipt": "6dec28f9-502b-86ee-8f87-d09f701ed7e7"
|
|
15481
|
+
},
|
|
15482
|
+
{
|
|
15483
|
+
"key": "lean_demand_mantels_bound_is_n_squared_over_four_for_every_n",
|
|
15484
|
+
"verdict": "UNVERIFIED",
|
|
15485
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15486
|
+
"receipt": "b9212e56-a3ea-8d6d-be87-f946b87d6b6c"
|
|
15487
|
+
},
|
|
15488
|
+
{
|
|
15489
|
+
"key": "lean_demand3_the_euler_characteristic_of_a_genus_g_surface_for_every_g",
|
|
15490
|
+
"verdict": "UNVERIFIED",
|
|
15491
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15492
|
+
"receipt": "a1a899d7-b3c5-8941-b02c-55f111d49fca"
|
|
15493
|
+
},
|
|
15494
|
+
{
|
|
15495
|
+
"key": "lean_demand3_a_repunit_has_the_residue_of_its_length_mod_three",
|
|
15496
|
+
"verdict": "UNVERIFIED",
|
|
15497
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15498
|
+
"receipt": "732113b8-a6d4-8b14-8681-6f31d2a78e30"
|
|
15499
|
+
},
|
|
15500
|
+
{
|
|
15501
|
+
"key": "lean_demand3_a_repunit_is_divisible_by_three_exactly_when_its_length_is_for_every_n",
|
|
15502
|
+
"verdict": "UNVERIFIED",
|
|
15503
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15504
|
+
"receipt": "93c43bd9-4707-8199-be02-c954c8916904"
|
|
15505
|
+
},
|
|
15506
|
+
{
|
|
15507
|
+
"key": "lean_demand3_repunit_of_a_sum",
|
|
15508
|
+
"verdict": "UNVERIFIED",
|
|
15509
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15510
|
+
"receipt": "5558e77e-438c-84e4-9a58-2520685771a3"
|
|
15511
|
+
},
|
|
15512
|
+
{
|
|
15513
|
+
"key": "lean_demand3_repunits_repeat_mod_seven_every_six_digits",
|
|
15514
|
+
"verdict": "UNVERIFIED",
|
|
15515
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15516
|
+
"receipt": "a67a8eec-997b-86f2-adbe-b77355dafc70"
|
|
15517
|
+
},
|
|
15518
|
+
{
|
|
15519
|
+
"key": "lean_demand3_a_repunit_has_the_residue_of_its_length_mod_six_mod_seven",
|
|
15520
|
+
"verdict": "UNVERIFIED",
|
|
15521
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15522
|
+
"receipt": "ec5bf7fe-1dd8-863d-8443-8682088d254b"
|
|
15523
|
+
},
|
|
15524
|
+
{
|
|
15525
|
+
"key": "lean_demand3_a_repunit_is_divisible_by_seven_exactly_when_six_divides_its_length_for_every_n",
|
|
15526
|
+
"verdict": "UNVERIFIED",
|
|
15527
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15528
|
+
"receipt": "2bb98278-186d-8284-9c6e-9c9e74177679"
|
|
15529
|
+
},
|
|
15530
|
+
{
|
|
15531
|
+
"key": "lean_elementary_the_interior_and_exterior_angles_are_n_straight_angles_for_every_n",
|
|
15532
|
+
"verdict": "UNVERIFIED",
|
|
15533
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15534
|
+
"receipt": "d1fbd7f1-d1df-8c7f-bb56-d565780d1db2"
|
|
15535
|
+
},
|
|
15536
|
+
{
|
|
15537
|
+
"key": "lean_elementary_a_product_of_consecutive_numbers_is_even",
|
|
15538
|
+
"verdict": "UNVERIFIED",
|
|
15539
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15540
|
+
"receipt": "cf763033-1ed3-82d8-866e-88ea2a38b2d1"
|
|
15541
|
+
},
|
|
15542
|
+
{
|
|
15543
|
+
"key": "lean_elementary_eight_times_a_triangular_number_plus_one_is_an_odd_square_for_every_n",
|
|
15544
|
+
"verdict": "UNVERIFIED",
|
|
15545
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15546
|
+
"receipt": "1aa59ef6-880c-8e39-b946-1b88e426040e"
|
|
15547
|
+
},
|
|
15548
|
+
{
|
|
15549
|
+
"key": "lean_energy_two_parts_in_three_is_two_thirds_at_every_scale_for_every_m",
|
|
15550
|
+
"verdict": "UNVERIFIED",
|
|
15551
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15552
|
+
"receipt": "9177c3d3-8280-8d65-9df5-c27b42454279"
|
|
15553
|
+
},
|
|
15554
|
+
{
|
|
15555
|
+
"key": "lean_families_the_powers_of_two_sum_to_one_less_than_the_next_for_every_n",
|
|
15556
|
+
"verdict": "UNVERIFIED",
|
|
15557
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15558
|
+
"receipt": "3cab57ca-4d36-8f80-a221-21c11d25adc9"
|
|
15559
|
+
},
|
|
15560
|
+
{
|
|
15561
|
+
"key": "lean_families_square_of_successor",
|
|
15562
|
+
"verdict": "UNVERIFIED",
|
|
15563
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15564
|
+
"receipt": "f9826dc5-b85d-8a85-800b-f6027e83a0cf"
|
|
15565
|
+
},
|
|
15566
|
+
{
|
|
15567
|
+
"key": "lean_families_the_first_n_odd_numbers_sum_to_n_squared_for_every_n",
|
|
15568
|
+
"verdict": "UNVERIFIED",
|
|
15569
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15570
|
+
"receipt": "7baff487-adea-8866-9d67-71fbbb0cdee6"
|
|
15571
|
+
},
|
|
15572
|
+
{
|
|
15573
|
+
"key": "lean_mechanical_consecutive_squares_differ_by_the_odd_numbers",
|
|
15574
|
+
"verdict": "UNVERIFIED",
|
|
15575
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15576
|
+
"receipt": "65131201-9df7-8805-8427-c1407fcd92cf"
|
|
15577
|
+
},
|
|
15578
|
+
{
|
|
15579
|
+
"key": "lean_mechanical_every_multiple_of_three_four_five_is_pythagorean",
|
|
15580
|
+
"verdict": "UNVERIFIED",
|
|
15581
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15582
|
+
"receipt": "a20992d7-56ea-8048-a939-96fc2fdc451d"
|
|
15583
|
+
},
|
|
15584
|
+
{
|
|
15585
|
+
"key": "lean_mechanical_the_product_of_three_consecutive_numbers_is_even",
|
|
15586
|
+
"verdict": "UNVERIFIED",
|
|
15587
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15588
|
+
"receipt": "0eb7327f-0789-8918-8365-8d4188436e01"
|
|
15589
|
+
},
|
|
15590
|
+
{
|
|
15591
|
+
"key": "lean_mechanical_the_product_of_three_consecutive_numbers_is_a_multiple_of_three",
|
|
15592
|
+
"verdict": "UNVERIFIED",
|
|
15593
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15594
|
+
"receipt": "f3e2ee80-28d1-89e3-92c7-082265ef98dc"
|
|
15595
|
+
},
|
|
15596
|
+
{
|
|
15597
|
+
"key": "lean_mechanical_the_product_of_any_three_consecutive_integers_is_divisible_by_six_for_every_n",
|
|
15598
|
+
"verdict": "UNVERIFIED",
|
|
15599
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15600
|
+
"receipt": "65518577-2bc3-82a2-97f8-f6cd4f7d1b62"
|
|
15601
|
+
},
|
|
15602
|
+
{
|
|
15603
|
+
"key": "lean_reversal_foldl_add_start",
|
|
15604
|
+
"verdict": "UNVERIFIED",
|
|
15605
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15606
|
+
"receipt": "70a7cff5-e668-8f44-a8d0-797abfa246c8"
|
|
15607
|
+
},
|
|
15608
|
+
{
|
|
15609
|
+
"key": "lean_reversal_the_digits_sum_to_the_number_mod_nine_when_the_fuel_covers_them",
|
|
15610
|
+
"verdict": "UNVERIFIED",
|
|
15611
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15612
|
+
"receipt": "58d4c502-7f73-8e6c-923e-76fdf25fc81c"
|
|
15613
|
+
},
|
|
15614
|
+
{
|
|
15615
|
+
"key": "lean_reversal_a_number_is_below_ten_to_its_own_successor",
|
|
15616
|
+
"verdict": "UNVERIFIED",
|
|
15617
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15618
|
+
"receipt": "dc7330c0-7a4c-8d99-9874-37c4c10fd1bb"
|
|
15619
|
+
},
|
|
15620
|
+
{
|
|
15621
|
+
"key": "lean_reversal_the_digit_sum_has_the_residue_of_the_number_mod_nine_for_every_n",
|
|
15622
|
+
"verdict": "UNVERIFIED",
|
|
15623
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15624
|
+
"receipt": "1a8922c4-c55c-88a0-b55a-23663d22fe49"
|
|
15625
|
+
},
|
|
15626
|
+
{
|
|
15627
|
+
"key": "lean_reversal_folding_by_ten_keeps_the_residue_of_the_digit_sum",
|
|
15628
|
+
"verdict": "UNVERIFIED",
|
|
15629
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15630
|
+
"receipt": "c7ce0223-8884-8e3a-84a1-dded449c3cb0"
|
|
15631
|
+
},
|
|
15632
|
+
{
|
|
15633
|
+
"key": "lean_reversal_reversal_keeps_the_residue_mod_nine_for_every_n",
|
|
15634
|
+
"verdict": "UNVERIFIED",
|
|
15635
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15636
|
+
"receipt": "3159b043-f18c-8c28-b831-114d6dc70ce2"
|
|
15637
|
+
},
|
|
15638
|
+
{
|
|
15639
|
+
"key": "lean_split_the_coin_step_and_the_coins_are_inverse_for_every_c",
|
|
15640
|
+
"verdict": "UNVERIFIED",
|
|
15641
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15642
|
+
"receipt": "1c1ebe41-4e80-80ad-b352-e90a09922838"
|
|
15643
|
+
},
|
|
15644
|
+
{
|
|
15645
|
+
"key": "lean_light_the_second_returns_from_the_metre_and_the_period_for_every_s",
|
|
15646
|
+
"verdict": "UNVERIFIED",
|
|
15647
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15648
|
+
"receipt": "1de974bb-854a-879c-a8f0-712b59f8d7bc"
|
|
15649
|
+
},
|
|
15650
|
+
{
|
|
15651
|
+
"key": "lean_mechanical_repeated_doubling_is_the_power_of_two_for_every_k",
|
|
15652
|
+
"verdict": "UNVERIFIED",
|
|
15653
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15654
|
+
"receipt": "71d6eeaa-fd06-8af1-893f-dfa60297892d"
|
|
15655
|
+
},
|
|
15656
|
+
{
|
|
15657
|
+
"key": "lean_mechanical_relation_digitroot_is_residue_mod9_for_every_n",
|
|
15658
|
+
"verdict": "UNVERIFIED",
|
|
15659
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15660
|
+
"receipt": "22aed33c-e7ff-80ef-aded-b466c40bf0e4"
|
|
15661
|
+
},
|
|
15662
|
+
{
|
|
15663
|
+
"key": "lean_mechanical_the_nine_times_table_always_digital_roots_to_nine_for_every_k",
|
|
15664
|
+
"verdict": "UNVERIFIED",
|
|
15665
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15666
|
+
"receipt": "36b3b4ea-25f1-8083-b075-d707f2fb91ea"
|
|
15667
|
+
},
|
|
15668
|
+
{
|
|
15669
|
+
"key": "lean_mechanical_the_digital_root_has_the_residue_of_its_number",
|
|
15670
|
+
"verdict": "UNVERIFIED",
|
|
15671
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15672
|
+
"receipt": "efc4383f-1f52-8cfc-9d4a-d291f4aa5bd4"
|
|
15673
|
+
},
|
|
15674
|
+
{
|
|
15675
|
+
"key": "lean_mechanical_a_digital_root_lies_between_one_and_nine",
|
|
15676
|
+
"verdict": "UNVERIFIED",
|
|
15677
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15678
|
+
"receipt": "298da32e-60d7-8bf9-9135-c6e904ae937f"
|
|
15679
|
+
},
|
|
15680
|
+
{
|
|
15681
|
+
"key": "lean_mechanical_casting_out_nines_is_multiplicative_for_every_a_b",
|
|
15682
|
+
"verdict": "UNVERIFIED",
|
|
15683
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15684
|
+
"receipt": "58842a8d-45b2-8316-b9a6-440b595e6782"
|
|
15685
|
+
},
|
|
15686
|
+
{
|
|
15687
|
+
"key": "lean_mechanical_the_moduli_dimensions_are_three_g_minus_three_and_six_g_minus_six_for_every_g",
|
|
15688
|
+
"verdict": "UNVERIFIED",
|
|
15689
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15690
|
+
"receipt": "633ba212-336a-8600-90d6-836751f6b813"
|
|
15691
|
+
},
|
|
15692
|
+
{
|
|
15693
|
+
"key": "lean_reach_exhaustion_never_reaches_its_own_bound_for_every_n",
|
|
15694
|
+
"verdict": "UNVERIFIED",
|
|
15695
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15696
|
+
"receipt": "dfc2849f-3870-823b-ade5-f036c5f40166"
|
|
15697
|
+
},
|
|
15698
|
+
{
|
|
15699
|
+
"key": "lean_reach_the_successor_of_every_bound_lies_outside_for_every_n",
|
|
15700
|
+
"verdict": "UNVERIFIED",
|
|
15701
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15702
|
+
"receipt": "1113761c-4967-898e-a9d9-d836a27b42ae"
|
|
15703
|
+
},
|
|
15704
|
+
{
|
|
15705
|
+
"key": "lean_reach_doubling_the_domain_leaves_the_same_hole_for_every_n",
|
|
15706
|
+
"verdict": "UNVERIFIED",
|
|
15707
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15708
|
+
"receipt": "f57338c8-104b-8058-90f6-b86622f64f86"
|
|
15709
|
+
},
|
|
15710
|
+
{
|
|
15711
|
+
"key": "lean_z9plus_doubling_has_period_six_for_every_k",
|
|
15712
|
+
"verdict": "UNVERIFIED",
|
|
15713
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15714
|
+
"receipt": "2c9ca8bc-08a6-87e8-ba10-0390547c7318"
|
|
15715
|
+
},
|
|
15716
|
+
{
|
|
15717
|
+
"key": "lean_z9plus_orbit_digital_roots_have_period_six_for_every_k",
|
|
15718
|
+
"verdict": "UNVERIFIED",
|
|
15719
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15720
|
+
"receipt": "e88dfdf8-3c33-87c9-b480-65d2db2769ac"
|
|
15721
|
+
},
|
|
15722
|
+
{
|
|
15723
|
+
"key": "lean_z9plus_the_doubling_orbit_is_read_from_the_exponent_mod_six",
|
|
15724
|
+
"verdict": "UNVERIFIED",
|
|
15725
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15726
|
+
"receipt": "c688c966-b59f-8e39-91d8-fa1f9fc564a0"
|
|
15727
|
+
},
|
|
15728
|
+
{
|
|
15729
|
+
"key": "lean_z9plus_the_orbit_never_meets_the_triad_for_every_k",
|
|
15730
|
+
"verdict": "UNVERIFIED",
|
|
15731
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15732
|
+
"receipt": "8c3dfc38-91e6-8a00-9d2f-ac18974cd169"
|
|
15733
|
+
},
|
|
15734
|
+
{
|
|
15735
|
+
"key": "lean_z9plus_fibonacci_residues_mod_nine_repeat_every_twenty_four_steps",
|
|
15736
|
+
"verdict": "UNVERIFIED",
|
|
15737
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15738
|
+
"receipt": "04f6a9cd-b19f-8b13-b5d9-7d88fec0139e"
|
|
15739
|
+
},
|
|
15740
|
+
{
|
|
15741
|
+
"key": "lean_z9plus_pisano_period_mod_nine_is_twenty_four_for_every_k",
|
|
15742
|
+
"verdict": "UNVERIFIED",
|
|
15743
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15744
|
+
"receipt": "985c1ebe-dc19-877e-8573-82765db72126"
|
|
15745
|
+
},
|
|
15746
|
+
{
|
|
15747
|
+
"key": "lean_z9plus_the_fuelled_gcd_is_the_gcd_when_the_fuel_exceeds_the_second_argument",
|
|
15748
|
+
"verdict": "UNVERIFIED",
|
|
15749
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15750
|
+
"receipt": "73c32b16-76ca-8bbc-91f3-3d550cd02477"
|
|
15751
|
+
},
|
|
15752
|
+
{
|
|
15753
|
+
"key": "lean_z9plus_consecutive_fibonacci_numbers_are_coprime",
|
|
15754
|
+
"verdict": "UNVERIFIED",
|
|
15755
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15756
|
+
"receipt": "5ae6ebcf-4c89-80d4-bc8c-1e5fed479a69"
|
|
15757
|
+
},
|
|
15758
|
+
{
|
|
15759
|
+
"key": "lean_z9plus_consecutive_fibonacci_are_coprime_for_every_n",
|
|
15760
|
+
"verdict": "UNVERIFIED",
|
|
15761
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15762
|
+
"receipt": "424d4751-1648-8d01-b6aa-e31be117166a"
|
|
15763
|
+
},
|
|
15764
|
+
{
|
|
15765
|
+
"key": "lean_z9plus_digital_root_agrees_with_the_residue_for_every_n",
|
|
15766
|
+
"verdict": "UNVERIFIED",
|
|
15767
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15768
|
+
"receipt": "20da0230-2b9f-8735-848e-8009809d9f04"
|
|
15769
|
+
},
|
|
15770
|
+
{
|
|
15771
|
+
"key": "lean_z9plus_digital_root_is_the_digit_sum_residue_for_every_n",
|
|
15772
|
+
"verdict": "UNVERIFIED",
|
|
15773
|
+
"ground": "no candidate in the current space — nothing to recompute",
|
|
15774
|
+
"receipt": "694fefdf-a71b-8019-84e5-04477e7be3d8"
|
|
15481
15775
|
}
|
|
15482
15776
|
]
|
package/src/proof/z9plus.lean
CHANGED
|
@@ -205,4 +205,96 @@ theorem both_parts_sum_to_zero :
|
|
|
205
205
|
m9 ((R.filter (fun d => R.any (fun e => m9 (d * e) == 1))).foldl (· + ·) 0) == 0
|
|
206
206
|
∧ m9 ((R.filter (fun d => ! R.any (fun e => m9 (d * e) == 1))).foldl (· + ·) 0) == 0 := by decide
|
|
207
207
|
|
|
208
|
+
|
|
209
|
+
-- ── the capped rows above, proved for every value — no bound ─────────────────────────────────────────────────
|
|
210
|
+
-- doubling_has_period_six (k < 30), orbit_digital_roots_have_period_six (k < 24), the_orbit_never_meets_the_triad
|
|
211
|
+
-- (k < 40), pisano_period_mod_nine_is_twenty_four (k < 30), consecutive_fibonacci_are_coprime (n ≤ 25) and
|
|
212
|
+
-- digital_root_agrees_with_the_residue (n ≤ 300) were checked up to a bound; these prove them for every value.
|
|
213
|
+
-- 2⁶ ≡ 1 mod 9 turns the orbit; the pair (fib k, fib (k+1)) mod 9 returns after 24 steps; gcd9 is Euclid with fuel
|
|
214
|
+
-- a + b + 1, which always exceeds what Euclid needs, so it is the gcd.
|
|
215
|
+
theorem doubling_has_period_six_for_every_k : ∀ k : Nat, pw 2 (k + 6) = pw 2 k := by
|
|
216
|
+
intro k
|
|
217
|
+
unfold pw m9
|
|
218
|
+
rw [Nat.pow_add, Nat.mul_mod]
|
|
219
|
+
have h : 2 ^ 6 % 9 = 1 := by decide
|
|
220
|
+
rw [h, Nat.mul_one, Nat.mod_mod]
|
|
221
|
+
|
|
222
|
+
theorem orbit_digital_roots_have_period_six_for_every_k : ∀ k : Nat, dr (pw 2 (k + 6)) = dr (pw 2 k) := by
|
|
223
|
+
intro k
|
|
224
|
+
rw [doubling_has_period_six_for_every_k]
|
|
225
|
+
|
|
226
|
+
theorem the_doubling_orbit_is_read_from_the_exponent_mod_six : ∀ k : Nat, pw 2 k = pw 2 (k % 6) := by
|
|
227
|
+
intro k
|
|
228
|
+
induction k using Nat.strongRecOn with
|
|
229
|
+
| _ k ih =>
|
|
230
|
+
if hk : k < 6 then rw [Nat.mod_eq_of_lt hk]
|
|
231
|
+
else
|
|
232
|
+
have e : k = (k - 6) + 6 := by omega
|
|
233
|
+
rw [e, doubling_has_period_six_for_every_k, ih (k - 6) (by omega), Nat.add_mod_right]
|
|
234
|
+
|
|
235
|
+
theorem the_orbit_never_meets_the_triad_for_every_k : ∀ k : Nat, pw 2 k ≠ 0 ∧ pw 2 k ≠ 3 ∧ pw 2 k ≠ 6 := by
|
|
236
|
+
intro k
|
|
237
|
+
rw [the_doubling_orbit_is_read_from_the_exponent_mod_six]
|
|
238
|
+
have h : k % 6 < 6 := Nat.mod_lt _ (by decide)
|
|
239
|
+
generalize k % 6 = j at h ⊢
|
|
240
|
+
revert j
|
|
241
|
+
decide
|
|
242
|
+
|
|
243
|
+
theorem fibonacci_residues_mod_nine_repeat_every_twenty_four_steps :
|
|
244
|
+
∀ k : Nat, fib (k + 24) % 9 = fib k % 9 ∧ fib (k + 25) % 9 = fib (k + 1) % 9 := by
|
|
245
|
+
intro k
|
|
246
|
+
induction k with
|
|
247
|
+
| zero => decide
|
|
248
|
+
| succ k ih =>
|
|
249
|
+
refine ⟨ih.2, ?_⟩
|
|
250
|
+
show (fib (k + 24) + fib (k + 25)) % 9 = (fib k + fib (k + 1)) % 9
|
|
251
|
+
rw [Nat.add_mod, ih.1, ih.2, ← Nat.add_mod]
|
|
252
|
+
|
|
253
|
+
theorem pisano_period_mod_nine_is_twenty_four_for_every_k : ∀ k : Nat, fib9 (k + 24) = fib9 k := by
|
|
254
|
+
intro k
|
|
255
|
+
exact (fibonacci_residues_mod_nine_repeat_every_twenty_four_steps k).1
|
|
256
|
+
|
|
257
|
+
theorem the_fuelled_gcd_is_the_gcd_when_the_fuel_exceeds_the_second_argument :
|
|
258
|
+
∀ f a b : Nat, b < f → gcdF f a b = Nat.gcd a b := by
|
|
259
|
+
intro f
|
|
260
|
+
induction f with
|
|
261
|
+
| zero => intro a b h; exact absurd h (Nat.not_lt_zero b)
|
|
262
|
+
| succ f ih =>
|
|
263
|
+
intro a b h
|
|
264
|
+
cases b with
|
|
265
|
+
| zero => show a = Nat.gcd a 0; rw [Nat.gcd_zero_right]
|
|
266
|
+
| succ b =>
|
|
267
|
+
show gcdF f (b + 1) (a % (b + 1)) = Nat.gcd a (b + 1)
|
|
268
|
+
have hm : a % (b + 1) < b + 1 := Nat.mod_lt a (Nat.succ_pos b)
|
|
269
|
+
rw [ih (b + 1) (a % (b + 1)) (by omega), Nat.gcd_comm a (b + 1), Nat.gcd_rec (b + 1) a, Nat.gcd_comm]
|
|
270
|
+
|
|
271
|
+
theorem consecutive_fibonacci_numbers_are_coprime : ∀ n : Nat, Nat.gcd (fib n) (fib (n + 1)) = 1 := by
|
|
272
|
+
intro n
|
|
273
|
+
induction n with
|
|
274
|
+
| zero => show Nat.gcd 0 1 = 1; exact Nat.gcd_zero_left 1
|
|
275
|
+
| succ n ih =>
|
|
276
|
+
show Nat.gcd (fib (n + 1)) (fib n + fib (n + 1)) = 1
|
|
277
|
+
rw [Nat.gcd_rec, Nat.add_mod_right, ← Nat.gcd_rec, Nat.gcd_comm, ih]
|
|
278
|
+
|
|
279
|
+
theorem consecutive_fibonacci_are_coprime_for_every_n : ∀ n : Nat, gcd9 (fib n) (fib (n + 1)) = 1 := by
|
|
280
|
+
intro n
|
|
281
|
+
unfold gcd9
|
|
282
|
+
rw [the_fuelled_gcd_is_the_gcd_when_the_fuel_exceeds_the_second_argument _ _ _ (by omega)]
|
|
283
|
+
exact consecutive_fibonacci_numbers_are_coprime n
|
|
284
|
+
|
|
285
|
+
theorem digital_root_agrees_with_the_residue_for_every_n : ∀ n : Nat, 0 < n → (dr n = 9 ↔ m9 n = 0) := by
|
|
286
|
+
intro n hn
|
|
287
|
+
unfold dr m9
|
|
288
|
+
rw [if_neg (show ¬ ((n == 0) = true) by simp; omega)]
|
|
289
|
+
by_cases h : n % 9 = 0
|
|
290
|
+
· simp [h]
|
|
291
|
+
· rw [if_neg (show ¬ ((n % 9 == 0) = true) by simpa using h)]
|
|
292
|
+
constructor
|
|
293
|
+
· intro e; have := Nat.mod_lt n (show 0 < 9 by decide); omega
|
|
294
|
+
· intro e; exact absurd e h
|
|
295
|
+
|
|
296
|
+
theorem digital_root_is_the_digit_sum_residue_for_every_n : ∀ n : Nat, m9 (digitSum n) = m9 n := by
|
|
297
|
+
intro n
|
|
298
|
+
exact Reversal.the_digit_sum_has_the_residue_of_the_number_mod_nine_for_every_n n
|
|
299
|
+
|
|
208
300
|
end Z9Plus
|