-
Notifications
You must be signed in to change notification settings - Fork 251
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: characterizations of IsBigO
along atTop
#6198
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.
Thanks: these will be very useful lemmas but I think worth a few tweaks.
I have suggestions for this PR that I didn't yet have the time to write down, including some proof simplification. Could you wait for them before merging? I should be able to write them in a few hours. |
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.
Sorry for the delay!
Actually I have an even better suggestion: you should add lemma exists_eventually_atTop {α : Type _} [SemilatticeSup α] [Nonempty α] {r : α → β → Prop} :
(∃ b, ∀ᶠ a in atTop, r a b) ↔ ∀ᶠ a₀ in atTop, ∃ b, ∀ a ≥ a₀, r a b := by
simp_rw [eventually_atTop, ← exists_swap (α := α)]
refine exists_congr fun a ↦ .symm <| forall_ge_iff <| Monotone.exists fun _ _ _ hb H n hn ↦
H n (hb.trans hn) Then, your proofs become: theorem isBigO_atTop_iff_dep_const {α : Type _} [SemilatticeSup α] [Nonempty α]
{f : α → E} {g : α → F} : f =O[atTop] g ↔ ∀ᶠ n₀ in atTop, ∃ c, ∀ n ≥ n₀, ‖f n‖ ≤ c * ‖g n‖ := by
rw [isBigO_iff, exists_eventually_atTop]
theorem isBigO_atTop_iff_dep_const' {α : Type _}
[SemilatticeSup α] [Nonempty α] {f : α → G} {g : α → G'} :
f =O[atTop] g ↔ ∀ᶠ n₀ in atTop, ∃ c > 0, ∀ n ≥ n₀, c * ‖f n‖ ≤ ‖g n‖ := by
simp_rw [isBigO_iff'', ← exists_prop, Subtype.exists', exists_eventually_atTop] |
Thanks a lot for the suggestions, Anatole, this is indeed much nicer! I have now implemented your last version, and changed the lemma names to what Oliver suggested. |
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.
@ocfnash I don't want to pull the trigger since I made quite heavy suggestions, would you mind having a final look?
Thank you both, this is great! bors merge |
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. |
IsBigO
along atTop
IsBigO
along atTop
This PR adds a way to characterize
IsBigO
along theatTop
filter, for cases where we want the constant to depend on a "starting point"n₀
.It also adds the lemma
tendsto_nhds_of_eventually_eq
.