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

[Merged by Bors] - feat: Lipschitz extensions of maps into l^infty #5107

Closed
wants to merge 16 commits into from

Conversation

chriscamano
Copy link
Collaborator

@chriscamano chriscamano commented Jun 15, 2023

A function f : α → ℓ^∞(ι, ℝ) which is K-Lipschitz on a subset s admits a K-Lipschitz extension to the whole space.

Co-authored-by: Ian Bunner 31334766+ian-bunner@users.noreply.github.com


Open in Gitpod

@chriscamano
Copy link
Collaborator Author

Closes leanprover-community/mathlib#11571

Copy link
Member

@urkud urkud left a comment

Choose a reason for hiding this comment

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

Thank you for working on this! Looks very good! I have a few minor comments. I'll checkout the branch and have a look at the main proof later tonight.

Mathlib/Topology/MetricSpace/Kuratowski.lean Outdated Show resolved Hide resolved
Mathlib/Topology/MetricSpace/Kuratowski.lean Outdated Show resolved Hide resolved
Mathlib/Topology/MetricSpace/Kuratowski.lean Outdated Show resolved Hide resolved
@chriscamano chriscamano added awaiting-review The author would like community review of the PR new-feature Add features not present in Mathlib 3 labels Jun 16, 2023
@hrmacbeth hrmacbeth linked an issue Jun 16, 2023 that may be closed by this pull request
Copy link
Collaborator

@tb65536 tb65536 left a comment

Choose a reason for hiding this comment

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

Some potential golfs/refactors:

Mathlib/Topology/MetricSpace/Kuratowski.lean Outdated Show resolved Hide resolved
Mathlib/Topology/MetricSpace/Kuratowski.lean Outdated Show resolved Hide resolved
exact lp.norm_apply_le_norm top_ne_zero (f a₀) i
-- Construct witness by bundling the function with its certificate of membership in ℓ^∞
let f_ext' : α → ℓ^∞(ι) := fun i ↦ ⟨swap g i, hf_extb i⟩
refine ⟨f_ext', ?_, ?_⟩
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you write refine' ⟨fun i ↦ ⟨swap g i, _⟩, _, _⟩, then you can move hf_extb as an extra goal from the refine.

Choose a reason for hiding this comment

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

I like the other two refactors, but I think that it is clearer if we explicitly name our witness and show how it is constructed. I think it would take longer for someone to go through the proof if they have to make the realization themself that swap g i is the desired extension. One sticking point in the proof for us was also this translation back and forth between functions from alpha to iota to R and functions from alpha to l^infty(iota, R). Here it is clear that we get from a function from alpha to iota to R to one from alpha to l^infty(iota, R) by bundling it with a certificate that it is bound. If we instead leave it as inferred and it pops up as an extra goal I think that is more confusing. Also, with no explicit mention of f_ext the term hf_extb ("hypothesis that f_ext is bounded") would have to be changed and given that I cannot think of a meaningful way to name it I think that that is strong evidence that the way the proof is structured now is fairly natural.

However, I am very new and if I've completely misunderstood this suggestion or there is a general consensus on this type of issue I'm certainly open to the change.

Now that we have replaced all mentions of f_ext with swap g i, I do think we should replace f_ext' with f_ext.

Copy link
Collaborator

@tb65536 tb65536 Jun 17, 2023

Choose a reason for hiding this comment

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

You wouldn't have to choose a new name for hf_extb, since it would just become an extra goal:

    refine' ⟨fun i ↦ ⟨swap g i, _⟩, _, _⟩
    . apply LipschitzWith.uniformly_bounded (swap g) hgl a₀
      use ‖f a₀‖
      rintro - ⟨i, rfl⟩
      simp_rw [←hgeq i ha₀_in_s]
      exact lp.norm_apply_le_norm top_ne_zero (f a₀) i
    · rw [LipschitzWith.coordinate]
      exact hgl
    · intro a hyp
      ext i
      exact (hgeq i) hyp

But I do see what you're saying about how it's nice to make it clear what the extension is, and I'm fine with keeping the current proof structure. I do like renaming f_ext' to f_ext, and using refine' rather than refine:

    let f_ext : α → ℓ^∞(ι) := fun i ↦ ⟨swap g i, hf_extb i⟩
    refine' ⟨f_ext, _, _⟩

Choose a reason for hiding this comment

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

Ah I see! Thanks for all the helpful comments!

toms golf

Co-authored-by: Thomas Browning <tb65536@users.noreply.github.com>
Co-authored-by: Thomas Browning <tb65536@users.noreply.github.com>
@PatrickMassot
Copy link
Member

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Jun 18, 2023
bors bot pushed a commit that referenced this pull request Jun 18, 2023
A function `f : α → ℓ^∞(ι, ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space.

Co-authored-by: Ian Bunner <31334766+ian-bunner@users.noreply.github.com>



Co-authored-by: Chris Camano <53490775+chriscamano@users.noreply.github.com>
@bors
Copy link

bors bot commented Jun 18, 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: Lipschitz extensions of maps into l^infty [Merged by Bors] - feat: Lipschitz extensions of maps into l^infty Jun 18, 2023
@bors bors bot closed this Jun 18, 2023
@bors bors bot deleted the chriscamano-lipschitz_ext branch June 18, 2023 01:26
alexkeizer pushed a commit that referenced this pull request Jun 22, 2023
A function `f : α → ℓ^∞(ι, ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space.

Co-authored-by: Ian Bunner <31334766+ian-bunner@users.noreply.github.com>



Co-authored-by: Chris Camano <53490775+chriscamano@users.noreply.github.com>
semorrison pushed a commit that referenced this pull request Jun 23, 2023
A function `f : α → ℓ^∞(ι, ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space.

Co-authored-by: Ian Bunner <31334766+ian-bunner@users.noreply.github.com>



Co-authored-by: Chris Camano <53490775+chriscamano@users.noreply.github.com>
semorrison pushed a commit that referenced this pull request Jun 25, 2023
A function `f : α → ℓ^∞(ι, ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space.

Co-authored-by: Ian Bunner <31334766+ian-bunner@users.noreply.github.com>



Co-authored-by: Chris Camano <53490775+chriscamano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Add features not present in Mathlib 3 ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lipschitz embeddings into ℓ^∞
8 participants