refactor(NumberTheory): golf Mathlib/NumberTheory/Dioph#38457
refactor(NumberTheory): golf Mathlib/NumberTheory/Dioph#38457yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
Mathlib/NumberTheory/Dioph#38457Conversation
|
!bench |
PR summary 7705510fbcImport changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo 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 No changes to technical debt.This script lives in the
|
|
Benchmark results for 14367bd against 7705510 are in. No significant results found. @yuanyi-350
No significant changes detected. |
|
Feel free to remove the label once you have commented on the performance! |
|
I ran a profiler comparison for the changed declarations in this PR. Results (seconds):
Overall:
|
grunweg
left a comment
There was a problem hiding this comment.
I think the proofs are an improvement --- and would justify the minor performance loss.
| (le_antisymm_iff.trans <| and_congr (Nat.le_div_iff_mul_le ypos) <| | ||
| Iff.trans ⟨lt_succ_of_le, le_of_lt_succ⟩ (div_lt_iff_lt_mul ypos)).symm | ||
| rcases y.eq_zero_or_pos with rfl | hy | ||
| · simp [eq_comm] |
There was a problem hiding this comment.
Why do you need eq_comm here?
There was a problem hiding this comment.
simp can simplify this expression to z = 0 ↔ 0 = z, and then eq_comm is needed.
|
Thanks! |
|
🚀 Pull request has been placed on the maintainer queue by grunweg. |
Mathlib/NumberTheory/Diophby replacing the arithmetic proof insub_diophwithgrinddiv_diophby splitting ony = 0 ∨ 0 < y, then closing the positive case withNat.div_eq_iffandgrindExtracted from #38144