chore(Data/Finsupp): make mapDomain_congr congr#39575
Conversation
PR summary 70ae40eadeImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| 25 | 1 | disabled simpNF lints |
Current commit 70ae40eade
Reference commit ae861491c1
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/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).
8867e7c to
3899098
Compare
|
This pull request has conflicts, please merge |
9a4c77d to
458cedf
Compare
|
This pull request has conflicts, please merge |
1589a31 to
882c618
Compare
|
|
||
| @[simp] | ||
| theorem repr_reindex : (b.reindex e).repr x = (b.repr x).mapDomain e := | ||
| theorem repr_reindex : (b.reindex e).repr x = (b.repr x).equivMapDomain e := |
There was a problem hiding this comment.
This makes the simp set more confluent. Otherwise simp fails to prove reindexFinsetRange_repr because the new congr lemma allows it to simplify the inside of the expression further earlier
| -- The linter complains that `mapDomain_id` can be proved from `mapDomain_fun_id` and `id_eq` | ||
| -- but this isn't true (at least within most of mathlib) |
There was a problem hiding this comment.
Why isn't this true? It looks to me like the congr lemma would eta-expand id, which leads to that chain.
There was a problem hiding this comment.
(I wonder if simp high would be more appropriate to silence the linter)
There was a problem hiding this comment.
I already tried simp high and simp\d a while ago and neither worked to silence the linter.
There was a problem hiding this comment.
Can you elaborate on "this isn't true (at least within most of mathlib)"?
There was a problem hiding this comment.
@[to_fun mapDomain_fun_id]
lemma mapDomain_id : mapDomain id v = v := sum_single _
/--
info: -- Found 0 errors in 41 declarations (plus 22 automatically generated ones) in the current file with 15 linters
-- All linting checks passed!
-/
#guard_msgs in
#lint
but if I do it with import Mathlib, then it complains. I tried bisecting quickly and I seem to be able to import most of mathlib without complaining
joneugster
left a comment
There was a problem hiding this comment.
Thanks, LGTM!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
This makes simp stronger. It particular, it breaks some proofs that relied on simp being weak.
From MeanFourier