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(topology, analysis) : add lemmas about has_neg.neg (preliminaries for L'Hopital's rule) #3392

Closed
wants to merge 18 commits into from

Conversation

ADedecker
Copy link
Member

@ADedecker ADedecker commented Jul 13, 2020

This PR contains a few lemmas about the has_neg.neg function, such as :

  • its limit along at_top and at_bot
  • its limit along nhds a, nhds_within a (Ioi a) and similar filters
  • its differentiability and derivative

This is a small part of the preliminaries for proving L'Hopital's rule. I am still working on it, but I thought I'd start PR-ing small parts already. The whole discussion is at https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/L'Hopital's.20rule/near/203526328

A small comment about naming : in most of the library, concept.neg describes how negating a function acts on its interaction with the concept, whereas concept_neg describes the way the has_neg.neg function interacts with the concept (this is the same for inv btw).

But that isn't the case for deriv and deriv_within so I ended up creating deriv_neg2 and deriv_within_neg2 (yes that's awful). What do you think about that ?

@ADedecker ADedecker added the awaiting-review The author would like community review of the PR label Jul 13, 2020
src/topology/algebra/ordered.lean Outdated Show resolved Hide resolved
src/topology/algebra/ordered.lean Outdated Show resolved Hide resolved
src/topology/algebra/ordered.lean Outdated Show resolved Hide resolved
src/order/filter/at_top_bot.lean Outdated Show resolved Hide resolved
@urkud
Copy link
Member

urkud commented Jul 15, 2020

I golfed some proofs and removed tendsto_inv_nhds, use continuous_inv.tendsto instead.

@ADedecker
Copy link
Member Author

I golfed some proofs and removed tendsto_inv_nhds, use continuous_inv.tendsto instead.

Out of curiosity, is there a way to make an alias for this ? It would be easier to guess the name

@urkud
Copy link
Member

urkud commented Jul 15, 2020

I golfed some proofs and removed tendsto_inv_nhds, use continuous_inv.tendsto instead.

Out of curiosity, is there a way to make an alias for this ? It would be easier to guess the name

@PatrickMassot @sgouezel What do you think about this? Should we have tendsto_inv as a separate lemma or use tendsto_id.inv/continuous_inv.tendsto?

@sgouezel
Copy link
Collaborator

For coherence and least surprise for newcomers, I think tendsto_inv can not be bad, so I'm willing to add it.

@urkud
Copy link
Member

urkud commented Jul 15, 2020

Should we rename the normed_field version to tendsto_inv'?

@ADedecker
Copy link
Member Author

Since you added tendsto_at_bot I just added tendsto_at_bot', which corresponds to tendsto_at_top'

@PatrickMassot
Copy link
Member

I don't mind having a couple more aliases.

@semorrison semorrison 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 Jul 17, 2020
@ADedecker
Copy link
Member Author

Hmm unless I missed something, I think I added the requested changes 🤔 Do I misunderstand the way we use labels @semorrison ?

@bryangingechen
Copy link
Collaborator

@semorrison might have added the label since there are unresolved comments above – if those are all resolved, please click the "resolve" button beneath them to make it easier for reviewers to see what remains to be done.

@ADedecker
Copy link
Member Author

Thanks a lot, I didn't knew that @bryangingechen ! i'm not used to GitHub yes, so I'll keep that in mind

@bryangingechen bryangingechen 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 17, 2020
@ADedecker
Copy link
Member Author

I did a few other silly mistakes in my last commit, I'm correcting them right now

@@ -619,7 +619,7 @@ begin
rwa [dist_comm, dist_eq_norm, add_sub_cancel'],
end

lemma tendsto_inv [normed_field α] {r : α} (r0 : r ≠ 0) : tendsto (λq, q⁻¹) (𝓝 r) (𝓝 r⁻¹) :=
lemma tendsto_inv' [normed_field α] {r : α} (r0 : r ≠ 0) : tendsto (λq, q⁻¹) (𝓝 r) (𝓝 r⁻¹) :=
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you need to add a ' on this lemma and the next one, they are in the normed_field namespace so they wouldn't clash with anything else

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, and I guess it's the same for continuous_on_inv ?

src/topology/algebra/group.lean Outdated Show resolved Hide resolved
@sgouezel sgouezel 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 Jul 17, 2020
@@ -1944,3 +1944,23 @@ lemma tendsto_of_monotone {ι α : Type*} [preorder ι] [topological_space α]
tendsto f at_top at_top ∨ (∃ l, tendsto f at_top (𝓝 l)) :=
if H : bdd_above (range f) then or.inr ⟨_, tendsto_at_top_csupr h_mono H⟩
else or.inl $ tendsto_at_top_at_top_of_monotone' h_mono H

lemma tendsto_neg_nhds_within_Ioi {α : Type*} [ordered_add_comm_group α]
Copy link
Member

Choose a reason for hiding this comment

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

@jcommelin Should we have a multiplicative version of this? I don't know if we're going to have any topological ordered_comm_groups.

Copy link
Member

Choose a reason for hiding this comment

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

If yes, then @[to_additive] should be able to transfer this lemma from multiplicative to additive.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't cost anything, so I made it anyway

@urkud
Copy link
Member

urkud commented Jul 19, 2020

Feel free to merge either as is, or with multiplicative version of various lemmas (and @[to_additive] creating additive versions for you).
bors d+

@bors
Copy link

bors bot commented Jul 19, 2020

✌️ 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.

@urkud urkud removed the awaiting-author A reviewer has asked the author a question or requested changes label Jul 19, 2020
@urkud
Copy link
Member

urkud commented Jul 19, 2020

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 Jul 19, 2020
bors bot pushed a commit that referenced this pull request Jul 19, 2020
…ies for L'Hopital's rule) (#3392)

This PR contains a few lemmas about the `has_neg.neg` function, such as : 
- its limit along `at_top` and `at_bot`
- its limit along `nhds a`, `nhds_within a (Ioi a)` and similar filters
- its differentiability and derivative



Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Co-authored-by: Anatole Dedecker <48656793+ADedecker@users.noreply.github.com>
@bors
Copy link

bors bot commented Jul 19, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(topology, analysis) : add lemmas about has_neg.neg (preliminaries for L'Hopital's rule) [Merged by Bors] - feat(topology, analysis) : add lemmas about has_neg.neg (preliminaries for L'Hopital's rule) Jul 19, 2020
@bors bors bot closed this Jul 19, 2020
@bors bors bot deleted the neg_limit_deriv branch July 19, 2020 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants