measure_theory.measure.lebesgue.complexMathlib.MeasureTheory.Measure.Lebesgue.Complex

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -44,7 +44,7 @@ def measurableEquivPi : ℂ ≃ᵐ (Fin 2 → ℝ) :=
 #print Complex.measurableEquivRealProd /-
 /-- Measurable equivalence between `ℂ` and `ℝ × ℝ`. -/
 def measurableEquivRealProd : ℂ ≃ᵐ ℝ × ℝ :=
-  equivRealProdClm.toHomeomorph.toMeasurableEquiv
+  equivRealProdCLM.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_real_prod Complex.measurableEquivRealProd
 -/
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
-import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
-import Mathbin.MeasureTheory.Measure.Haar.OfBasis
+import MeasureTheory.Constructions.BorelSpace.Complex
+import MeasureTheory.Measure.Lebesgue.Basic
+import MeasureTheory.Measure.Haar.OfBasis
 
 #align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
 
Diff
@@ -29,12 +29,10 @@ noncomputable section
 
 namespace Complex
 
-#print Complex.measureSpace /-
 /-- Lebesgue measure on `ℂ`. -/
 instance measureSpace : MeasureSpace ℂ :=
   ⟨Measure.map basisOneI.equivFun.symm volume⟩
 #align complex.measure_space Complex.measureSpace
--/
 
 #print Complex.measurableEquivPi /-
 /-- Measurable equivalence between `ℂ` and `ℝ² = fin 2 → ℝ`. -/
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 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.measure.lebesgue.complex
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
 import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
 import Mathbin.MeasureTheory.Measure.Haar.OfBasis
 
+#align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
 /-!
 # Lebesgue measure on `ℂ`
 
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.measure.lebesgue.complex
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.MeasureTheory.Measure.Haar.OfBasis
 /-!
 # Lebesgue measure on `ℂ`
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define Lebesgue measure on `ℂ`. Since `ℂ` is defined as a `structure` as the
 push-forward of the volume on `ℝ²` under the natural isomorphism. There are (at least) two
 frequently used ways to represent `ℝ²` in `mathlib`: `ℝ × ℝ` and `fin 2 → ℝ`. We define measurable
@@ -29,28 +32,38 @@ noncomputable section
 
 namespace Complex
 
+#print Complex.measureSpace /-
 /-- Lebesgue measure on `ℂ`. -/
 instance measureSpace : MeasureSpace ℂ :=
   ⟨Measure.map basisOneI.equivFun.symm volume⟩
 #align complex.measure_space Complex.measureSpace
+-/
 
+#print Complex.measurableEquivPi /-
 /-- Measurable equivalence between `ℂ` and `ℝ² = fin 2 → ℝ`. -/
 def measurableEquivPi : ℂ ≃ᵐ (Fin 2 → ℝ) :=
   basisOneI.equivFun.toContinuousLinearEquiv.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_pi Complex.measurableEquivPi
+-/
 
+#print Complex.measurableEquivRealProd /-
 /-- Measurable equivalence between `ℂ` and `ℝ × ℝ`. -/
 def measurableEquivRealProd : ℂ ≃ᵐ ℝ × ℝ :=
   equivRealProdClm.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_real_prod Complex.measurableEquivRealProd
+-/
 
+#print Complex.volume_preserving_equiv_pi /-
 theorem volume_preserving_equiv_pi : MeasurePreserving measurableEquivPi :=
   (measurableEquivPi.symm.Measurable.MeasurePreserving _).symm _
 #align complex.volume_preserving_equiv_pi Complex.volume_preserving_equiv_pi
+-/
 
+#print Complex.volume_preserving_equiv_real_prod /-
 theorem volume_preserving_equiv_real_prod : MeasurePreserving measurableEquivRealProd :=
   (volume_preserving_finTwoArrow ℝ).comp volume_preserving_equiv_pi
 #align complex.volume_preserving_equiv_real_prod Complex.volume_preserving_equiv_real_prod
+-/
 
 end Complex
 
Diff
@@ -3,13 +3,14 @@ Copyright (c) 2021 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.measure.complex_lebesgue
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! This file was ported from Lean 3 source module measure_theory.measure.lebesgue.complex
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Measure.Lebesgue
-import Mathbin.MeasureTheory.Measure.HaarOfBasis
+import Mathbin.MeasureTheory.Constructions.BorelSpace.Complex
+import Mathbin.MeasureTheory.Measure.Lebesgue.Basic
+import Mathbin.MeasureTheory.Measure.Haar.OfBasis
 
 /-!
 # Lebesgue measure on `ℂ`

Changes in mathlib4

mathlib3
mathlib4
fix: Clm -> CLM, Cle -> CLE (#10018)

Rename

  • Complex.equivRealProdClmComplex.equivRealProdCLM;
    • TODO: should this one use CLE?
  • Complex.reClmComplex.reCLM;
  • Complex.imClmComplex.imCLM;
  • Complex.conjLieComplex.conjLIE;
  • Complex.conjCleComplex.conjCLE;
  • Complex.ofRealLiComplex.ofRealLI;
  • Complex.ofRealClmComplex.ofRealCLM;
  • fderivInnerClmfderivInnerCLM;
  • LinearPMap.adjointDomainMkClmLinearPMap.adjointDomainMkCLM;
  • LinearPMap.adjointDomainMkClmExtendLinearPMap.adjointDomainMkCLMExtend;
  • IsROrC.reClmIsROrC.reCLM;
  • IsROrC.imClmIsROrC.imCLM;
  • IsROrC.conjLieIsROrC.conjLIE;
  • IsROrC.conjCleIsROrC.conjCLE;
  • IsROrC.ofRealLiIsROrC.ofRealLI;
  • IsROrC.ofRealClmIsROrC.ofRealCLM;
  • MeasureTheory.condexpL1ClmMeasureTheory.condexpL1CLM;
  • algebraMapClmalgebraMapCLM;
  • WeakDual.CharacterSpace.toClmWeakDual.CharacterSpace.toCLM;
  • BoundedContinuousFunction.evalClmBoundedContinuousFunction.evalCLM;
  • ContinuousMap.evalClmContinuousMap.evalCLM;
  • TrivSqZeroExt.fstClmTrivSqZeroExt.fstClm;
  • TrivSqZeroExt.sndClmTrivSqZeroExt.sndCLM;
  • TrivSqZeroExt.inlClmTrivSqZeroExt.inlCLM;
  • TrivSqZeroExt.inrClmTrivSqZeroExt.inrCLM

and related theorems.

Diff
@@ -40,7 +40,7 @@ theorem measurableEquivPi_symm_apply (p : (Fin 2) → ℝ) :
 
 /-- Measurable equivalence between `ℂ` and `ℝ × ℝ`. -/
 def measurableEquivRealProd : ℂ ≃ᵐ ℝ × ℝ :=
-  equivRealProdClm.toHomeomorph.toMeasurableEquiv
+  equivRealProdCLM.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_real_prod Complex.measurableEquivRealProd
 
 @[simp]
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
 import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
+import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
 
 #align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
feat: Compute volume of balls of higher dimension for Lp norms (#8030)

We give a formula measure_unitBall_eq_integral_div_gamma for computing the volume of the unit ball in a normed finite dimensional -vector space E with an Haar measure:

theorem measure_unitBall_eq_integral_div_gamma {E : Type*} {p : ℝ}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E]
    [BorelSpace E] (μ : Measure E) [IsAddHaarMeasure μ] (hp : 0 < p) :
    μ (Metric.ball 0 1) =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- ‖x‖ ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

We also provide a theorem measure_lt_one_eq_integral_div_gamma to compute the volume of the ball {x : E | g x < 1} for a function g : E → ℝ defining a norm.

theorem measure_lt_one_eq_integral_div_gamma {E : Type*}
    [AddCommGroup E] [Module ℝ E] [FiniteDimensional ℝ E] [mE : MeasurableSpace E]
    [tE : TopologicalSpace E] [TopologicalAddGroup E] [BorelSpace E] [T2Space E]
    [ContinuousSMul ℝ E] (μ : Measure E) [IsAddHaarMeasure μ]
    {g : E → ℝ} (hg0 : g 0 = 0) (hgn : ∀ x, g (- x) = g x) (hgt : ∀ x y, g (x + y) ≤ g x + g y)
    (hgs : ∀ {x}, g x = 0 → x = 0) (hns :  ∀ r x, g (r • x) ≤ |r| * (g x)) {p : ℝ} (hp : 0 < p) :
    μ {x : E | g x < 1} =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- (g x) ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

This provides a way to compute the volume of the unit ball for the norms L_p for 1 ≤ p in any dimension over the reals MeasureTheory.volume_sum_rpow_lt_one and the complex Complex.volume_sum_rpow_lt_one.

variable (ι : Type*) [Fintype ι] {p : ℝ} (hp : 1 ≤ p)

theorem volume_sum_rpow_lt_one :
    volume {x : ι → ℝ | ∑ i, |x i| ^ p < 1} =
      ENNReal.ofReal ((2 * Real.Gamma (1 / p + 1)) ^ card ι / Real.Gamma (card ι / p + 1))

theorem Complex.volume_sum_rpow_lt_one {p : ℝ} (hp : 1 ≤ p) :
    volume {x : ι → ℂ | ∑ i, ‖x i‖ ^ p < 1} =
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * card ι / p + 1)) 

From these, we deduce the volume of balls in several situations.

--

Other significant changes include:

  • Adding MeasurePreserving.integral_comp': when the theorem MeasurePreserving.integral_comp is used with f a measurable equiv, it is necessary to specify that it is a measurable embedding although it is trivial in this case. This version bypasses this hypothesis
  • Proof of volume computations of the unit ball in and in EuclideanSpace ℝ (Fin 2) which are now done with the methods of the file VolumeOfBalls have been moved to this file.

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

Diff
@@ -62,22 +62,4 @@ theorem volume_preserving_equiv_real_prod : MeasurePreserving measurableEquivRea
   (volume_preserving_finTwoArrow ℝ).comp volume_preserving_equiv_pi
 #align complex.volume_preserving_equiv_real_prod Complex.volume_preserving_equiv_real_prod
 
-@[simp]
-theorem volume_ball (a : ℂ) (r : ℝ) :
-    volume (Metric.ball a r) = NNReal.pi * ENNReal.ofReal r ^ 2 := by
-  rw [Measure.addHaar_ball_center, ← EuclideanSpace.volume_ball 0,
-    ← (volume_preserving_equiv_pi.symm).measure_preimage measurableSet_ball,
-    ← ((EuclideanSpace.volume_preserving_measurableEquiv (Fin 2)).symm).measure_preimage
-    measurableSet_ball]
-  refine congrArg _ (Set.ext fun _ => ?_)
-  simp_rw [← MeasurableEquiv.coe_toEquiv_symm, Set.mem_preimage, MeasurableEquiv.coe_toEquiv_symm,
-    measurableEquivPi_symm_apply, mem_ball_zero_iff, norm_eq_abs, abs_def, normSq_add_mul_I,
-    EuclideanSpace.coe_measurableEquiv_symm, EuclideanSpace.norm_eq, WithLp.equiv_symm_pi_apply,
-    Fin.sum_univ_two, Real.norm_eq_abs, _root_.sq_abs]
-
-@[simp]
-theorem volume_closedBall (a : ℂ) (r : ℝ) :
-    volume (Metric.closedBall a r) = NNReal.pi * ENNReal.ofReal r ^ 2 := by
-  rw [MeasureTheory.Measure.addHaar_closedBall_eq_addHaar_ball, Complex.volume_ball]
-
 end Complex
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
@@ -18,8 +18,6 @@ used ways to represent `ℝ²` in `mathlib`: `ℝ × ℝ` and `Fin 2 → ℝ`, d
 of `MeasureTheory.measurePreserving`).
 -/
 
-local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
-
 open MeasureTheory
 
 noncomputable section
feat: Add polar change of coordinates for complex variable (#8034)
Diff
@@ -3,9 +3,7 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathlib.Analysis.SpecialFunctions.Integrals
 import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
-import Mathlib.MeasureTheory.Measure.Lebesgue.Integral
 
 #align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
feat: volume of a complex ball (#6907)

We prove the formula for the area of a disc

theorem volume_ball (x : EuclideanSpace ℝ (Fin 2)) (r : ℝ) :
    volume (Metric.ball x r) = NNReal.pi * (ENNReal.ofReal r) ^ 2 

and deduce from this, the volume of complex balls

theorem volume_ball (a : ℂ) (r : ℝ) :  
    volume (Metric.ball a r) = NNReal.pi * (ENNReal.ofReal r) ^ 2

Co-authored-by: James Arthur Co-authored-by: Benjamin Davidson Co-authored-by: Andrew Souther

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -3,8 +3,9 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
+import Mathlib.Analysis.SpecialFunctions.Integrals
 import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
+import Mathlib.MeasureTheory.Measure.Lebesgue.Integral
 
 #align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
@@ -19,6 +20,7 @@ used ways to represent `ℝ²` in `mathlib`: `ℝ × ℝ` and `Fin 2 → ℝ`, d
 of `MeasureTheory.measurePreserving`).
 -/
 
+local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
 
 open MeasureTheory
 
@@ -31,11 +33,26 @@ def measurableEquivPi : ℂ ≃ᵐ (Fin 2 → ℝ) :=
   basisOneI.equivFun.toContinuousLinearEquiv.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_pi Complex.measurableEquivPi
 
+@[simp]
+theorem measurableEquivPi_apply (a : ℂ) :
+    measurableEquivPi a = ![a.re, a.im] := rfl
+
+@[simp]
+theorem measurableEquivPi_symm_apply (p : (Fin 2) → ℝ) :
+    measurableEquivPi.symm p = (p 0) + (p 1) * I := rfl
+
 /-- Measurable equivalence between `ℂ` and `ℝ × ℝ`. -/
 def measurableEquivRealProd : ℂ ≃ᵐ ℝ × ℝ :=
   equivRealProdClm.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_real_prod Complex.measurableEquivRealProd
 
+@[simp]
+theorem measurableEquivRealProd_apply (a : ℂ) : measurableEquivRealProd a = (a.re, a.im) := rfl
+
+@[simp]
+theorem measurableEquivRealProd_symm_apply (p : ℝ × ℝ) :
+    measurableEquivRealProd.symm p = {re := p.1, im := p.2} := rfl
+
 theorem volume_preserving_equiv_pi : MeasurePreserving measurableEquivPi := by
   convert (measurableEquivPi.symm.measurable.measurePreserving volume).symm
   rw [← addHaarMeasure_eq_volume_pi, ← Basis.parallelepiped_basisFun, ← Basis.addHaar,
@@ -49,4 +66,22 @@ theorem volume_preserving_equiv_real_prod : MeasurePreserving measurableEquivRea
   (volume_preserving_finTwoArrow ℝ).comp volume_preserving_equiv_pi
 #align complex.volume_preserving_equiv_real_prod Complex.volume_preserving_equiv_real_prod
 
+@[simp]
+theorem volume_ball (a : ℂ) (r : ℝ) :
+    volume (Metric.ball a r) = NNReal.pi * ENNReal.ofReal r ^ 2 := by
+  rw [Measure.addHaar_ball_center, ← EuclideanSpace.volume_ball 0,
+    ← (volume_preserving_equiv_pi.symm).measure_preimage measurableSet_ball,
+    ← ((EuclideanSpace.volume_preserving_measurableEquiv (Fin 2)).symm).measure_preimage
+    measurableSet_ball]
+  refine congrArg _ (Set.ext fun _ => ?_)
+  simp_rw [← MeasurableEquiv.coe_toEquiv_symm, Set.mem_preimage, MeasurableEquiv.coe_toEquiv_symm,
+    measurableEquivPi_symm_apply, mem_ball_zero_iff, norm_eq_abs, abs_def, normSq_add_mul_I,
+    EuclideanSpace.coe_measurableEquiv_symm, EuclideanSpace.norm_eq, WithLp.equiv_symm_pi_apply,
+    Fin.sum_univ_two, Real.norm_eq_abs, _root_.sq_abs]
+
+@[simp]
+theorem volume_closedBall (a : ℂ) (r : ℝ) :
+    volume (Metric.closedBall a r) = NNReal.pi * ENNReal.ofReal r ^ 2 := by
+  rw [MeasureTheory.Measure.addHaar_closedBall_eq_addHaar_ball, Complex.volume_ball]
+
 end Complex
feat: remove the diamond for Complex.measureSpace (#6832)

We remove the instance

instance measureSpace : MeasureSpace ℂ :=  ⟨Measure.map basisOneI.equivFun.symm volume⟩

in MeasureTheory.Measure.Lebesgue.Complex since has already a measureSpace instance coming from its InnerProductSpace structure over , and fix the proof of volume_preserving_equiv_pi.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -4,19 +4,19 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
 import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
-import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
-import Mathlib.MeasureTheory.Measure.Haar.OfBasis
+import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
 
 #align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
 
 /-!
 # Lebesgue measure on `ℂ`
 
-In this file we define Lebesgue measure on `ℂ`. Since `ℂ` is defined as a `structure` as the
-push-forward of the volume on `ℝ²` under the natural isomorphism. There are (at least) two
-frequently used ways to represent `ℝ²` in `mathlib`: `ℝ × ℝ` and `Fin 2 → ℝ`. We define measurable
-equivalences (`MeasurableEquiv`) to both types and prove that both of them are volume preserving
-(in the sense of `MeasureTheory.measurePreserving`).
+In this file, we consider the Lebesgue measure on `ℂ` defined as the push-forward of the volume
+on `ℝ²` under the natural isomorphism and prove that it is equal to the measure `volume` of `ℂ`
+coming from its `InnerProductSpace` structure over `ℝ`. For that, we consider the two frequently
+used ways to represent `ℝ²` in `mathlib`: `ℝ × ℝ` and `Fin 2 → ℝ`, define measurable equivalences
+(`MeasurableEquiv`) to both types and prove that both of them are volume preserving (in the sense
+of `MeasureTheory.measurePreserving`).
 -/
 
 
@@ -26,11 +26,6 @@ noncomputable section
 
 namespace Complex
 
-/-- Lebesgue measure on `ℂ`. -/
-instance measureSpace : MeasureSpace ℂ :=
-  ⟨Measure.map basisOneI.equivFun.symm volume⟩
-#align complex.measure_space Complex.measureSpace
-
 /-- Measurable equivalence between `ℂ` and `ℝ² = Fin 2 → ℝ`. -/
 def measurableEquivPi : ℂ ≃ᵐ (Fin 2 → ℝ) :=
   basisOneI.equivFun.toContinuousLinearEquiv.toHomeomorph.toMeasurableEquiv
@@ -41,8 +36,13 @@ def measurableEquivRealProd : ℂ ≃ᵐ ℝ × ℝ :=
   equivRealProdClm.toHomeomorph.toMeasurableEquiv
 #align complex.measurable_equiv_real_prod Complex.measurableEquivRealProd
 
-theorem volume_preserving_equiv_pi : MeasurePreserving measurableEquivPi :=
-  (measurableEquivPi.symm.measurable.measurePreserving _).symm _
+theorem volume_preserving_equiv_pi : MeasurePreserving measurableEquivPi := by
+  convert (measurableEquivPi.symm.measurable.measurePreserving volume).symm
+  rw [← addHaarMeasure_eq_volume_pi, ← Basis.parallelepiped_basisFun, ← Basis.addHaar,
+    measurableEquivPi, Homeomorph.toMeasurableEquiv_symm_coe,
+    ContinuousLinearEquiv.symm_toHomeomorph, ContinuousLinearEquiv.coe_toHomeomorph,
+    Basis.map_addHaar, eq_comm]
+  exact (Basis.addHaar_eq_iff _ _).mpr Complex.orthonormalBasisOneI.volume_parallelepiped
 #align complex.volume_preserving_equiv_pi Complex.volume_preserving_equiv_pi
 
 theorem volume_preserving_equiv_real_prod : MeasurePreserving measurableEquivRealProd :=
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,16 +2,13 @@
 Copyright (c) 2021 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.measure.lebesgue.complex
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
 import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
 import Mathlib.MeasureTheory.Measure.Haar.OfBasis
 
+#align_import measure_theory.measure.lebesgue.complex from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Lebesgue measure on `ℂ`
 
feat: port MeasureTheory.Measure.Lebesgue.Complex (#4598)

Dependencies 12 + 957

958 files ported (98.8%)
431623 lines ported (98.7%)
Show graph

The unported dependencies are

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