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

chore: avoid unnecessary change tactics #20486

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

chore: avoid unnecessary change tactics #20486

wants to merge 6 commits into from

Conversation

kim-em
Copy link
Contributor

@kim-em kim-em commented Jan 5, 2025

change is always a bit of smell, so in cases where simp can just close the goal unassisted, do that.

@kim-em
Copy link
Contributor Author

kim-em commented Jan 5, 2025

Another one thanks to @dwrensha's tryAtEachStep project.

Copy link

github-actions bot commented Jan 5, 2025

PR summary 0644c2101a

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/declarations_diff.sh <optional_commit>

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

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


Decrease in tech debt: (relative, absolute) = (3.00, 0.00)
Current number Change Type
3373 -3 porting notes

Current commit 0644c2101a
Reference commit a221dba44a

You can run this locally as

./scripts/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).

@kim-em kim-em changed the title chore: avoid unnecessary change tactics chore: avoid unnecessary change tactics Jan 5, 2025
Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

maintainer merge

Copy link

github-actions bot commented Jan 5, 2025

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

@bryangingechen
Copy link
Contributor

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 377edfc.
The entire run failed.
Found no significant differences.

@eric-wieser
Copy link
Member

eric-wieser commented Jan 5, 2025

I worry that dropping the change makes these proofs less maintainable, as if simp starts failing we've thrown away the human-written clue about the expected proof. Using suffices as I suggest above means we can keep the clue, but drop the dependence on the defeq (if that's desirable)

@kim-em
Copy link
Contributor Author

kim-em commented Jan 5, 2025

@eric-wieser, do you see other changes here which are helping readability? I'm happy to revert those or replace them with suffices.

Comment on lines -445 to -446
change e t.2 / e t.1 = e (t.2 / t.1)
rw [← map_div e t.2 t.1]
Copy link
Member

Choose a reason for hiding this comment

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

This one can probably just become exact (map_div e t.2 t.1).symm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But simp is better, no?

@TwoFX TwoFX added the awaiting-author A reviewer has asked the author a question or requested changes label Jan 6, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 8, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 11, 2025
@kim-em kim-em removed the awaiting-author A reviewer has asked the author a question or requested changes label Feb 11, 2025
@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes label Feb 15, 2025
@j-loreaux
Copy link
Collaborator

the build is failing

@kim-em kim-em removed the awaiting-author A reviewer has asked the author a question or requested changes label Feb 16, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 17, 2025
@j-loreaux
Copy link
Collaborator

Sorry, looks like there's yet another merge conflict:

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 17, 2025

✌️ kim-em 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 removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants