@@ -106,7 +106,7 @@ namespace, while notions associated to metric spaces are mostly in the root name
106
106
variables [pseudo_emetric_space α]
107
107
108
108
@[priority 100 ] -- see Note [lower instance priority]
109
- instance pseudoe_emetric_space .to_uniform_space' : uniform_space α :=
109
+ instance pseudo_emetric_space .to_uniform_space' : uniform_space α :=
110
110
pseudo_emetric_space.to_uniform_space
111
111
112
112
export pseudo_emetric_space (edist_self edist_comm edist_triangle)
@@ -362,7 +362,7 @@ This is useful if one wants to construct a pseudoemetric space with a
362
362
specified uniformity. See Note [forgetful inheritance] explaining why having definitionally
363
363
the right uniformity is often important.
364
364
-/
365
- def pseudoemetric_space .replace_uniformity {α} [U : uniform_space α] (m : pseudo_emetric_space α)
365
+ def pseudo_emetric_space .replace_uniformity {α} [U : uniform_space α] (m : pseudo_emetric_space α)
366
366
(H : @uniformity _ U = @uniformity _ pseudo_emetric_space.to_uniform_space) :
367
367
pseudo_emetric_space α :=
368
368
{ edist := @edist _ m.to_has_edist,
@@ -372,8 +372,7 @@ def pseudoemetric_space.replace_uniformity {α} [U : uniform_space α] (m : pseu
372
372
to_uniform_space := U,
373
373
uniformity_edist := H.trans (@pseudo_emetric_space.uniformity_edist α _) }
374
374
375
- /-- The extended pseudometric induced by an injective function taking values in a
376
- pseudoemetric space. -/
375
+ /-- The extended pseudometric induced by a function taking values in a pseudoemetric space. -/
377
376
def pseudo_emetric_space.induced {α β} (f : α → β)
378
377
(m : pseudo_emetric_space β) : pseudo_emetric_space α :=
379
378
{ edist := λ x y, edist (f x) (f y),
@@ -403,7 +402,7 @@ theorem subtype.edist_eq {p : α → Prop} (x y : subtype p) : edist x y = edist
403
402
/-- The product of two pseudoemetric spaces, with the max distance, is an extended
404
403
pseudometric spaces. We make sure that the uniform structure thus constructed is the one
405
404
corresponding to the product of uniform spaces, to avoid diamond problems. -/
406
- instance prod.pseudoemetric_space_max [pseudo_emetric_space β] : pseudo_emetric_space (α × β) :=
405
+ instance prod.pseudo_emetric_space_max [pseudo_emetric_space β] : pseudo_emetric_space (α × β) :=
407
406
{ edist := λ x y, max (edist x.1 y.1 ) (edist x.2 y.2 ),
408
407
edist_self := λ x, by simp,
409
408
edist_comm := λ x y, by simp [edist_comm],
@@ -432,7 +431,8 @@ a pseudoemetric space.
432
431
This construction would also work for infinite products, but it would not give rise
433
432
to the product topology. Hence, we only formalize it in the good situation of finitely many
434
433
spaces. -/
435
- instance pseudoemetric_space_pi [∀b, pseudo_emetric_space (π b)] : pseudo_emetric_space (Πb, π b) :=
434
+ instance pseudo_emetric_space_pi [∀b, pseudo_emetric_space (π b)] :
435
+ pseudo_emetric_space (Πb, π b) :=
436
436
{ edist := λ f g, finset.sup univ (λb, edist (f b) (g b)),
437
437
edist_self := assume f, bot_unique $ finset.sup_le $ by simp,
438
438
edist_comm := assume f g, by unfold edist; congr; funext a; exact edist_comm _ _,
@@ -452,11 +452,11 @@ instance pseudoemetric_space_pi [∀b, pseudo_emetric_space (π b)] : pseudo_eme
452
452
simp [set.ext_iff, εpos]
453
453
end }
454
454
455
- lemma pseudoedist_pi_def [Π b, pseudo_emetric_space (π b)] (f g : Π b, π b) :
455
+ lemma pseudo_edist_pi_def [Π b, pseudo_emetric_space (π b)] (f g : Π b, π b) :
456
456
edist f g = finset.sup univ (λb, edist (f b) (g b)) := rfl
457
457
458
458
@[priority 1100 ]
459
- lemma pseudoedist_pi_const [nonempty β] (a b : α) :
459
+ lemma pseudo_edist_pi_const [nonempty β] (a b : α) :
460
460
edist (λ x : β, a) (λ _, b) = edist a b := finset.sup_const univ_nonempty (edist a b)
461
461
462
462
end pi
@@ -907,6 +907,17 @@ instance to_separated : separated_space γ :=
907
907
separated_def.2 $ λ x y h, eq_of_forall_edist_le $
908
908
λ ε ε0 , le_of_lt (h _ (edist_mem_uniformity ε0 ))
909
909
910
+ /-- If a `pseudo_emetric_space` is separated, then it is an `emetric_space`. -/
911
+ def emetric_of_t2_pseudo_emetric_space {α : Type *} [pseudo_emetric_space α]
912
+ (h : separated_space α) : emetric_space α :=
913
+ { eq_of_edist_eq_zero := λ x y hdist,
914
+ begin
915
+ refine separated_def.1 h x y (λ s hs, _),
916
+ obtain ⟨ε, hε, H⟩ := mem_uniformity_edist.1 hs,
917
+ exact H (show edist x y < ε, by rwa [hdist])
918
+ end
919
+ ..‹pseudo_emetric_space α› }
920
+
910
921
/-- Auxiliary function to replace the uniformity on an emetric space with
911
922
a uniformity which is equal to the original one, but maybe not defeq.
912
923
This is useful if one wants to construct an emetric space with a
@@ -958,7 +969,7 @@ instance prod.emetric_space_max [emetric_space β] : emetric_space (γ × β) :=
958
969
have B : x.snd = y.snd := edist_le_zero.1 h₂,
959
970
exact prod.ext_iff.2 ⟨A, B⟩
960
971
end ,
961
- ..prod.pseudoemetric_space_max }
972
+ ..prod.pseudo_emetric_space_max }
962
973
963
974
lemma prod.edist_eq [emetric_space β] (x y : α × β) :
964
975
edist x y = max (edist x.1 y.1 ) (edist x.2 y.2 ) :=
@@ -985,7 +996,7 @@ instance emetric_space_pi [∀b, emetric_space (π b)] : emetric_space (Πb, π
985
996
simp only [finset.sup_le_iff] at eq1,
986
997
exact (funext $ assume b, edist_le_zero.1 $ eq1 b $ mem_univ b),
987
998
end ,
988
- ..pseudoemetric_space_pi }
999
+ ..pseudo_emetric_space_pi }
989
1000
990
1001
lemma edist_pi_def [Π b, emetric_space (π b)] (f g : Π b, π b) :
991
1002
edist f g = finset.sup univ (λb, edist (f b) (g b)) := rfl
0 commit comments