number_theory.liouville.liouville_numberMathlib.NumberTheory.Liouville.LiouvilleNumber

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -162,7 +162,7 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
         (∑' i, (1 / m) ^ i) * (1 / m ^ (n + 1)!) :=
       tsum_mul_right
     _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=-- the series if the geometric series
-    by rw [tsum_geometric_of_lt_1 (by positivity) mi]
+    by rw [tsum_geometric_of_lt_one (by positivity) mi]
 #align liouville_number.remainder_lt' LiouvilleNumber.remainder_lt'
 -/
 
Diff
@@ -189,7 +189,8 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- solve all the inequalities `0 < m ^ ??`
       any_goals exact pow_pos (zero_lt_two.trans_le hm) _
       -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
-      exact trans (trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
+      exact
+        trans (trans hm (pow_one _).symm.le) (pow_right_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
 #align liouville_number.aux_calc LiouvilleNumber.aux_calc
 -/
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Jujian Zhang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Damiano Testa, Jujian Zhang
 -/
-import Mathbin.NumberTheory.Liouville.Basic
+import NumberTheory.Liouville.Basic
 
 #align_import number_theory.liouville.liouville_number from "leanprover-community/mathlib"@"5c1efce12ba86d4901463f61019832f6a4b1a0d0"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2020 Jujian Zhang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Damiano Testa, Jujian Zhang
-
-! This file was ported from Lean 3 source module number_theory.liouville.liouville_number
-! leanprover-community/mathlib commit 5c1efce12ba86d4901463f61019832f6a4b1a0d0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.NumberTheory.Liouville.Basic
 
+#align_import number_theory.liouville.liouville_number from "leanprover-community/mathlib"@"5c1efce12ba86d4901463f61019832f6a4b1a0d0"
+
 /-!
 
 # Liouville constants
Diff
@@ -89,33 +89,44 @@ We start with simple observations.
 -/
 
 
+#print LiouvilleNumber.summable /-
 protected theorem summable {m : ℝ} (hm : 1 < m) : Summable fun i : ℕ => 1 / m ^ i ! :=
   summable_one_div_pow_of_le hm Nat.self_le_factorial
 #align liouville_number.summable LiouvilleNumber.summable
+-/
 
+#print LiouvilleNumber.remainder_summable /-
 theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :
     Summable fun i : ℕ => 1 / m ^ (i + (k + 1))! := by
   convert (summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)
 #align liouville_number.remainder_summable LiouvilleNumber.remainder_summable
+-/
 
+#print LiouvilleNumber.remainder_pos /-
 theorem remainder_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < remainder m k :=
   tsum_pos (remainder_summable hm k) (fun _ => by positivity) 0 (by positivity)
 #align liouville_number.remainder_pos LiouvilleNumber.remainder_pos
+-/
 
+#print LiouvilleNumber.partialSum_succ /-
 theorem partialSum_succ (m : ℝ) (n : ℕ) :
     partialSum m (n + 1) = partialSum m n + 1 / m ^ (n + 1)! :=
   sum_range_succ _ _
 #align liouville_number.partial_sum_succ LiouvilleNumber.partialSum_succ
+-/
 
+#print LiouvilleNumber.partialSum_add_remainder /-
 /-- Split the sum definining a Liouville number into the first `k` term and the rest. -/
 theorem partialSum_add_remainder {m : ℝ} (hm : 1 < m) (k : ℕ) :
     partialSum m k + remainder m k = liouvilleNumber m :=
   sum_add_tsum_nat_add _ (LiouvilleNumber.summable hm)
 #align liouville_number.partial_sum_add_remainder LiouvilleNumber.partialSum_add_remainder
+-/
 
 /-! We now prove two useful inequalities, before collecting everything together. -/
 
 
+#print LiouvilleNumber.remainder_lt' /-
 /-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `1 < m` and is
 stronger than the estimate `liouville_number.remainder_lt` below. However, the latter estimate is
 more useful for the proof. -/
@@ -156,7 +167,9 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
     _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=-- the series if the geometric series
     by rw [tsum_geometric_of_lt_1 (by positivity) mi]
 #align liouville_number.remainder_lt' LiouvilleNumber.remainder_lt'
+-/
 
+#print LiouvilleNumber.aux_calc /-
 theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
     (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) ≤ 1 / (m ^ n !) ^ n :=
   calc
@@ -182,17 +195,21 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       exact trans (trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
 #align liouville_number.aux_calc LiouvilleNumber.aux_calc
+-/
 
+#print LiouvilleNumber.remainder_lt /-
 /-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `2 ≤ m` and is
 weaker than the estimate `liouville_number.remainder_lt'` above. However, this estimate is
 more useful for the proof. -/
 theorem remainder_lt (n : ℕ) {m : ℝ} (m2 : 2 ≤ m) : remainder m n < 1 / (m ^ n !) ^ n :=
   (remainder_lt' n <| one_lt_two.trans_le m2).trans_le (aux_calc _ m2)
 #align liouville_number.remainder_lt LiouvilleNumber.remainder_lt
+-/
 
 /-!  Starting from here, we specialize to the case in which `m` is a natural number. -/
 
 
+#print LiouvilleNumber.partialSum_eq_rat /-
 /-- The sum of the `k` initial terms of the Liouville number to base `m` is a ratio of natural
 numbers where the denominator is `m ^ k!`. -/
 theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) : ∃ p : ℕ, partialSum m k = p / m ^ k ! :=
@@ -207,11 +224,13 @@ theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) : ∃ p : ℕ, partia
       simp [mul_assoc]
     all_goals positivity
 #align liouville_number.partial_sum_eq_rat LiouvilleNumber.partialSum_eq_rat
+-/
 
 end liouvilleNumber
 
 open liouvilleNumber
 
+#print liouville_liouvilleNumber /-
 theorem liouville_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvilleNumber m) :=
   by
   -- two useful inequalities
@@ -227,9 +246,12 @@ theorem liouville_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvill
   have hpos := remainder_pos m1 n
   simpa [abs_of_pos hpos, hpos.ne'] using @remainder_lt n m (by assumption_mod_cast)
 #align liouville_liouville_number liouville_liouvilleNumber
+-/
 
+#print transcendental_liouvilleNumber /-
 theorem transcendental_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) :
     Transcendental ℤ (liouvilleNumber m) :=
   (liouville_liouvilleNumber hm).Transcendental
 #align transcendental_liouville_number transcendental_liouvilleNumber
+-/
 
Diff
@@ -128,7 +128,7 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
     zero_lt_one.trans m1
   have mi : 1 / m < 1 := (div_lt_one m0).mpr m1
   calc
-    (∑' i, 1 / m ^ (i + (n + 1))!) <
+    ∑' i, 1 / m ^ (i + (n + 1))! <
         ∑' i,
           1 /
             m ^
Diff
@@ -155,7 +155,6 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
       tsum_mul_right
     _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=-- the series if the geometric series
     by rw [tsum_geometric_of_lt_1 (by positivity) mi]
-    
 #align liouville_number.remainder_lt' LiouvilleNumber.remainder_lt'
 
 theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
@@ -182,7 +181,6 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
       exact trans (trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
-    
 #align liouville_number.aux_calc LiouvilleNumber.aux_calc
 
 /-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `2 ≤ m` and is
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Damiano Testa, Jujian Zhang
 
 ! This file was ported from Lean 3 source module number_theory.liouville.liouville_number
-! leanprover-community/mathlib commit 04e80bb7e8510958cd9aacd32fe2dc147af0b9f1
+! leanprover-community/mathlib commit 5c1efce12ba86d4901463f61019832f6a4b1a0d0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.NumberTheory.Liouville.Basic
 
 # Liouville constants
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file contains a construction of a family of Liouville numbers, indexed by a natural number $m$.
 The most important property is that they are examples of transcendental real numbers.
 This fact is recorded in `transcendental_liouville_number`.
@@ -42,6 +45,7 @@ open scoped Nat BigOperators
 
 open Real Finset
 
+#print liouvilleNumber /-
 /-- For a real number `m`, Liouville's constant is
 $$
 \sum_{i=0}^\infty\frac{1}{m^{i!}}.
@@ -52,9 +56,11 @@ if the series does not converge, then the sum of the series is defined to be zer
 def liouvilleNumber (m : ℝ) : ℝ :=
   ∑' i : ℕ, 1 / m ^ i !
 #align liouville_number liouvilleNumber
+-/
 
 namespace liouvilleNumber
 
+#print LiouvilleNumber.partialSum /-
 /-- `liouville_number.partial_sum` is the sum of the first `k + 1` terms of Liouville's constant,
 i.e.
 $$
@@ -63,8 +69,10 @@ $$
 -/
 def partialSum (m : ℝ) (k : ℕ) : ℝ :=
   ∑ i in range (k + 1), 1 / m ^ i !
-#align liouville_number.partial_sum liouvilleNumber.partialSum
+#align liouville_number.partial_sum LiouvilleNumber.partialSum
+-/
 
+#print LiouvilleNumber.remainder /-
 /-- `liouville_number.remainder` is the sum of the series of the terms in `liouville_number m`
 starting from `k+1`, i.e
 $$
@@ -73,7 +81,8 @@ $$
 -/
 def remainder (m : ℝ) (k : ℕ) : ℝ :=
   ∑' i, 1 / m ^ (i + (k + 1))!
-#align liouville_number.remainder liouvilleNumber.remainder
+#align liouville_number.remainder LiouvilleNumber.remainder
+-/
 
 /-!
 We start with simple observations.
@@ -82,27 +91,27 @@ We start with simple observations.
 
 protected theorem summable {m : ℝ} (hm : 1 < m) : Summable fun i : ℕ => 1 / m ^ i ! :=
   summable_one_div_pow_of_le hm Nat.self_le_factorial
-#align liouville_number.summable liouvilleNumber.summable
+#align liouville_number.summable LiouvilleNumber.summable
 
 theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :
     Summable fun i : ℕ => 1 / m ^ (i + (k + 1))! := by
-  convert(summable_nat_add_iff (k + 1)).2 (liouvilleNumber.summable hm)
-#align liouville_number.remainder_summable liouvilleNumber.remainder_summable
+  convert (summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)
+#align liouville_number.remainder_summable LiouvilleNumber.remainder_summable
 
 theorem remainder_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < remainder m k :=
   tsum_pos (remainder_summable hm k) (fun _ => by positivity) 0 (by positivity)
-#align liouville_number.remainder_pos liouvilleNumber.remainder_pos
+#align liouville_number.remainder_pos LiouvilleNumber.remainder_pos
 
 theorem partialSum_succ (m : ℝ) (n : ℕ) :
     partialSum m (n + 1) = partialSum m n + 1 / m ^ (n + 1)! :=
   sum_range_succ _ _
-#align liouville_number.partial_sum_succ liouvilleNumber.partialSum_succ
+#align liouville_number.partial_sum_succ LiouvilleNumber.partialSum_succ
 
 /-- Split the sum definining a Liouville number into the first `k` term and the rest. -/
 theorem partialSum_add_remainder {m : ℝ} (hm : 1 < m) (k : ℕ) :
     partialSum m k + remainder m k = liouvilleNumber m :=
-  sum_add_tsum_nat_add _ (liouvilleNumber.summable hm)
-#align liouville_number.partial_sum_add_remainder liouvilleNumber.partialSum_add_remainder
+  sum_add_tsum_nat_add _ (LiouvilleNumber.summable hm)
+#align liouville_number.partial_sum_add_remainder LiouvilleNumber.partialSum_add_remainder
 
 /-! We now prove two useful inequalities, before collecting everything together. -/
 
@@ -147,7 +156,7 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
     _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=-- the series if the geometric series
     by rw [tsum_geometric_of_lt_1 (by positivity) mi]
     
-#align liouville_number.remainder_lt' liouvilleNumber.remainder_lt'
+#align liouville_number.remainder_lt' LiouvilleNumber.remainder_lt'
 
 theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
     (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) ≤ 1 / (m ^ n !) ^ n :=
@@ -174,14 +183,14 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       exact trans (trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
     
-#align liouville_number.aux_calc liouvilleNumber.aux_calc
+#align liouville_number.aux_calc LiouvilleNumber.aux_calc
 
 /-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `2 ≤ m` and is
 weaker than the estimate `liouville_number.remainder_lt'` above. However, this estimate is
 more useful for the proof. -/
 theorem remainder_lt (n : ℕ) {m : ℝ} (m2 : 2 ≤ m) : remainder m n < 1 / (m ^ n !) ^ n :=
   (remainder_lt' n <| one_lt_two.trans_le m2).trans_le (aux_calc _ m2)
-#align liouville_number.remainder_lt liouvilleNumber.remainder_lt
+#align liouville_number.remainder_lt LiouvilleNumber.remainder_lt
 
 /-!  Starting from here, we specialize to the case in which `m` is a natural number. -/
 
@@ -199,7 +208,7 @@ theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) : ∃ p : ℕ, partia
       rw [add_mul, one_mul, Nat.factorial_succ, add_mul, one_mul, add_tsub_cancel_right, pow_add]
       simp [mul_assoc]
     all_goals positivity
-#align liouville_number.partial_sum_eq_rat liouvilleNumber.partialSum_eq_rat
+#align liouville_number.partial_sum_eq_rat LiouvilleNumber.partialSum_eq_rat
 
 end liouvilleNumber
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Jujian Zhang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Damiano Testa, Jujian Zhang
 
-! This file was ported from Lean 3 source module number_theory.liouville.liouville_constant
-! leanprover-community/mathlib commit 98cbfb459a053c5ca44aec69f0a5a932b84c0d67
+! This file was ported from Lean 3 source module number_theory.liouville.liouville_number
+! leanprover-community/mathlib commit 04e80bb7e8510958cd9aacd32fe2dc147af0b9f1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -16,7 +16,7 @@ import Mathbin.NumberTheory.Liouville.Basic
 
 This file contains a construction of a family of Liouville numbers, indexed by a natural number $m$.
 The most important property is that they are examples of transcendental real numbers.
-This fact is recorded in `liouville.is_transcendental`.
+This fact is recorded in `transcendental_liouville_number`.
 
 More precisely, for a real number $m$, Liouville's constant is
 $$
@@ -42,8 +42,6 @@ open scoped Nat BigOperators
 
 open Real Finset
 
-namespace Liouville
-
 /-- For a real number `m`, Liouville's constant is
 $$
 \sum_{i=0}^\infty\frac{1}{m^{i!}}.
@@ -53,103 +51,103 @@ if the series does not converge, then the sum of the series is defined to be zer
 -/
 def liouvilleNumber (m : ℝ) : ℝ :=
   ∑' i : ℕ, 1 / m ^ i !
-#align liouville.liouville_number Liouville.liouvilleNumber
+#align liouville_number liouvilleNumber
+
+namespace liouvilleNumber
 
-/-- `liouville_number_initial_terms` is the sum of the first `k + 1` terms of Liouville's constant,
+/-- `liouville_number.partial_sum` is the sum of the first `k + 1` terms of Liouville's constant,
 i.e.
 $$
 \sum_{i=0}^k\frac{1}{m^{i!}}.
 $$
 -/
-def liouvilleNumberInitialTerms (m : ℝ) (k : ℕ) : ℝ :=
+def partialSum (m : ℝ) (k : ℕ) : ℝ :=
   ∑ i in range (k + 1), 1 / m ^ i !
-#align liouville.liouville_number_initial_terms Liouville.liouvilleNumberInitialTerms
+#align liouville_number.partial_sum liouvilleNumber.partialSum
 
-/-- `liouville_number_tail` is the sum of the series of the terms in `liouville_number m`
+/-- `liouville_number.remainder` is the sum of the series of the terms in `liouville_number m`
 starting from `k+1`, i.e
 $$
 \sum_{i=k+1}^\infty\frac{1}{m^{i!}}.
 $$
 -/
-def liouvilleNumberTail (m : ℝ) (k : ℕ) : ℝ :=
+def remainder (m : ℝ) (k : ℕ) : ℝ :=
   ∑' i, 1 / m ^ (i + (k + 1))!
-#align liouville.liouville_number_tail Liouville.liouvilleNumberTail
+#align liouville_number.remainder liouvilleNumber.remainder
+
+/-!
+We start with simple observations.
+-/
 
-theorem liouvilleNumberTail_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < liouvilleNumberTail m k :=
-  calc
-    -- replace `0` with the constantly zero series `∑ i : ℕ, 0`
-        (0 : ℝ) =
-        ∑' i : ℕ, 0 :=
-      tsum_zero.symm
-    _ <
-        liouvilleNumberTail m
-          k :=-- to show that a series with non-negative terms has strictly positive sum it suffices
-          -- to prove that
-          -- 1. the terms of the zero series are indeed non-negative
-          -- 2. the terms of our series are non-negative
-          -- 3. one term of our series is strictly positive -- they all are, we use the first term
-          tsum_lt_tsum_of_nonneg
-          (fun _ => rfl.le) (fun i => one_div_nonneg.mpr (pow_nonneg (zero_le_one.trans hm.le) _))
-          (one_div_pos.mpr
-            (pow_pos (zero_lt_one.trans hm)
-              (0 +
-                  (k +
-                    1))!)) <|-- 4. our series converges -- it does since it is the tail of a converging series, though
-          -- this is not the argument here.
-          summable_one_div_pow_of_le
-          hm fun i => trans le_self_add (Nat.self_le_factorial _)
-    
-#align liouville.liouville_number_tail_pos Liouville.liouvilleNumberTail_pos
+
+protected theorem summable {m : ℝ} (hm : 1 < m) : Summable fun i : ℕ => 1 / m ^ i ! :=
+  summable_one_div_pow_of_le hm Nat.self_le_factorial
+#align liouville_number.summable liouvilleNumber.summable
+
+theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :
+    Summable fun i : ℕ => 1 / m ^ (i + (k + 1))! := by
+  convert(summable_nat_add_iff (k + 1)).2 (liouvilleNumber.summable hm)
+#align liouville_number.remainder_summable liouvilleNumber.remainder_summable
+
+theorem remainder_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < remainder m k :=
+  tsum_pos (remainder_summable hm k) (fun _ => by positivity) 0 (by positivity)
+#align liouville_number.remainder_pos liouvilleNumber.remainder_pos
+
+theorem partialSum_succ (m : ℝ) (n : ℕ) :
+    partialSum m (n + 1) = partialSum m n + 1 / m ^ (n + 1)! :=
+  sum_range_succ _ _
+#align liouville_number.partial_sum_succ liouvilleNumber.partialSum_succ
 
 /-- Split the sum definining a Liouville number into the first `k` term and the rest. -/
-theorem liouvilleNumber_eq_initial_terms_add_tail {m : ℝ} (hm : 1 < m) (k : ℕ) :
-    liouvilleNumber m = liouvilleNumberInitialTerms m k + liouvilleNumberTail m k :=
-  (sum_add_tsum_nat_add _ (summable_one_div_pow_of_le hm fun i => i.self_le_factorial)).symm
-#align liouville.liouville_number_eq_initial_terms_add_tail Liouville.liouvilleNumber_eq_initial_terms_add_tail
+theorem partialSum_add_remainder {m : ℝ} (hm : 1 < m) (k : ℕ) :
+    partialSum m k + remainder m k = liouvilleNumber m :=
+  sum_add_tsum_nat_add _ (liouvilleNumber.summable hm)
+#align liouville_number.partial_sum_add_remainder liouvilleNumber.partialSum_add_remainder
 
 /-! We now prove two useful inequalities, before collecting everything together. -/
 
 
-/-- Partial inequality, works with `m ∈ ℝ` satisfying `1 < m`. -/
-theorem tsum_one_div_pow_factorial_lt (n : ℕ) {m : ℝ} (m1 : 1 < m) :
-    (∑' i : ℕ, 1 / m ^ (i + (n + 1))!) < (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=
+/-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `1 < m` and is
+stronger than the estimate `liouville_number.remainder_lt` below. However, the latter estimate is
+more useful for the proof. -/
+theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
+    remainder m n < (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=
   have
     m0 :-- two useful inequalities
       0 <
       m :=
     zero_lt_one.trans m1
-  have mi : |1 / m| < 1 :=
-    (le_of_eq (abs_of_pos (one_div_pos.mpr m0))).trans_lt ((div_lt_one m0).mpr m1)
+  have mi : 1 / m < 1 := (div_lt_one m0).mpr m1
   calc
     (∑' i, 1 / m ^ (i + (n + 1))!) <
         ∑' i,
           1 /
             m ^
               (i + (n + 1)!) :=-- to show the strict inequality between these series, we prove that:
-        tsum_lt_tsum_of_nonneg
-        (-- 1. the first series has non-negative terms
-        fun b => one_div_nonneg.mpr (pow_nonneg m0.le _))
-        (-- 2. the second series dominates the first
+        tsum_lt_tsum
+        (-- 1. the second series dominates the first
         fun b =>
           one_div_pow_le_one_div_pow_of_le m1.le (b.add_factorial_succ_le_factorial_add_succ n))
-        (-- 3. the term with index `i = 2` of the first series is strictly smaller than
+        (-- 2. the term with index `i = 2` of the first series is strictly smaller than
           -- the corresponding term of the second series
           one_div_pow_strictAnti
-          m1 (n.add_factorial_succ_lt_factorial_add_succ rfl.le))
+          m1 (n.add_factorial_succ_lt_factorial_add_succ le_rfl))
+        (-- 3. the first series is summable
+          remainder_summable
+          m1 n)
         (-- 4. the second series is summable, since its terms grow quickly
           summable_one_div_pow_of_le
-          m1 fun j => Nat.le.intro rfl)
-    _ = ∑' i, (1 / m) ^ i * (1 / m ^ (n + 1)!) :=-- split the sum in the exponent and massage
-    by congr; ext i; rw [pow_add, ← div_div, div_eq_mul_one_div, one_div_pow]
+          m1 fun j => le_self_add)
+    _ = ∑' i : ℕ, (1 / m) ^ i * (1 / m ^ (n + 1)!) :=-- split the sum in the exponent and massage
+    by simp only [pow_add, one_div, mul_inv, inv_pow]
     -- factor the constant `(1 / m ^ (n + 1)!)` out of the series
         _ =
         (∑' i, (1 / m) ^ i) * (1 / m ^ (n + 1)!) :=
       tsum_mul_right
     _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=-- the series if the geometric series
-          mul_eq_mul_right_iff.mpr
-        (Or.inl (tsum_geometric_of_abs_lt_1 mi))
+    by rw [tsum_geometric_of_lt_1 (by positivity) mi]
     
-#align liouville.tsum_one_div_pow_factorial_lt Liouville.tsum_one_div_pow_factorial_lt
+#align liouville_number.remainder_lt' liouvilleNumber.remainder_lt'
 
 theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
     (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) ≤ 1 / (m ^ n !) ^ n :=
@@ -176,55 +174,55 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       exact trans (trans hm (pow_one _).symm.le) (pow_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
     
-#align liouville.aux_calc Liouville.aux_calc
+#align liouville_number.aux_calc liouvilleNumber.aux_calc
+
+/-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `2 ≤ m` and is
+weaker than the estimate `liouville_number.remainder_lt'` above. However, this estimate is
+more useful for the proof. -/
+theorem remainder_lt (n : ℕ) {m : ℝ} (m2 : 2 ≤ m) : remainder m n < 1 / (m ^ n !) ^ n :=
+  (remainder_lt' n <| one_lt_two.trans_le m2).trans_le (aux_calc _ m2)
+#align liouville_number.remainder_lt liouvilleNumber.remainder_lt
 
 /-!  Starting from here, we specialize to the case in which `m` is a natural number. -/
 
 
 /-- The sum of the `k` initial terms of the Liouville number to base `m` is a ratio of natural
 numbers where the denominator is `m ^ k!`. -/
-theorem liouville_number_rat_initial_terms {m : ℕ} (hm : 0 < m) (k : ℕ) :
-    ∃ p : ℕ, liouvilleNumberInitialTerms m k = p / m ^ k ! :=
+theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) : ∃ p : ℕ, partialSum m k = p / m ^ k ! :=
   by
   induction' k with k h
-  · exact ⟨1, by rw [liouville_number_initial_terms, range_one, sum_singleton, Nat.cast_one]⟩
+  · exact ⟨1, by rw [partial_sum, range_one, sum_singleton, Nat.cast_one]⟩
   · rcases h with ⟨p_k, h_k⟩
     use p_k * m ^ ((k + 1)! - k !) + 1
-    unfold liouville_number_initial_terms at h_k ⊢
-    rw [sum_range_succ, h_k, div_add_div, div_eq_div_iff, add_mul]
+    rw [partial_sum_succ, h_k, div_add_div, div_eq_div_iff, add_mul]
     · norm_cast
-      rw [add_mul, one_mul, Nat.factorial_succ,
-        show k.succ * k ! - k ! = (k.succ - 1) * k ! by rw [tsub_mul, one_mul], Nat.succ_sub_one,
-        add_mul, one_mul, pow_add]
+      rw [add_mul, one_mul, Nat.factorial_succ, add_mul, one_mul, add_tsub_cancel_right, pow_add]
       simp [mul_assoc]
-    refine' mul_ne_zero_iff.mpr ⟨_, _⟩
-    all_goals exact pow_ne_zero _ (nat.cast_ne_zero.mpr hm.ne.symm)
-#align liouville.liouville_number_rat_initial_terms Liouville.liouville_number_rat_initial_terms
+    all_goals positivity
+#align liouville_number.partial_sum_eq_rat liouvilleNumber.partialSum_eq_rat
+
+end liouvilleNumber
+
+open liouvilleNumber
 
-theorem is_liouville {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvilleNumber m) :=
+theorem liouville_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvilleNumber m) :=
   by
   -- two useful inequalities
   have mZ1 : 1 < (m : ℤ) := by norm_cast; exact one_lt_two.trans_le hm
   have m1 : 1 < (m : ℝ) := by norm_cast; exact one_lt_two.trans_le hm
   intro n
   -- the first `n` terms sum to `p / m ^ k!`
-  rcases liouville_number_rat_initial_terms (zero_lt_two.trans_le hm) n with ⟨p, hp⟩
+  rcases partial_sum_eq_rat (zero_lt_two.trans_le hm) n with ⟨p, hp⟩
   refine' ⟨p, m ^ n !, one_lt_pow mZ1 n.factorial_ne_zero, _⟩
   push_cast
   -- separate out the sum of the first `n` terms and the rest
-  rw [liouville_number_eq_initial_terms_add_tail m1 n, ← hp, add_sub_cancel',
-    abs_of_nonneg (liouville_number_tail_pos m1 _).le]
-  exact
-    ⟨((lt_add_iff_pos_right _).mpr (liouville_number_tail_pos m1 n)).Ne.symm,
-      (tsum_one_div_pow_factorial_lt n m1).trans_le
-        (aux_calc _ (nat.cast_two.symm.le.trans (nat.cast_le.mpr hm)))⟩
-#align liouville.is_liouville Liouville.is_liouville
-
-/- Placing this lemma outside of the `open/closed liouville`-namespace would allow to remove
-`_root_.`, at the cost of some other small weirdness. -/
-theorem is_transcendental {m : ℕ} (hm : 2 ≤ m) : Transcendental ℤ (liouvilleNumber m) :=
-  transcendental (is_liouville hm)
-#align liouville.is_transcendental Liouville.is_transcendental
-
-end Liouville
+  rw [← partial_sum_add_remainder m1 n, ← hp]
+  have hpos := remainder_pos m1 n
+  simpa [abs_of_pos hpos, hpos.ne'] using @remainder_lt n m (by assumption_mod_cast)
+#align liouville_liouville_number liouville_liouvilleNumber
+
+theorem transcendental_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) :
+    Transcendental ℤ (liouvilleNumber m) :=
+  (liouville_liouvilleNumber hm).Transcendental
+#align transcendental_liouville_number transcendental_liouvilleNumber
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -148,9 +148,10 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- I solve all extraneous goals at once with `exact pow_pos (zero_lt_two.trans_le hm) _`.]
       -- Clear denominators and massage*
       apply (div_le_div_iff _ _).mpr
-      conv_rhs => rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
-      -- the second factors coincide, so we prove the inequality of the first factors*
-      refine' (mul_le_mul_right _).mpr _
+      focus
+        conv_rhs => rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
+        -- the second factors coincide, so we prove the inequality of the first factors*
+        refine' (mul_le_mul_right _).mpr _
       -- solve all the inequalities `0 < m ^ ??`
       any_goals exact pow_pos (zero_lt_two.trans_le hm) _
       -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -141,7 +141,7 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- the second factors coincide (and are non-negative),
       -- the first factors satisfy the inequality `sub_one_div_inv_le_two`
       mul_le_mul_of_nonneg_right (sub_one_div_inv_le_two hm) (by positivity)
-    _ = 2 / m ^ (n + 1)! := (mul_one_div 2 _)
+    _ = 2 / m ^ (n + 1)! := mul_one_div 2 _
     _ = 2 / m ^ (n ! * (n + 1)) := (congr_arg (2 / ·) (congr_arg (Pow.pow m) (mul_comm _ _)))
     _ ≤ 1 / m ^ (n ! * n) := by
       -- [NB: in this block, I do not follow the brace convention for subgoals -- I wait until
chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one (#10077)

See here on Zulip.

This PR changes a bunch of names containing nhds_0 or/and lt_1 to nhds_zero or/and lt_one.

Diff
@@ -131,7 +131,7 @@ theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
     -- factor the constant `(1 / m ^ (n + 1)!)` out of the series
     _ = (∑' i, (1 / m) ^ i) * (1 / m ^ (n + 1)!) := tsum_mul_right
     -- the series is the geometric series
-    _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) := by rw [tsum_geometric_of_lt_1 (by positivity) mi]
+    _ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) := by rw [tsum_geometric_of_lt_one (by positivity) mi]
 #align liouville_number.remainder_lt' LiouvilleNumber.remainder_lt'
 
 theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
chore: Rename pow monotonicity lemmas (#9095)

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.
Diff
@@ -155,7 +155,7 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       any_goals exact pow_pos (zero_lt_two.trans_le hm) _
       -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
       exact _root_.trans (_root_.trans hm (pow_one _).symm.le)
-        (pow_mono (one_le_two.trans hm) n.factorial_pos)
+        (pow_right_mono (one_le_two.trans hm) n.factorial_pos)
     _ = 1 / (m ^ n !) ^ n := congr_arg (1 / ·) (pow_mul m n ! n)
 #align liouville_number.aux_calc LiouvilleNumber.aux_calc
 
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -142,7 +142,7 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- the first factors satisfy the inequality `sub_one_div_inv_le_two`
       mul_le_mul_of_nonneg_right (sub_one_div_inv_le_two hm) (by positivity)
     _ = 2 / m ^ (n + 1)! := (mul_one_div 2 _)
-    _ = 2 / m ^ (n ! * (n + 1)) := (congr_arg ((· / ·) 2) (congr_arg (Pow.pow m) (mul_comm _ _)))
+    _ = 2 / m ^ (n ! * (n + 1)) := (congr_arg (2 / ·) (congr_arg (Pow.pow m) (mul_comm _ _)))
     _ ≤ 1 / m ^ (n ! * n) := by
       -- [NB: in this block, I do not follow the brace convention for subgoals -- I wait until
       -- I solve all extraneous goals at once with `exact pow_pos (zero_lt_two.trans_le hm) _`.]
@@ -156,7 +156,7 @@ theorem aux_calc (n : ℕ) {m : ℝ} (hm : 2 ≤ m) :
       -- `2 ≤ m ^ n!` is a consequence of monotonicity of exponentiation at `2 ≤ m`.
       exact _root_.trans (_root_.trans hm (pow_one _).symm.le)
         (pow_mono (one_le_two.trans hm) n.factorial_pos)
-    _ = 1 / (m ^ n !) ^ n := congr_arg ((· / ·) 1) (pow_mul m n ! n)
+    _ = 1 / (m ^ n !) ^ n := congr_arg (1 / ·) (pow_mul m n ! n)
 #align liouville_number.aux_calc LiouvilleNumber.aux_calc
 
 /-- An upper estimate on the remainder. This estimate works with `m ∈ ℝ` satisfying `2 ≤ m` and is
chore: bump to v4.3.0-rc2 (#8366)

PR contents

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.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

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).

leanprover/lean4#2722

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}).

leanprover/lean4#2783

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:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[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>

Diff
@@ -172,7 +172,7 @@ theorem remainder_lt (n : ℕ) {m : ℝ} (m2 : 2 ≤ m) : remainder m n < 1 / (m
 /-- The sum of the `k` initial terms of the Liouville number to base `m` is a ratio of natural
 numbers where the denominator is `m ^ k!`. -/
 theorem partialSum_eq_rat {m : ℕ} (hm : 0 < m) (k : ℕ) :
-    ∃ p : ℕ, partialSum m k = p / (m ^ k ! : ℝ) := by
+    ∃ p : ℕ, partialSum m k = p / ((m ^ k ! :) : ℝ) := by
   induction' k with k h
   · exact ⟨1, by rw [partialSum, range_one, sum_singleton, Nat.cast_one, Nat.factorial,
       pow_one, pow_one]⟩
@@ -196,7 +196,7 @@ theorem liouville_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) : Liouville (liouvill
   intro n
   -- the first `n` terms sum to `p / m ^ k!`
   rcases partialSum_eq_rat (zero_lt_two.trans_le hm) n with ⟨p, hp⟩
-  refine' ⟨p, m ^ n !, by rw [Nat.cast_pow]; exact one_lt_pow mZ1 n.factorial_ne_zero, _⟩
+  refine' ⟨p, m ^ n !, one_lt_pow mZ1 n.factorial_ne_zero, _⟩
   push_cast
   rw [Nat.cast_pow] at hp
   -- separate out the sum of the first `n` terms and the rest
chore: missing spaces after rcases, convert and congrm (#7725)

Replace rcases( with rcases (. Same thing for convert( and congrm(. No other change.

Diff
@@ -83,7 +83,7 @@ protected theorem summable {m : ℝ} (hm : 1 < m) : Summable fun i : ℕ => 1 /
 
 theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :
     Summable fun i : ℕ => 1 / m ^ (i + (k + 1))! := by
-  convert(summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)
+  convert (summable_nat_add_iff (k + 1)).2 (LiouvilleNumber.summable hm)
 #align liouville_number.remainder_summable LiouvilleNumber.remainder_summable
 
 theorem remainder_pos {m : ℝ} (hm : 1 < m) (k : ℕ) : 0 < remainder m k :=
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2020 Jujian Zhang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Damiano Testa, Jujian Zhang
-
-! This file was ported from Lean 3 source module number_theory.liouville.liouville_number
-! leanprover-community/mathlib commit 04e80bb7e8510958cd9aacd32fe2dc147af0b9f1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.NumberTheory.Liouville.Basic
 
+#align_import number_theory.liouville.liouville_number from "leanprover-community/mathlib"@"04e80bb7e8510958cd9aacd32fe2dc147af0b9f1"
+
 /-!
 
 # Liouville constants
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -98,7 +98,7 @@ theorem partialSum_succ (m : ℝ) (n : ℕ) :
   sum_range_succ _ _
 #align liouville_number.partial_sum_succ LiouvilleNumber.partialSum_succ
 
-/-- Split the sum definining a Liouville number into the first `k` terms and the rest. -/
+/-- Split the sum defining a Liouville number into the first `k` terms and the rest. -/
 theorem partialSum_add_remainder {m : ℝ} (hm : 1 < m) (k : ℕ) :
     partialSum m k + remainder m k = liouvilleNumber m :=
   sum_add_tsum_nat_add _ (LiouvilleNumber.summable hm)
feat: port NumberTheory.Liouville.LiouvilleNumber (#4615)

Dependencies 12 + 869

870 files ported (98.6%)
382891 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file