analysis.special_functions.log.monotoneMathlib.Analysis.SpecialFunctions.Log.Monotone

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -3,7 +3,7 @@ Copyright (c) 2021 Bolton Bailey. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
 -/
-import Mathbin.Analysis.SpecialFunctions.Pow.Real
+import Analysis.SpecialFunctions.Pow.Real
 
 #align_import analysis.special_functions.log.monotone from "leanprover-community/mathlib"@"1b0a28e1c93409dbf6d69526863cd9984ef652ce"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Bolton Bailey. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
-
-! This file was ported from Lean 3 source module analysis.special_functions.log.monotone
-! leanprover-community/mathlib commit 1b0a28e1c93409dbf6d69526863cd9984ef652ce
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.Pow.Real
 
+#align_import analysis.special_functions.log.monotone from "leanprover-community/mathlib"@"1b0a28e1c93409dbf6d69526863cd9984ef652ce"
+
 /-!
 # Logarithm Tonality
 
Diff
@@ -35,6 +35,7 @@ namespace Real
 
 variable {x y : ℝ}
 
+#print Real.log_mul_self_monotoneOn /-
 theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) {x | 1 ≤ x} :=
   by
   -- TODO: can be strengthened to exp (-1) ≤ x
@@ -45,7 +46,9 @@ theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) {x | 1 
   refine' mul_le_mul ((log_le_log x_pos y_pos).mpr hxy) hxy (le_of_lt x_pos) _
   rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
 #align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOn
+-/
 
+#print Real.log_div_self_antitoneOn /-
 theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) {x | exp 1 ≤ x} :=
   by
   simp only [AntitoneOn, mem_set_of_eq]
@@ -61,7 +64,9 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) {x | exp
     _ ≤ log x * (y / x - 1) := (le_mul_of_one_le_left hyx hlogx)
     _ = log x / x * y - log x := by ring
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
+-/
 
+#print Real.log_div_self_rpow_antitoneOn /-
 theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     AntitoneOn (fun x : ℝ => log x / x ^ a) {x | exp (1 / a) ≤ x} :=
   by
@@ -91,13 +96,16 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
       exact le_of_lt (exp_pos (1 / a))
     exact rpow_le_rpow x_nonneg hxy (le_of_lt ha)
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
+-/
 
+#print Real.log_div_sqrt_antitoneOn /-
 theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) {x | exp 2 ≤ x} :=
   by
   simp_rw [sqrt_eq_rpow]
   convert @log_div_self_rpow_antitone_on (1 / 2) (by norm_num)
   norm_num
 #align real.log_div_sqrt_antitone_on Real.log_div_sqrt_antitoneOn
+-/
 
 end Real
 
Diff
@@ -60,7 +60,6 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) {x | exp
     _ ≤ y / x - 1 := (log_le_sub_one_of_pos (div_pos y_pos x_pos))
     _ ≤ log x * (y / x - 1) := (le_mul_of_one_le_left hyx hlogx)
     _ = log x / x * y - log x := by ring
-    
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
 
 theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
Diff
@@ -35,7 +35,7 @@ namespace Real
 
 variable {x y : ℝ}
 
-theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1 ≤ x } :=
+theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) {x | 1 ≤ x} :=
   by
   -- TODO: can be strengthened to exp (-1) ≤ x
   simp only [MonotoneOn, mem_set_of_eq]
@@ -46,7 +46,7 @@ theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1
   rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
 #align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOn
 
-theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x } :=
+theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) {x | exp 1 ≤ x} :=
   by
   simp only [AntitoneOn, mem_set_of_eq]
   intro x hex y hey hxy
@@ -64,7 +64,7 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | ex
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
 
 theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
-    AntitoneOn (fun x : ℝ => log x / x ^ a) { x | exp (1 / a) ≤ x } :=
+    AntitoneOn (fun x : ℝ => log x / x ^ a) {x | exp (1 / a) ≤ x} :=
   by
   simp only [AntitoneOn, mem_set_of_eq]
   intro x hex y hey hxy
@@ -93,10 +93,10 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     exact rpow_le_rpow x_nonneg hxy (le_of_lt ha)
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
 
-theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } :=
+theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) {x | exp 2 ≤ x} :=
   by
   simp_rw [sqrt_eq_rpow]
-  convert@log_div_self_rpow_antitone_on (1 / 2) (by norm_num)
+  convert @log_div_self_rpow_antitone_on (1 / 2) (by norm_num)
   norm_num
 #align real.log_div_sqrt_antitone_on Real.log_div_sqrt_antitoneOn
 
Diff
@@ -27,7 +27,7 @@ logarithm, tonality
 
 open Set Filter Function
 
-open Topology
+open scoped Topology
 
 noncomputable section
 
Diff
@@ -35,12 +35,6 @@ namespace Real
 
 variable {x y : ℝ}
 
-/- warning: real.log_mul_self_monotone_on -> Real.log_mul_self_monotoneOn is a dubious translation:
-lean 3 declaration is
-  MonotoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) x))
-but is expected to have type
-  MonotoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) x))
-Case conversion may be inaccurate. Consider using '#align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOnₓ'. -/
 theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1 ≤ x } :=
   by
   -- TODO: can be strengthened to exp (-1) ≤ x
@@ -52,12 +46,6 @@ theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1
   rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
 #align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOn
 
-/- warning: real.log_div_self_antitone_on -> Real.log_div_self_antitoneOn is a dubious translation:
-lean 3 declaration is
-  AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) x))
-but is expected to have type
-  AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) x))
-Case conversion may be inaccurate. Consider using '#align real.log_div_self_antitone_on Real.log_div_self_antitoneOnₓ'. -/
 theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x } :=
   by
   simp only [AntitoneOn, mem_set_of_eq]
@@ -75,12 +63,6 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | ex
     
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
 
-/- warning: real.log_div_self_rpow_antitone_on -> Real.log_div_self_rpow_antitoneOn is a dubious translation:
-lean 3 declaration is
-  forall {a : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) a) -> (AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) (HPow.hPow.{0, 0, 0} Real Real Real (instHPow.{0, 0} Real Real Real.hasPow) x a)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) a)) x)))
-but is expected to have type
-  forall {a : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) a) -> (AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) (HPow.hPow.{0, 0, 0} Real Real Real (instHPow.{0, 0} Real Real Real.instPowReal) x a)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) a)) x)))
-Case conversion may be inaccurate. Consider using '#align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOnₓ'. -/
 theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     AntitoneOn (fun x : ℝ => log x / x ^ a) { x | exp (1 / a) ≤ x } :=
   by
@@ -111,12 +93,6 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     exact rpow_le_rpow x_nonneg hxy (le_of_lt ha)
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
 
-/- warning: real.log_div_sqrt_antitone_on -> Real.log_div_sqrt_antitoneOn is a dubious translation:
-lean 3 declaration is
-  AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) (Real.sqrt x)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne))))) x))
-but is expected to have type
-  AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) (Real.sqrt x)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))))) x))
-Case conversion may be inaccurate. Consider using '#align real.log_div_sqrt_antitone_on Real.log_div_sqrt_antitoneOnₓ'. -/
 theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } :=
   by
   simp_rw [sqrt_eq_rpow]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
 
 ! This file was ported from Lean 3 source module analysis.special_functions.log.monotone
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
+! leanprover-community/mathlib commit 1b0a28e1c93409dbf6d69526863cd9984ef652ce
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Analysis.SpecialFunctions.Pow.Real
 /-!
 # Logarithm Tonality
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we describe the tonality of the logarithm function when multiplied by functions of the
 form `x ^ a`.
 
Diff
@@ -32,6 +32,12 @@ namespace Real
 
 variable {x y : ℝ}
 
+/- warning: real.log_mul_self_monotone_on -> Real.log_mul_self_monotoneOn is a dubious translation:
+lean 3 declaration is
+  MonotoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) x))
+but is expected to have type
+  MonotoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) x))
+Case conversion may be inaccurate. Consider using '#align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOnₓ'. -/
 theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1 ≤ x } :=
   by
   -- TODO: can be strengthened to exp (-1) ≤ x
@@ -43,6 +49,12 @@ theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1
   rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
 #align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOn
 
+/- warning: real.log_div_self_antitone_on -> Real.log_div_self_antitoneOn is a dubious translation:
+lean 3 declaration is
+  AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne)))) x))
+but is expected to have type
+  AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) x) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal))) x))
+Case conversion may be inaccurate. Consider using '#align real.log_div_self_antitone_on Real.log_div_self_antitoneOnₓ'. -/
 theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x } :=
   by
   simp only [AntitoneOn, mem_set_of_eq]
@@ -60,6 +72,12 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | ex
     
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
 
+/- warning: real.log_div_self_rpow_antitone_on -> Real.log_div_self_rpow_antitoneOn is a dubious translation:
+lean 3 declaration is
+  forall {a : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) a) -> (AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) (HPow.hPow.{0, 0, 0} Real Real Real (instHPow.{0, 0} Real Real Real.hasPow) x a)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (OfNat.ofNat.{0} Real 1 (OfNat.mk.{0} Real 1 (One.one.{0} Real Real.hasOne))) a)) x)))
+but is expected to have type
+  forall {a : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) a) -> (AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) (HPow.hPow.{0, 0, 0} Real Real Real (instHPow.{0, 0} Real Real Real.instPowReal) x a)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (OfNat.ofNat.{0} Real 1 (One.toOfNat1.{0} Real Real.instOneReal)) a)) x)))
+Case conversion may be inaccurate. Consider using '#align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOnₓ'. -/
 theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     AntitoneOn (fun x : ℝ => log x / x ^ a) { x | exp (1 / a) ≤ x } :=
   by
@@ -90,6 +108,12 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     exact rpow_le_rpow x_nonneg hxy (le_of_lt ha)
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
 
+/- warning: real.log_div_sqrt_antitone_on -> Real.log_div_sqrt_antitoneOn is a dubious translation:
+lean 3 declaration is
+  AntitoneOn.{0, 0} Real Real Real.preorder Real.preorder (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (DivInvMonoid.toHasDiv.{0} Real (DivisionRing.toDivInvMonoid.{0} Real Real.divisionRing))) (Real.log x) (Real.sqrt x)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.hasLe (Real.exp (OfNat.ofNat.{0} Real 2 (OfNat.mk.{0} Real 2 (bit0.{0} Real Real.hasAdd (One.one.{0} Real Real.hasOne))))) x))
+but is expected to have type
+  AntitoneOn.{0, 0} Real Real Real.instPreorderReal Real.instPreorderReal (fun (x : Real) => HDiv.hDiv.{0, 0, 0} Real Real Real (instHDiv.{0} Real (LinearOrderedField.toDiv.{0} Real Real.instLinearOrderedFieldReal)) (Real.log x) (Real.sqrt x)) (setOf.{0} Real (fun (x : Real) => LE.le.{0} Real Real.instLEReal (Real.exp (OfNat.ofNat.{0} Real 2 (instOfNat.{0} Real 2 Real.natCast (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))))) x))
+Case conversion may be inaccurate. Consider using '#align real.log_div_sqrt_antitone_on Real.log_div_sqrt_antitoneOnₓ'. -/
 theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } :=
   by
   simp_rw [sqrt_eq_rpow]
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
 
 ! This file was ported from Lean 3 source module analysis.special_functions.log.monotone
-! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
+! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Analysis.SpecialFunctions.Pow
+import Mathbin.Analysis.SpecialFunctions.Pow.Real
 
 /-!
 # Logarithm Tonality
Diff
@@ -4,11 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
 
 ! This file was ported from Lean 3 source module analysis.special_functions.log.monotone
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 2c1d8ca2812b64f88992a5294ea3dba144755cd1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Analysis.SpecialFunctions.Log.Basic
 import Mathbin.Analysis.SpecialFunctions.Pow
 
 /-!
Diff
@@ -94,7 +94,7 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
 theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } :=
   by
   simp_rw [sqrt_eq_rpow]
-  convert @log_div_self_rpow_antitone_on (1 / 2) (by norm_num)
+  convert@log_div_self_rpow_antitone_on (1 / 2) (by norm_num)
   norm_num
 #align real.log_div_sqrt_antitone_on Real.log_div_sqrt_antitoneOn
 
Diff
@@ -55,8 +55,8 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | ex
   rw [div_le_iff y_pos, ← sub_le_sub_iff_right (log x)]
   calc
     log y - log x = log (y / x) := by rw [log_div y_pos.ne' x_pos.ne']
-    _ ≤ y / x - 1 := log_le_sub_one_of_pos (div_pos y_pos x_pos)
-    _ ≤ log x * (y / x - 1) := le_mul_of_one_le_left hyx hlogx
+    _ ≤ y / x - 1 := (log_le_sub_one_of_pos (div_pos y_pos x_pos))
+    _ ≤ log x * (y / x - 1) := (le_mul_of_one_le_left hyx hlogx)
     _ = log x / x * y - log x := by ring
     
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

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

Diff
@@ -48,8 +48,8 @@ theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | ex
   rw [div_le_iff y_pos, ← sub_le_sub_iff_right (log x)]
   calc
     log y - log x = log (y / x) := by rw [log_div y_pos.ne' x_pos.ne']
-    _ ≤ y / x - 1 := (log_le_sub_one_of_pos (div_pos y_pos x_pos))
-    _ ≤ log x * (y / x - 1) := (le_mul_of_one_le_left hyx hlogx)
+    _ ≤ y / x - 1 := log_le_sub_one_of_pos (div_pos y_pos x_pos)
+    _ ≤ log x * (y / x - 1) := le_mul_of_one_le_left hyx hlogx
     _ = log x / x * y - log x := by ring
 #align real.log_div_self_antitone_on Real.log_div_self_antitoneOn
 
feat: add notation for Real.sqrt (#12056)

This adds the notation √r for Real.sqrt r. The precedence is such that √x⁻¹ is parsed as √(x⁻¹); not because this is particularly desirable, but because it's the default and the choice doesn't really matter.

This is extracted from #7907, which adds a more general nth root typeclass. The idea is to perform all the boring substitutions downstream quickly, so that we can play around with custom elaborators with a much slower rate of code-rot. This PR also won't rot as quickly, as it does not forbid writing x.sqrt as that PR does.

While perhaps claiming for Real.sqrt is greedy; it:

  • Is far more common thatn NNReal.sqrt and Nat.sqrt
  • Is far more interesting to mathlib than sqrt on Float
  • Can be overloaded anyway, so this does not prevent downstream code using the notation on their own types.
  • Will be replaced by a more general typeclass in a future PR.

Zulip

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -82,7 +82,7 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
     gcongr
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
 
-theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } := by
+theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / √x) { x | exp 2 ≤ x } := by
   simp_rw [sqrt_eq_rpow]
   convert @log_div_self_rpow_antitoneOn (1 / 2) (by norm_num)
   norm_num
feat: golf using gcongr throughout the library (#8752)

Following on from previous gcongr golfing PRs #4702 and #4784.

This is a replacement for #7901: this round of golfs, first introduced there, there exposed some performance issues in gcongr, hopefully fixed by #8731, and I am opening a new PR so that the performance can be checked against current master rather than master at the time of #7901.

Diff
@@ -33,9 +33,8 @@ theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1
   -- TODO: can be strengthened to exp (-1) ≤ x
   simp only [MonotoneOn, mem_setOf_eq]
   intro x hex y hey hxy
-  have x_pos : 0 < x := lt_of_lt_of_le zero_lt_one hex
   have y_pos : 0 < y := lt_of_lt_of_le zero_lt_one hey
-  refine' mul_le_mul ((log_le_log x_pos y_pos).mpr hxy) hxy (le_of_lt x_pos) _
+  gcongr
   rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
 #align real.log_mul_self_monotone_on Real.log_mul_self_monotoneOn
 
@@ -80,7 +79,7 @@ theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
       simp only [Real.exp_eq_exp]
       field_simp [(ne_of_lt ha).symm]
       exact le_of_lt (exp_pos (1 / a))
-    exact rpow_le_rpow x_nonneg hxy (le_of_lt ha)
+    gcongr
 #align real.log_div_self_rpow_antitone_on Real.log_div_self_rpow_antitoneOn
 
 theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / sqrt x) { x | exp 2 ≤ x } := by
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) 2021 Bolton Bailey. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Bolton Bailey
-
-! This file was ported from Lean 3 source module analysis.special_functions.log.monotone
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecialFunctions.Pow.Real
 
+#align_import analysis.special_functions.log.monotone from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
+
 /-!
 # Logarithm Tonality
 
feat: port Analysis.SpecialFunctions.Log.Monotone (#4144)

Dependencies 12 + 747

748 files ported (98.4%)
327634 lines ported (98.3%)
Show graph

The unported dependencies are

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