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

Commit 900963c

Browse files
refactor(topology/metric_space/emetric_space): add pseudo_emetric (#6694)
Working on the Liquid Tensor Experiment, we realize we need seminorms ~~pseudonorms~~ (meaning we don't require `∥x∥ = 0 → x = 0`). For this reason I would like to include seminorms, pseudometric and pseudoemetric to mathlib. (We currently have `premetric_space`, my plan is to change the name to `pseudometric_space`, that seems to be the standard terminology.) I started modifying `emetric_space` since it seems the more fundamental (looking at the structure of the imports). What I did here is to define a new class `pseudo_emetric_space`, generalize almost all the results about `emetric_space` to this case (I mean, all the results that are actually true) and at the end of the file I defined `emetric_space` and prove the remaining results. It is the first time I did a refactor like this, so I probably did something wrong, but at least it compiles on my computer. I don't know why one proof in `measure_theory/ae_eq_fun_metric.lean` stopped working, the same proof in tactic mode works.
1 parent 22eba86 commit 900963c

File tree

3 files changed

+289
-166
lines changed

3 files changed

+289
-166
lines changed

src/measure_theory/ae_eq_fun_metric.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ instance : emetric_space (α →ₘ[μ] γ) :=
5757
measure_theory.lintegral_mono (λ a, edist_triangle (f a) (g a) (h a))
5858
... = ∫⁻ a, edist (f a) (g a) ∂μ + ∫⁻ a, edist (g a) (h a) ∂μ :
5959
lintegral_add' (hf.edist hg) (hg.edist hh),
60-
eq_of_edist_eq_zero := λ f g, induction_on₂ f g $ λ f hf g hg H, mk_eq_mk.2 $
61-
((lintegral_eq_zero_iff' (hf.edist hg)).1 H).mono $ λ x, eq_of_edist_eq_zero }
60+
eq_of_edist_eq_zero := λ f g,
61+
begin
62+
exact induction_on₂ f g (λ f hf g hg H, mk_eq_mk.2 (((lintegral_eq_zero_iff'
63+
(hf.edist hg)).1 H).mono (λ x, eq_of_edist_eq_zero)))
64+
end }
6265

6366
lemma edist_mk_mk {f g : α → γ} (hf hg) :
6467
edist (mk f hf : α →ₘ[μ] γ) (mk g hg) = ∫⁻ x, edist (f x) (g x) ∂μ :=

src/topology/metric_space/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ let m : metric_space α :=
809809
eq_of_dist_eq_zero := λx y hxy,
810810
by simpa [h, ennreal.to_real_eq_zero_iff, edist_ne_top x y] using hxy,
811811
dist_self := λx, by simp [h],
812-
dist_comm := λx y, by simp [h, emetric_space.edist_comm],
812+
dist_comm := λx y, by simp [h, pseudo_emetric_space.edist_comm],
813813
dist_triangle := λx y z, begin
814814
simp only [h],
815815
rw [← ennreal.to_real_add (edist_ne_top _ _) (edist_ne_top _ _),

0 commit comments

Comments
 (0)