-
Notifications
You must be signed in to change notification settings - Fork 855
[Merged by Bors] - feat: grind golf in Mathlib.Data.List #29492
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
Conversation
PR summary f4506f7151Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| theorem exists_mem_cons_iff (p : α → Prop) (a : α) (l : List α) : | ||
| (∃ x ∈ a :: l, p x) ↔ p a ∨ ∃ x ∈ l, p x := | ||
| Iff.intro or_exists_of_exists_mem_cons fun h => | ||
| Or.elim h (exists_mem_cons_of l) exists_mem_cons_of_exists | ||
| (∃ x ∈ a :: l, p x) ↔ p a ∨ ∃ x ∈ l, p x := by grind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one specifically I quite like how the old proof spells out exactly what the names of the individual pieces are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. This is a triviality, and I can't imagine how anyone could learn anything from the proof that they didn't already understand from the statement. In fact, this seems like one of the most extreme examples possible of this. :-) But I appreciate that my eyes glaze over on theorem names faster than most peoples'.
| @[grind =] | ||
| theorem cons_bagInteger : | ||
| (a :: l₁).bagInter l₂ = if a ∈ l₂ then a :: l₁.bagInter (l₂.erase a) else l₁.bagInter l₂ := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the general rule with grind that unlike simp, we should encourage expansion of ifs? Could this be document somewhere (perhaps including but not limited to the commit message)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've finally started writing a document about this, in progress at leanprover/reference-manual#586.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line count: +74 -231
Impressive!
|
This pull request has conflicts, please merge |
|
bors d+ |
|
✌️ kim-em can now approve this pull request. To approve and merge a pull request, simply reply with |
|
This pull request has conflicts, please merge |
|
bors merge |
|
👎 Rejected by label |
|
bors merge |
Much of this comes from locations identified by the new `linter.tacticAnalysis.terminalToGrind`, and then cleaning up in flagged files.
|
Pull request successfully merged into master. Build succeeded: |
Much of this comes from locations identified by the new `linter.tacticAnalysis.terminalToGrind`, and then cleaning up in flagged files.
Much of this comes from locations identified by the new `linter.tacticAnalysis.terminalToGrind`, and then cleaning up in flagged files.
Much of this comes from locations identified by the new
linter.tacticAnalysis.terminalToGrind, and then cleaning up in flagged files.