@@ -74,10 +74,8 @@ theorem flowerVertCount_ge_real (u v g : ℕ) (hu : 1 < u)
7474 (huv : u ≤ v) :
7575 (↑(u + v) - 2 ) / (↑(u + v) - 1 ) * (↑(u + v) : ℝ) ^ g ≤
7676 ↑(flowerVertCount u v g) := by
77- have hw1 : (0 : ℝ) < ↑(u + v) - 1 := by
78- have : (1 : ℝ) < ↑(u + v) := by
79- exact_mod_cast (show 1 < u + v from by omega)
80- linarith
77+ have hw1 : (0 : ℝ) < ↑(u + v) - 1 :=
78+ sub_pos.mpr (by exact_mod_cast (show 1 < u + v by omega))
8179 rw [div_mul_eq_mul_div, div_le_iff₀ hw1]
8280 have h := flowerVertCount_lower_real u v g hu huv
8381 linarith [mul_comm (↑(u + v) - 1 : ℝ) (↑(flowerVertCount u v g) : ℝ)]
@@ -86,13 +84,11 @@ theorem flowerVertCount_ge_real (u v g : ℕ) (hu : 1 < u)
8684theorem flowerVertCount_le_real (u v g : ℕ) (hu : 1 < u)
8785 (huv : u ≤ v) :
8886 (↑(flowerVertCount u v g) : ℝ) ≤ 2 * (↑(u + v) : ℝ) ^ g := by
89- have hw1 : (0 : ℝ) < ↑(u + v) - 1 := by
90- have : (1 : ℝ) < ↑(u + v) := by
91- exact_mod_cast (show 1 < u + v from by omega)
92- linarith
87+ have hw1 : (0 : ℝ) < ↑(u + v) - 1 :=
88+ sub_pos.mpr (by exact_mod_cast (show 1 < u + v by omega))
9389 have h := flowerVertCount_upper_real u v g hu huv
9490 rw [show (2 : ℝ) * (↑(u + v) - 1 ) * (↑(u + v) : ℝ) ^ g =
95- (↑(u + v) - 1 ) * (2 * (↑(u + v) : ℝ) ^ g) from by ring] at h
91+ (↑(u + v) - 1 ) * (2 * (↑(u + v) : ℝ) ^ g) by ring] at h
9692 exact (mul_le_mul_iff_right₀ hw1).mp h
9793
9894/-! ### The headline theorem -/
@@ -113,7 +109,7 @@ theorem flowerDimension (u v : ℕ) (hu : 1 < u) (huv : u ≤ v) :
113109 have hlogu : 0 < log (↑u : ℝ) :=
114110 log_pos (by exact_mod_cast hu)
115111 have hlogw : 0 < log (↑(u + v) : ℝ) :=
116- log_pos (by exact_mod_cast (show 1 < u + v from by omega))
112+ log_pos (by exact_mod_cast (show 1 < u + v by omega))
117113 have hw_pos : (0 : ℝ) < ↑(u + v) :=
118114 Nat.cast_pos.mpr (by omega)
119115 have hN_pos : ∀ g, (0 : ℝ) < ↑(flowerVertCount u v g) :=
@@ -122,8 +118,8 @@ theorem flowerDimension (u v : ℕ) (hu : 1 < u) (huv : u ≤ v) :
122118 have h_log_hub : ∀ g : ℕ,
123119 log (↑(flowerHubDist u v g) : ℝ) = ↑g * log (↑u : ℝ) := by
124120 intro g
125- rw [show (↑(flowerHubDist u v g) : ℝ) = (↑u : ℝ) ^ g from by
126- simp [flowerHubDist_eq_pow, Nat.cast_pow]]
121+ rw [show (↑(flowerHubDist u v g) : ℝ) = (↑u : ℝ) ^ g by
122+ simp only [flowerHubDist_eq_pow, Nat.cast_pow]]
127123 exact log_pow (↑u) g
128124 -- Step 2: Suffices with g * log(u) in denominator
129125 suffices h : Tendsto
@@ -148,14 +144,9 @@ theorem flowerDimension (u v : ℕ) (hu : 1 < u) (huv : u ≤ v) :
148144 -- The residual is bounded between log(c₁)/(g*log u) and log(2)/(g* log u)
149145 -- where c₁ = (w-2)/(w-1) > 0
150146 set c₁ := (↑(u + v) - 2 : ℝ) / (↑(u + v) - 1 ) with hc₁_def
151- have hc₁_pos : 0 < c₁ := by
152- apply div_pos
153- · have : (2 : ℝ) < ↑(u + v) := by
154- exact_mod_cast (show 2 < u + v from by omega)
155- linarith
156- · have : (1 : ℝ) < ↑(u + v) := by
157- exact_mod_cast (show 1 < u + v from by omega)
158- linarith
147+ have hc₁_pos : 0 < c₁ :=
148+ div_pos (sub_pos.mpr (by exact_mod_cast (show 2 < u + v by omega)))
149+ (sub_pos.mpr (by exact_mod_cast (show 1 < u + v by omega)))
159150 -- g * log(u) → ∞
160151 have h_denom : Tendsto (fun g : ℕ ↦ (↑g : ℝ) * log (↑u : ℝ))
161152 atTop atTop :=
0 commit comments