Skip to content

Commit c6208eb

Browse files
committed
chore(Analysis/Meromorphic/Basic): use variable more (#31214)
Declare frequently used objects as `variable`, to avoid repetitive declarations.
1 parent 8be8e0b commit c6208eb

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

β€ŽMathlib/Analysis/Meromorphic/Basic.leanβ€Ž

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ theorem MeromorphicAt.eventually_eq_zero_or_eventually_ne_zero {f : π•œ β†’ E}
5252

5353
namespace MeromorphicAt
5454

55+
variable {ΞΉ : Type*} {s : Finset ΞΉ} {F : ΞΉ β†’ π•œ β†’ π•œ} {G : ΞΉ β†’ π•œ β†’ E}
56+
5557
@[fun_prop]
5658
lemma id (x : π•œ) : MeromorphicAt id x := analyticAt_id.meromorphicAt
5759

5860
@[fun_prop, simp]
5961
lemma const (e : E) (x : π•œ) : MeromorphicAt (fun _ ↦ e) x :=
6062
analyticAt_const.meromorphicAt
6163

64+
variable {x : π•œ}
65+
6266
@[fun_prop]
63-
lemma add {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
67+
lemma add {f g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
6468
MeromorphicAt (f + g) x := by
6569
rcases hf with ⟨m, hf⟩
6670
rcases hg with ⟨n, hg⟩
@@ -74,14 +78,14 @@ lemma add {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : Meromorph
7478
(((analyticAt_id.sub analyticAt_const).pow _).smul hg)
7579

7680
@[fun_prop]
77-
lemma fun_add {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
81+
lemma fun_add {f g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
7882
MeromorphicAt (fun z ↦ f z + g z) x :=
7983
hf.add hg
8084

8185
@[deprecated (since := "2025-05-09")] alias add' := fun_add
8286

8387
@[fun_prop]
84-
lemma smul {f : π•œ β†’ π•œ} {g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
88+
lemma smul {f : π•œ β†’ π•œ} {g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
8589
MeromorphicAt (f β€’ g) x := by
8690
rcases hf with ⟨m, hf⟩
8791
rcases hg with ⟨n, hg⟩
@@ -91,29 +95,28 @@ lemma smul {f : π•œ β†’ π•œ} {g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f
9195
module
9296

9397
@[fun_prop]
94-
lemma fun_smul {f : π•œ β†’ π•œ} {g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
98+
lemma fun_smul {f : π•œ β†’ π•œ} {g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
9599
MeromorphicAt (fun z ↦ f z β€’ g z) x :=
96100
hf.smul hg
97101

98102
@[deprecated (since := "2025-05-09")] alias smul' := fun_smul
99103

100104
@[fun_prop]
101-
lemma mul {f g : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
105+
lemma mul {f g : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
102106
MeromorphicAt (f * g) x :=
103107
hf.smul hg
104108

105109
@[fun_prop]
106-
lemma fun_mul {f g : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
110+
lemma fun_mul {f g : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
107111
MeromorphicAt (fun z ↦ f z * g z) x :=
108112
hf.smul hg
109113

110114
@[deprecated (since := "2025-05-09")] alias mul' := fun_mul
111115

112116
/-- Finite products of meromorphic functions are meromorphic. -/
113117
@[fun_prop]
114-
theorem prod {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ π•œ} {x : π•œ}
115-
(h : βˆ€ Οƒ, MeromorphicAt (f Οƒ) x) :
116-
MeromorphicAt (∏ n ∈ s, f n) x := by
118+
theorem prod (h : βˆ€ Οƒ, MeromorphicAt (F Οƒ) x) :
119+
MeromorphicAt (∏ n ∈ s, F n) x := by
117120
classical
118121
induction s using Finset.induction with
119122
| empty =>
@@ -125,16 +128,15 @@ theorem prod {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ π•œ} {x : π•œ}
125128

126129
/-- Finite products of meromorphic functions are meromorphic. -/
127130
@[fun_prop]
128-
theorem fun_prod {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ π•œ} {x : π•œ}
129-
(h : βˆ€ Οƒ, MeromorphicAt (f Οƒ) x) :
130-
MeromorphicAt (fun z ↦ ∏ n ∈ s, f n z) x := by
131+
theorem fun_prod (h : βˆ€ Οƒ, MeromorphicAt (F Οƒ) x) :
132+
MeromorphicAt (fun z ↦ ∏ n ∈ s, F n z) x := by
131133
convert prod h (s := s)
132134
simp
133135

134136
/-- Finite sums of meromorphic functions are meromorphic. -/
135137
@[fun_prop]
136-
theorem sum {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ E} {x : π•œ} (h : βˆ€ Οƒ, MeromorphicAt (f Οƒ) x) :
137-
MeromorphicAt (βˆ‘ n ∈ s, f n) x := by
138+
theorem sum (h : βˆ€ Οƒ, MeromorphicAt (G Οƒ) x) :
139+
MeromorphicAt (βˆ‘ n ∈ s, G n) x := by
138140
classical
139141
induction s using Finset.induction with
140142
| empty =>
@@ -146,46 +148,45 @@ theorem sum {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ E} {x : π•œ} (h :
146148

147149
/-- Finite sums of meromorphic functions are meromorphic. -/
148150
@[fun_prop]
149-
theorem fun_sum {ΞΉ : Type*} {s : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ E} {x : π•œ}
150-
(h : βˆ€ Οƒ, MeromorphicAt (f Οƒ) x) :
151-
MeromorphicAt (fun z ↦ βˆ‘ n ∈ s, f n z) x := by
151+
theorem fun_sum (h : βˆ€ Οƒ, MeromorphicAt (G Οƒ) x) :
152+
MeromorphicAt (fun z ↦ βˆ‘ n ∈ s, G n z) x := by
152153
convert sum h (s := s)
153154
simp
154155

155156
@[fun_prop]
156-
lemma neg {f : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) : MeromorphicAt (-f) x := by
157+
lemma neg {f : π•œ β†’ E} (hf : MeromorphicAt f x) : MeromorphicAt (-f) x := by
157158
convert (MeromorphicAt.const (-1 : π•œ) x).smul hf using 1
158159
ext1 z
159160
simp only [Pi.neg_apply, Pi.smul_apply', neg_smul, one_smul]
160161

161162
@[fun_prop]
162-
lemma fun_neg {f : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) : MeromorphicAt (fun z ↦ -f z) x :=
163+
lemma fun_neg {f : π•œ β†’ E} (hf : MeromorphicAt f x) : MeromorphicAt (fun z ↦ -f z) x :=
163164
hf.neg
164165

165166
@[deprecated (since := "2025-05-09")] alias neg' := fun_neg
166167

167168
@[simp]
168-
lemma neg_iff {f : π•œ β†’ E} {x : π•œ} :
169+
lemma neg_iff {f : π•œ β†’ E} :
169170
MeromorphicAt (-f) x ↔ MeromorphicAt f x :=
170171
⟨fun h ↦ by simpa only [neg_neg] using h.neg, MeromorphicAt.neg⟩
171172

172173
@[fun_prop]
173-
lemma sub {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
174+
lemma sub {f g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
174175
MeromorphicAt (f - g) x := by
175176
convert hf.add hg.neg using 1
176177
ext1 z
177178
simp_rw [Pi.sub_apply, Pi.add_apply, Pi.neg_apply, sub_eq_add_neg]
178179

179180
@[fun_prop]
180-
lemma fun_sub {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
181+
lemma fun_sub {f g : π•œ β†’ E} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
181182
MeromorphicAt (fun z ↦ f z - g z) x :=
182183
hf.sub hg
183184

184185
@[deprecated (since := "2025-05-09")] alias sub' := fun_sub
185186

186187
/-- With our definitions, `MeromorphicAt f x` depends only on the values of `f` on a punctured
187188
neighbourhood of `x` (not on `f x`) -/
188-
lemma congr {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hfg : f =αΆ [𝓝[β‰ ] x] g) :
189+
lemma congr {f g : π•œ β†’ E} (hf : MeromorphicAt f x) (hfg : f =αΆ [𝓝[β‰ ] x] g) :
189190
MeromorphicAt g x := by
190191
rcases hf with ⟨m, hf⟩
191192
refine ⟨m + 1, ?_⟩
@@ -200,7 +201,7 @@ lemma congr {f g : π•œ β†’ E} {x : π•œ} (hf : MeromorphicAt f x) (hfg : f =αΆ 
200201
/--
201202
If two functions agree on a punctured neighborhood, then one is meromorphic iff the other is so.
202203
-/
203-
lemma meromorphicAt_congr {f g : π•œ β†’ E} {x : π•œ} (h : f =αΆ [𝓝[β‰ ] x] g) :
204+
lemma meromorphicAt_congr {f g : π•œ β†’ E} (h : f =αΆ [𝓝[β‰ ] x] g) :
204205
MeromorphicAt f x ↔ MeromorphicAt g x :=
205206
⟨fun hf ↦ hf.congr h, fun hg ↦ hg.congr h.symm⟩
206207

@@ -215,7 +216,7 @@ lemma update [DecidableEq π•œ] {f : π•œ β†’ E} {z} (hf : MeromorphicAt f z) (w
215216
update_iff.mpr hf
216217

217218
@[fun_prop]
218-
lemma inv {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) : MeromorphicAt f⁻¹ x := by
219+
lemma inv {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) : MeromorphicAt f⁻¹ x := by
219220
rcases hf with ⟨m, hf⟩
220221
by_cases h_eq : (fun z ↦ (z - x) ^ m β€’ f z) =αΆ [𝓝 x] 0
221222
Β· -- silly case: f locally 0 near x
@@ -241,56 +242,56 @@ lemma inv {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) : MeromorphicA
241242
simp [field, pow_succ', mul_assoc, hfg]
242243

243244
@[fun_prop]
244-
lemma fun_inv {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) : MeromorphicAt (fun z ↦ (f z)⁻¹) x :=
245+
lemma fun_inv {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) : MeromorphicAt (fun z ↦ (f z)⁻¹) x :=
245246
hf.inv
246247

247248
@[deprecated (since := "2025-05-09")] alias inv' := fun_inv
248249

249250
@[simp]
250-
lemma inv_iff {f : π•œ β†’ π•œ} {x : π•œ} :
251+
lemma inv_iff {f : π•œ β†’ π•œ} :
251252
MeromorphicAt f⁻¹ x ↔ MeromorphicAt f x :=
252253
⟨fun h ↦ by simpa only [inv_inv] using h.inv, MeromorphicAt.inv⟩
253254

254255
@[fun_prop]
255-
lemma div {f g : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
256+
lemma div {f g : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
256257
MeromorphicAt (f / g) x :=
257258
(div_eq_mul_inv f g).symm β–Έ (hf.mul hg.inv)
258259

259260
@[fun_prop]
260-
lemma fun_div {f g : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
261+
lemma fun_div {f g : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
261262
MeromorphicAt (fun z ↦ f z / g z) x :=
262263
hf.div hg
263264

264265
@[deprecated (since := "2025-05-09")] alias div' := fun_div
265266

266267
@[fun_prop]
267-
lemma pow {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (n : β„•) : MeromorphicAt (f ^ n) x := by
268+
lemma pow {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (n : β„•) : MeromorphicAt (f ^ n) x := by
268269
induction n with
269270
| zero => simpa only [pow_zero] using MeromorphicAt.const 1 x
270271
| succ m hm => simpa only [pow_succ] using hm.mul hf
271272

272273
@[fun_prop]
273-
lemma fun_pow {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (n : β„•) :
274+
lemma fun_pow {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (n : β„•) :
274275
MeromorphicAt (fun z ↦ (f z) ^ n) x :=
275276
hf.pow n
276277

277278
@[deprecated (since := "2025-05-09")] alias pow' := fun_pow
278279

279280
@[fun_prop]
280-
lemma zpow {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (n : β„€) : MeromorphicAt (f ^ n) x := by
281+
lemma zpow {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (n : β„€) : MeromorphicAt (f ^ n) x := by
281282
cases n with
282283
| ofNat m => simpa only [Int.ofNat_eq_coe, zpow_natCast] using hf.pow m
283284
| negSucc m => simpa only [zpow_negSucc, inv_iff] using hf.pow (m + 1)
284285

285286
@[fun_prop]
286-
lemma fun_zpow {f : π•œ β†’ π•œ} {x : π•œ} (hf : MeromorphicAt f x) (n : β„€) :
287+
lemma fun_zpow {f : π•œ β†’ π•œ} (hf : MeromorphicAt f x) (n : β„€) :
287288
MeromorphicAt (fun z ↦ (f z) ^ n) x :=
288289
hf.zpow n
289290

290291
@[deprecated (since := "2025-05-09")] alias zpow' := fun_zpow
291292

292293
/-- If a function is meromorphic at a point, then it is continuous at nearby points. -/
293-
theorem eventually_continuousAt {f : π•œ β†’ E} {x : π•œ}
294+
theorem eventually_continuousAt {f : π•œ β†’ E}
294295
(h : MeromorphicAt f x) : βˆ€αΆ  y in 𝓝[β‰ ] x, ContinuousAt f y := by
295296
obtain ⟨n, h⟩ := h
296297
have : βˆ€αΆ  y in 𝓝[β‰ ] x, ContinuousAt (fun z ↦ (z - x) ^ n β€’ f z) y :=
@@ -306,7 +307,7 @@ theorem eventually_continuousAt {f : π•œ β†’ E} {x : π•œ}
306307
/-- In a complete space, a function which is meromorphic at a point is analytic at all nearby
307308
points. The completeness assumption can be dispensed with if one assumes that `f` is meromorphic
308309
on a set around `x`, see `MeromorphicOn.eventually_analyticAt`. -/
309-
theorem eventually_analyticAt [CompleteSpace E] {f : π•œ β†’ E} {x : π•œ}
310+
theorem eventually_analyticAt [CompleteSpace E] {f : π•œ β†’ E}
310311
(h : MeromorphicAt f x) : βˆ€αΆ  y in 𝓝[β‰ ] x, AnalyticAt π•œ f y := by
311312
obtain ⟨n, h⟩ := h
312313
apply AnalyticAt.eventually_analyticAt at h
@@ -322,7 +323,7 @@ theorem eventually_analyticAt [CompleteSpace E] {f : π•œ β†’ E} {x : π•œ}
322323
intro z hz
323324
simp [smul_smul, hz, sub_eq_zero]
324325

325-
lemma iff_eventuallyEq_zpow_smul_analyticAt {f : π•œ β†’ E} {x : π•œ} : MeromorphicAt f x ↔
326+
lemma iff_eventuallyEq_zpow_smul_analyticAt {f : π•œ β†’ E} : MeromorphicAt f x ↔
326327
βˆƒ (n : β„€) (g : π•œ β†’ E), AnalyticAt π•œ g x ∧ βˆ€αΆ  z in 𝓝[β‰ ] x, f z = (z - x) ^ n β€’ g z := by
327328
refine ⟨fun ⟨n, hn⟩ ↦ ⟨-n, _, ⟨hn, eventually_nhdsWithin_iff.mpr ?_⟩⟩, ?_⟩
328329
Β· filter_upwards with z hz

0 commit comments

Comments
Β (0)