@@ -101,56 +101,40 @@ from the edistance (which is equal to it, but not defeq). See Note [forgetful in
101
101
explaining why having definitionally the right uniformity is often important.
102
102
-/
103
103
104
- variables [Π i, emetric_space (α i)] [Π i, pseudo_emetric_space (β i)] [fintype ι]
104
+ variables [Π i, pseudo_metric_space (α i)] [Π i, pseudo_emetric_space (β i)] [fintype ι]
105
+
105
106
include fact_one_le_p
106
107
108
+ private lemma pos : 0 < p := zero_lt_one.trans_le fact_one_le_p.out
109
+
107
110
/-- Endowing the space `pi_Lp p β` with the `L^p` pseudoedistance. This definition is not
108
111
satisfactory, as it does not register the fact that the topology and the uniform structure coincide
109
112
with the product one. Therefore, we do not register it as an instance. Using this as a temporary
110
113
pseudoemetric space instance, we will show that the uniform structure is equal (but not defeq) to
111
114
the product one, and then register an instance in which we replace the uniform structure by the
112
115
product one using this pseudoemetric space and `pseudo_emetric_space.replace_uniformity`. -/
113
116
def pseudo_emetric_aux : pseudo_emetric_space (pi_Lp p β) :=
114
- have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
115
117
{ edist := λ f g, (∑ i, edist (f i) (g i) ^ p) ^ (1 /p),
116
- edist_self := λ f, by simp [edist, ennreal.zero_rpow_of_pos pos,
117
- ennreal.zero_rpow_of_pos (inv_pos.2 pos)],
118
+ edist_self := λ f, by simp [edist, ennreal.zero_rpow_of_pos ( pos p) ,
119
+ ennreal.zero_rpow_of_pos (inv_pos.2 $ pos p )],
118
120
edist_comm := λ f g, by simp [edist, edist_comm],
119
121
edist_triangle := λ f g h, calc
120
122
(∑ i, edist (f i) (h i) ^ p) ^ (1 / p) ≤
121
123
(∑ i, (edist (f i) (g i) + edist (g i) (h i)) ^ p) ^ (1 / p) :
122
124
begin
123
- apply ennreal.rpow_le_rpow _ (one_div_nonneg.2 $ le_of_lt pos),
125
+ apply ennreal.rpow_le_rpow _ (one_div_nonneg.2 ( pos p).le ),
124
126
refine finset.sum_le_sum (λ i hi, _),
125
- exact ennreal.rpow_le_rpow (edist_triangle _ _ _) (le_trans zero_le_one fact_one_le_p.out)
127
+ exact ennreal.rpow_le_rpow (edist_triangle _ _ _) (pos p).le
126
128
end
127
129
... ≤
128
130
(∑ i, edist (f i) (g i) ^ p) ^ (1 / p) + (∑ i, edist (g i) (h i) ^ p) ^ (1 / p) :
129
131
ennreal.Lp_add_le _ _ _ fact_one_le_p.out }
130
132
131
- /-- Endowing the space `pi_Lp p α` with the `L^p` edistance. This definition is not satisfactory,
132
- as it does not register the fact that the topology and the uniform structure coincide with the
133
- product one. Therefore, we do not register it as an instance. Using this as a temporary emetric
134
- space instance, we will show that the uniform structure is equal (but not defeq) to the product
135
- one, and then register an instance in which we replace the uniform structure by the product one
136
- using this emetric space and `emetric_space.replace_uniformity`. -/
137
- def emetric_aux : emetric_space (pi_Lp p α) :=
138
- { eq_of_edist_eq_zero := λ f g hfg,
139
- begin
140
- have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
141
- letI h := pseudo_emetric_aux p α,
142
- have h : edist f g = (∑ i, (edist (f i) (g i)) ^ p) ^ (1 /p) := rfl,
143
- simp [h, ennreal.rpow_eq_zero_iff, pos, asymm pos, finset.sum_eq_zero_iff_of_nonneg] at hfg,
144
- exact funext hfg
145
- end ,
146
- ..pseudo_emetric_aux p α }
147
-
148
- local attribute [instance] pi_Lp.emetric_aux pi_Lp.pseudo_emetric_aux
133
+ local attribute [instance] pi_Lp.pseudo_emetric_aux
149
134
150
- lemma lipschitz_with_equiv : lipschitz_with 1 (pi_Lp.equiv p β) :=
135
+ lemma lipschitz_with_equiv_aux : lipschitz_with 1 (pi_Lp.equiv p β) :=
151
136
begin
152
- have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
153
- have cancel : p * (1 /p) = 1 := mul_div_cancel' 1 (ne_of_gt pos),
137
+ have cancel : p * (1 /p) = 1 := mul_div_cancel' 1 (pos p).ne',
154
138
assume x y,
155
139
simp only [edist, forall_prop_of_true, one_mul, finset.mem_univ, finset.sup_le_iff,
156
140
ennreal.coe_one],
@@ -160,12 +144,12 @@ begin
160
144
by simp [← ennreal.rpow_mul, cancel, -one_div]
161
145
... ≤ (∑ i, edist (x i) (y i) ^ p) ^ (1 / p) :
162
146
begin
163
- apply ennreal.rpow_le_rpow _ (one_div_nonneg.2 $ le_of_lt pos),
147
+ apply ennreal.rpow_le_rpow _ (one_div_nonneg.2 $ ( pos p).le ),
164
148
exact finset.single_le_sum (λ i hi, (bot_le : (0 : ℝ≥0 ∞) ≤ _)) (finset.mem_univ i)
165
149
end
166
150
end
167
151
168
- lemma antilipschitz_with_equiv :
152
+ lemma antilipschitz_with_equiv_aux :
169
153
antilipschitz_with ((fintype.card ι : ℝ≥0 ) ^ (1 /p)) (pi_Lp.equiv p β) :=
170
154
begin
171
155
have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
@@ -196,8 +180,8 @@ lemma aux_uniformity_eq :
196
180
𝓤 (pi_Lp p β) = @uniformity _ (Pi.uniform_space _) :=
197
181
begin
198
182
have A : uniform_inducing (pi_Lp.equiv p β) :=
199
- (antilipschitz_with_equiv p β).uniform_inducing
200
- (lipschitz_with_equiv p β).uniform_continuous,
183
+ (antilipschitz_with_equiv_aux p β).uniform_inducing
184
+ (lipschitz_with_equiv_aux p β).uniform_continuous,
201
185
have : (λ (x : pi_Lp p β × pi_Lp p β),
202
186
((pi_Lp.equiv p β) x.fst, (pi_Lp.equiv p β) x.snd)) = id,
203
187
by ext i; refl,
@@ -222,49 +206,30 @@ instance [Π i, pseudo_emetric_space (β i)] : pseudo_emetric_space (pi_Lp p β)
222
206
/-- emetric space instance on the product of finitely many emetric spaces, using the `L^p`
223
207
edistance, and having as uniformity the product uniformity. -/
224
208
instance [Π i, emetric_space (α i)] : emetric_space (pi_Lp p α) :=
225
- (emetric_aux p α).replace_uniformity (aux_uniformity_eq p α).symm
209
+ @emetric.of_t0_pseudo_emetric_space _ _ $
210
+ -- TODO: add `Pi.t0_space`
211
+ by { haveI : t2_space (pi_Lp p α) := Pi.t2_space, apply_instance }
226
212
227
- omit fact_one_le_p
228
- lemma edist_eq {p : ℝ} [fact (1 ≤ p)] {β : ι → Type *}
229
- [Π i, pseudo_emetric_space (β i)] (x y : pi_Lp p β) :
213
+ variables {p β}
214
+ lemma edist_eq [Π i, pseudo_emetric_space (β i)] (x y : pi_Lp p β) :
230
215
edist x y = (∑ i, edist (x i) (y i) ^ p) ^ (1 /p) := rfl
231
- include fact_one_le_p
216
+ variables (p β)
232
217
233
218
/-- pseudometric space instance on the product of finitely many psuedometric spaces, using the
234
219
`L^p` distance, and having as uniformity the product uniformity. -/
235
220
instance [Π i, pseudo_metric_space (β i)] : pseudo_metric_space (pi_Lp p β) :=
236
- begin
237
- /- we construct the instance from the pseudo emetric space instance to avoid checking again that
238
- the uniformity is the same as the product uniformity, but we register nevertheless a nice formula
239
- for the distance -/
240
- have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
241
- refine pseudo_emetric_space.to_pseudo_metric_space_of_dist
242
- (λf g, (∑ i, dist (f i) (g i) ^ p) ^ (1 /p)) (λ f g, _) (λ f g, _),
243
- { simp [pi_Lp.edist_eq, ennreal.rpow_eq_top_iff, asymm pos, pos,
244
- ennreal.sum_eq_top_iff, edist_ne_top] },
245
- { have A : ∀ (i : ι), i ∈ (finset.univ : finset ι) → edist (f i) (g i) ^ p ≠ ⊤ :=
246
- λ i hi, by simp [lt_top_iff_ne_top, edist_ne_top, le_of_lt pos],
247
- simp [dist, -one_div, pi_Lp.edist_eq, ← ennreal.to_real_rpow,
248
- ennreal.to_real_sum A, dist_edist] }
249
- end
221
+ pseudo_emetric_space.to_pseudo_metric_space_of_dist
222
+ (λ f g, (∑ i, dist (f i) (g i) ^ p) ^ (1 /p))
223
+ (λ f g, ennreal.rpow_ne_top_of_nonneg (one_div_nonneg.2 (pos p).le) $ ne_of_lt $
224
+ (ennreal.sum_lt_top $ λ i hi, ennreal.rpow_ne_top_of_nonneg (pos p).le (edist_ne_top _ _)))
225
+ (λ f g,
226
+ have A : ∀ i, edist (f i) (g i) ^ p ≠ ⊤,
227
+ from λ i, ennreal.rpow_ne_top_of_nonneg (pos p).le (edist_ne_top _ _),
228
+ by simp only [edist_eq, dist_edist, ennreal.to_real_rpow, ← ennreal.to_real_sum (λ i _, A i)])
250
229
251
230
/-- metric space instance on the product of finitely many metric spaces, using the `L^p` distance,
252
231
and having as uniformity the product uniformity. -/
253
- instance [Π i, metric_space (α i)] : metric_space (pi_Lp p α) :=
254
- begin
255
- /- we construct the instance from the emetric space instance to avoid checking again that the
256
- uniformity is the same as the product uniformity, but we register nevertheless a nice formula
257
- for the distance -/
258
- have pos : 0 < p := lt_of_lt_of_le zero_lt_one fact_one_le_p.out,
259
- refine emetric_space.to_metric_space_of_dist
260
- (λf g, (∑ i, dist (f i) (g i) ^ p) ^ (1 /p)) (λ f g, _) (λ f g, _),
261
- { simp [pi_Lp.edist_eq, ennreal.rpow_eq_top_iff, asymm pos, pos,
262
- ennreal.sum_eq_top_iff, edist_ne_top] },
263
- { have A : ∀ (i : ι), i ∈ (finset.univ : finset ι) → edist (f i) (g i) ^ p ≠ ⊤ :=
264
- λ i hi, by simp [edist_ne_top, pos.le],
265
- simp [dist, -one_div, pi_Lp.edist_eq, ← ennreal.to_real_rpow,
266
- ennreal.to_real_sum A, dist_edist] }
267
- end
232
+ instance [Π i, metric_space (α i)] : metric_space (pi_Lp p α) := metric.of_t0_pseudo_metric_space _
268
233
269
234
omit fact_one_le_p
270
235
lemma dist_eq {p : ℝ} [fact (1 ≤ p)] {β : ι → Type *}
@@ -278,6 +243,14 @@ subtype.ext $ by { push_cast, exact dist_eq _ _ }
278
243
279
244
include fact_one_le_p
280
245
246
+ lemma lipschitz_with_equiv [Π i, pseudo_emetric_space (β i)] :
247
+ lipschitz_with 1 (pi_Lp.equiv p β) :=
248
+ lipschitz_with_equiv_aux p β
249
+
250
+ lemma antilipschitz_with_equiv [Π i, pseudo_emetric_space (β i)] :
251
+ antilipschitz_with ((fintype.card ι : ℝ≥0 ) ^ (1 /p)) (pi_Lp.equiv p β) :=
252
+ antilipschitz_with_equiv_aux p β
253
+
281
254
/-- seminormed group instance on the product of finitely many normed groups, using the `L^p`
282
255
norm. -/
283
256
instance semi_normed_group [Π i, semi_normed_group (β i)] : semi_normed_group (pi_Lp p β) :=
0 commit comments