Repository navigation
[Merged by Bors] - chore: use congr() much more widely - #43408
YaelDillies wants to merge 4 commits into
Conversation
PR summary 318ce8e1c8Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| 418 | -2 | porting notes |
Current commit 318ce8e1c8
Reference commit 159df8fb17
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.py 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).
|
!radar |
|
Benchmark results for 03e7e55 against cd67817 are in. There are significant results. @riccardobrasca
Large changes (2🟥)
Medium changes (5✅, 3🟥)
Small changes (8✅, 8🟥)
|
|
This pull request has conflicts, please merge |
|
|
03e7e55 to
d001613
Compare
|
This pull request has conflicts, please merge |
d001613 to
e2fe3c4
Compare
|
This pull request has conflicts, please merge |
e2fe3c4 to
2639c0b
Compare
|
!radar |
|
Benchmark results for 2639c0b against cf6bde1 are in. There are significant results. @riccardobrasca
Large changes (2🟥)
Medium changes (6✅, 3🟥)
Small changes (11✅, 6🟥)
|
|
Some of these seem really nice, such as
But some of these are of the form For example There are also some Wdyt? |
Do you want me to remove the not-really-nice ones for now and put them in a separate PR?
Do you have another example? Turns out the |
|
This pull request has conflicts, please merge |
Not having to specify the cast seems like a win for It's the usages of The last one does remove one set of parentheses which is nice, so we're left with the same amount, but now they're nested. I also found another nice one, where it's technically a single function application, but
I'm on the fence about this opinion, so perhaps we should have a second opinion. After this PR, would |
I don't see why we should. It is still useful in very early files before the elaborator is available, and I expect people will naturally migrate to |
|
This pull request has conflicts, please merge |
7ab4f7e to
f817542
Compare
|
Let's merge this, otherwise @YaelDillies has to go through an infinite sequence of conflicts. Thanks! bors d+ |
|
✌️ YaelDillies can now approve this pull request until 2026-10-09 16:02 UTC (in 2 weeks). To approve and merge, reply with
|
|
Thank you! bors merge |
|
Merge conflict. Merge or rebase |
|
This pull request has conflicts, please merge |
|
bors merge |
|
👎 Rejected by label |
|
bors merge |
Replace most uses of `congr_fun`, `congr_arg`, `DFunLike.congr_fun`, `DFunLike.congr_arg`, etc... by uses of the `congr()` elaborator. Some uses were silly and have been replaced by the `congr` or `congr!` tactic? Generated by Claude Opus, painstakingly reviewed and improved line-by-line by myself. Assisted-by: Claude Opus 5
|
Pull request successfully merged into master. Build succeeded: |
congr() much more widelycongr() much more widely
- Regenerate `VecNotation.lean` as a pure move from `master`'s `Notation.lean`, restoring upstream changes that had been reverted (leanprover-community#44933, leanprover-community#43918, leanprover-community#44513, leanprover-community#43408, leanprover-community#42318); in particular `cons_transpose`, `head_transpose` and `tail_transpose` are no longer simp. - Fix the `!![...]` delaborator for literals with more than 32 entries, whose list literals contain `let`s and are too deep to delaborate as `#[...]`: delaborate entries one at a time. Move `listLitElems?` to `Notation/Basic.lean` and reuse it in the tactic parser. Add a 6x6 delaborator test. - Remove `@[simp]` from `transposeArray_size` and `submatrixArray_size` (simpNF). - Drop `@[expose]` from `Notation.lean` and `Notation/Basic.lean`. - Add the new modules to `Mathlib.lean`. - Nits: avoid shadowing in `List.tendsto_getD`, split tactic one-liners, merge `simp` calls in `CanonicalEmbedding/Basic.lean`, simplify the `Modular.lean` literal products, and replace `simp? says` with `simp` in `MathlibTest/matrix.lean`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replace most uses of
congr_fun,congr_arg,DFunLike.congr_fun,DFunLike.congr_arg, etc... by uses of thecongr()elaborator. Some uses were silly and have been replaced by thecongrorcongr!tactic?Generated by Claude Opus, painstakingly reviewed and improved line-by-line by myself.
Assisted-by: Claude Opus 5
I know this is a churny PR, but my point is that a new notation (like
congr()) will never be used (by humans and LLMs alike) if we don't make such big changes adopting it widely.