-
Notifications
You must be signed in to change notification settings - Fork 259
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors d+
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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 α] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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..
✌️ ADedecker can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
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.
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. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Cauchy
under operations on UniformSpace
Cauchy
under operations on UniformSpace
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.