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

Glueing metric spaces #695

Merged
merged 2 commits into from Feb 12, 2019
Merged

Conversation

sgouezel
Copy link
Collaborator

@sgouezel sgouezel commented Feb 7, 2019

Glueing metric spaces along isometric or almost isometric subsets. The metric structure on disjoint unions in metric_space/basic.lean is a particular case of this, so we move it from this file to the new file.

@rwbarton
Copy link
Collaborator

rwbarton commented Feb 8, 2019

So for example, if I tried to form the "line with two origins" by gluing two copies of R along the subset R - {0}, the two copies of 0 would get identified when passing to the metric space quotient so I just end up with R again, right? That is the underlying set of the glued space may not be the pushout of the original underlying sets and maps.

I'm trying to think whether it makes sense to generalize any part of this to another setting, e.g., gluing sets, but it seems not to make sense, for this reason. (Which is fine, and simplifies matters in some sense.)

@sgouezel
Copy link
Collaborator Author

sgouezel commented Feb 8, 2019

Yes, if you want to glue metric spaces it has to be this way. For another example, if you take two copies of R and glue them along Q \cap (0,1), then in fact all the points in the closure of Q \cap (0,1) will be glued, i.e., you obtain two copies of R glued along [0,1], i.e., a tree.

@avigad
Copy link
Collaborator

avigad commented Feb 10, 2019

This looks good to me. @rwbarton Do you have any objection to merging it?

Copy link
Collaborator

@rwbarton rwbarton left a comment

Choose a reason for hiding this comment

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

Just some minor comments.

I think "gluing" is the more standard spelling.

It would be nice to avoid repeating some similar proofs 2 or 4 times, but I don't have any concrete suggestions...

local attribute [instance] metric_space_sum

lemma sum.dist_eq {x y : α ⊕ β} :
dist x y = sum.dist x y := rfl
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be one line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

have : 0 ≤ infi (λp, dist x (Φ p) + dist y (Ψ p)) :=
le_cinfi (λp, by simpa using add_le_add (@dist_nonneg _ _ x _) (@dist_nonneg _ _ y _)),
have : 0 + ε ≤ glue_dist Φ Ψ ε (inl x) (inr y) := add_le_add this (le_refl ε),
have : false, by linarith,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe exfalso, linarith to finish the proof would be a bit more idiomatic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@sgouezel
Copy link
Collaborator Author

Renamed to gluing

@rwbarton rwbarton merged commit d1ef181 into leanprover-community:master Feb 12, 2019
@sgouezel sgouezel deleted the metric_glueing branch March 25, 2019 07:56
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

3 participants