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

[Merged by Bors] - feat(topology/metric_space): diameter of pointwise zero and addition #19028

Closed
wants to merge 10 commits into from

Conversation

eric-wieser
Copy link
Member


Split from #18990 as they're orthogonal and I don't need this stuff.

Open in Gitpod

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR t-topology Topological spaces, uniform spaces, metric spaces, filters t-analysis Analysis (normed *, calculus) labels May 17, 2023
@github-actions github-actions bot added the modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. label May 17, 2023
@eric-wieser
Copy link
Member Author

There is some discussion at #18990 (comment) about proving metric.diam (x * y) ≤ metric.diam x + metric.diam y

@eric-wieser

This comment was marked as resolved.

@@ -33,6 +34,22 @@ begin
exact norm_mul_le_of_le (hRs x hx) (hRt y hy),
end

@[to_additive] lemma metric.bounded.of_mul [has_isometric_smul E E] (hst : bounded (s * t)) :
Copy link
Member

Choose a reason for hiding this comment

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

I think that we should add a lemma about set.image2 and a map which is antilipschitz in both coordinates. Also, the conclusion seems very weak. If s is nonempty, then t is bounded.

Copy link
Member

Choose a reason for hiding this comment

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

@eric-wieser what do you think of this comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe I already addressed this in the subsequent commits; but am happy to wait for @urkud to take another look

@urkud urkud added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jun 21, 2023
Comment on lines 28 to 29
-- note: we can't use `lipschitz_with.bounded_image2` here without adding `[isometric_smul E E]`
@[to_additive] lemma metric.bounded.mul (hs : bounded s) (ht : bounded t) : bounded (s * t) :=
Copy link
Member Author

Choose a reason for hiding this comment

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

@YaelDillies, any ideas on whether I can make a better generalization that does work here?

Copy link
Collaborator

@YaelDillies YaelDillies Jul 14, 2023

Choose a reason for hiding this comment

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

Yes, I believe you can instead use

lemma bounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : set α} {t : set β}
  (hf₁ : ∀ b ∈ t, lipschitz_with K₁ (λ a, f a b) s) (hf₂ : ∀ a ∈ s, lipschitz_on_with K₂ (f a) t)
  (hs : bounded s) (ht : bounded t) : bounded (set.image2 f s t) := sorry

Then you use the fact that multiplication is Lipschitz on bounded sets.

I'm not sure it results in a shorter proof, but it's at least conceptually more satisfying.

Copy link
Member Author

Choose a reason for hiding this comment

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

I generalized bounded_image2, but haven't changed this proof

Then you use the fact that multiplication is Lipschitz on bounded sets.

Where is this result?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not in mathlib :/

Should be easy though. The bound on the set turns into the Lipschitz constant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you sure this doesn't need the same [isometric_smul E E] argument that I was trying to avoid?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't forget we're in weird normed_group land not normed_add_group.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then I'm confused: Isn't isometric_smul E E always true in that context?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not without commutativity; only isometric_smul (MulOpposite E) E is true

Copy link
Collaborator

@YaelDillies YaelDillies Jul 16, 2023

Choose a reason for hiding this comment

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

Do you care about noncommutative settings?

Also doesn't that mean you can do the proof along t instead of along s (whatever that means)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you care about noncommutative settings?

No, but I don't want to un-generalize a lemma solely for the point of a golf.

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 12, 2023
@eric-wieser eric-wieser requested a review from urkud July 12, 2023 13:44
@eric-wieser eric-wieser added the not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 label Jul 15, 2023
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now!

maintainer merge

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@riccardobrasca
Copy link
Member

Modulo Yuri's comment above LGTM, thanks!

bors d+

@bors
Copy link

bors bot commented Jul 27, 2023

✌️ eric-wieser 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 delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jul 27, 2023
@urkud
Copy link
Member

urkud commented Oct 9, 2023

Thanks! 🎉
bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Oct 9, 2023
@bors
Copy link

bors bot commented Oct 9, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat(topology/metric_space): diameter of pointwise zero and addition [Merged by Bors] - feat(topology/metric_space): diameter of pointwise zero and addition Oct 9, 2023
@bors bors bot closed this Oct 9, 2023
@bors bors bot deleted the eric-wieser/diam-add branch October 9, 2023 16:56
eric-wieser added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2023
This was "feat(topology/metric_space): diameter of pointwise zero and addition"
eric-wieser added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2023
This was "feat(topology/metric_space): diameter of pointwise zero and addition"
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2023
This was "feat(topology/metric_space): diameter of pointwise zero and addition"
chenjulang added a commit to chenjulang/mathlib that referenced this pull request May 11, 2024
* commit '65a1391a0106c9204fe45bc73a039f056558cb83': (12443 commits)
  feat(data/{list,multiset,finset}/*): `attach` and `filter` lemmas (leanprover-community#18087)
  feat(combinatorics/simple_graph): More clique lemmas (leanprover-community#19203)
  feat(measure_theory/order/upper_lower): Order-connected sets in `ℝⁿ` are measurable (leanprover-community#16976)
  move old README.md to OLD_README.md
  doc: Add a warning mentioning Lean 4 to the readme (leanprover-community#19243)
  feat(topology/metric_space): diameter of pointwise zero and addition (leanprover-community#19028)
  feat(topology/algebra/order/liminf_limsup): Eventual boundedness of neighborhoods (leanprover-community#18629)
  feat(probability/independence): Independence of singletons (leanprover-community#18506)
  feat(combinatorics/set_family/ahlswede_zhang): Ahlswede-Zhang identity, part I (leanprover-community#18612)
  feat(data/finset/lattice): `sup'`/`inf'` lemmas (leanprover-community#18989)
  chore(order/liminf_limsup): Generalise and move lemmas (leanprover-community#18628)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for abelian categories (leanprover-community#17926)
  feat(data/sum/interval): The lexicographic sum of two locally finite orders is locally finite (leanprover-community#11352)
  feat(analysis/convex/proj_Icc): Extending convex functions (leanprover-community#18797)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for pseudoabelian categories (leanprover-community#17925)
  feat(measure_theory/measure/haar_quotient): the Unfolding Trick (leanprover-community#18863)
  feat(linear_algebra/orientation): add `orientation.reindex` (leanprover-community#19236)
  feat(combinatorics/quiver/covering): Definition of coverings and unique lifting of paths (leanprover-community#17828)
  feat(set_theory/game/pgame): small sets of pre-games / games / surreals are bounded (leanprover-community#15260)
  feat(tactic/positivity): Extension for `ite` (leanprover-community#17650)
  ...

# Conflicts:
#	README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
delegated The PR author may merge after reviewing final suggestions. modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-analysis Analysis (normed *, calculus) t-topology Topological spaces, uniform spaces, metric spaces, filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants