@@ -1314,6 +1314,43 @@ end
1314
1314
1315
1315
end nnreal
1316
1316
1317
+ namespace real
1318
+ variables {n : ℕ}
1319
+
1320
+ lemma exists_rat_pow_btwn_rat_aux (hn : n ≠ 0 ) (x y : ℝ) (h : x < y) (hy : 0 < y) :
1321
+ ∃ q : ℚ, 0 < q ∧ x < q^n ∧ ↑q^n < y :=
1322
+ begin
1323
+ have hn' : 0 < (n : ℝ) := by exact_mod_cast hn.bot_lt,
1324
+ obtain ⟨q, hxq, hqy⟩ := exists_rat_btwn (rpow_lt_rpow (le_max_left 0 x) (max_lt hy h) $
1325
+ inv_pos.mpr hn'),
1326
+ have := rpow_nonneg_of_nonneg (le_max_left 0 x) n⁻¹,
1327
+ have hq := this.trans_lt hxq,
1328
+ replace hxq := rpow_lt_rpow this hxq hn',
1329
+ replace hqy := rpow_lt_rpow hq.le hqy hn',
1330
+ rw [rpow_nat_cast, rpow_nat_cast, rpow_nat_inv_pow_nat _ hn.bot_lt] at hxq hqy,
1331
+ exact ⟨q, by exact_mod_cast hq, (le_max_right _ _).trans_lt hxq, hqy⟩,
1332
+ { exact le_max_left _ _ },
1333
+ { exact hy.le }
1334
+ end
1335
+
1336
+ lemma exists_rat_pow_btwn_rat (hn : n ≠ 0 ) {x y : ℚ} (h : x < y) (hy : 0 < y) :
1337
+ ∃ q : ℚ, 0 < q ∧ x < q^n ∧ q^n < y :=
1338
+ by apply_mod_cast exists_rat_pow_btwn_rat_aux hn x y; assumption
1339
+
1340
+ /-- There is a rational power between any two positive elements of an archimedean ordered field. -/
1341
+ lemma exists_rat_pow_btwn {α : Type *} [linear_ordered_field α] [archimedean α] (hn : n ≠ 0 )
1342
+ {x y : α} (h : x < y) (hy : 0 < y) : ∃ q : ℚ, 0 < q ∧ x < q^n ∧ (q^n : α) < y :=
1343
+ begin
1344
+ obtain ⟨q₂, hx₂, hy₂⟩ := exists_rat_btwn (max_lt h hy),
1345
+ obtain ⟨q₁, hx₁, hq₁₂⟩ := exists_rat_btwn hx₂,
1346
+ have : (0 : α) < q₂ := (le_max_right _ _).trans_lt hx₂,
1347
+ norm_cast at hq₁₂ this ,
1348
+ obtain ⟨q, hq, hq₁, hq₂⟩ := exists_rat_pow_btwn_rat hn hq₁₂ this ,
1349
+ refine ⟨q, hq, (le_max_left _ _).trans_lt $ hx₁.trans _, hy₂.trans' _⟩; assumption_mod_cast,
1350
+ end
1351
+
1352
+ end real
1353
+
1317
1354
open filter
1318
1355
1319
1356
lemma filter.tendsto.nnrpow {α : Type *} {f : filter α} {u : α → ℝ≥0 } {v : α → ℝ} {x : ℝ≥0 } {y : ℝ}
0 commit comments