@@ -3,8 +3,8 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Sébastien Gouëzel
5
5
-/
6
- import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
7
6
import Mathlib.MeasureTheory.Function.Jacobian
7
+ import Mathlib.MeasureTheory.Measure.Lebesgue.Complex
8
8
9
9
#align_import analysis.special_functions.polar_coord from "leanprover-community/mathlib" @"8f9fea08977f7e450770933ee6abb20733b47c92"
10
10
@@ -19,11 +19,10 @@ It satisfies the following change of variables formula (see `integral_comp_polar
19
19
20
20
-/
21
21
22
-
23
- noncomputable section
24
-
25
22
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue lean4#2220
26
23
24
+ noncomputable section Real
25
+
27
26
open Real Set MeasureTheory
28
27
29
28
open scoped Real Topology
@@ -152,3 +151,44 @@ theorem integral_comp_polarCoord_symm {E : Type*} [NormedAddCommGroup E] [Normed
152
151
rw [B_det, abs_of_pos]
153
152
exact hx.1
154
153
#align integral_comp_polar_coord_symm integral_comp_polarCoord_symm
154
+
155
+ end Real
156
+
157
+ noncomputable section Complex
158
+
159
+ namespace Complex
160
+
161
+ open scoped Real
162
+
163
+ /-- The polar coordinates local homeomorphism in `ℂ`, mapping `r (cos θ + I * sin θ)` to `(r, θ)`.
164
+ It is a homeomorphism between `ℂ - ℝ≤0` and `(0, +∞) × (-π, π)`. -/
165
+ protected noncomputable def polarCoord : LocalHomeomorph ℂ (ℝ × ℝ) :=
166
+ equivRealProdClm.toHomeomorph.toLocalHomeomorph.trans polarCoord
167
+
168
+ protected theorem polarCoord_apply (a : ℂ) :
169
+ Complex.polarCoord a = (Complex.abs a, Complex.arg a) := by
170
+ simp_rw [Complex.abs_def, Complex.normSq_apply, ← pow_two]
171
+ rfl
172
+
173
+ protected theorem polarCoord_source :
174
+ Complex.polarCoord.source = {a | 0 < a.re} ∪ {a | a.im ≠ 0 } := by simp [Complex.polarCoord]
175
+
176
+ protected theorem polarCoord_target :
177
+ Complex.polarCoord.target = Set.Ioi (0 : ℝ) ×ˢ Set.Ioo (-π) π := by simp [Complex.polarCoord]
178
+
179
+ @[simp]
180
+ protected theorem polarCoord_symm_apply (p : ℝ × ℝ) :
181
+ Complex.polarCoord.symm p = p.1 * (Real.cos p.2 + Real.sin p.2 * Complex.I) := by
182
+ simp [Complex.polarCoord, equivRealProdClm_symm_apply, mul_add, mul_assoc]
183
+
184
+ theorem polardCoord_symm_abs (p : ℝ × ℝ) :
185
+ Complex.abs (Complex.polarCoord.symm p) = |p.1 | := by simp
186
+
187
+ protected theorem integral_comp_polarCoord_symm {E : Type *} [NormedAddCommGroup E]
188
+ [NormedSpace ℝ E] (f : ℂ → E) :
189
+ (∫ p in polarCoord.target, p.1 • f (Complex.polarCoord.symm p)) = ∫ p, f p := by
190
+ rw [← (Complex.volume_preserving_equiv_real_prod.symm).integral_comp
191
+ measurableEquivRealProd.symm.measurableEmbedding, ← integral_comp_polarCoord_symm]
192
+ rfl
193
+
194
+ end Complex
0 commit comments