Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit cc65716

Browse files
committed
refactor(analysis/complex): replace diff_on_int_cont with diff_cont_on_cl (#13148)
Use "differentiable on a set and continuous on its closure" instead of "continuous on a set and differentiable on its interior". There are a few reasons to prefer the latter: * it has better "composition" lemma; * it allows us to talk about functions that are, e.g., differentiable on `{z : ℂ | abs z < 1 ∧ (re z < 0 ∨ im z ≠ 0)}` and continuous on the closed unit disk. Also generalize `eq_on_of_eq_on_frontier` from a compact set to a bounded set (so that it works, e.g., for the unit ball in a Banach space). This PR does not move the file `diff_on_int_cont` to make the diff more readable; the file will be moved in another PR.
1 parent 57f382a commit cc65716

File tree

7 files changed

+200
-164
lines changed

7 files changed

+200
-164
lines changed

src/analysis/calculus/diff_on_int_cont.lean

Lines changed: 72 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Authors: Yury G. Kudryashov
66
import analysis.calculus.deriv
77

88
/-!
9-
# Functions continuous on a domain and differentiable on its interior
9+
# Functions differentiable on a domain and continuous on its closure
1010
11-
Many theorems in complex analysis assume that a function is continuous on a domain and is complex
12-
differentiable on its interior. In this file we define a predicate `diff_on_int_cont` that expresses
11+
Many theorems in complex analysis assume that a function is complex differentiable on a domain and
12+
is continuous on its closure. In this file we define a predicate `diff_cont_on_cl` that expresses
1313
this property and prove basic facts about this predicate.
1414
-/
1515

@@ -20,117 +20,112 @@ variables (𝕜 : Type*) {E F G : Type*} [nondiscrete_normed_field 𝕜] [normed
2020
[normed_group F] [normed_space 𝕜 E] [normed_space 𝕜 F] [normed_group G] [normed_space 𝕜 G]
2121
{f g : E → F} {s t : set E} {x : E}
2222

23-
/-- A predicate saying that a function is continuous on a set and is differentiable on its interior.
24-
This assumption naturally appears in many theorems in complex analysis. -/
25-
@[protect_proj] structure diff_on_int_cont (f : E → F) (s : set E) : Prop :=
26-
(differentiable_on : differentiable_on 𝕜 f (interior s))
27-
(continuous_on : continuous_on f s)
23+
/-- A predicate saying that a function is differentiable on a set and is continuous on its
24+
closure. This is a common assumption in complex analysis. -/
25+
@[protect_proj] structure diff_cont_on_cl (f : E → F) (s : set E) : Prop :=
26+
(differentiable_on : differentiable_on 𝕜 f s)
27+
(continuous_on : continuous_on f (closure s))
2828

2929
variable {𝕜}
3030

31-
lemma differentiable_on.diff_on_int_cont (h : differentiable_on 𝕜 f s) :
32-
diff_on_int_cont 𝕜 f s :=
33-
⟨h.mono interior_subset, h.continuous_on⟩
31+
lemma differentiable_on.diff_cont_on_cl (h : differentiable_on 𝕜 f (closure s)) :
32+
diff_cont_on_cl 𝕜 f s :=
33+
⟨h.mono subset_closure, h.continuous_on⟩
3434

35-
lemma differentiable.diff_on_int_cont (h : differentiable 𝕜 f) : diff_on_int_cont 𝕜 f s :=
36-
h.differentiable_on.diff_on_int_cont
35+
lemma differentiable.diff_cont_on_cl (h : differentiable 𝕜 f) : diff_cont_on_cl 𝕜 f s :=
36+
h.differentiable_on, h.continuous.continuous_on⟩
3737

38-
lemma diff_on_int_cont_open (hs : is_open s) :
39-
diff_on_int_cont 𝕜 f s ↔ differentiable_on 𝕜 f s :=
40-
⟨λ h, hs.interior_eq ▸ h.differentiable_on, λ h, h.diff_on_int_cont
38+
lemma is_closed.diff_cont_on_cl_iff (hs : is_closed s) :
39+
diff_cont_on_cl 𝕜 f s ↔ differentiable_on 𝕜 f s :=
40+
⟨λ h, h.differentiable_on, λ h, ⟨h, hs.closure_eq.symm ▸ h.continuous_on⟩
4141

42-
lemma diff_on_int_cont_univ : diff_on_int_cont 𝕜 f univ ↔ differentiable 𝕜 f :=
43-
(diff_on_int_cont_open is_open_univ).trans differentiable_on_univ
42+
lemma diff_cont_on_cl_univ : diff_cont_on_cl 𝕜 f univ ↔ differentiable 𝕜 f :=
43+
is_closed_univ.diff_cont_on_cl_iff.trans differentiable_on_univ
4444

45-
lemma diff_on_int_cont_const {c : F} :
46-
diff_on_int_cont 𝕜 (λ x : E, c) s :=
45+
lemma diff_cont_on_cl_const {c : F} :
46+
diff_cont_on_cl 𝕜 (λ x : E, c) s :=
4747
⟨differentiable_on_const c, continuous_on_const⟩
4848

49-
lemma differentiable_on.comp_diff_on_int_cont {g : G → E} {t : set G}
50-
(hf : differentiable_on 𝕜 f s) (hg : diff_on_int_cont 𝕜 g t) (h : maps_to g t s) :
51-
diff_on_int_cont 𝕜 (f ∘ g) t :=
52-
⟨hf.comp hg.differentiable_on $ h.mono_left interior_subset, hf.continuous_on.comp hg.2 h⟩
49+
namespace diff_cont_on_cl
5350

54-
lemma differentiable.comp_diff_on_int_cont {g : G → E} {t : set G}
55-
(hf : differentiable 𝕜 f) (hg : diff_on_int_cont 𝕜 g t) :
56-
diff_on_int_cont 𝕜 (f ∘ g) t :=
57-
hf.differentiable_on.comp_diff_on_int_cont hg (maps_to_image _ _)
51+
lemma comp {g : G → E} {t : set G} (hf : diff_cont_on_cl 𝕜 f s) (hg : diff_cont_on_cl 𝕜 g t)
52+
(h : maps_to g t s) :
53+
diff_cont_on_cl 𝕜 (f ∘ g) t :=
54+
hf.1.comp hg.1 h, hf.2.comp hg.2 $ h.closure_of_continuous_on hg.2
5855

59-
namespace diff_on_int_cont
60-
61-
lemma comp {g : G → E} {t : set G} (hf : diff_on_int_cont 𝕜 f s) (hg : diff_on_int_cont 𝕜 g t)
62-
(h : maps_to g t s) (h' : maps_to g (interior t) (interior s)) :
63-
diff_on_int_cont 𝕜 (f ∘ g) t :=
64-
⟨hf.1.comp hg.1 h', hf.2.comp hg.2 h⟩
65-
66-
lemma differentiable_on_ball {x : E} {r : ℝ} (h : diff_on_int_cont 𝕜 f (closed_ball x r)) :
67-
differentiable_on 𝕜 f (ball x r) :=
68-
h.differentiable_on.mono ball_subset_interior_closed_ball
69-
70-
lemma mk_ball [normed_space ℝ E] {x : E} {r : ℝ} (hd : differentiable_on 𝕜 f (ball x r))
71-
(hc : continuous_on f (closed_ball x r)) : diff_on_int_cont 𝕜 f (closed_ball x r) :=
56+
lemma continuous_on_ball [normed_space ℝ E] {x : E} {r : ℝ} (h : diff_cont_on_cl 𝕜 f (ball x r)) :
57+
continuous_on f (closed_ball x r) :=
7258
begin
73-
refine ⟨_, hc⟩,
7459
rcases eq_or_ne r 0 with rfl|hr,
75-
{ rw [closed_ball_zero],
76-
exact (subsingleton_singleton.mono interior_subset).differentiable_on },
77-
{ rwa interior_closed_ball x hr }
60+
{ rw closed_ball_zero,
61+
exact continuous_on_singleton f x },
62+
{ rw ← closure_ball x hr,
63+
exact h.continuous_on }
7864
end
7965

80-
protected lemma differentiable_at (h : diff_on_int_cont 𝕜 f s) (hx : x ∈ interior s) :
66+
lemma mk_ball {x : E} {r : ℝ} (hd : differentiable_on 𝕜 f (ball x r))
67+
(hc : continuous_on f (closed_ball x r)) : diff_cont_on_cl 𝕜 f (ball x r) :=
68+
⟨hd, hc.mono $ closure_ball_subset_closed_ball⟩
69+
70+
protected lemma differentiable_at (h : diff_cont_on_cl 𝕜 f s) (hs : is_open s) (hx : x ∈ s) :
8171
differentiable_at 𝕜 f x :=
82-
h.differentiable_on.differentiable_at $ is_open_interior.mem_nhds hx
72+
h.differentiable_on.differentiable_at $ hs.mem_nhds hx
8373

84-
lemma differentiable_at' (h : diff_on_int_cont 𝕜 f s) (hx : s ∈ 𝓝 x) :
74+
lemma differentiable_at' (h : diff_cont_on_cl 𝕜 f s) (hx : s ∈ 𝓝 x) :
8575
differentiable_at 𝕜 f x :=
86-
h.differentiable_at (mem_interior_iff_mem_nhds.2 hx)
76+
h.differentiable_on.differentiable_at hx
8777

88-
protected lemma mono (h : diff_on_int_cont 𝕜 f s) (ht : t ⊆ s) : diff_on_int_cont 𝕜 f t :=
89-
⟨h.differentiable_on.mono (interior_mono ht), h.continuous_on.mono ht
78+
protected lemma mono (h : diff_cont_on_cl 𝕜 f s) (ht : t ⊆ s) : diff_cont_on_cl 𝕜 f t :=
79+
⟨h.differentiable_on.mono ht, h.continuous_on.mono (closure_mono ht)
9080

91-
lemma add (hf : diff_on_int_cont 𝕜 f s) (hg : diff_on_int_cont 𝕜 g s) :
92-
diff_on_int_cont 𝕜 (f + g) s :=
81+
lemma add (hf : diff_cont_on_cl 𝕜 f s) (hg : diff_cont_on_cl 𝕜 g s) :
82+
diff_cont_on_cl 𝕜 (f + g) s :=
9383
⟨hf.1.add hg.1, hf.2.add hg.2
9484

95-
lemma add_const (hf : diff_on_int_cont 𝕜 f s) (c : F) :
96-
diff_on_int_cont 𝕜 (λ x, f x + c) s :=
97-
hf.add diff_on_int_cont_const
85+
lemma add_const (hf : diff_cont_on_cl 𝕜 f s) (c : F) :
86+
diff_cont_on_cl 𝕜 (λ x, f x + c) s :=
87+
hf.add diff_cont_on_cl_const
9888

99-
lemma const_add (hf : diff_on_int_cont 𝕜 f s) (c : F) :
100-
diff_on_int_cont 𝕜 (λ x, c + f x) s :=
101-
diff_on_int_cont_const.add hf
89+
lemma const_add (hf : diff_cont_on_cl 𝕜 f s) (c : F) :
90+
diff_cont_on_cl 𝕜 (λ x, c + f x) s :=
91+
diff_cont_on_cl_const.add hf
10292

103-
lemma neg (hf : diff_on_int_cont 𝕜 f s) : diff_on_int_cont 𝕜 (-f) s := ⟨hf.1.neg, hf.2.neg⟩
93+
lemma neg (hf : diff_cont_on_cl 𝕜 f s) : diff_cont_on_cl 𝕜 (-f) s := ⟨hf.1.neg, hf.2.neg⟩
10494

105-
lemma sub (hf : diff_on_int_cont 𝕜 f s) (hg : diff_on_int_cont 𝕜 g s) :
106-
diff_on_int_cont 𝕜 (f - g) s :=
95+
lemma sub (hf : diff_cont_on_cl 𝕜 f s) (hg : diff_cont_on_cl 𝕜 g s) :
96+
diff_cont_on_cl 𝕜 (f - g) s :=
10797
⟨hf.1.sub hg.1, hf.2.sub hg.2
10898

109-
lemma sub_const (hf : diff_on_int_cont 𝕜 f s) (c : F) : diff_on_int_cont 𝕜 (λ x, f x - c) s :=
110-
hf.sub diff_on_int_cont_const
99+
lemma sub_const (hf : diff_cont_on_cl 𝕜 f s) (c : F) : diff_cont_on_cl 𝕜 (λ x, f x - c) s :=
100+
hf.sub diff_cont_on_cl_const
111101

112-
lemma const_sub (hf : diff_on_int_cont 𝕜 f s) (c : F) : diff_on_int_cont 𝕜 (λ x, c - f x) s :=
113-
diff_on_int_cont_const.sub hf
102+
lemma const_sub (hf : diff_cont_on_cl 𝕜 f s) (c : F) : diff_cont_on_cl 𝕜 (λ x, c - f x) s :=
103+
diff_cont_on_cl_const.sub hf
114104

115105
lemma const_smul {R : Type*} [semiring R] [module R F] [smul_comm_class 𝕜 R F]
116-
[has_continuous_const_smul R F] (hf : diff_on_int_cont 𝕜 f s) (c : R) :
117-
diff_on_int_cont 𝕜 (c • f) s :=
106+
[has_continuous_const_smul R F] (hf : diff_cont_on_cl 𝕜 f s) (c : R) :
107+
diff_cont_on_cl 𝕜 (c • f) s :=
118108
⟨hf.1.const_smul c, hf.2.const_smul c⟩
119109

120110
lemma smul {𝕜' : Type*} [nondiscrete_normed_field 𝕜'] [normed_algebra 𝕜 𝕜']
121111
[normed_space 𝕜' F] [is_scalar_tower 𝕜 𝕜' F] {c : E → 𝕜'} {f : E → F} {s : set E}
122-
(hc : diff_on_int_cont 𝕜 c s) (hf : diff_on_int_cont 𝕜 f s) :
123-
diff_on_int_cont 𝕜 (λ x, c x • f x) s :=
112+
(hc : diff_cont_on_cl 𝕜 c s) (hf : diff_cont_on_cl 𝕜 f s) :
113+
diff_cont_on_cl 𝕜 (λ x, c x • f x) s :=
124114
⟨hc.1.smul hf.1, hc.2.smul hf.2
125115

126116
lemma smul_const {𝕜' : Type*} [nondiscrete_normed_field 𝕜'] [normed_algebra 𝕜 𝕜']
127117
[normed_space 𝕜' F] [is_scalar_tower 𝕜 𝕜' F] {c : E → 𝕜'} {s : set E}
128-
(hc : diff_on_int_cont 𝕜 c s) (y : F) :
129-
diff_on_int_cont 𝕜 (λ x, c x • y) s :=
130-
hc.smul diff_on_int_cont_const
118+
(hc : diff_cont_on_cl 𝕜 c s) (y : F) :
119+
diff_cont_on_cl 𝕜 (λ x, c x • y) s :=
120+
hc.smul diff_cont_on_cl_const
121+
122+
lemma inv {f : E → 𝕜} (hf : diff_cont_on_cl 𝕜 f s) (h₀ : ∀ x ∈ closure s, f x ≠ 0) :
123+
diff_cont_on_cl 𝕜 f⁻¹ s :=
124+
⟨differentiable_on_inv.comp hf.1 $ λ x hx, h₀ _ (subset_closure hx), hf.2.inv₀ h₀⟩
131125

132-
lemma inv {f : E → 𝕜} (hf : diff_on_int_cont 𝕜 f s) (h₀ : ∀ x ∈ s, f x ≠ 0) :
133-
diff_on_int_cont 𝕜 f⁻¹ s :=
134-
⟨differentiable_on_inv.comp hf.1 $ λ x hx, h₀ _ (interior_subset hx), hf.2.inv₀ h₀⟩
126+
end diff_cont_on_cl
135127

136-
end diff_on_int_cont
128+
lemma differentiable.comp_diff_cont_on_cl {g : G → E} {t : set G}
129+
(hf : differentiable 𝕜 f) (hg : diff_cont_on_cl 𝕜 g t) :
130+
diff_cont_on_cl 𝕜 (f ∘ g) t :=
131+
hf.diff_cont_on_cl.comp hg (maps_to_image _ _)

0 commit comments

Comments
 (0)