Skip to content

chore: avoid superfluous use of push_neg with contrapose, by_contra o…#37937

Open
grunweg wants to merge 2 commits intoleanprover-community:masterfrom
grunweg:less-neg
Open

chore: avoid superfluous use of push_neg with contrapose, by_contra o…#37937
grunweg wants to merge 2 commits intoleanprover-community:masterfrom
grunweg:less-neg

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Apr 11, 2026

…r by_cases

Found by the linter in #37907.


Open in Gitpod

@grunweg grunweg added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 11, 2026
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Apr 11, 2026

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Apr 11, 2026

Benchmark results for f7917f4 against 24bf43f are in. There are no significant changes. @grunweg

  • build//instructions: -5.9G (-0.00%)

No significant changes detected.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

PR summary 00dbc4ec64

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

@JovanGerb
Copy link
Copy Markdown
Contributor

Great! That's a non-trivial amount of tactics cleaned up :). I guess most of these removals are made possible by #31510. I wonder if a similar change should be made to by_cases, namely that if the hypothesis is already a negation, it doesn't make a double negation.

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 11, 2026
Copy link
Copy Markdown
Collaborator

@wwylele wwylele left a comment

Choose a reason for hiding this comment

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

I see myself got listed in suggested reviewers, likely because I put code with a lot of contrapose! without thinking. If the new guideline is to only use it when needed, then this looks good!

@JovanGerb
Copy link
Copy Markdown
Contributor

maintainer merge

@JovanGerb
Copy link
Copy Markdown
Contributor

Oh, it seems there is a merge conflict. Does the merge conflict label not work anymore?

@github-actions
Copy link
Copy Markdown

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

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

grunweg commented Apr 13, 2026

Indeed - merged master.
CC @bryangingechen in case there's something to investigate about the merge conflict workflow. Maybe it just got stuck in the crossfire of github issues these days.

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

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants