number_theory.liouville.measure ⟷
Mathlib.NumberTheory.Liouville.Measure
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -106,7 +106,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
have hB : ∀ a b, volume (B a b) = ↑(2 / b ^ r : ℝ≥0) :=
by
intro a b
- rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_nat_cast, ← NNReal.coe_rpow, ←
+ rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_natCast, ← NNReal.coe_rpow, ←
NNReal.coe_div, ENNReal.ofReal_coe_nnreal]
have :
∀ b : ℕ, volume (⋃ a ∈ Finset.Icc (0 : ℤ) b, B a b) ≤ (2 * (b ^ (1 - r) + b ^ (-r)) : ℝ≥0) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -117,7 +117,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
measure_bUnion_finset_le _ _
_ = ((b + 1) * (2 / b ^ r) : ℝ≥0) := by
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
- Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
+ Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_natCast]
_ = _ := _
have : 1 - r ≠ 0 := by linarith
rw [ENNReal.coe_inj]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -117,7 +117,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
measure_bUnion_finset_le _ _
_ = ((b + 1) * (2 / b ^ r) : ℝ≥0) := by
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
- Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
+ Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := _
have : 1 - r ≠ 0 := by linarith
rw [ENNReal.coe_inj]
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -47,7 +47,7 @@ theorem setOf_liouvilleWith_subset_aux :
by
rintro x ⟨p, hp, hxp⟩
rcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩
- rw [lt_sub_iff_add_lt'] at hn
+ rw [lt_sub_iff_add_lt'] at hn
suffices
∀ y : ℝ,
LiouvilleWith p y →
@@ -63,7 +63,7 @@ theorem setOf_liouvilleWith_subset_aux :
clear hxp x; intro x hxp hx01
refine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_at_top 1)).mono _
rintro b ⟨⟨a, hne, hlt⟩, hb⟩
- rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
+ rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
refine' ⟨a, _, hlt⟩
replace hb : (1 : ℝ) ≤ b; exact Nat.one_le_cast.2 hb
have hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb
@@ -74,7 +74,7 @@ theorem setOf_liouvilleWith_subset_aux :
_ ≤ b ^ (2 + 1 / (n + 1 : ℕ) : ℝ) := rpow_le_rpow_of_exponent_le hb (one_le_two.trans _)
simpa using n.cast_add_one_pos.le
rw [sub_div' _ _ _ hb0.ne', abs_div, abs_of_pos hb0, div_lt_div_right hb0, abs_sub_lt_iff,
- sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
+ sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
rw [Finset.mem_Icc, ← Int.lt_add_one_iff, ← Int.lt_add_one_iff, ← neg_lt_iff_pos_add, add_comm, ←
@Int.cast_lt ℝ, ← @Int.cast_lt ℝ]
push_cast
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -120,7 +120,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := _
have : 1 - r ≠ 0 := by linarith
- rw [ENNReal.coe_eq_coe]
+ rw [ENNReal.coe_inj]
simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]
refine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)
refine' (Summable.add _ _).mul_left _ <;> simp only [NNReal.summable_rpow] <;> linarith
mathlib commit https://github.com/leanprover-community/mathlib/commit/b1abe23ae96fef89ad30d9f4362c307f72a55010
@@ -129,7 +129,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
#print ae_not_liouvilleWith /-
theorem ae_not_liouvilleWith : ∀ᵐ x, ∀ p > (2 : ℝ), ¬LiouvilleWith p x := by
- simpa only [ae_iff, not_forall, Classical.not_not, set_of_exists] using
+ simpa only [ae_iff, Classical.not_forall, Classical.not_not, set_of_exists] using
volume_iUnion_setOf_liouvilleWith
#align ae_not_liouville_with ae_not_liouvilleWith
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
-import Mathbin.NumberTheory.Liouville.Residual
-import Mathbin.NumberTheory.Liouville.LiouvilleWith
-import Mathbin.Analysis.PSeries
+import MeasureTheory.Measure.Lebesgue.Basic
+import NumberTheory.Liouville.Residual
+import NumberTheory.Liouville.LiouvilleWith
+import Analysis.PSeries
#align_import number_theory.liouville.measure from "leanprover-community/mathlib"@"36938f775671ff28bea1c0310f1608e4afbb22e0"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module number_theory.liouville.measure
-! leanprover-community/mathlib commit 36938f775671ff28bea1c0310f1608e4afbb22e0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
import Mathbin.NumberTheory.Liouville.Residual
import Mathbin.NumberTheory.Liouville.LiouvilleWith
import Mathbin.Analysis.PSeries
+#align_import number_theory.liouville.measure from "leanprover-community/mathlib"@"36938f775671ff28bea1c0310f1608e4afbb22e0"
+
/-!
# Volume of the set of Liouville numbers
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -38,6 +38,7 @@ open scoped Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
+#print setOf_liouvilleWith_subset_aux /-
theorem setOf_liouvilleWith_subset_aux :
{x : ℝ | ∃ p > 2, LiouvilleWith p x} ⊆
⋃ m : ℤ,
@@ -87,7 +88,9 @@ theorem setOf_liouvilleWith_subset_aux :
x * b ≤ 1 * b := mul_le_mul_of_nonneg_right hx01.2.le hb0.le
_ = b := one_mul b
#align set_of_liouville_with_subset_aux setOf_liouvilleWith_subset_aux
+-/
+#print volume_iUnion_setOf_liouvilleWith /-
/-- The set of numbers satisfying the Liouville condition with some exponent `p > 2` has Lebesgue
measure zero. -/
@[simp]
@@ -125,11 +128,14 @@ theorem volume_iUnion_setOf_liouvilleWith :
refine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)
refine' (Summable.add _ _).mul_left _ <;> simp only [NNReal.summable_rpow] <;> linarith
#align volume_Union_set_of_liouville_with volume_iUnion_setOf_liouvilleWith
+-/
+#print ae_not_liouvilleWith /-
theorem ae_not_liouvilleWith : ∀ᵐ x, ∀ p > (2 : ℝ), ¬LiouvilleWith p x := by
simpa only [ae_iff, not_forall, Classical.not_not, set_of_exists] using
volume_iUnion_setOf_liouvilleWith
#align ae_not_liouville_with ae_not_liouvilleWith
+-/
#print ae_not_liouville /-
theorem ae_not_liouville : ∀ᵐ x, ¬Liouville x :=
@@ -137,15 +143,19 @@ theorem ae_not_liouville : ∀ᵐ x, ¬Liouville x :=
#align ae_not_liouville ae_not_liouville
-/
+#print volume_setOf_liouville /-
/-- The set of Liouville numbers has Lebesgue measure zero. -/
@[simp]
theorem volume_setOf_liouville : volume {x : ℝ | Liouville x} = 0 := by
simpa only [ae_iff, Classical.not_not] using ae_not_liouville
#align volume_set_of_liouville volume_setOf_liouville
+-/
+#print Real.disjoint_residual_ae /-
/-- The filters `residual ℝ` and `volume.ae` are disjoint. This means that there exists a residual
set of Lebesgue measure zero (e.g., the set of Liouville numbers). -/
theorem Real.disjoint_residual_ae : Disjoint (residual ℝ) volume.ae :=
disjoint_of_disjoint_of_mem disjoint_compl_right eventually_residual_liouville ae_not_liouville
#align real.disjoint_residual_ae Real.disjoint_residual_ae
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -74,7 +74,6 @@ theorem setOf_liouvilleWith_subset_aux :
calc
(b : ℝ) = b ^ (1 : ℝ) := (rpow_one _).symm
_ ≤ b ^ (2 + 1 / (n + 1 : ℕ) : ℝ) := rpow_le_rpow_of_exponent_le hb (one_le_two.trans _)
-
simpa using n.cast_add_one_pos.le
rw [sub_div' _ _ _ hb0.ne', abs_div, abs_of_pos hb0, div_lt_div_right hb0, abs_sub_lt_iff,
sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
@@ -87,7 +86,6 @@ theorem setOf_liouvilleWith_subset_aux :
calc
x * b ≤ 1 * b := mul_le_mul_of_nonneg_right hx01.2.le hb0.le
_ = b := one_mul b
-
#align set_of_liouville_with_subset_aux setOf_liouvilleWith_subset_aux
/-- The set of numbers satisfying the Liouville condition with some exponent `p > 2` has Lebesgue
@@ -121,7 +119,6 @@ theorem volume_iUnion_setOf_liouvilleWith :
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := _
-
have : 1 - r ≠ 0 := by linarith
rw [ENNReal.coe_eq_coe]
simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]
mathlib commit https://github.com/leanprover-community/mathlib/commit/58a272265b5e05f258161260dd2c5d247213cbd3
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module number_theory.liouville.measure
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 36938f775671ff28bea1c0310f1608e4afbb22e0
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.Analysis.PSeries
/-!
# Volume of the set of Liouville numbers
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file we prove that the set of Liouville numbers with exponent (irrationality measure)
strictly greater than two is a set of Lebesuge measure zero, see
`volume_Union_set_of_liouville_with`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/13361559d66b84f80b6d5a1c4a26aa5054766725
@@ -131,9 +131,11 @@ theorem ae_not_liouvilleWith : ∀ᵐ x, ∀ p > (2 : ℝ), ¬LiouvilleWith p x
volume_iUnion_setOf_liouvilleWith
#align ae_not_liouville_with ae_not_liouvilleWith
+#print ae_not_liouville /-
theorem ae_not_liouville : ∀ᵐ x, ¬Liouville x :=
ae_not_liouvilleWith.mono fun x h₁ h₂ => h₁ 3 (by norm_num) (h₂.LiouvilleWith 3)
#align ae_not_liouville ae_not_liouville
+-/
/-- The set of Liouville numbers has Lebesgue measure zero. -/
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -36,13 +36,13 @@ open scoped Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
theorem setOf_liouvilleWith_subset_aux :
- { x : ℝ | ∃ p > 2, LiouvilleWith p x } ⊆
+ {x : ℝ | ∃ p > 2, LiouvilleWith p x} ⊆
⋃ m : ℤ,
(fun x : ℝ => x + m) ⁻¹'
⋃ n > (0 : ℕ),
- { x : ℝ |
+ {x : ℝ |
∃ᶠ b : ℕ in atTop,
- ∃ a ∈ Finset.Icc (0 : ℤ) b, |x - (a : ℤ) / b| < 1 / b ^ (2 + 1 / n : ℝ) } :=
+ ∃ a ∈ Finset.Icc (0 : ℤ) b, |x - (a : ℤ) / b| < 1 / b ^ (2 + 1 / n : ℝ)} :=
by
rintro x ⟨p, hp, hxp⟩
rcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩
@@ -91,7 +91,7 @@ theorem setOf_liouvilleWith_subset_aux :
measure zero. -/
@[simp]
theorem volume_iUnion_setOf_liouvilleWith :
- volume (⋃ (p : ℝ) (hp : 2 < p), { x : ℝ | LiouvilleWith p x }) = 0 :=
+ volume (⋃ (p : ℝ) (hp : 2 < p), {x : ℝ | LiouvilleWith p x}) = 0 :=
by
simp only [← set_of_exists]
refine' measure_mono_null setOf_liouvilleWith_subset_aux _
@@ -137,7 +137,7 @@ theorem ae_not_liouville : ∀ᵐ x, ¬Liouville x :=
/-- The set of Liouville numbers has Lebesgue measure zero. -/
@[simp]
-theorem volume_setOf_liouville : volume { x : ℝ | Liouville x } = 0 := by
+theorem volume_setOf_liouville : volume {x : ℝ | Liouville x} = 0 := by
simpa only [ae_iff, Classical.not_not] using ae_not_liouville
#align volume_set_of_liouville volume_setOf_liouville
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -46,7 +46,7 @@ theorem setOf_liouvilleWith_subset_aux :
by
rintro x ⟨p, hp, hxp⟩
rcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩
- rw [lt_sub_iff_add_lt'] at hn
+ rw [lt_sub_iff_add_lt'] at hn
suffices
∀ y : ℝ,
LiouvilleWith p y →
@@ -62,7 +62,7 @@ theorem setOf_liouvilleWith_subset_aux :
clear hxp x; intro x hxp hx01
refine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_at_top 1)).mono _
rintro b ⟨⟨a, hne, hlt⟩, hb⟩
- rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
+ rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
refine' ⟨a, _, hlt⟩
replace hb : (1 : ℝ) ≤ b; exact Nat.one_le_cast.2 hb
have hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb
@@ -74,7 +74,7 @@ theorem setOf_liouvilleWith_subset_aux :
simpa using n.cast_add_one_pos.le
rw [sub_div' _ _ _ hb0.ne', abs_div, abs_of_pos hb0, div_lt_div_right hb0, abs_sub_lt_iff,
- sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
+ sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
rw [Finset.mem_Icc, ← Int.lt_add_one_iff, ← Int.lt_add_one_iff, ← neg_lt_iff_pos_add, add_comm, ←
@Int.cast_lt ℝ, ← @Int.cast_lt ℝ]
push_cast
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -31,7 +31,7 @@ Liouville number, Lebesgue measure, residual, generic property
-/
-open Filter BigOperators ENNReal Topology NNReal
+open scoped Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -59,14 +59,12 @@ theorem setOf_liouvilleWith_subset_aux :
simp only [Int.floor_le, Int.lt_floor_add_one, add_neg_lt_iff_le_add', zero_add, and_self_iff,
mem_Ico, Int.cast_neg, le_add_neg_iff_add_le]
refine' ⟨-⌊x⌋, n + 1, n.succ_pos, this _ (hxp.add_int _) hx⟩
- clear hxp x
- intro x hxp hx01
+ clear hxp x; intro x hxp hx01
refine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_at_top 1)).mono _
rintro b ⟨⟨a, hne, hlt⟩, hb⟩
rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
refine' ⟨a, _, hlt⟩
- replace hb : (1 : ℝ) ≤ b
- exact Nat.one_le_cast.2 hb
+ replace hb : (1 : ℝ) ≤ b; exact Nat.one_le_cast.2 hb
have hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb
replace hlt : |x - a / b| < 1 / b
· refine' hlt.trans_le (one_div_le_one_div_of_le hb0 _)
@@ -97,15 +95,10 @@ theorem volume_iUnion_setOf_liouvilleWith :
by
simp only [← set_of_exists]
refine' measure_mono_null setOf_liouvilleWith_subset_aux _
- rw [measure_Union_null_iff]
- intro m
- rw [measure_preimage_add_right]
- clear m
+ rw [measure_Union_null_iff]; intro m; rw [measure_preimage_add_right]; clear m
refine' (measure_bUnion_null_iff <| to_countable _).2 fun n (hn : 1 ≤ n) => _
generalize hr : (2 + 1 / n : ℝ) = r
- replace hr : 2 < r
- · simp [← hr, zero_lt_one.trans_le hn]
- clear hn n
+ replace hr : 2 < r; · simp [← hr, zero_lt_one.trans_le hn]; clear hn n
refine' measure_set_of_frequently_eq_zero _
simp only [set_of_exists, ← Real.dist_eq, ← mem_ball, set_of_mem_eq]
set B : ℤ → ℕ → Set ℝ := fun a b => ball (a / b) (1 / b ^ r)
mathlib commit https://github.com/leanprover-community/mathlib/commit/f51de8769c34652d82d1c8e5f8f18f8374782bed
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module number_theory.liouville.measure
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.MeasureTheory.Measure.Lebesgue
+import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
import Mathbin.NumberTheory.Liouville.Residual
import Mathbin.NumberTheory.Liouville.LiouvilleWith
import Mathbin.Analysis.PSeries
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -92,7 +92,7 @@ theorem setOf_liouvilleWith_subset_aux :
/-- The set of numbers satisfying the Liouville condition with some exponent `p > 2` has Lebesgue
measure zero. -/
@[simp]
-theorem volume_unionᵢ_setOf_liouvilleWith :
+theorem volume_iUnion_setOf_liouvilleWith :
volume (⋃ (p : ℝ) (hp : 2 < p), { x : ℝ | LiouvilleWith p x }) = 0 :=
by
simp only [← set_of_exists]
@@ -131,11 +131,11 @@ theorem volume_unionᵢ_setOf_liouvilleWith :
simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]
refine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)
refine' (Summable.add _ _).mul_left _ <;> simp only [NNReal.summable_rpow] <;> linarith
-#align volume_Union_set_of_liouville_with volume_unionᵢ_setOf_liouvilleWith
+#align volume_Union_set_of_liouville_with volume_iUnion_setOf_liouvilleWith
theorem ae_not_liouvilleWith : ∀ᵐ x, ∀ p > (2 : ℝ), ¬LiouvilleWith p x := by
simpa only [ae_iff, not_forall, Classical.not_not, set_of_exists] using
- volume_unionᵢ_setOf_liouvilleWith
+ volume_iUnion_setOf_liouvilleWith
#align ae_not_liouville_with ae_not_liouvilleWith
theorem ae_not_liouville : ∀ᵐ x, ¬Liouville x :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -31,7 +31,7 @@ Liouville number, Lebesgue measure, residual, generic property
-/
-open Filter BigOperators Ennreal Topology NNReal
+open Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
@@ -113,7 +113,7 @@ theorem volume_unionᵢ_setOf_liouvilleWith :
by
intro a b
rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_nat_cast, ← NNReal.coe_rpow, ←
- NNReal.coe_div, Ennreal.ofReal_coe_nNReal]
+ NNReal.coe_div, ENNReal.ofReal_coe_nnreal]
have :
∀ b : ℕ, volume (⋃ a ∈ Finset.Icc (0 : ℤ) b, B a b) ≤ (2 * (b ^ (1 - r) + b ^ (-r)) : ℝ≥0) :=
by
@@ -123,13 +123,13 @@ theorem volume_unionᵢ_setOf_liouvilleWith :
measure_bUnion_finset_le _ _
_ = ((b + 1) * (2 / b ^ r) : ℝ≥0) := by
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
- Int.toNat_coe_nat, ← Nat.cast_succ, Ennreal.coe_mul, Ennreal.coe_nat]
+ Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := _
have : 1 - r ≠ 0 := by linarith
- rw [Ennreal.coe_eq_coe]
+ rw [ENNReal.coe_eq_coe]
simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add, mul_left_comm]
- refine' ne_top_of_le_ne_top (Ennreal.tsum_coe_ne_top_iff_summable.2 _) (Ennreal.tsum_le_tsum this)
+ refine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)
refine' (Summable.add _ _).mul_left _ <;> simp only [NNReal.summable_rpow] <;> linarith
#align volume_Union_set_of_liouville_with volume_unionᵢ_setOf_liouvilleWith
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)
Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.
@@ -87,7 +87,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
simp only [setOf_exists, ← exists_prop, ← Real.dist_eq, ← mem_ball, setOf_mem_eq]
set B : ℤ → ℕ → Set ℝ := fun a b => ball (a / b) (1 / (b : ℝ) ^ r)
have hB : ∀ a b, volume (B a b) = ↑((2 : ℝ≥0) / (b : ℝ≥0) ^ r) := fun a b ↦ by
- rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_nat_cast, ← NNReal.coe_rpow,
+ rw [Real.volume_ball, mul_one_div, ← NNReal.coe_two, ← NNReal.coe_natCast, ← NNReal.coe_rpow,
← NNReal.coe_div, ENNReal.ofReal_coe_nnreal]
have : ∀ b : ℕ, volume (⋃ a ∈ Finset.Icc (0 : ℤ) b, B a b) ≤
↑(2 * ((b : ℝ≥0) ^ (1 - r) + (b : ℝ≥0) ^ (-r))) := fun b ↦
@@ -96,7 +96,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
measure_biUnion_finset_le _ _
_ = ↑((b + 1) * (2 / (b : ℝ≥0) ^ r)) := by
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
- Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
+ Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_natCast]
_ = _ := by
have : 1 - r ≠ 0 := by linarith
rw [ENNReal.coe_inj]
coe_nat to natCast (#11637)
Reduce the diff of #11499
All in the Int namespace:
ofNat_eq_cast → ofNat_eq_natCastcast_eq_cast_iff_Nat → natCast_injnatCast_eq_ofNat → ofNat_eq_natCastcoe_nat_sub → natCast_subcoe_nat_nonneg → natCast_nonnegsign_coe_add_one → sign_natCast_add_onenat_succ_eq_int_succ → natCast_succsucc_neg_nat_succ → succ_neg_natCast_succcoe_pred_of_pos → natCast_pred_of_poscoe_nat_div → natCast_divcoe_nat_ediv → natCast_edivsign_coe_nat_of_nonzero → sign_natCast_of_ne_zerotoNat_coe_nat → toNat_natCasttoNat_coe_nat_add_one → toNat_natCast_add_onecoe_nat_dvd → natCast_dvd_natCastcoe_nat_dvd_left → natCast_dvdcoe_nat_dvd_right → dvd_natCastle_coe_nat_sub → le_natCast_subsucc_coe_nat_pos → succ_natCast_poscoe_nat_modEq_iff → natCast_modEq_iffcoe_natAbs → natCast_natAbscoe_nat_eq_zero → natCast_eq_zerocoe_nat_ne_zero → natCast_ne_zerocoe_nat_ne_zero_iff_pos → natCast_ne_zero_iff_posabs_coe_nat → abs_natCastcoe_nat_nonpos_iff → natCast_nonpos_iffAlso rename Nat.coe_nat_dvd to Nat.cast_dvd_cast
@@ -96,7 +96,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
measure_biUnion_finset_le _ _
_ = ↑((b + 1) * (2 / (b : ℝ≥0) ^ r)) := by
simp only [hB, Int.card_Icc, Finset.sum_const, nsmul_eq_mul, sub_zero, ← Int.ofNat_succ,
- Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
+ Int.toNat_natCast, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := by
have : 1 - r ≠ 0 := by linarith
rw [ENNReal.coe_inj]
refines (#10762)
I replaced a few "terminal" refine/refine's with exact.
The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.
This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.
@@ -45,7 +45,7 @@ theorem setOf_liouvilleWith_subset_aux :
have hx : x + ↑(-⌊x⌋) ∈ Ico (0 : ℝ) 1 := by
simp only [Int.floor_le, Int.lt_floor_add_one, add_neg_lt_iff_le_add', zero_add, and_self_iff,
mem_Ico, Int.cast_neg, le_add_neg_iff_add_le]
- refine' ⟨-⌊x⌋, n + 1, n.succ_pos, this _ (hxp.add_int _) hx⟩
+ exact ⟨-⌊x⌋, n + 1, n.succ_pos, this _ (hxp.add_int _) hx⟩
clear hxp x; intro x hxp hx01
refine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_atTop 1)).mono _
rintro b ⟨⟨a, -, hlt⟩, hb⟩
have, replace and suffices (#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -51,10 +51,10 @@ theorem setOf_liouvilleWith_subset_aux :
rintro b ⟨⟨a, -, hlt⟩, hb⟩
rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
refine' ⟨a, _, hlt⟩
- replace hb : (1 : ℝ) ≤ b; exact Nat.one_le_cast.2 hb
+ replace hb : (1 : ℝ) ≤ b := Nat.one_le_cast.2 hb
have hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb
- replace hlt : |x - a / b| < 1 / b
- · refine' hlt.trans_le (one_div_le_one_div_of_le hb0 _)
+ replace hlt : |x - a / b| < 1 / b := by
+ refine' hlt.trans_le (one_div_le_one_div_of_le hb0 _)
calc
(b : ℝ) = (b : ℝ) ^ (1 : ℝ) := (rpow_one _).symm
_ ≤ (b : ℝ) ^ (2 + 1 / (n + 1 : ℕ) : ℝ) :=
@@ -81,7 +81,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
rw [measure_iUnion_null_iff]; intro m; rw [measure_preimage_add_right]; clear m
refine' (measure_biUnion_null_iff <| to_countable _).2 fun n (hn : 1 ≤ n) => _
generalize hr : (2 + 1 / n : ℝ) = r
- replace hr : 2 < r; · simp [← hr, zero_lt_one.trans_le hn]
+ replace hr : 2 < r := by simp [← hr, zero_lt_one.trans_le hn]
clear hn n
refine' measure_setOf_frequently_eq_zero _
simp only [setOf_exists, ← exists_prop, ← Real.dist_eq, ← mem_ball, setOf_mem_eq]
ℝ≥0 → ℝ≥0∞ commute defeqly with nsmul and pow (#10225)
by tweaking the definition of the AddMonoid and MonoidWithZero instances for WithTop. Also unprotect ENNReal.coe_injective and rename ENNReal.coe_eq_coe → ENNReal.coe_inj.
From LeanAPAP
@@ -99,7 +99,7 @@ theorem volume_iUnion_setOf_liouvilleWith :
Int.toNat_coe_nat, ← Nat.cast_succ, ENNReal.coe_mul, ENNReal.coe_nat]
_ = _ := by
have : 1 - r ≠ 0 := by linarith
- rw [ENNReal.coe_eq_coe]
+ rw [ENNReal.coe_inj]
simp [add_mul, div_eq_mul_inv, NNReal.rpow_neg, NNReal.rpow_sub' _ this, mul_add,
mul_left_comm]
refine' ne_top_of_le_ne_top (ENNReal.tsum_coe_ne_top_iff_summable.2 _) (ENNReal.tsum_le_tsum this)
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).
This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true }) in some places, to recover the old behaviour@[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -31,8 +31,6 @@ open scoped Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
theorem setOf_liouvilleWith_subset_aux :
{ x : ℝ | ∃ p > 2, LiouvilleWith p x } ⊆
⋃ m : ℤ, (· + (m : ℝ)) ⁻¹' ⋃ n > (0 : ℕ),
@@ -40,7 +40,7 @@ theorem setOf_liouvilleWith_subset_aux :
|x - (a : ℤ) / b| < 1 / (b : ℝ) ^ (2 + 1 / n : ℝ) } := by
rintro x ⟨p, hp, hxp⟩
rcases exists_nat_one_div_lt (sub_pos.2 hp) with ⟨n, hn⟩
- rw [lt_sub_iff_add_lt'] at hn
+ rw [lt_sub_iff_add_lt'] at hn
suffices ∀ y : ℝ, LiouvilleWith p y → y ∈ Ico (0 : ℝ) 1 → ∃ᶠ b : ℕ in atTop,
∃ a ∈ Finset.Icc (0 : ℤ) b, |y - a / b| < 1 / (b : ℝ) ^ (2 + 1 / (n + 1 : ℕ) : ℝ) by
simp only [mem_iUnion, mem_preimage]
@@ -51,7 +51,7 @@ theorem setOf_liouvilleWith_subset_aux :
clear hxp x; intro x hxp hx01
refine' ((hxp.frequently_lt_rpow_neg hn).and_eventually (eventually_ge_atTop 1)).mono _
rintro b ⟨⟨a, -, hlt⟩, hb⟩
- rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
+ rw [rpow_neg b.cast_nonneg, ← one_div, ← Nat.cast_succ] at hlt
refine' ⟨a, _, hlt⟩
replace hb : (1 : ℝ) ≤ b; exact Nat.one_le_cast.2 hb
have hb0 : (0 : ℝ) < b := zero_lt_one.trans_le hb
@@ -63,7 +63,7 @@ theorem setOf_liouvilleWith_subset_aux :
rpow_le_rpow_of_exponent_le hb (one_le_two.trans ?_)
simpa using n.cast_add_one_pos.le
rw [sub_div' _ _ _ hb0.ne', abs_div, abs_of_pos hb0, div_lt_div_right hb0, abs_sub_lt_iff,
- sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
+ sub_lt_iff_lt_add, sub_lt_iff_lt_add, ← sub_lt_iff_lt_add'] at hlt
rw [Finset.mem_Icc, ← Int.lt_add_one_iff, ← Int.lt_add_one_iff, ← neg_lt_iff_pos_add, add_comm, ←
@Int.cast_lt ℝ, ← @Int.cast_lt ℝ]
push_cast
@@ -31,7 +31,7 @@ open scoped Filter BigOperators ENNReal Topology NNReal
open Filter Set Metric MeasureTheory Real
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See Lean4 issue #2220
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
theorem setOf_liouvilleWith_subset_aux :
{ x : ℝ | ∃ p > 2, LiouvilleWith p x } ⊆
@@ -2,17 +2,14 @@
Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module number_theory.liouville.measure
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.NumberTheory.Liouville.Residual
import Mathlib.NumberTheory.Liouville.LiouvilleWith
import Mathlib.Analysis.PSeries
+#align_import number_theory.liouville.measure from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
/-!
# Volume of the set of Liouville numbers
@@ -17,7 +17,7 @@ import Mathlib.Analysis.PSeries
# Volume of the set of Liouville numbers
In this file we prove that the set of Liouville numbers with exponent (irrationality measure)
-strictly greater than two is a set of Lebesuge measure zero, see
+strictly greater than two is a set of Lebesgue measure zero, see
`volume_iUnion_setOf_liouvilleWith`.
Since this set is a residual set, we show that the filters `residual` and `volume.ae` are disjoint.
The unported dependencies are
algebra.order.moduleinit.corelinear_algebra.free_module.finite.rankalgebra.order.monoid.cancel.defsalgebra.absalgebra.group_power.lemmasinit.data.list.basiclinear_algebra.free_module.rankalgebra.order.monoid.cancel.basicinit.data.list.defaulttopology.subset_propertiesinit.logicThe following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file