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: behavior of Cauchy under operations on UniformSpace #6694

Closed
wants to merge 4 commits into from

Conversation

ADedecker
Copy link
Member

Some of the lemmas are cherry-picked from leanprover-community/mathlib#17975 and will be useful for the general Arzela-Ascoli theorem, but I also filled some API holes on the way.


Open in Gitpod

@ADedecker ADedecker added awaiting-review t-topology Topological spaces, uniform spaces, metric spaces, filters labels Aug 20, 2023
Copy link
Member

@PatrickMassot PatrickMassot left a comment

Choose a reason for hiding this comment

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

bors d+

Mathlib/Topology/UniformSpace/Cauchy.lean Outdated Show resolved Hide resolved
lemma cauchy_iInf_uniformSpace' {ι : Sort*} {u : ι → UniformSpace β}
{l : Filter β} [l.NeBot] :
Cauchy (uniformSpace := ⨅ i, u i) l ↔ ∀ i, Cauchy (uniformSpace := u i) l := by
simp_rw [cauchy_of_neBot (uniformSpace := _), iInf_uniformity, le_iInf_iff]
Copy link
Member

Choose a reason for hiding this comment

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

What is this (uniformSpace := _) dark magic? Is it acting on elaboration order?

Copy link
Member Author

Choose a reason for hiding this comment

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

Without it Lean tries to guess the uniform structure by typeclass inference, so it doesn't work.

Copy link
Member Author

@ADedecker ADedecker Aug 20, 2023

Choose a reason for hiding this comment

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

have := fun i ↦ (hl i).1
simpa [cauchy_pi_iff]

instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i) where
Copy link
Member

Choose a reason for hiding this comment

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

I'm still a bit sad that we don't prove this by abstract non-sense after constructing the completion functor, but I can live with that.

@@ -20,7 +20,7 @@ open Filter TopologicalSpace Set Classical UniformSpace Function

open Classical Uniformity Topology Filter

variable {α : Type u} {β : Type v} [UniformSpace α]
variable {α : Type u} {β : Type v} [uniformSpace : UniformSpace α]
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add this name?

Copy link
Member Author

Choose a reason for hiding this comment

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

To allow for Cauchy (uniformSpace := u) instead of @Cauchy _ u, as well as the (uniformSpace := _) dark magic (instead of @s and _s). I'm not sure the benefit is very clear, but I think it is more readable.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see. Maybe we should have a general strategy about this, but in this case it clearly helps since I was able to understand the proofs without realizing this trick was needed..

@bors
Copy link

bors bot commented Aug 20, 2023

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

@ADedecker
Copy link
Member Author

bors r+

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Aug 21, 2023
bors bot pushed a commit that referenced this pull request Aug 21, 2023
Some of the lemmas are cherry-picked from leanprover-community/mathlib#17975 and will be useful for the general Arzela-Ascoli theorem, but I also filled some API holes on the way.
@bors
Copy link

bors bot commented Aug 21, 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: behavior of Cauchy under operations on UniformSpace [Merged by Bors] - feat: behavior of Cauchy under operations on UniformSpace Aug 21, 2023
@bors bors bot closed this Aug 21, 2023
@bors bors bot deleted the AD_cauchy_misc branch August 21, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-topology Topological spaces, uniform spaces, metric spaces, filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants