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

Commit 0c424e9

Browse files
committed
refactor(analysis/normed_space/conformal_linear_map): redefine (#13143)
Use equality of bundled maps instead of coercions to functions in the definition of `is_conformal_map`. Also golf some proofs.
1 parent 036fc99 commit 0c424e9

File tree

6 files changed

+77
-85
lines changed

6 files changed

+77
-85
lines changed

src/analysis/calculus/conformal/normed_space.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ lemma conformal_at_const_smul {c : ℝ} (h : c ≠ 0) (x : X) :
6161
⟨c • continuous_linear_map.id ℝ X,
6262
(has_fderiv_at_id x).const_smul c, is_conformal_map_const_smul h⟩
6363

64+
@[nontriviality] lemma subsingleton.conformal_at [subsingleton X] (f : X → Y) (x : X) :
65+
conformal_at f x :=
66+
0, has_fderiv_at_of_subsingleton _ _, is_conformal_map_of_subsingleton _⟩
67+
6468
/-- A function is a conformal map if and only if its differential is a conformal linear map-/
6569
lemma conformal_at_iff_is_conformal_map_fderiv {f : X → Y} {x : X} :
6670
conformal_at f x ↔ is_conformal_map (fderiv ℝ f x) :=
6771
begin
6872
split,
69-
{ rintros ⟨c, hf, hf'⟩,
70-
rw hf.fderiv,
71-
exact hf' },
73+
{ rintros ⟨f', hf, hf'⟩,
74+
rwa hf.fderiv },
7275
{ intros H,
7376
by_cases h : differentiable_at ℝ f x,
7477
{ exact ⟨fderiv ℝ f x, h.has_fderiv_at, H⟩, },
75-
{ cases subsingleton_or_nontrivial X with w w; resetI,
76-
{ exact ⟨(0 : X →L[ℝ] Y), has_fderiv_at_of_subsingleton f x,
77-
is_conformal_map_of_subsingleton 0⟩, },
78-
{ exfalso,
79-
exact H.ne_zero (fderiv_zero_of_not_differentiable_at h), }, }, },
78+
{ nontriviality X,
79+
exact absurd (fderiv_zero_of_not_differentiable_at h) H.ne_zero } },
8080
end
8181

8282
namespace conformal_at

src/analysis/complex/conformal.lean

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ section conformal_into_complex_normed
4242
variables {E : Type*} [normed_group E] [normed_space ℝ E] [normed_space ℂ E]
4343
{z : ℂ} {g : ℂ →L[ℝ] E} {f : ℂ → E}
4444

45-
lemma is_conformal_map_complex_linear
46-
{map : ℂ →L[ℂ] E} (nonzero : map ≠ 0) : is_conformal_map (map.restrict_scalars ℝ) :=
45+
lemma is_conformal_map_complex_linear {map : ℂ →L[ℂ] E} (nonzero : map ≠ 0) :
46+
is_conformal_map (map.restrict_scalars ℝ) :=
4747
begin
4848
have minor₁ : ∥map 1∥ ≠ 0,
4949
{ simpa [ext_ring_iff] using nonzero },
@@ -56,8 +56,7 @@ begin
5656
simp only [map.coe_coe, map.map_smul, norm_smul, norm_inv, norm_norm],
5757
field_simp [minor₁], },
5858
{ ext1,
59-
rw [← linear_isometry.coe_to_linear_map],
60-
simp [minor₁], },
59+
simp [minor₁] },
6160
end
6261

6362
lemma is_conformal_map_complex_linear_conj
@@ -77,23 +76,21 @@ lemma is_conformal_map.is_complex_or_conj_linear (h : is_conformal_map g) :
7776
(∃ (map : ℂ →L[ℂ] ℂ), map.restrict_scalars ℝ = g) ∨
7877
(∃ (map : ℂ →L[ℂ] ℂ), map.restrict_scalars ℝ = g ∘L ↑conj_cle) :=
7978
begin
80-
rcases h with ⟨c, hc, li, hg⟩,
81-
rcases linear_isometry_complex (li.to_linear_isometry_equiv rfl) with ⟨a, ha⟩,
82-
let rot := c • (a : ℂ) • continuous_linear_map.id ℂ ℂ,
83-
cases ha,
84-
{ refine or.intro_left _ ⟨rot, _⟩,
79+
rcases h with ⟨c, hc, li, rfl⟩,
80+
obtain ⟨li, rfl⟩ : ∃ li' : ℂ ≃ₗᵢ[ℝ] ℂ, li'.to_linear_isometry = li,
81+
from ⟨li.to_linear_isometry_equiv rfl, by { ext1, refl }⟩,
82+
rcases linear_isometry_complex li with ⟨a, rfl|rfl⟩,
83+
-- let rot := c • (a : ℂ) • continuous_linear_map.id ℂ ℂ,
84+
{ refine or.inl ⟨c • (a : ℂ) • continuous_linear_map.id ℂ ℂ, _⟩,
8585
ext1,
86-
simp only [coe_restrict_scalars', hg, ← li.coe_to_linear_isometry_equiv, ha,
87-
pi.smul_apply, continuous_linear_map.smul_apply, rotation_apply,
88-
continuous_linear_map.id_apply, smul_eq_mul], },
89-
{ refine or.intro_right _ ⟨rot, _⟩,
86+
simp only [coe_restrict_scalars', smul_apply, linear_isometry.coe_to_continuous_linear_map,
87+
linear_isometry_equiv.coe_to_linear_isometry, rotation_apply, id_apply, smul_eq_mul] },
88+
{ refine or.inr ⟨c • (a : ℂ) • continuous_linear_map.id ℂ ℂ, _⟩,
9089
ext1,
91-
rw [continuous_linear_map.coe_comp', hg, ← li.coe_to_linear_isometry_equiv, ha],
92-
simp only [coe_restrict_scalars', function.comp_app, pi.smul_apply,
93-
linear_isometry_equiv.coe_trans, conj_lie_apply,
94-
rotation_apply, continuous_linear_equiv.coe_apply, conj_cle_apply],
95-
simp only [continuous_linear_map.smul_apply, continuous_linear_map.id_apply,
96-
smul_eq_mul, conj_conj], },
90+
simp only [coe_restrict_scalars', smul_apply, linear_isometry.coe_to_continuous_linear_map,
91+
linear_isometry_equiv.coe_to_linear_isometry, rotation_apply, id_apply, smul_eq_mul,
92+
comp_apply, linear_isometry_equiv.trans_apply, continuous_linear_equiv.coe_coe,
93+
conj_cle_apply, conj_lie_apply, conj_conj] },
9794
end
9895

9996
/-- A real continuous linear map on the complex plane is conformal if and only if the map or its

src/analysis/complex/real_deriv.lean

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,17 @@ section conformality
122122
open complex continuous_linear_map
123123
open_locale complex_conjugate
124124

125+
variables {E : Type*} [normed_group E] [normed_space ℂ E] {z : ℂ} {f : ℂ → E}
126+
125127
/-- A real differentiable function of the complex plane into some complex normed space `E` is
126128
conformal at a point `z` if it is holomorphic at that point with a nonvanishing differential.
127129
This is a version of the Cauchy-Riemann equations. -/
128-
lemma differentiable_at.conformal_at {E : Type*}
129-
[normed_group E] [normed_space ℝ E] [normed_space ℂ E]
130-
{z : ℂ} {f : ℂ → E}
131-
(hf' : fderiv ℝ f z ≠ 0) (h : differentiable_at ℂ f z) :
130+
lemma differentiable_at.conformal_at (h : differentiable_at ℂ f z) (hf' : deriv f z ≠ 0) :
132131
conformal_at f z :=
133132
begin
134-
rw conformal_at_iff_is_conformal_map_fderiv,
135-
rw (h.has_fderiv_at.restrict_scalars ℝ).fderiv at ⊢ hf',
133+
rw [conformal_at_iff_is_conformal_map_fderiv, (h.has_fderiv_at.restrict_scalars ℝ).fderiv],
136134
apply is_conformal_map_complex_linear,
137-
contrapose! hf' with w,
138-
simp [w]
135+
simpa only [ne.def, ext_ring_iff]
139136
end
140137

141138
/-- A complex function is conformal if and only if the function is holomorphic or antiholomorphic

src/analysis/inner_product_space/conformal_linear_map.lean

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,23 @@ variables {E F : Type*} [inner_product_space ℝ E] [inner_product_space ℝ F]
1717
open linear_isometry continuous_linear_map
1818
open_locale real_inner_product_space
1919

20-
lemma is_conformal_map_iff (f' : E →L[ℝ] F) :
21-
is_conformal_map f' ↔ ∃ (c : ℝ), 0 < c ∧
22-
∀ (u v : E), ⟪f' u, f' v⟫ = (c : ℝ) * ⟪u, v⟫ :=
20+
/-- A map between two inner product spaces is a conformal map if and only if it preserves inner
21+
products up to a scalar factor, i.e., there exists a positive `c : ℝ` such that `⟪f u, f v⟫ = c *
22+
⟪u, v⟫` for all `u`, `v`. -/
23+
lemma is_conformal_map_iff (f : E →L[ℝ] F) :
24+
is_conformal_map f ↔ ∃ (c : ℝ), 0 < c ∧ ∀ (u v : E), ⟪f u, f v⟫ = c * ⟪u, v⟫ :=
2325
begin
2426
split,
25-
{ rintros ⟨c₁, hc₁, li, h⟩,
27+
{ rintros ⟨c₁, hc₁, li, rfl⟩,
2628
refine ⟨c₁ * c₁, mul_self_pos.2 hc₁, λ u v, _⟩,
27-
simp only [h, pi.smul_apply, inner_map_map,
28-
real_inner_smul_left, real_inner_smul_right, mul_assoc], },
29+
simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
30+
coe_to_continuous_linear_map, pi.smul_apply, inner_map_map] },
2931
{ rintros ⟨c₁, hc₁, huv⟩,
30-
let c := real.sqrt c₁⁻¹,
31-
have hc : c ≠ 0 := λ w, by {simp only [c] at w;
32-
exact (real.sqrt_ne_zero'.mpr $ inv_pos.mpr hc₁) w},
33-
let f₁ := c • f',
34-
have minor : (f₁ : E → F) = c • f' := rfl,
35-
have minor' : (f' : E → F) = c⁻¹ • f₁ := by ext;
36-
simp_rw [minor, pi.smul_apply]; rw [smul_smul, inv_mul_cancel hc, one_smul],
37-
refine ⟨c⁻¹, inv_ne_zero hc, f₁.to_linear_map.isometry_of_inner (λ u v, _), minor'⟩,
38-
simp_rw [to_linear_map_eq_coe, continuous_linear_map.coe_coe, minor, pi.smul_apply],
39-
rw [real_inner_smul_left, real_inner_smul_right,
40-
huv u v, ← mul_assoc, ← mul_assoc,
41-
real.mul_self_sqrt $ le_of_lt $ inv_pos.mpr hc₁,
42-
inv_mul_cancel $ ne_of_gt hc₁, one_mul], },
32+
obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = c * c,
33+
from ⟨real.sqrt c₁, real.sqrt_pos.2 hc₁, (real.mul_self_sqrt hc₁.le).symm⟩,
34+
refine ⟨c, hc.ne', (c⁻¹ • f : E →ₗ[ℝ] F).isometry_of_inner (λ u v, _), _⟩,
35+
{ simp only [real_inner_smul_left, real_inner_smul_right, huv, mul_assoc, coe_smul,
36+
inv_mul_cancel_left₀ hc.ne', linear_map.smul_apply, continuous_linear_map.coe_coe] },
37+
{ ext1 x,
38+
exact (smul_inv_smul₀ hc.ne' (f x)).symm } }
4339
end

src/analysis/normed_space/conformal_linear_map.lean

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,66 +40,63 @@ The definition of conformality in this file does NOT require the maps to be orie
4040

4141
noncomputable theory
4242

43-
open linear_isometry continuous_linear_map
43+
open function linear_isometry continuous_linear_map
4444

4545
/-- A continuous linear map `f'` is said to be conformal if it's
4646
a nonzero multiple of a linear isometry. -/
4747
def is_conformal_map {R : Type*} {X Y : Type*} [normed_field R]
4848
[semi_normed_group X] [semi_normed_group Y] [normed_space R X] [normed_space R Y]
4949
(f' : X →L[R] Y) :=
50-
∃ (c : R) (hc : c ≠ 0) (li : X →ₗᵢ[R] Y), (f' : X → Y) = c • li
50+
∃ (c : R) (hc : c ≠ 0) (li : X →ₗᵢ[R] Y), f' = c • li.to_continuous_linear_map
5151

5252
variables {R M N G M' : Type*} [normed_field R]
5353
[semi_normed_group M] [semi_normed_group N] [semi_normed_group G]
5454
[normed_space R M] [normed_space R N] [normed_space R G]
5555
[normed_group M'] [normed_space R M']
56+
{f : M →L[R] N} {g : N →L[R] G} {c : R}
5657

5758
lemma is_conformal_map_id : is_conformal_map (id R M) :=
58-
1, one_ne_zero, id, by { ext, simp }
59+
1, one_ne_zero, id, by simp⟩
5960

60-
lemma is_conformal_map_const_smul {c : R} (hc : c ≠ 0) : is_conformal_map (c • (id R M)) :=
61-
⟨c, hc, id, by { ext, simp }⟩
61+
lemma is_conformal_map.smul (hf : is_conformal_map f) {c : R} (hc : c ≠ 0) :
62+
is_conformal_map (c • f) :=
63+
begin
64+
rcases hf with ⟨c', hc', li, rfl⟩,
65+
exact ⟨c * c', mul_ne_zero hc hc', li, smul_smul _ _ _⟩
66+
end
67+
68+
lemma is_conformal_map_const_smul (hc : c ≠ 0) : is_conformal_map (c • id R M) :=
69+
is_conformal_map_id.smul hc
6270

63-
lemma linear_isometry.is_conformal_map (f' : M →ₗᵢ[R] N) :
71+
protected lemma linear_isometry.is_conformal_map (f' : M →ₗᵢ[R] N) :
6472
is_conformal_map f'.to_continuous_linear_map :=
65-
1, one_ne_zero, f', by { ext, simp }
73+
1, one_ne_zero, f', (one_smul _ _).symm
6674

67-
lemma is_conformal_map_of_subsingleton [h : subsingleton M] (f' : M →L[R] N) :
75+
@[nontriviality] lemma is_conformal_map_of_subsingleton [subsingleton M] (f' : M →L[R] N) :
6876
is_conformal_map f' :=
69-
begin
70-
rw subsingleton_iff at h,
71-
have minor : (f' : M → N) = function.const M 0 := by ext x'; rw h x' 0; exact f'.map_zero,
72-
have key : ∀ (x' : M), ∥(0 : M →ₗ[R] N) x'∥ = ∥x'∥ := λ x',
73-
by { rw [linear_map.zero_apply, h x' 0], repeat { rw norm_zero }, },
74-
exact ⟨(1 : R), one_ne_zero, ⟨0, key⟩,
75-
by { rw pi.smul_def, ext p, rw [one_smul, minor], refl, }⟩,
76-
end
77+
1, one_ne_zero, ⟨0, λ x, by simp [subsingleton.elim x 0]⟩, subsingleton.elim _ _⟩
7778

7879
namespace is_conformal_map
7980

80-
lemma comp {f' : M →L[R] N} {g' : N →L[R] G}
81-
(hg' : is_conformal_map g') (hf' : is_conformal_map f') :
82-
is_conformal_map (g'.comp f') :=
81+
lemma comp (hg : is_conformal_map g) (hf : is_conformal_map f) :
82+
is_conformal_map (g.comp f) :=
8383
begin
84-
rcases hf' with ⟨cf, hcf, lif, hlif⟩,
85-
rcases hg' with ⟨cg, hcg, lig, hlig⟩,
86-
refine ⟨cg * cf, mul_ne_zero hcg hcf, lig.comp lif, funext (λ x, _)⟩,
87-
simp only [coe_comp', linear_isometry.coe_comp, hlif, hlig, pi.smul_apply,
88-
function.comp_app, linear_isometry.map_smul, smul_smul],
84+
rcases hf with ⟨cf, hcf, lif, rfl⟩,
85+
rcases hg with ⟨cg, hcg, lig, rfl⟩,
86+
refine ⟨cg * cf, mul_ne_zero hcg hcf, lig.comp lif, _⟩,
87+
rw [smul_comp, comp_smul, mul_smul],
88+
refl
8989
end
9090

91-
lemma injective {f' : M' →L[R] N} (h : is_conformal_map f') : function.injective f' :=
92-
let ⟨c, hc, li, hf'⟩ := h in by simp only [hf', pi.smul_def];
93-
exact (smul_right_injective _ hc).comp li.injective
91+
protected lemma injective {f : M' →L[R] N} (h : is_conformal_map f) : function.injective f :=
92+
by { rcases h with ⟨c, hc, li, rfl⟩, exact (smul_right_injective _ hc).comp li.injective }
9493

9594
lemma ne_zero [nontrivial M'] {f' : M' →L[R] N} (hf' : is_conformal_map f') :
9695
f' ≠ 0 :=
9796
begin
98-
intros w,
97+
rintro rfl,
9998
rcases exists_ne (0 : M') with ⟨a, ha⟩,
100-
have : f' a = f' 0,
101-
{ simp_rw [w, continuous_linear_map.zero_apply], },
102-
exact ha (hf'.injective this),
99+
exact ha (hf'.injective rfl)
103100
end
104101

105102
end is_conformal_map

src/analysis/normed_space/linear_isometry.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ instance : has_coe_to_fun (E →ₛₗᵢ[σ₁₂] E₂) (λ _, E → E₂) :=
7474

7575
@[simp] lemma coe_to_linear_map : ⇑f.to_linear_map = f := rfl
7676

77+
@[simp] lemma coe_mk (f : E →ₛₗ[σ₁₂] E₂) (hf) : ⇑(mk f hf) = f := rfl
78+
7779
lemma coe_injective : @injective (E →ₛₗᵢ[σ₁₂] E₂) (E → E₂) coe_fn :=
7880
fun_like.coe_injective
7981

@@ -169,6 +171,9 @@ def id : E →ₗᵢ[R] E := ⟨linear_map.id, λ x, rfl⟩
169171

170172
@[simp] lemma id_to_linear_map : (id.to_linear_map : E →ₗ[R] E) = linear_map.id := rfl
171173

174+
@[simp] lemma id_to_continuous_linear_map :
175+
id.to_continuous_linear_map = continuous_linear_map.id R E := rfl
176+
172177
instance : inhabited (E →ₗᵢ[R] E) := ⟨id⟩
173178

174179
/-- Composition of linear isometries. -/

0 commit comments

Comments
 (0)