Skip to content

[Merged by Bors] - refactor(Analysis): golf Mathlib/Analysis/SpecialFunctions/Log/Monotone#38352

Closed
yuanyi-350 wants to merge 5 commits intoleanprover-community:masterfrom
yuanyi-350:A_4
Closed

[Merged by Bors] - refactor(Analysis): golf Mathlib/Analysis/SpecialFunctions/Log/Monotone#38352
yuanyi-350 wants to merge 5 commits intoleanprover-community:masterfrom
yuanyi-350:A_4

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

  • refactors Log/Monotone by extracting the repeated exp (1 / a) ≤ z to exp 1 ≤ z ^ a bound into a shared local helper
  • reuses that helper in log_div_self_rpow_antitoneOn to shorten the final call to log_div_self_antitoneOn

Extracted from #37968

Open in Gitpod

@yuanyi-350 yuanyi-350 added codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

PR summary ee3a5404e5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-analysis Analysis (normed *, calculus) label Apr 22, 2026
@yuanyi-350
Copy link
Copy Markdown
Collaborator Author

I ran a profiler comparison for the changed declarations in this PR.

Results (seconds):

  • Real.log_div_self_rpow_antitoneOn: 0.147811 -> 0.136405 (-7.72%)

Overall:

  • The changed declaration elaborates slightly faster after the refactor.

@yuanyi-350
Copy link
Copy Markdown
Collaborator Author

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Apr 22, 2026

Benchmark results for 63f8ec6 against ee3a540 are in. No significant results found. @yuanyi-350

  • 🟥 build//instructions: +7.4G (+0.00%)

No significant changes detected.

Comment thread Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean Outdated
Comment thread Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean Outdated
Comment thread Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean Outdated
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
Comment thread Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean Outdated
Copy link
Copy Markdown
Collaborator

@themathqueen themathqueen left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer merge

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by themathqueen.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 23, 2026
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Thanks!

bors merge

@mathlib-triage mathlib-triage Bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 23, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Apr 23, 2026
…one` (#38352)

- refactors `Log/Monotone` by extracting the repeated `exp (1 / a) ≤ z` to `exp 1 ≤ z ^ a` bound into a shared local helper
- reuses that helper in `log_div_self_rpow_antitoneOn` to shorten the final call to `log_div_self_antitoneOn`

Extracted from #37968

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 23, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title refactor(Analysis): golf Mathlib/Analysis/SpecialFunctions/Log/Monotone [Merged by Bors] - refactor(Analysis): golf Mathlib/Analysis/SpecialFunctions/Log/Monotone Apr 23, 2026
@mathlib-bors mathlib-bors Bot closed this Apr 23, 2026
@SnirBroshi
Copy link
Copy Markdown
Collaborator

SnirBroshi commented Apr 23, 2026

FYI this PR might be reverted by #37717 (but might not be). Do you have any suggestions, perhaps these two golfs could combine to create an even better golf?

Regardless it might be interesting as a case of an LLM and a human golfing the same theorem and arriving at the same length (ignoring the double nth_rw keyhole golf) in different ways.

@yuanyi-350 yuanyi-350 deleted the A_4 branch April 24, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants