Skip to content

refactor: golf ValueDistribution/LogCounting/Asymptotic ConstantSpeed Analytic/Within#38078

Closed
yuanyi-350 wants to merge 1 commit intoleanprover-community:masterfrom
yuanyi-350:golf_63
Closed

refactor: golf ValueDistribution/LogCounting/Asymptotic ConstantSpeed Analytic/Within#38078
yuanyi-350 wants to merge 1 commit intoleanprover-community:masterfrom
yuanyi-350:golf_63

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

This PR selectively ports file-level changes from #37968.

Included files:

  • Mathlib/Analysis/Complex/ValueDistribution/LogCounting/Asymptotic.lean
  • Mathlib/Analysis/ConstantSpeed.lean
  • Mathlib/Analysis/Analytic/Within.lean

Only these file changes are included.

No build or compile check was run intentionally.

@github-actions
Copy link
Copy Markdown

PR summary 14ec76b5f0

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.

You can run this locally as

./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 15, 2026
@yuanyi-350
Copy link
Copy Markdown
Collaborator Author

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

Results (seconds, merge-base -> PR head):

  • hasFPowerSeriesWithinOnBall_iff_exists_hasFPowerSeriesOnBall: 0.186697 -> 0.175779 (-5.85%)
  • analyticWithinAt_iff_exists_analyticAt': 0.051474 -> 0.033891 (-34.16%)
  • one_isLittleO_logCounting_single: 0.205887 -> 0.030446 (-85.21%)
  • logCounting_isBigO_one_iff_analyticOnNhd: 0.389839 -> 0.046660 (-88.03%)
  • hasConstantSpeedOnWith_zero_iff: 0.100620 -> 0.045256 (-55.02%)
  • unique_unit_speed_on_Icc_zero: 0.072857 -> 0.063438 (-12.93%)

Overall:

  • All six changed declarations were faster on the PR head than on the merge-base version.
  • The largest improvements are in Mathlib/Analysis/Complex/ValueDistribution/LogCounting/Asymptotic.lean.

Caveat:

  • These are single trace.profiler runs, using the Elab.definition.value entry from lake env lean on temporary instrumented copies of the changed files.

@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 16, 2026
@yuanyi-350 yuanyi-350 requested a review from urkud April 16, 2026 15:04
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Apr 19, 2026

Please follow the request made in the comments here and here. Thanks!

@grunweg grunweg added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 19, 2026
@yuanyi-350 yuanyi-350 closed this Apr 20, 2026
@yuanyi-350 yuanyi-350 deleted the golf_63 branch April 20, 2026 05:53
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. codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants