@@ -38,105 +38,142 @@ open Complex Metric
38
38
39
39
open ComplexConjugate
40
40
41
- /-- The unit circle in `ℂ`, here given the structure of a submonoid of `ℂ`. -/
41
+ /-- The unit circle in `ℂ`, here given the structure of a submonoid of `ℂ`.
42
+
43
+ Please use `Circle` when referring to the circle as a type. -/
44
+ @[deprecated (since := "2024-07-24")]
42
45
def circle : Submonoid ℂ :=
43
46
Submonoid.unitSphere ℂ
44
47
45
- @[simp]
48
+ set_option linter.deprecated false in
49
+ @[deprecated (since := "2024-07-24")]
46
50
theorem mem_circle_iff_abs {z : ℂ} : z ∈ circle ↔ abs z = 1 :=
47
51
mem_sphere_zero_iff_norm
48
52
49
- theorem circle_def : ↑circle = { z : ℂ | abs z = 1 } :=
50
- Set.ext fun _ => mem_circle_iff_abs
51
-
52
- @[simp]
53
- theorem abs_coe_circle (z : circle) : abs z = 1 :=
54
- mem_circle_iff_abs.mp z.2
53
+ set_option linter.deprecated false in
54
+ @[deprecated (since := "2024-07-24")]
55
+ theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1 := by
56
+ simp [Complex.abs, mem_circle_iff_abs]
55
57
56
- theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1 := by simp [Complex.abs]
58
+ /-- The unit circle in `ℂ`. -/
59
+ def Circle : Type := Submonoid.unitSphere ℂ
60
+ deriving TopologicalSpace
57
61
58
- @[simp]
59
- theorem normSq_eq_of_mem_circle (z : circle) : normSq z = 1 := by simp [normSq_eq_abs]
62
+ namespace Circle
60
63
61
- theorem ne_zero_of_mem_circle (z : circle) : (z : ℂ) ≠ 0 :=
62
- ne_zero_of_mem_unit_sphere z
64
+ instance instCoeOut : CoeOut Circle ℂ := subtypeCoe
63
65
64
- instance commGroup : CommGroup circle :=
65
- Metric.sphere.commGroup
66
+ instance instCommGroup : CommGroup Circle := Metric.sphere.commGroup
67
+ instance instMetricSpace : MetricSpace Circle := Subtype.metricSpace
66
68
67
- @[simp]
68
- theorem coe_inv_circle (z : circle) : ↑z⁻¹ = (z : ℂ)⁻¹ :=
69
- rfl
69
+ @[simp] lemma abs_coe (z : Circle) : abs z = 1 := mem_sphere_zero_iff_norm.1 z.2
70
+ @[simp] lemma normSq_coe (z : Circle) : normSq z = 1 := by simp [normSq_eq_abs]
71
+ @[simp] lemma coe_ne_zero (z : Circle) : (z : ℂ) ≠ 0 := ne_zero_of_mem_unit_sphere z
72
+ @[simp, norm_cast] lemma coe_one : ↑(1 : Circle) = (1 : ℂ) := rfl
73
+ @[simp, norm_cast] lemma coe_mul (z w : Circle) : ↑(z * w) = (z : ℂ) * w := rfl
74
+ @[simp, norm_cast] lemma coe_inv (z : Circle) : ↑z⁻¹ = (z : ℂ)⁻¹ := rfl
75
+ lemma coe_inv_eq_conj (z : Circle) : ↑z⁻¹ = conj (z : ℂ) := by
76
+ rw [coe_inv, inv_def, normSq_coe, inv_one, ofReal_one, mul_one]
70
77
71
- theorem coe_inv_circle_eq_conj (z : circle) : ↑z⁻¹ = conj (z : ℂ) := by
72
- rw [coe_inv_circle, inv_def, normSq_eq_of_mem_circle, inv_one, ofReal_one, mul_one]
78
+ @[simp, norm_cast] lemma coe_div (z w : Circle) : ↑(z / w) = (z : ℂ) / w := rfl
73
79
74
- @[simp]
75
- theorem coe_div_circle (z w : circle) : ↑(z / w) = (z : ℂ) / w :=
76
- circle.subtype.map_div z w
80
+ /-- The coercion `Circle → ℂ` as a monoid homomorphism. -/
81
+ @[simps]
82
+ def coeHom : Circle →* ℂ where
83
+ toFun := (↑)
84
+ map_one' := coe_one
85
+ map_mul' := coe_mul
86
+
87
+ @[deprecated (since := "2024-07-24")] alias _root_.abs_coe_circle := abs_coe
88
+ @[deprecated (since := "2024-07-24")] alias _root_.normSq_eq_of_mem_circle := normSq_coe
89
+ @[deprecated (since := "2024-07-24")] alias _root_.ne_zero_of_mem_circle := coe_ne_zero
90
+ @[deprecated (since := "2024-07-24")] alias _root_.coe_inv_circle := coe_inv
91
+ @[deprecated (since := "2024-07-24")] alias _root_.coe_inv_circle_eq_conj := coe_inv_eq_conj
92
+ @[deprecated (since := "2024-07-24")] alias _root_.coe_div_circle := coe_div
77
93
78
94
/-- The elements of the circle embed into the units. -/
79
- def circle.toUnits : circle →* Units ℂ :=
80
- unitSphereToUnits ℂ
81
-
82
- -- written manually because `@[simps]` was slow and generated the wrong lemma
83
- @[simp]
84
- theorem circle.toUnits_apply (z : circle) :
85
- circle.toUnits z = Units.mk0 ↑z (ne_zero_of_mem_circle z) :=
86
- rfl
87
-
88
- instance : CompactSpace circle :=
89
- Metric.sphere.compactSpace _ _
95
+ def toUnits : Circle →* Units ℂ := unitSphereToUnits ℂ
90
96
91
- instance : TopologicalGroup circle :=
92
- Metric.sphere.topologicalGroup
97
+ -- written manually because `@[simps]` generated the wrong lemma
98
+ @[simp] lemma toUnits_apply (z : Circle) : toUnits z = Units.mk0 ↑z z.coe_ne_zero := rfl
93
99
94
- instance : UniformGroup circle := by
95
- convert topologicalGroup_is_uniform_of_compactSpace circle
100
+ instance : CompactSpace Circle := Metric.sphere.compactSpace _ _
101
+ instance : TopologicalGroup Circle := Metric.sphere.topologicalGroup
102
+ instance instUniformSpace : UniformSpace Circle := instUniformSpaceSubtype
103
+ instance : UniformGroup Circle := by
104
+ convert topologicalGroup_is_uniform_of_compactSpace Circle
96
105
exact unique_uniformity_of_compact rfl rfl
97
106
98
107
/-- If `z` is a nonzero complex number, then `conj z / z` belongs to the unit circle. -/
99
108
@[simps]
100
- def circle.ofConjDivSelf (z : ℂ) (hz : z ≠ 0 ) : circle :=
101
- ⟨conj z / z,
102
- mem_circle_iff_abs.2 <| by rw [map_div₀, abs_conj, div_self]; exact Complex.abs.ne_zero hz⟩
109
+ def ofConjDivSelf (z : ℂ) (hz : z ≠ 0 ) : Circle where
110
+ val := conj z / z
111
+ property := mem_sphere_zero_iff_norm.2 <| by
112
+ rw [norm_div, RCLike.norm_conj, div_self]; exact Complex.abs.ne_zero hz
103
113
104
114
/-- The map `fun t => exp (t * I)` from `ℝ` to the unit circle in `ℂ`. -/
105
- def expMapCircle : C(ℝ, circle) where
106
- toFun t := ⟨exp (t * I), by simp [exp_mul_I, abs_cos_add_sin_mul_I]⟩
115
+ def exp : C(ℝ, Circle) where
116
+ toFun t := ⟨(t * I).exp, by simp [Submonoid.unitSphere, exp_mul_I, abs_cos_add_sin_mul_I]⟩
117
+ continuous_toFun := Continuous.subtype_mk (by fun_prop)
118
+ (by simp [Submonoid.unitSphere, exp_mul_I, abs_cos_add_sin_mul_I])
107
119
108
120
@[simp]
109
- theorem expMapCircle_apply (t : ℝ) : ↑(expMapCircle t) = Complex.exp (t * Complex.I) :=
110
- rfl
121
+ theorem exp_apply (t : ℝ) : ↑(exp t) = Complex.exp (t * Complex.I) := rfl
111
122
112
123
@[simp]
113
- theorem expMapCircle_zero : expMapCircle 0 = 1 :=
114
- Subtype.ext <| by
115
- rw [expMapCircle_apply, ofReal_zero, zero_mul, exp_zero, Submonoid.coe_one]
124
+ theorem exp_zero : exp 0 = 1 :=
125
+ Subtype.ext <| by rw [exp_apply, ofReal_zero, zero_mul, Complex.exp_zero, coe_one]
116
126
117
127
@[simp]
118
- theorem expMapCircle_add (x y : ℝ) : expMapCircle (x + y) = expMapCircle x * expMapCircle y :=
128
+ theorem exp_add (x y : ℝ) : exp (x + y) = exp x * exp y :=
119
129
Subtype.ext <| by
120
- simp only [expMapCircle_apply , Submonoid.coe_mul, ofReal_add, add_mul, Complex.exp_add]
130
+ simp only [exp_apply , Submonoid.coe_mul, ofReal_add, add_mul, Complex.exp_add, coe_mul ]
121
131
122
132
/-- The map `fun t => exp (t * I)` from `ℝ` to the unit circle in `ℂ`,
123
133
considered as a homomorphism of groups. -/
124
134
@[simps]
125
- def expMapCircleHom : ℝ →+ Additive circle where
126
- toFun := Additive.ofMul ∘ expMapCircle
127
- map_zero' := expMapCircle_zero
128
- map_add' := expMapCircle_add
135
+ def expHom : ℝ →+ Additive Circle where
136
+ toFun := Additive.ofMul ∘ exp
137
+ map_zero' := exp_zero
138
+ map_add' := exp_add
129
139
130
- @[simp]
131
- theorem expMapCircle_sub (x y : ℝ) : expMapCircle (x - y) = expMapCircle x / expMapCircle y :=
132
- expMapCircleHom.map_sub x y
140
+ @[simp] lemma exp_sub (x y : ℝ) : exp (x - y) = exp x / exp y := expHom.map_sub x y
141
+ @[simp] lemma exp_neg (x : ℝ) : exp (-x) = (exp x)⁻¹ := expHom.map_neg x
133
142
134
- @[simp]
135
- theorem expMapCircle_neg (x : ℝ) : expMapCircle (-x) = (expMapCircle x)⁻¹ :=
136
- expMapCircleHom.map_neg x
143
+ variable {α β M : Type *}
144
+
145
+ instance instSMul [SMul ℂ α] : SMul Circle α := Submonoid.smul _
146
+
147
+ instance instSMulCommClass_left [SMul ℂ β] [SMul α β] [SMulCommClass ℂ α β] :
148
+ SMulCommClass Circle α β := Submonoid.smulCommClass_left _
149
+
150
+ instance instSMulCommClass_right [SMul ℂ β] [SMul α β] [SMulCommClass α ℂ β] :
151
+ SMulCommClass α Circle β := Submonoid.smulCommClass_right _
152
+
153
+ instance instIsScalarTower [SMul ℂ α] [SMul ℂ β] [SMul α β] [IsScalarTower ℂ α β] :
154
+ IsScalarTower Circle α β := Submonoid.isScalarTower _
155
+
156
+ instance instMulAction [MulAction ℂ α] : MulAction Circle α := Submonoid.mulAction _
157
+
158
+ instance instDistribMulAction [AddMonoid M] [DistribMulAction ℂ M] :
159
+ DistribMulAction Circle M := Submonoid.distribMulAction _
160
+
161
+ lemma smul_def [SMul ℂ α] (z : Circle) (a : α) : z • a = (z : ℂ) • a := rfl
162
+
163
+ instance instContinuousSMul [TopologicalSpace α] [MulAction ℂ α] [ContinuousSMul ℂ α] :
164
+ ContinuousSMul Circle α := Submonoid.continuousSMul
137
165
138
166
@[simp]
139
- lemma norm_circle_smul {E : Type *} [SeminormedAddCommGroup E] [NormedSpace ℂ E]
140
- (u : circle ) (v : E) :
167
+ protected lemma norm_smul {E : Type *} [SeminormedAddCommGroup E] [NormedSpace ℂ E]
168
+ (u : Circle ) (v : E) :
141
169
‖u • v‖ = ‖v‖ := by
142
170
rw [Submonoid.smul_def, norm_smul, norm_eq_of_mem_sphere, one_mul]
171
+
172
+ @[deprecated (since := "2024-07-24")] noncomputable alias _root_.expMapCircle := exp
173
+ @[deprecated (since := "2024-07-24")] noncomputable alias _root_.expMapCircle_apply := exp_apply
174
+ @[deprecated (since := "2024-07-24")] noncomputable alias _root_.expMapCircle_zero := exp_zero
175
+ @[deprecated (since := "2024-07-24")] noncomputable alias _root_.expMapCircle_sub := exp_sub
176
+ @[deprecated (since := "2024-07-24")] noncomputable alias _root_.norm_circle_smul :=
177
+ Circle.norm_smul
178
+
179
+ end Circle
0 commit comments