Skip to content

refactor: golf 100 files#37968

Open
yuanyi-350 wants to merge 19 commits intoleanprover-community:masterfrom
yuanyi-350:golf
Open

refactor: golf 100 files#37968
yuanyi-350 wants to merge 19 commits intoleanprover-community:masterfrom
yuanyi-350:golf

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

@yuanyi-350 yuanyi-350 commented Apr 13, 2026

This PR is an experimental project. In this PR, we use an Agent to automatically scan and attempt to simplify proofs. We hope to eventually effectively golf 100 files and avoid reinventing the wheel in mathlib.

We have chosen Mathlib/Analysis as the testing ground. There are currently 785 files in total, and we have scanned 122 so far.

If this experiment is very successful and accepted by the mathlib community, we would be honored to open source it.


Open in Gitpod

@yuanyi-350 yuanyi-350 added WIP Work in progress LLM-generated PRs with substantial input from LLMs - review accordingly labels Apr 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

PR summary 1a3500f1bf

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.


Decrease in tech debt: (relative, absolute) = (3.00, 0.00)
Current number Change Type
6453 -3 backward.isDefEq.respectTransparency

Current commit ffe171fe74
Reference commit 1a3500f1bf

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 13, 2026
@yuanyi-350 yuanyi-350 added the codex OpenAI Codex wrote (parts of) this PR. label Apr 13, 2026
@yuanyi-350 yuanyi-350 changed the title refactor: golf 100 files experiment: golf 100 files Apr 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@yuanyi-350 yuanyi-350 changed the title experiment: golf 100 files refactor: golf 100 files Apr 13, 2026
@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Apr 13, 2026
@github-actions github-actions bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Apr 13, 2026
@themathqueen
Copy link
Copy Markdown
Collaborator

I know this is marked WIP, but I just want to say that you should split this into multiple PRs when you're ready. Other golfing PRs usually golf about 5-10 results per PR (I think), so maybe aim for that?

@yuanyi-350
Copy link
Copy Markdown
Collaborator Author

I know this is marked WIP, but I just want to say that you should split this into multiple PRs when you're ready. Other golfing PRs usually golf about 5-10 results per PR (I think), so maybe aim for that?

@themathqueen , Thank you for your suggestion. We will split this into many PRs for easier maintenance. The purpose of this PR is to serve as a catalog and to demonstrate the golfing potential of mathlib4.

This reverts commit ba6196a, reversing
changes made to 8813b2a.
@mathlib-dependent-issues mathlib-dependent-issues bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 13, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

mathlib-dependent-issues bot commented Apr 13, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly t-analysis Analysis (normed *, calculus) WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants