measure_theory.function.special_functions.basicMathlib.MeasureTheory.Function.SpecialFunctions.Basic

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Analysis.SpecialFunctions.Pow.Nnreal
+import Analysis.SpecialFunctions.Pow.NNReal
 import MeasureTheory.Constructions.BorelSpace.Complex
 
 #align_import measure_theory.function.special_functions.basic from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.Analysis.SpecialFunctions.Pow.Nnreal
-import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
+import Analysis.SpecialFunctions.Pow.Nnreal
+import MeasureTheory.Constructions.BorelSpace.Complex
 
 #align_import measure_theory.function.special_functions.basic from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module measure_theory.function.special_functions.basic
-! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.Pow.Nnreal
 import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
 
+#align_import measure_theory.function.special_functions.basic from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
+
 /-!
 # Measurability of real and complex functions
 
Diff
@@ -106,10 +106,12 @@ theorem measurable_im : Measurable im :=
 #align complex.measurable_im Complex.measurable_im
 -/
 
+#print Complex.measurable_ofReal /-
 @[measurability]
 theorem measurable_ofReal : Measurable (coe : ℝ → ℂ) :=
   continuous_ofReal.Measurable
 #align complex.measurable_of_real Complex.measurable_ofReal
+-/
 
 #print Complex.measurable_exp /-
 @[measurability]
Diff
@@ -107,9 +107,9 @@ theorem measurable_im : Measurable im :=
 -/
 
 @[measurability]
-theorem measurable_of_real : Measurable (coe : ℝ → ℂ) :=
+theorem measurable_ofReal : Measurable (coe : ℝ → ℂ) :=
   continuous_ofReal.Measurable
-#align complex.measurable_of_real Complex.measurable_of_real
+#align complex.measurable_of_real Complex.measurable_ofReal
 
 #print Complex.measurable_exp /-
 @[measurability]
@@ -162,8 +162,8 @@ theorem measurable_arg : Measurable arg :=
 #print Complex.measurable_log /-
 @[measurability]
 theorem measurable_log : Measurable log :=
-  (measurable_of_real.comp <| Real.measurable_log.comp measurable_norm).add <|
-    (measurable_of_real.comp measurable_arg).mul_const I
+  (measurable_ofReal.comp <| Real.measurable_log.comp measurable_norm).add <|
+    (measurable_ofReal.comp measurable_arg).mul_const I
 #align complex.measurable_log Complex.measurable_log
 -/
 
@@ -296,8 +296,8 @@ instance Complex.hasMeasurablePow : MeasurablePow ℂ ℂ :=
 #print Real.hasMeasurablePow /-
 instance Real.hasMeasurablePow : MeasurablePow ℝ ℝ :=
   ⟨Complex.measurable_re.comp <|
-      (Complex.measurable_of_real.comp measurable_fst).pow
-        (Complex.measurable_of_real.comp measurable_snd)⟩
+      (Complex.measurable_ofReal.comp measurable_fst).pow
+        (Complex.measurable_ofReal.comp measurable_snd)⟩
 #align real.has_measurable_pow Real.hasMeasurablePow
 -/
 
Diff
@@ -327,7 +327,7 @@ end PowInstances
 -- Guard against import creep:
 assert_not_exists InnerProductSpace
 
-assert_not_exists real.arctan
+assert_not_exists Real.arctan
 
 assert_not_exists FiniteDimensional.proper
 
Diff
@@ -27,7 +27,7 @@ See also `measure_theory.function.special_functions.arctan` and
 
 noncomputable section
 
-open NNReal ENNReal
+open scoped NNReal ENNReal
 
 namespace Real
 
Diff
@@ -106,12 +106,6 @@ theorem measurable_im : Measurable im :=
 #align complex.measurable_im Complex.measurable_im
 -/
 
-/- warning: complex.measurable_of_real -> Complex.measurable_of_real is a dubious translation:
-lean 3 declaration is
-  Measurable.{0, 0} Real Complex Real.measurableSpace Complex.measurableSpace ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Real Complex (HasLiftT.mk.{1, 1} Real Complex (CoeTCₓ.coe.{1, 1} Real Complex (coeBase.{1, 1} Real Complex Complex.hasCoe))))
-but is expected to have type
-  Measurable.{0, 0} Real Complex Real.measurableSpace Complex.measurableSpace Complex.ofReal'
-Case conversion may be inaccurate. Consider using '#align complex.measurable_of_real Complex.measurable_of_realₓ'. -/
 @[measurability]
 theorem measurable_of_real : Measurable (coe : ℝ → ℂ) :=
   continuous_ofReal.Measurable
Diff
@@ -331,7 +331,7 @@ instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ :=
 end PowInstances
 
 -- Guard against import creep:
-assert_not_exists inner_product_space
+assert_not_exists InnerProductSpace
 
 assert_not_exists real.arctan
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module measure_theory.function.special_functions.basic
-! leanprover-community/mathlib commit 83a66c8775fa14ee5180c85cab98e970956401ad
+! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
 /-!
 # Measurability of real and complex functions
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We show that most standard real and complex functions are measurable, notably `exp`, `cos`, `sin`,
 `cosh`, `sinh`, `log`, `pow`, `arcsin`, `arccos`.
 
Diff
@@ -28,91 +28,128 @@ open NNReal ENNReal
 
 namespace Real
 
+#print Real.measurable_exp /-
 @[measurability]
 theorem measurable_exp : Measurable exp :=
   continuous_exp.Measurable
 #align real.measurable_exp Real.measurable_exp
+-/
 
+#print Real.measurable_log /-
 @[measurability]
 theorem measurable_log : Measurable log :=
   measurable_of_measurable_on_compl_singleton 0 <|
     Continuous.measurable <| continuousOn_iff_continuous_restrict.1 continuousOn_log
 #align real.measurable_log Real.measurable_log
+-/
 
+#print Real.measurable_sin /-
 @[measurability]
 theorem measurable_sin : Measurable sin :=
   continuous_sin.Measurable
 #align real.measurable_sin Real.measurable_sin
+-/
 
+#print Real.measurable_cos /-
 @[measurability]
 theorem measurable_cos : Measurable cos :=
   continuous_cos.Measurable
 #align real.measurable_cos Real.measurable_cos
+-/
 
+#print Real.measurable_sinh /-
 @[measurability]
 theorem measurable_sinh : Measurable sinh :=
   continuous_sinh.Measurable
 #align real.measurable_sinh Real.measurable_sinh
+-/
 
+#print Real.measurable_cosh /-
 @[measurability]
 theorem measurable_cosh : Measurable cosh :=
   continuous_cosh.Measurable
 #align real.measurable_cosh Real.measurable_cosh
+-/
 
+#print Real.measurable_arcsin /-
 @[measurability]
 theorem measurable_arcsin : Measurable arcsin :=
   continuous_arcsin.Measurable
 #align real.measurable_arcsin Real.measurable_arcsin
+-/
 
+#print Real.measurable_arccos /-
 @[measurability]
 theorem measurable_arccos : Measurable arccos :=
   continuous_arccos.Measurable
 #align real.measurable_arccos Real.measurable_arccos
+-/
 
 end Real
 
 namespace Complex
 
+#print Complex.measurable_re /-
 @[measurability]
 theorem measurable_re : Measurable re :=
   continuous_re.Measurable
 #align complex.measurable_re Complex.measurable_re
+-/
 
+#print Complex.measurable_im /-
 @[measurability]
 theorem measurable_im : Measurable im :=
   continuous_im.Measurable
 #align complex.measurable_im Complex.measurable_im
+-/
 
+/- warning: complex.measurable_of_real -> Complex.measurable_of_real is a dubious translation:
+lean 3 declaration is
+  Measurable.{0, 0} Real Complex Real.measurableSpace Complex.measurableSpace ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Real Complex (HasLiftT.mk.{1, 1} Real Complex (CoeTCₓ.coe.{1, 1} Real Complex (coeBase.{1, 1} Real Complex Complex.hasCoe))))
+but is expected to have type
+  Measurable.{0, 0} Real Complex Real.measurableSpace Complex.measurableSpace Complex.ofReal'
+Case conversion may be inaccurate. Consider using '#align complex.measurable_of_real Complex.measurable_of_realₓ'. -/
 @[measurability]
 theorem measurable_of_real : Measurable (coe : ℝ → ℂ) :=
   continuous_ofReal.Measurable
 #align complex.measurable_of_real Complex.measurable_of_real
 
+#print Complex.measurable_exp /-
 @[measurability]
 theorem measurable_exp : Measurable exp :=
   continuous_exp.Measurable
 #align complex.measurable_exp Complex.measurable_exp
+-/
 
+#print Complex.measurable_sin /-
 @[measurability]
 theorem measurable_sin : Measurable sin :=
   continuous_sin.Measurable
 #align complex.measurable_sin Complex.measurable_sin
+-/
 
+#print Complex.measurable_cos /-
 @[measurability]
 theorem measurable_cos : Measurable cos :=
   continuous_cos.Measurable
 #align complex.measurable_cos Complex.measurable_cos
+-/
 
+#print Complex.measurable_sinh /-
 @[measurability]
 theorem measurable_sinh : Measurable sinh :=
   continuous_sinh.Measurable
 #align complex.measurable_sinh Complex.measurable_sinh
+-/
 
+#print Complex.measurable_cosh /-
 @[measurability]
 theorem measurable_cosh : Measurable cosh :=
   continuous_cosh.Measurable
 #align complex.measurable_cosh Complex.measurable_cosh
+-/
 
+#print Complex.measurable_arg /-
 @[measurability]
 theorem measurable_arg : Measurable arg :=
   have A : Measurable fun x : ℂ => Real.arcsin (x.im / x.abs) :=
@@ -123,12 +160,15 @@ theorem measurable_arg : Measurable arg :=
     Measurable.ite (isClosed_le continuous_const continuous_im).MeasurableSet (B.AddConst _)
       (B.sub_const _)
 #align complex.measurable_arg Complex.measurable_arg
+-/
 
+#print Complex.measurable_log /-
 @[measurability]
 theorem measurable_log : Measurable log :=
   (measurable_of_real.comp <| Real.measurable_log.comp measurable_norm).add <|
     (measurable_of_real.comp measurable_arg).mul_const I
 #align complex.measurable_log Complex.measurable_log
+-/
 
 end Complex
 
@@ -138,40 +178,54 @@ open Real
 
 variable {α : Type _} {m : MeasurableSpace α} {f : α → ℝ} (hf : Measurable f)
 
+#print Measurable.exp /-
 @[measurability]
 theorem Measurable.exp : Measurable fun x => Real.exp (f x) :=
   Real.measurable_exp.comp hf
 #align measurable.exp Measurable.exp
+-/
 
+#print Measurable.log /-
 @[measurability]
 theorem Measurable.log : Measurable fun x => log (f x) :=
   measurable_log.comp hf
 #align measurable.log Measurable.log
+-/
 
+#print Measurable.cos /-
 @[measurability]
 theorem Measurable.cos : Measurable fun x => Real.cos (f x) :=
   Real.measurable_cos.comp hf
 #align measurable.cos Measurable.cos
+-/
 
+#print Measurable.sin /-
 @[measurability]
 theorem Measurable.sin : Measurable fun x => Real.sin (f x) :=
   Real.measurable_sin.comp hf
 #align measurable.sin Measurable.sin
+-/
 
+#print Measurable.cosh /-
 @[measurability]
 theorem Measurable.cosh : Measurable fun x => Real.cosh (f x) :=
   Real.measurable_cosh.comp hf
 #align measurable.cosh Measurable.cosh
+-/
 
+#print Measurable.sinh /-
 @[measurability]
 theorem Measurable.sinh : Measurable fun x => Real.sinh (f x) :=
   Real.measurable_sinh.comp hf
 #align measurable.sinh Measurable.sinh
+-/
 
+#print Measurable.sqrt /-
 @[measurability]
 theorem Measurable.sqrt : Measurable fun x => sqrt (f x) :=
   continuous_sqrt.Measurable.comp hf
 #align measurable.sqrt Measurable.sqrt
+-/
 
 end RealComposition
 
@@ -181,61 +235,82 @@ open Complex
 
 variable {α : Type _} {m : MeasurableSpace α} {f : α → ℂ} (hf : Measurable f)
 
+#print Measurable.cexp /-
 @[measurability]
 theorem Measurable.cexp : Measurable fun x => Complex.exp (f x) :=
   Complex.measurable_exp.comp hf
 #align measurable.cexp Measurable.cexp
+-/
 
+#print Measurable.ccos /-
 @[measurability]
 theorem Measurable.ccos : Measurable fun x => Complex.cos (f x) :=
   Complex.measurable_cos.comp hf
 #align measurable.ccos Measurable.ccos
+-/
 
+#print Measurable.csin /-
 @[measurability]
 theorem Measurable.csin : Measurable fun x => Complex.sin (f x) :=
   Complex.measurable_sin.comp hf
 #align measurable.csin Measurable.csin
+-/
 
+#print Measurable.ccosh /-
 @[measurability]
 theorem Measurable.ccosh : Measurable fun x => Complex.cosh (f x) :=
   Complex.measurable_cosh.comp hf
 #align measurable.ccosh Measurable.ccosh
+-/
 
+#print Measurable.csinh /-
 @[measurability]
 theorem Measurable.csinh : Measurable fun x => Complex.sinh (f x) :=
   Complex.measurable_sinh.comp hf
 #align measurable.csinh Measurable.csinh
+-/
 
+#print Measurable.carg /-
 @[measurability]
 theorem Measurable.carg : Measurable fun x => arg (f x) :=
   measurable_arg.comp hf
 #align measurable.carg Measurable.carg
+-/
 
+#print Measurable.clog /-
 @[measurability]
 theorem Measurable.clog : Measurable fun x => log (f x) :=
   measurable_log.comp hf
 #align measurable.clog Measurable.clog
+-/
 
 end ComplexComposition
 
 section PowInstances
 
+#print Complex.hasMeasurablePow /-
 instance Complex.hasMeasurablePow : MeasurablePow ℂ ℂ :=
   ⟨Measurable.ite (measurable_fst (measurableSet_singleton 0))
       (Measurable.ite (measurable_snd (measurableSet_singleton 0)) measurable_one measurable_zero)
       (measurable_fst.clog.mul measurable_snd).cexp⟩
 #align complex.has_measurable_pow Complex.hasMeasurablePow
+-/
 
+#print Real.hasMeasurablePow /-
 instance Real.hasMeasurablePow : MeasurablePow ℝ ℝ :=
   ⟨Complex.measurable_re.comp <|
       (Complex.measurable_of_real.comp measurable_fst).pow
         (Complex.measurable_of_real.comp measurable_snd)⟩
 #align real.has_measurable_pow Real.hasMeasurablePow
+-/
 
+#print NNReal.hasMeasurablePow /-
 instance NNReal.hasMeasurablePow : MeasurablePow ℝ≥0 ℝ :=
   ⟨(measurable_fst.coeNNRealReal.pow measurable_snd).subtype_mk⟩
 #align nnreal.has_measurable_pow NNReal.hasMeasurablePow
+-/
 
+#print ENNReal.hasMeasurablePow /-
 instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ :=
   by
   refine' ⟨ENNReal.measurable_of_measurable_nnreal_prod _ _⟩
@@ -248,6 +323,7 @@ instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ :=
     refine' Measurable.ite measurableSet_Ioi measurable_const _
     exact Measurable.ite (measurable_set_singleton 0) measurable_const measurable_const
 #align ennreal.has_measurable_pow ENNReal.hasMeasurablePow
+-/
 
 end PowInstances
 
Diff
@@ -238,9 +238,9 @@ instance NNReal.hasMeasurablePow : MeasurablePow ℝ≥0 ℝ :=
 
 instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ :=
   by
-  refine' ⟨ENNReal.measurable_of_measurable_nNReal_prod _ _⟩
+  refine' ⟨ENNReal.measurable_of_measurable_nnreal_prod _ _⟩
   · simp_rw [ENNReal.coe_rpow_def]
-    refine' Measurable.ite _ measurable_const (measurable_fst.pow measurable_snd).coe_nNReal_eNNReal
+    refine' Measurable.ite _ measurable_const (measurable_fst.pow measurable_snd).coe_nnreal_ennreal
     exact
       MeasurableSet.inter (measurable_fst (measurable_set_singleton 0))
         (measurable_snd measurableSet_Iio)
Diff
@@ -4,12 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module measure_theory.function.special_functions.basic
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
+! leanprover-community/mathlib commit 83a66c8775fa14ee5180c85cab98e970956401ad
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.SpecialFunctions.Pow.Nnreal
-import Mathbin.Data.IsROrC.Lemmas
 import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
 
 /-!
@@ -133,22 +132,6 @@ theorem measurable_log : Measurable log :=
 
 end Complex
 
-namespace IsROrC
-
-variable {𝕜 : Type _} [IsROrC 𝕜]
-
-@[measurability]
-theorem measurable_re : Measurable (re : 𝕜 → ℝ) :=
-  continuous_re.Measurable
-#align is_R_or_C.measurable_re IsROrC.measurable_re
-
-@[measurability]
-theorem measurable_im : Measurable (im : 𝕜 → ℝ) :=
-  continuous_im.Measurable
-#align is_R_or_C.measurable_im IsROrC.measurable_im
-
-end IsROrC
-
 section RealComposition
 
 open Real
@@ -235,67 +218,6 @@ theorem Measurable.clog : Measurable fun x => log (f x) :=
 
 end ComplexComposition
 
-section IsROrCComposition
-
-variable {α 𝕜 : Type _} [IsROrC 𝕜] {m : MeasurableSpace α} {f : α → 𝕜} {μ : MeasureTheory.Measure α}
-
-include m
-
-@[measurability]
-theorem Measurable.re (hf : Measurable f) : Measurable fun x => IsROrC.re (f x) :=
-  IsROrC.measurable_re.comp hf
-#align measurable.re Measurable.re
-
-@[measurability]
-theorem AEMeasurable.re (hf : AEMeasurable f μ) : AEMeasurable (fun x => IsROrC.re (f x)) μ :=
-  IsROrC.measurable_re.comp_aemeasurable hf
-#align ae_measurable.re AEMeasurable.re
-
-@[measurability]
-theorem Measurable.im (hf : Measurable f) : Measurable fun x => IsROrC.im (f x) :=
-  IsROrC.measurable_im.comp hf
-#align measurable.im Measurable.im
-
-@[measurability]
-theorem AEMeasurable.im (hf : AEMeasurable f μ) : AEMeasurable (fun x => IsROrC.im (f x)) μ :=
-  IsROrC.measurable_im.comp_aemeasurable hf
-#align ae_measurable.im AEMeasurable.im
-
-omit m
-
-end IsROrCComposition
-
-section
-
-variable {α 𝕜 : Type _} [IsROrC 𝕜] [MeasurableSpace α] {f : α → 𝕜} {μ : MeasureTheory.Measure α}
-
-@[measurability]
-theorem IsROrC.measurable_of_real : Measurable (coe : ℝ → 𝕜) :=
-  IsROrC.continuous_ofReal.Measurable
-#align is_R_or_C.measurable_of_real IsROrC.measurable_of_real
-
-theorem measurable_of_re_im (hre : Measurable fun x => IsROrC.re (f x))
-    (him : Measurable fun x => IsROrC.im (f x)) : Measurable f :=
-  by
-  convert(is_R_or_C.measurable_of_real.comp hre).add
-      ((is_R_or_C.measurable_of_real.comp him).mul_const IsROrC.i)
-  · ext1 x
-    exact (IsROrC.re_add_im _).symm
-  all_goals infer_instance
-#align measurable_of_re_im measurable_of_re_im
-
-theorem aEMeasurable_of_re_im (hre : AEMeasurable (fun x => IsROrC.re (f x)) μ)
-    (him : AEMeasurable (fun x => IsROrC.im (f x)) μ) : AEMeasurable f μ :=
-  by
-  convert(is_R_or_C.measurable_of_real.comp_ae_measurable hre).add
-      ((is_R_or_C.measurable_of_real.comp_ae_measurable him).mul_const IsROrC.i)
-  · ext1 x
-    exact (IsROrC.re_add_im _).symm
-  all_goals infer_instance
-#align ae_measurable_of_re_im aEMeasurable_of_re_im
-
-end
-
 section PowInstances
 
 instance Complex.hasMeasurablePow : MeasurablePow ℂ ℂ :=
@@ -334,3 +256,5 @@ assert_not_exists inner_product_space
 
 assert_not_exists real.arctan
 
+assert_not_exists FiniteDimensional.proper
+
Diff
@@ -4,13 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module measure_theory.function.special_functions.basic
-! leanprover-community/mathlib commit 468b141b14016d54b479eb7a0fff1e360b7e3cf6
+! 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.Nnreal
 import Mathbin.Data.IsROrC.Lemmas
-import Mathbin.MeasureTheory.Constructions.BorelSpace
+import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
 
 /-!
 # Measurability of real and complex functions
Diff
@@ -86,7 +86,7 @@ theorem measurable_im : Measurable im :=
 
 @[measurability]
 theorem measurable_of_real : Measurable (coe : ℝ → ℂ) :=
-  continuous_of_real.Measurable
+  continuous_ofReal.Measurable
 #align complex.measurable_of_real Complex.measurable_of_real
 
 @[measurability]
Diff
@@ -271,7 +271,7 @@ variable {α 𝕜 : Type _} [IsROrC 𝕜] [MeasurableSpace α] {f : α → 𝕜}
 
 @[measurability]
 theorem IsROrC.measurable_of_real : Measurable (coe : ℝ → 𝕜) :=
-  IsROrC.continuous_of_real.Measurable
+  IsROrC.continuous_ofReal.Measurable
 #align is_R_or_C.measurable_of_real IsROrC.measurable_of_real
 
 theorem measurable_of_re_im (hre : Measurable fun x => IsROrC.re (f x))
Diff
@@ -298,23 +298,23 @@ end
 
 section PowInstances
 
-instance Complex.hasMeasurablePow : HasMeasurablePow ℂ ℂ :=
+instance Complex.hasMeasurablePow : MeasurablePow ℂ ℂ :=
   ⟨Measurable.ite (measurable_fst (measurableSet_singleton 0))
       (Measurable.ite (measurable_snd (measurableSet_singleton 0)) measurable_one measurable_zero)
       (measurable_fst.clog.mul measurable_snd).cexp⟩
 #align complex.has_measurable_pow Complex.hasMeasurablePow
 
-instance Real.hasMeasurablePow : HasMeasurablePow ℝ ℝ :=
+instance Real.hasMeasurablePow : MeasurablePow ℝ ℝ :=
   ⟨Complex.measurable_re.comp <|
       (Complex.measurable_of_real.comp measurable_fst).pow
         (Complex.measurable_of_real.comp measurable_snd)⟩
 #align real.has_measurable_pow Real.hasMeasurablePow
 
-instance NNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0 ℝ :=
+instance NNReal.hasMeasurablePow : MeasurablePow ℝ≥0 ℝ :=
   ⟨(measurable_fst.coeNNRealReal.pow measurable_snd).subtype_mk⟩
 #align nnreal.has_measurable_pow NNReal.hasMeasurablePow
 
-instance ENNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0∞ ℝ :=
+instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ :=
   by
   refine' ⟨ENNReal.measurable_of_measurable_nNReal_prod _ _⟩
   · simp_rw [ENNReal.coe_rpow_def]
Diff
@@ -247,9 +247,9 @@ theorem Measurable.re (hf : Measurable f) : Measurable fun x => IsROrC.re (f x)
 #align measurable.re Measurable.re
 
 @[measurability]
-theorem AeMeasurable.re (hf : AeMeasurable f μ) : AeMeasurable (fun x => IsROrC.re (f x)) μ :=
-  IsROrC.measurable_re.compAeMeasurable hf
-#align ae_measurable.re AeMeasurable.re
+theorem AEMeasurable.re (hf : AEMeasurable f μ) : AEMeasurable (fun x => IsROrC.re (f x)) μ :=
+  IsROrC.measurable_re.comp_aemeasurable hf
+#align ae_measurable.re AEMeasurable.re
 
 @[measurability]
 theorem Measurable.im (hf : Measurable f) : Measurable fun x => IsROrC.im (f x) :=
@@ -257,9 +257,9 @@ theorem Measurable.im (hf : Measurable f) : Measurable fun x => IsROrC.im (f x)
 #align measurable.im Measurable.im
 
 @[measurability]
-theorem AeMeasurable.im (hf : AeMeasurable f μ) : AeMeasurable (fun x => IsROrC.im (f x)) μ :=
-  IsROrC.measurable_im.compAeMeasurable hf
-#align ae_measurable.im AeMeasurable.im
+theorem AEMeasurable.im (hf : AEMeasurable f μ) : AEMeasurable (fun x => IsROrC.im (f x)) μ :=
+  IsROrC.measurable_im.comp_aemeasurable hf
+#align ae_measurable.im AEMeasurable.im
 
 omit m
 
@@ -284,15 +284,15 @@ theorem measurable_of_re_im (hre : Measurable fun x => IsROrC.re (f x))
   all_goals infer_instance
 #align measurable_of_re_im measurable_of_re_im
 
-theorem aeMeasurableOfReIm (hre : AeMeasurable (fun x => IsROrC.re (f x)) μ)
-    (him : AeMeasurable (fun x => IsROrC.im (f x)) μ) : AeMeasurable f μ :=
+theorem aEMeasurable_of_re_im (hre : AEMeasurable (fun x => IsROrC.re (f x)) μ)
+    (him : AEMeasurable (fun x => IsROrC.im (f x)) μ) : AEMeasurable f μ :=
   by
   convert(is_R_or_C.measurable_of_real.comp_ae_measurable hre).add
       ((is_R_or_C.measurable_of_real.comp_ae_measurable him).mul_const IsROrC.i)
   · ext1 x
     exact (IsROrC.re_add_im _).symm
   all_goals infer_instance
-#align ae_measurable_of_re_im aeMeasurableOfReIm
+#align ae_measurable_of_re_im aEMeasurable_of_re_im
 
 end
 
Diff
@@ -277,8 +277,7 @@ theorem IsROrC.measurable_of_real : Measurable (coe : ℝ → 𝕜) :=
 theorem measurable_of_re_im (hre : Measurable fun x => IsROrC.re (f x))
     (him : Measurable fun x => IsROrC.im (f x)) : Measurable f :=
   by
-  convert
-    (is_R_or_C.measurable_of_real.comp hre).add
+  convert(is_R_or_C.measurable_of_real.comp hre).add
       ((is_R_or_C.measurable_of_real.comp him).mul_const IsROrC.i)
   · ext1 x
     exact (IsROrC.re_add_im _).symm
@@ -288,8 +287,7 @@ theorem measurable_of_re_im (hre : Measurable fun x => IsROrC.re (f x))
 theorem aeMeasurableOfReIm (hre : AeMeasurable (fun x => IsROrC.re (f x)) μ)
     (him : AeMeasurable (fun x => IsROrC.im (f x)) μ) : AeMeasurable f μ :=
   by
-  convert
-    (is_R_or_C.measurable_of_real.comp_ae_measurable hre).add
+  convert(is_R_or_C.measurable_of_real.comp_ae_measurable hre).add
       ((is_R_or_C.measurable_of_real.comp_ae_measurable him).mul_const IsROrC.i)
   · ext1 x
     exact (IsROrC.re_add_im _).symm
Diff
@@ -128,7 +128,7 @@ theorem measurable_arg : Measurable arg :=
 @[measurability]
 theorem measurable_log : Measurable log :=
   (measurable_of_real.comp <| Real.measurable_log.comp measurable_norm).add <|
-    (measurable_of_real.comp measurable_arg).mul_const i
+    (measurable_of_real.comp measurable_arg).mul_const I
 #align complex.measurable_log Complex.measurable_log
 
 end Complex
Diff
@@ -313,7 +313,7 @@ instance Real.hasMeasurablePow : HasMeasurablePow ℝ ℝ :=
 #align real.has_measurable_pow Real.hasMeasurablePow
 
 instance NNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0 ℝ :=
-  ⟨(measurable_fst.coeNnrealReal.pow measurable_snd).subtype_mk⟩
+  ⟨(measurable_fst.coeNNRealReal.pow measurable_snd).subtype_mk⟩
 #align nnreal.has_measurable_pow NNReal.hasMeasurablePow
 
 instance ENNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0∞ ℝ :=
Diff
@@ -25,7 +25,7 @@ See also `measure_theory.function.special_functions.arctan` and
 
 noncomputable section
 
-open NNReal Ennreal
+open NNReal ENNReal
 
 namespace Real
 
@@ -316,18 +316,18 @@ instance NNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0 ℝ :=
   ⟨(measurable_fst.coeNnrealReal.pow measurable_snd).subtype_mk⟩
 #align nnreal.has_measurable_pow NNReal.hasMeasurablePow
 
-instance Ennreal.hasMeasurablePow : HasMeasurablePow ℝ≥0∞ ℝ :=
+instance ENNReal.hasMeasurablePow : HasMeasurablePow ℝ≥0∞ ℝ :=
   by
-  refine' ⟨Ennreal.measurable_of_measurable_nNReal_prod _ _⟩
-  · simp_rw [Ennreal.coe_rpow_def]
-    refine' Measurable.ite _ measurable_const (measurable_fst.pow measurable_snd).coe_nNReal_ennreal
+  refine' ⟨ENNReal.measurable_of_measurable_nNReal_prod _ _⟩
+  · simp_rw [ENNReal.coe_rpow_def]
+    refine' Measurable.ite _ measurable_const (measurable_fst.pow measurable_snd).coe_nNReal_eNNReal
     exact
       MeasurableSet.inter (measurable_fst (measurable_set_singleton 0))
         (measurable_snd measurableSet_Iio)
-  · simp_rw [Ennreal.top_rpow_def]
+  · simp_rw [ENNReal.top_rpow_def]
     refine' Measurable.ite measurableSet_Ioi measurable_const _
     exact Measurable.ite (measurable_set_singleton 0) measurable_const measurable_const
-#align ennreal.has_measurable_pow Ennreal.hasMeasurablePow
+#align ennreal.has_measurable_pow ENNReal.hasMeasurablePow
 
 end PowInstances
 

Changes in mathlib4

mathlib3
mathlib4
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
@@ -180,7 +180,7 @@ theorem Measurable.sinh : Measurable fun x => Real.sinh (f x) :=
 #align measurable.sinh Measurable.sinh
 
 @[measurability]
-theorem Measurable.sqrt : Measurable fun x => sqrt (f x) :=
+theorem Measurable.sqrt : Measurable fun x => √(f x) :=
   continuous_sqrt.measurable.comp hf
 #align measurable.sqrt Measurable.sqrt
 
feat: exponentially tilted measures (#7676)

Define exponentially tilted measures. The exponential tilting of a measure μ on α by a function f : α → ℝ is the measure with density x ↦ exp (f x) / ∫ y, exp (f y) ∂μ with respect to μ.

Co-authored-by: Rémy Degenne <remydegenne@gmail.com> Co-authored-by: RemyDegenne <remydegenne@gmail.com>

Diff
@@ -36,6 +36,20 @@ theorem measurable_log : Measurable log :=
     Continuous.measurable <| continuousOn_iff_continuous_restrict.1 continuousOn_log
 #align real.measurable_log Real.measurable_log
 
+lemma measurable_of_measurable_exp {α : Type*} {_ : MeasurableSpace α} {f : α → ℝ}
+    (hf : Measurable (fun x ↦ exp (f x))) :
+    Measurable f := by
+  have : f = fun x ↦ log (exp (f x)) := by ext; rw [log_exp]
+  rw [this]
+  exact measurable_log.comp hf
+
+lemma aemeasurable_of_aemeasurable_exp {α : Type*} {_ : MeasurableSpace α} {f : α → ℝ}
+    {μ : MeasureTheory.Measure α} (hf : AEMeasurable (fun x ↦ exp (f x)) μ) :
+    AEMeasurable f μ := by
+  have : f = fun x ↦ log (exp (f x)) := by ext; rw [log_exp]
+  rw [this]
+  exact measurable_log.comp_aemeasurable hf
+
 @[measurability]
 theorem measurable_sin : Measurable sin :=
   continuous_sin.measurable
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -133,7 +133,7 @@ section RealComposition
 
 open Real
 
-variable {α : Type _} {m : MeasurableSpace α} {f : α → ℝ} (hf : Measurable f)
+variable {α : Type*} {m : MeasurableSpace α} {f : α → ℝ} (hf : Measurable f)
 
 @[measurability]
 theorem Measurable.exp : Measurable fun x => Real.exp (f x) :=
@@ -176,7 +176,7 @@ section ComplexComposition
 
 open Complex
 
-variable {α : Type _} {m : MeasurableSpace α} {f : α → ℂ} (hf : Measurable f)
+variable {α : Type*} {m : MeasurableSpace α} {f : α → ℂ} (hf : Measurable f)
 
 @[measurability]
 theorem Measurable.cexp : Measurable fun x => Complex.exp (f x) :=
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,15 +2,12 @@
 Copyright (c) 2020 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module measure_theory.function.special_functions.basic
-! leanprover-community/mathlib commit 83a66c8775fa14ee5180c85cab98e970956401ad
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
 import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
 
+#align_import measure_theory.function.special_functions.basic from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
+
 /-!
 # Measurability of real and complex functions
 
chore: use ofReal instead of of_real in lemma names (#4934)
Diff
@@ -84,9 +84,9 @@ theorem measurable_im : Measurable im :=
 #align complex.measurable_im Complex.measurable_im
 
 @[measurability]
-theorem measurable_of_real : Measurable ((↑) : ℝ → ℂ) :=
+theorem measurable_ofReal : Measurable ((↑) : ℝ → ℂ) :=
   continuous_ofReal.measurable
-#align complex.measurable_of_real Complex.measurable_of_real
+#align complex.measurable_of_real Complex.measurable_ofReal
 
 @[measurability]
 theorem measurable_exp : Measurable exp :=
@@ -126,8 +126,8 @@ theorem measurable_arg : Measurable arg :=
 
 @[measurability]
 theorem measurable_log : Measurable log :=
-  (measurable_of_real.comp <| Real.measurable_log.comp measurable_norm).add <|
-    (measurable_of_real.comp measurable_arg).mul_const I
+  (measurable_ofReal.comp <| Real.measurable_log.comp measurable_norm).add <|
+    (measurable_ofReal.comp measurable_arg).mul_const I
 #align complex.measurable_log Complex.measurable_log
 
 end Complex
@@ -228,8 +228,8 @@ instance Complex.hasMeasurablePow : MeasurablePow ℂ ℂ :=
 
 instance Real.hasMeasurablePow : MeasurablePow ℝ ℝ :=
   ⟨Complex.measurable_re.comp <|
-      (Complex.measurable_of_real.comp measurable_fst).pow
-        (Complex.measurable_of_real.comp measurable_snd)⟩
+      (Complex.measurable_ofReal.comp measurable_fst).pow
+        (Complex.measurable_ofReal.comp measurable_snd)⟩
 #align real.has_measurable_pow Real.hasMeasurablePow
 
 instance NNReal.hasMeasurablePow : MeasurablePow ℝ≥0 ℝ :=
feat: assert_not_exists (#4245)
Diff
@@ -251,6 +251,6 @@ instance ENNReal.hasMeasurablePow : MeasurablePow ℝ≥0∞ ℝ := by
 end PowInstances
 
 -- Guard against import creep:
--- assert_not_exists InnerProductSpace
--- assert_not_exists Real.arctan
--- assert_not_exists FiniteDimensional.proper
+assert_not_exists InnerProductSpace
+assert_not_exists Real.arctan
+assert_not_exists FiniteDimensional.proper
feat: port MeasureTheory.Function.SpecialFunctions.Basic (#4175)

Dependencies 12 + 774

775 files ported (98.5%)
346636 lines ported (98.4%)
Show graph

The unported dependencies are

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