Skip to content

Commit bd6616c

Browse files
committed
chore(Integral/CircleTransform): golf (#9937)
Motivated by @Ruben-VandeVelde's leanprover-community/mathlib3#15206
1 parent 941d069 commit bd6616c

1 file changed

Lines changed: 21 additions & 41 deletions

File tree

Mathlib/MeasureTheory/Integral/CircleTransform.lean

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ theorem continuous_circleTransform {R : ℝ} (hR : 0 < R) {f : ℂ → E} {z w :
7878
apply_rules [Continuous.smul, continuous_const]
7979
simp_rw [deriv_circleMap]
8080
apply_rules [Continuous.mul, continuous_circleMap 0 R, continuous_const]
81-
· apply continuous_circleMap_inv hw
81+
· exact continuous_circleMap_inv hw
8282
· apply ContinuousOn.comp_continuous hf (continuous_circleMap z R)
8383
exact fun _ => (circleMap_mem_sphere _ hR.le) _
8484
#align complex.continuous_circle_transform Complex.continuous_circleTransform
@@ -100,27 +100,21 @@ theorem continuousOn_prod_circle_transform_function {R r : ℝ} (hr : r < R) {z
100100
(closedBall z r ×ˢ univ) := by
101101
simp_rw [← one_div]
102102
apply_rules [ContinuousOn.pow, ContinuousOn.div, continuousOn_const]
103-
refine' ((continuous_circleMap z R).continuousOn.comp continuousOn_snd fun _ => And.right).sub
104-
(continuousOn_id.comp continuousOn_fst fun _ => And.left)
105-
simp only [mem_prod, Ne.def, and_imp, Prod.forall]
106-
intro a b ha _
107-
have ha2 : a ∈ ball z R := by simp at *; linarith
108-
exact sub_ne_zero.2 (circleMap_ne_mem_ball ha2 b)
103+
· exact ((continuous_circleMap z R).comp_continuousOn continuousOn_snd).sub continuousOn_fst
104+
· rintro ⟨a, b⟩ ⟨ha, -⟩
105+
have ha2 : a ∈ ball z R := closedBall_subset_ball hr ha
106+
exact sub_ne_zero.2 (circleMap_ne_mem_ball ha2 b)
109107
#align complex.continuous_on_prod_circle_transform_function Complex.continuousOn_prod_circle_transform_function
110108

111109
theorem continuousOn_abs_circleTransformBoundingFunction {R r : ℝ} (hr : r < R) (z : ℂ) :
112-
ContinuousOn (abs ∘ fun t => circleTransformBoundingFunction R z t)
113-
(closedBall z r ×ˢ univ) := by
114-
have : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ (⊤ : Set ℝ)) := by
110+
ContinuousOn (abs ∘ circleTransformBoundingFunction R z) (closedBall z r ×ˢ univ) := by
111+
have : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ univ) := by
115112
apply_rules [ContinuousOn.smul, continuousOn_const]
116-
simp only [deriv_circleMap]
117-
have c := (continuous_circleMap 0 R).continuousOn (s := ⊤)
118-
apply_rules [ContinuousOn.mul, c.comp continuousOn_snd fun _ => And.right, continuousOn_const]
119-
simp_rw [← inv_pow]
120-
apply continuousOn_prod_circle_transform_function hr
121-
refine' continuous_abs.continuousOn (s := ⊤).comp this _
122-
show MapsTo _ _ (⊤ : Set ℂ)
123-
simp [MapsTo]
113+
· simp only [deriv_circleMap]
114+
apply_rules [ContinuousOn.mul, (continuous_circleMap 0 R).comp_continuousOn continuousOn_snd,
115+
continuousOn_const]
116+
· simpa only [inv_pow] using continuousOn_prod_circle_transform_function hr
117+
exact this.norm
124118
#align complex.continuous_on_abs_circle_transform_bounding_function Complex.continuousOn_abs_circleTransformBoundingFunction
125119

126120
theorem abs_circleTransformBoundingFunction_le {R r : ℝ} (hr : r < R) (hr' : 0 ≤ r) (z : ℂ) :
@@ -131,10 +125,8 @@ theorem abs_circleTransformBoundingFunction_le {R r : ℝ} (hr : r < R) (hr' : 0
131125
apply_rules [IsCompact.prod, ProperSpace.isCompact_closedBall z r, isCompact_uIcc]
132126
have none : (closedBall z r ×ˢ [[0, 2 * π]]).Nonempty :=
133127
(nonempty_closedBall.2 hr').prod nonempty_uIcc
134-
have := IsCompact.exists_isMaxOn comp none (cts.mono
135-
(by intro z; simp only [mem_prod, mem_closedBall, mem_univ, and_true_iff, and_imp]; tauto))
136-
simp only [IsMaxOn, IsMaxFilter] at this
137-
simpa [SetCoe.forall, Subtype.coe_mk, SetCoe.exists]
128+
have := IsCompact.exists_isMaxOn comp none (cts.mono <| prod_mono_right (subset_univ _))
129+
simpa [isMaxOn_iff] using this
138130
#align complex.abs_circle_transform_bounding_function_le Complex.abs_circleTransformBoundingFunction_le
139131

140132
/-- The derivative of a `circleTransform` is locally bounded. -/
@@ -146,30 +138,18 @@ theorem circleTransformDeriv_bound {R : ℝ} (hR : 0 < R) {z x : ℂ} {f : ℂ
146138
obtain ⟨⟨⟨a, b⟩, ⟨ha, hb⟩⟩, hab⟩ :=
147139
abs_circleTransformBoundingFunction_le hr (pos_of_mem_ball hrx).le z
148140
let V : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun _ => 1) θ
149-
have funccomp : ContinuousOn (fun r => abs (f r)) (sphere z R) := by
150-
have cabs : ContinuousOn abs ⊤ := by apply continuous_abs.continuousOn
151-
apply cabs.comp hf; rw [MapsTo]; tauto
152-
have sbou :=
153-
IsCompact.exists_isMaxOn (isCompact_sphere z R) (NormedSpace.sphere_nonempty.2 hR.le) funccomp
154-
obtain ⟨X, HX, HX2⟩ := sbou
155-
refine' ⟨abs (V b a) * abs (f X), ε', hε', Subset.trans H (ball_subset_ball hr.le), _⟩
156-
intro y v hv
141+
obtain ⟨X, -, HX2⟩ := (isCompact_sphere z R).exists_isMaxOn
142+
(NormedSpace.sphere_nonempty.2 hR.le) hf.norm
143+
refine ⟨abs (V b a) * abs (f X), ε', hε', H.trans (ball_subset_ball hr.le), fun y v hv ↦ ?_⟩
157144
obtain ⟨y1, hy1, hfun⟩ :=
158145
Periodic.exists_mem_Ico₀ (circleTransformDeriv_periodic R z v f) Real.two_pi_pos y
159-
have hy2 : y1 ∈ [[0, 2 * π]] := by
160-
convert Ico_subset_Icc_self hy1 using 1
161-
simp [uIcc_of_le Real.two_pi_pos.le]
162-
simp only [IsMaxOn, IsMaxFilter, eventually_principal, mem_sphere_iff_norm, norm_eq_abs] at HX2
146+
have hy2 : y1 ∈ [[0, 2 * π]] := Icc_subset_uIcc <| Ico_subset_Icc_self hy1
147+
simp only [isMaxOn_iff, mem_sphere_iff_norm, norm_eq_abs] at HX2
163148
have := mul_le_mul (hab ⟨⟨v, y1⟩, ⟨ball_subset_closedBall (H hv), hy2⟩⟩)
164149
(HX2 (circleMap z R y1) (circleMap_mem_sphere z hR.le y1)) (Complex.abs.nonneg _)
165150
(Complex.abs.nonneg _)
166-
simp_rw [hfun]
167-
simp only [circleTransformBoundingFunction, circleTransformDeriv, norm_eq_abs,
168-
Algebra.id.smul_eq_mul, deriv_circleMap, map_mul, abs_circleMap_zero, abs_I, mul_one, ←
169-
mul_assoc, mul_inv_rev, inv_I, abs_neg, abs_inv, abs_ofReal, one_mul, abs_two, abs_pow,
170-
mem_ball, gt_iff_lt, Subtype.coe_mk, SetCoe.forall, mem_prod, mem_closedBall, and_imp,
171-
Prod.forall, NormedSpace.sphere_nonempty, mem_sphere_iff_norm] at *
172-
exact this
151+
rw [hfun]
152+
simpa [circleTransformBoundingFunction, circleTransformDeriv, mul_assoc] using this
173153
#align complex.circle_transform_deriv_bound Complex.circleTransformDeriv_bound
174154

175155
end Complex

0 commit comments

Comments
 (0)