feat(Logic): declare optional simprocs for commuting equality and iff#37850
Open
Vierkantor wants to merge 23 commits intoleanprover-community:masterfrom
Open
feat(Logic): declare optional simprocs for commuting equality and iff#37850Vierkantor wants to merge 23 commits intoleanprover-community:masterfrom
Vierkantor wants to merge 23 commits intoleanprover-community:masterfrom
Conversation
… so remove it from the set
This should fix the issue with `simp [field]` not firing.
This reverts commit 57f4c35.
1 task
PR summary 91b2017b29Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Logic.Basic | 58 | 61 | +3 (+5.17%) |
| Mathlib.Logic.Function.Basic | 82 | 85 | +3 (+3.66%) |
| Mathlib.Algebra.GroupWithZero.Defs | 83 | 86 | +3 (+3.61%) |
| Mathlib.Data.Set.Prod | 209 | 212 | +3 (+1.44%) |
| Mathlib.Algebra.Group.Pi.Lemmas | 232 | 235 | +3 (+1.29%) |
| Mathlib.Data.Matrix.Diagonal | 408 | 409 | +1 (+0.25%) |
| Mathlib.Data.Fin.Tuple.Sort | 566 | 567 | +1 (+0.18%) |
| Mathlib.SetTheory.Cardinal.Order | 620 | 621 | +1 (+0.16%) |
| Mathlib.CategoryTheory.Preadditive.Biproducts | 688 | 689 | +1 (+0.15%) |
| Mathlib.Algebra.Order.Antidiag.Finsupp | 697 | 698 | +1 (+0.14%) |
| Mathlib.Data.ENNReal.Operations | 720 | 721 | +1 (+0.14%) |
| Mathlib.Data.EReal.Operations | 722 | 723 | +1 (+0.14%) |
| Mathlib.SetTheory.Cardinal.Aleph | 732 | 733 | +1 (+0.14%) |
| Mathlib.SetTheory.Ordinal.Notation | 800 | 801 | +1 (+0.12%) |
| Mathlib.Algebra.Exact | 963 | 964 | +1 (+0.10%) |
| Mathlib.GroupTheory.Perm.Cycle.Basic | 992 | 993 | +1 (+0.10%) |
| Mathlib.Algebra.Polynomial.Monic | 1059 | 1060 | +1 (+0.09%) |
| Mathlib.Algebra.MvPolynomial.Nilpotent | 1373 | 1374 | +1 (+0.07%) |
| Mathlib.Analysis.Normed.Module.Multilinear.Basic | 1656 | 1657 | +1 (+0.06%) |
| Mathlib.FieldTheory.Finite.Basic | 1701 | 1702 | +1 (+0.06%) |
| Mathlib.NumberTheory.LegendreSymbol.GaussEisensteinLemmas | 1708 | 1709 | +1 (+0.06%) |
| Mathlib.FieldTheory.Finite.Polynomial | 1720 | 1721 | +1 (+0.06%) |
| Mathlib.Analysis.SpecialFunctions.Complex.Arg | 1754 | 1755 | +1 (+0.06%) |
| Mathlib.Analysis.SpecialFunctions.Pow.Real | 1769 | 1770 | +1 (+0.06%) |
| Mathlib.FieldTheory.SeparablyGenerated | 1814 | 1815 | +1 (+0.06%) |
| Mathlib.Analysis.Complex.Arg | 1829 | 1830 | +1 (+0.05%) |
| Mathlib.Tactic.NormNum.Irrational | 1886 | 1887 | +1 (+0.05%) |
| Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Pi | 1917 | 1918 | +1 (+0.05%) |
| Mathlib.LinearAlgebra.Matrix.Permutation | 2153 | 2154 | +1 (+0.05%) |
| Mathlib.LinearAlgebra.Matrix.Stochastic | 2154 | 2155 | +1 (+0.05%) |
Import changes for all files
| Files | Import difference |
|---|---|
| There are 7516 files with changed transitive imports taking up over 330104 characters: this is too many to display! | |
You can run ci-tools/scripts/pr_summary/import_trans_difference.sh all locally to see the whole output. |
Declarations diff
+ eq_comm_eq
+ iff_comm_eq
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) = (1.00, 0.01)
| Current number | Change | Type |
|---|---|---|
| 450 | -1 | porting notes |
| 82 | -1 | flexible linter exceptions |
Current commit 884f5d61fb
Reference commit 91b2017b29
You can run this locally as
./scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
Vierkantor
commented
Apr 14, 2026
Comment on lines
+310
to
+311
| -- This is not marked `@[simp]` since `simp` can derive this from `mul_eq_zero`. | ||
| theorem zero_eq_mul : 0 = a * b ↔ a = 0 ∨ b = 0 := by simp [eqComm] |
Contributor
Author
There was a problem hiding this comment.
Not sure if we want to keep this un-@[simp]ed, since we'd now need simp [eqComm].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces two simprocs
eqCommandiffCommthat can use@[simp]lemmas on symmetrical forms of an expression: if we have a simp lemma sayingf a = b ↔ a = g band the goal containsb = f a, then we would end up withg b = a. I developed these in #36534. Enabling them globally proved to be quite slow (+0,44% overall build time, which corresponds to +5%simping time), so this PR only declares them (and enables them locally, using e.g.simp [eqComm], when we see that it pays off in the proof).