Skip to content
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

metric namespace #568

Closed

Conversation

sgouezel
Copy link
Collaborator

@sgouezel sgouezel commented Jan 3, 2019

Currently, all the notions about metric spaces are in the root namespace, contrary to essentially everything else in mathlib. This PR adds a metric namespace, puts the notions related to metric spaces in it, and opens it where necessary.

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

For reviewers: code review check list

@PatrickMassot PatrickMassot mentioned this pull request Jan 5, 2019
@johoelzl
Copy link
Collaborator

See https://github.com/leanprover-community/mathlib/tree/metric_namespace as an alternative way

(there is a short Zulip discussion)

@sgouezel
Copy link
Collaborator Author

I have added Mario's proposition to the PR. It looks like a reasonable middle ground, putting in dedicated namespaces the notions that could conflict with notions in other fields, but keeping in the root namespace notions that are directly defined in terms of dist.

@@ -340,11 +340,14 @@ begin
have limg' : tendsto (λ x, ∥g x∥) e (nhds ∥b∥) := filter.tendsto.comp limg (continuous_iff_tendsto.1 continuous_norm _),

have lim1 : tendsto (λ x, ∥f x - s∥ * ∥g x∥) e (nhds 0),
by simpa using tendsto_mul limf' limg',
{ have := tendsto_mul limf' limg',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh, this is not good. Why is this necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to a better version suggested by P. Massot.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rwbarton for the reference. I hope with the simpa-change we can remove these changes here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. I confirm that with the simpa version proposed by @rwbarton, the change is not needed any more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I will merge @rwbarton s simpa-change and then this PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just opened a PR with the changes to simpa (including doc changes).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too late, I already pushed :-)

have limg3 := tendsto_iff_norm_tendsto_zero.1 limg,
have lim2 : tendsto (λ x, ∥s∥ * ∥g x - b∥) e (nhds 0),
by simpa using tendsto_mul tendsto_const_nhds limg3,

{ have := tendsto_mul tendsto_const_nhds limg3,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@johoelzl
Copy link
Collaborator

merged in 49c059a

@johoelzl johoelzl closed this Jan 14, 2019
@johoelzl
Copy link
Collaborator

Thanks @sgouezel for this change!

@sgouezel sgouezel deleted the metric_namespace branch January 17, 2019 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants