Skip to content

[Merged by Bors] - feat(MetricSpace/Ultra): IsUltrametricDist and basic facts on open/closed sets in such spaces#14433

Closed
pechersky wants to merge 8 commits intomasterfrom
pechersky/ultrametric-space
Closed

[Merged by Bors] - feat(MetricSpace/Ultra): IsUltrametricDist and basic facts on open/closed sets in such spaces#14433
pechersky wants to merge 8 commits intomasterfrom
pechersky/ultrametric-space

Conversation

@pechersky
Copy link
Copy Markdown
Contributor

TODO in future PRs

  • add "all triangles are isosceles" in such normed spaces
  • totally disconnected space
  • give instances of this to Z_p, Q_p, etc

Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 5, 2024

PR summary 00154257b5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Topology.MetricSpace.Ultra.Basic 858

Declarations diff

+ IsUltrametricDist
+ ball_eq_of_mem
+ ball_eq_or_disjoint
+ ball_subset_trichotomy
+ closedBall_eq_of_mem
+ closedBall_eq_or_disjoint
+ closedBall_subset_trichotomy
+ dist_triangle_max
+ frontier_ball_eq_empty
+ frontier_closedBall_eq_empty
+ isClopen_ball
+ isClopen_closedBall
+ isClopen_sphere
+ isClosed_ball
+ isOpen_closedBall
+ isOpen_sphere
+ mem_ball_iff
+ mem_closedBall_iff

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

@j-loreaux j-loreaux added the t-topology Topological spaces, uniform spaces, metric spaces, filters label Jul 16, 2024
@j-loreaux j-loreaux self-assigned this Jul 16, 2024
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Thanks! I think there are some easy simplifications that can be made. I'll have another look when you think it's ready again.

@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 16, 2024
pechersky and others added 2 commits July 16, 2024 20:50
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 17, 2024
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Sorry for missing the point of the trichotomy lemmas earlier. Here they are again with short proofs. You are welcome to add them back in.

lemma ball_subset_trichotomy :
    ball x r ⊆ ball y s ∨ ball y s ⊆ ball x r ∨ Disjoint (ball x r) (ball y s) := by
  wlog hrs : r ≤ s generalizing x y r s
  · rw [disjoint_comm, ← or_assoc, or_comm (b := _ ⊆ _), or_assoc]
    exact this y x s r (lt_of_not_le hrs).le
  · refine Set.disjoint_or_nonempty_inter (ball x r) (ball y s) |>.symm.imp (fun h ↦ ?_) (Or.inr ·)
    obtain ⟨hxz, hyz⟩ := (Set.mem_inter_iff _ _ _).mp h.some_mem
    have hx := ball_subset_ball hrs (x := x)
    rwa [ball_eq_of_mem hyz |>.trans (ball_eq_of_mem <| hx hxz).symm]

lemma closedBall_subset_trichotomy :
    closedBall x r ⊆ closedBall y s ∨ closedBall y s ⊆ closedBall x r ∨
    Disjoint (closedBall x r) (closedBall y s) := by
  wlog hrs : r ≤ s generalizing x y r s
  · rw [disjoint_comm, ← or_assoc, or_comm (b := _ ⊆ _), or_assoc]
    exact this y x s r (lt_of_not_le hrs).le
  · refine Set.disjoint_or_nonempty_inter (closedBall x r) (closedBall y s) |>.symm.imp
      (fun h ↦ ?_) (Or.inr ·)
    obtain ⟨hxz, hyz⟩ := (Set.mem_inter_iff _ _ _).mp h.some_mem
    have hx := closedBall_subset_closedBall hrs (x := x)
    rwa [closedBall_eq_of_mem hyz |>.trans (closedBall_eq_of_mem <| hx hxz).symm]

@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 17, 2024
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 17, 2024
@j-loreaux
Copy link
Copy Markdown
Contributor

up to potentially reordering lemmas to make things match better, I'm happy. If you want to reorder go for it, but it's not required.

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 17, 2024

✌️ pechersky can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jul 17, 2024
@pechersky
Copy link
Copy Markdown
Contributor Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Jul 18, 2024
…osed sets in such spaces (#14433)

TODO in future PRs
- add "all triangles are isosceles" in such normed spaces
- totally disconnected space
- give instances of this to Z_p, Q_p, etc



Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 18, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(MetricSpace/Ultra): IsUltrametricDist and basic facts on open/closed sets in such spaces [Merged by Bors] - feat(MetricSpace/Ultra): IsUltrametricDist and basic facts on open/closed sets in such spaces Jul 18, 2024
@mathlib-bors mathlib-bors bot closed this Jul 18, 2024
@mathlib-bors mathlib-bors bot deleted the pechersky/ultrametric-space branch July 18, 2024 15:27
@adomani adomani mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants