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(analysis/special_functions/{log, pow}): add log_base #11246

Closed
wants to merge 32 commits into from

Conversation

BoltonBailey
Copy link
Collaborator

@BoltonBailey BoltonBailey commented Jan 4, 2022

Adds real.logb, the log base b of x, defined as log x / log b. Proves that this is related to real.rpow.


Open in Gitpod

@BoltonBailey BoltonBailey added the awaiting-review The author would like community review of the PR label Jan 5, 2022
@urkud urkud 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 Jan 5, 2022
@BoltonBailey BoltonBailey added awaiting-CI The author would like to see what CI has to say before doing more work. and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 6, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jan 6, 2022
@BoltonBailey BoltonBailey added the awaiting-review The author would like community review of the PR label Jan 8, 2022
@BoltonBailey
Copy link
Collaborator Author

BoltonBailey commented Jan 8, 2022

I'm willing to hear comments on how to handle the proliferation of one_lt_b everywhere in the file. Should I prove these lemmas for 0 < b < 1 as well? If so, how should I name all these lemmas? Should I write simp lemmas of the form log b x < log b y \iff <some expression on inequalities>? My thinking is the-1 < b < 0 and b < -1 ranges are probably not worth the time to write them all.

@BoltonBailey BoltonBailey 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 Jan 13, 2022
@BoltonBailey
Copy link
Collaborator Author

I've opened a discussion on the naming of this new function on Zulip

@BoltonBailey BoltonBailey added awaiting-review The author would like community review of the PR and removed awaiting-review The author would like community review of the PR labels Jan 17, 2022
@dupuisf
Copy link
Collaborator

dupuisf commented Jan 26, 2022

Regarding the one_lt_b issue, I think a good way to deal with it would be via the typeclass system, as is done in docs#pi_Lp (see how fact_one_le_p is used in that file).

@jcommelin jcommelin 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 Jan 31, 2022
@BoltonBailey
Copy link
Collaborator Author

@dupuisf Do you like this better than the suggestion from Zulip of using include without involving the typeclass system? I prefer not using it, since fact confuses me, and my understanding is that it should only be used when you actually need to infer another typeclass from it (such as inferring field from fact p.prime). Also, it seems like when I make this change all the lemma proofs get longer.

For example
by rw [←rpow_le_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one hb) hx]
becomes
by {rw [←rpow_le_rpow_left_iff hb.out, rpow_logb (b_pos) (b_ne_one) hx], assumption, assumption, }

Also, presumably this way if someone calls library_search for one of these lemmas with the vanilla argument, it won't be found.

@dupuisf
Copy link
Collaborator

dupuisf commented Jan 31, 2022

I don't have a particular preference for that solution, I thought it was an idea that could be tried out. So if you've tried it out and it's not great, let's just stick with the current version.

bors d+

@bors
Copy link

bors bot commented Jan 31, 2022

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

@github-actions github-actions bot added the delegated The PR author may merge after reviewing final suggestions. label Jan 31, 2022
@BoltonBailey
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 1, 2022
Adds `real.logb`, the log base `b` of `x`, defined as `log x / log b`. Proves that this is related to `real.rpow`.
@bors
Copy link

bors bot commented Feb 1, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(analysis/special_functions/{log, pow}): add log_base [Merged by Bors] - feat(analysis/special_functions/{log, pow}): add log_base Feb 1, 2022
@bors bors bot closed this Feb 1, 2022
@bors bors bot deleted the BoltonBailey/log_base branch February 1, 2022 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants