New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - refactor(topology/metric_space/emetric_space): add pseudo_emetric #6694
Conversation
Minor point: should the name be |
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
The doc-string on |
I made two suggestions removing duplicated proofs. Otherwise, LGTM, thank you! Onwards to |
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
I improved the docstring. I don't know about the splitting in two files... Almost everything worked for But how knows, maybe sooner or later someone will need that an extended pseudo metric space is paracompact :) |
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
bors d+ |
✌️ riccardobrasca can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
) 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.
Build failed (retrying...): |
I think linting failed on the last commit: https://github.com/leanprover-community/mathlib/runs/2117543193 Feel free to put it back on the queue when the linter is happy! |
Canceled. |
bors r+ |
) 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.
Build failed (retrying...): |
) 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.
bors r- |
Hmm, it seems I cannot stop bors... I wanted to do it because working with metric spaces I realized that there is maybe a better strategy for doing this refactor:
The advantage of this is that we will have less duplicate proofs (I believe), for example the product of two |
Pull request successfully merged into master. Build succeeded: |
I got a lot of |
You can not have both an instance from |
Ah, you're right! |
This is the natural continuation of #6694: we introduce here `pseudo_metric_space`. Note that I didn't do anything fancy, I only generalize the results that work out of the box for pseudometric spaces (quite a lot indeed). It's possible that there is some duplicate code, especially in the section about products.
) 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.
This is the natural continuation of #6694: we introduce here `pseudo_metric_space`. Note that I didn't do anything fancy, I only generalize the results that work out of the box for pseudometric spaces (quite a lot indeed). It's possible that there is some duplicate code, especially in the section about products.
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 havepremetric_space
, my plan is to change the name topseudometric_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 classpseudo_emetric_space
, generalize almost all the results aboutemetric_space
to this case (I mean, all the results that are actually true) and at the end of the file I definedemetric_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.