[Merged by Bors] - feat: mixin ordered algebraic typeclasses#20593
[Merged by Bors] - feat: mixin ordered algebraic typeclasses#20593astrainfinita wants to merge 93 commits intomasterfrom
Conversation
commit 7561e65e55f1dbba1058c43ca1701038ceed98dc Author: negiizhao <[email protected]> Date: Wed Jun 5 04:26:04 2024 +0800 fix commit 777db8a7d19ed4d66815f9575206992ca578cb5e Merge: cc6eede 52b851a Author: negiizhao <[email protected]> Date: Wed Jun 5 04:25:36 2024 +0800 Merge branch 'master' into FR_canonically commit cc6eede Author: negiizhao <[email protected]> Date: Thu Dec 28 15:01:00 2023 +0800 fix commit ae1dfda Merge: c1931cf 1a749e0 Author: negiizhao <[email protected]> Date: Thu Dec 28 14:10:05 2023 +0800 Merge branch 'FR_covariance_instance' into FR_canonically commit c1931cf Merge: 9e0f667 6cab3d6 Author: negiizhao <[email protected]> Date: Thu Dec 28 14:09:53 2023 +0800 Merge branch 'master' into FR_canonically commit 1a749e0 Author: negiizhao <[email protected]> Date: Tue Dec 26 04:24:52 2023 +0800 revert some instance changes commit a6e645f Author: negiizhao <[email protected]> Date: Mon Dec 25 11:01:06 2023 +0800 fix commit 6af13a5 Author: negiizhao <[email protected]> Date: Mon Dec 25 10:06:19 2023 +0800 Revert "fix" This reverts commit 7ebd135. commit 63a181b Author: negiizhao <[email protected]> Date: Mon Dec 25 09:49:50 2023 +0800 hack commit 7ebd135 Author: negiizhao <[email protected]> Date: Sun Dec 24 14:25:47 2023 +0800 fix commit 20d2809 Author: negiizhao <[email protected]> Date: Sun Dec 24 14:13:08 2023 +0800 chore: remove redundant instances commit 9e0f667 Author: negiizhao <[email protected]> Date: Sun Dec 24 12:45:15 2023 +0800 fix commit bf51f25 Merge: bd9e5b4 e9fb5b3 Author: negiizhao <[email protected]> Date: Sun Dec 24 12:00:56 2023 +0800 Merge branch 'master' into FR_canonically commit bd9e5b4 Author: negiizhao <[email protected]> Date: Tue Oct 24 01:49:05 2023 +0800 nolint again commit 6414331 Author: negiizhao <[email protected]> Date: Tue Oct 24 00:36:00 2023 +0800 reduce diffs commit 6d1f059 Author: negiizhao <[email protected]> Date: Mon Oct 23 19:41:50 2023 +0800 Revert "remove nolint" This reverts commit d60fc68. commit d60fc68 Author: negiizhao <[email protected]> Date: Mon Oct 23 10:24:07 2023 +0800 remove nolint commit 86f6ec7 Author: negiizhao <[email protected]> Date: Mon Oct 23 10:23:24 2023 +0800 fix commit a3d8af1 Merge: 58e2ba8 801dc0d Author: negiizhao <[email protected]> Date: Mon Oct 23 09:53:43 2023 +0800 Merge branch 'master' into FR_canonically commit 58e2ba8 Author: negiizhao <[email protected]> Date: Mon Oct 23 09:52:49 2023 +0800 reduce diffs commit be2b4bb Author: negiizhao <[email protected]> Date: Mon Oct 23 08:58:03 2023 +0800 `[Mul α] [LE α]` -> `[Monoid α] [PartialOrder α]` commit 0777b07 Author: negiizhao <[email protected]> Date: Mon Oct 23 02:46:01 2023 +0800 rerun bench please commit 6415bc9 Author: negiizhao <[email protected]> Date: Sun Oct 22 18:30:20 2023 +0800 fix commit 14cdac7 Author: negiizhao <[email protected]> Date: Sun Oct 22 14:11:31 2023 +0800 nolint commit 5bc0815 Author: Mario Carneiro <[email protected]> Date: Sat Oct 21 17:30:57 2023 -0400 chore: bump lean toolchain commit 86c8440 Author: negiizhao <[email protected]> Date: Sat Oct 21 23:50:53 2023 +0800 fix commit f14bdc9 Author: negiizhao <[email protected]> Date: Sat Oct 21 23:07:59 2023 +0800 fix commit 5feb528 Author: negiizhao <[email protected]> Date: Sat Oct 21 22:41:09 2023 +0800 fix commit 958c4a5 Author: negiizhao <[email protected]> Date: Sat Oct 21 22:07:26 2023 +0800 fix commit fae1c85 Author: negiizhao <[email protected]> Date: Fri Oct 20 21:07:44 2023 +0800 fix commit e6309d6 Author: negiizhao <[email protected]> Date: Fri Oct 20 20:07:09 2023 +0800 fix merge commit a619670 Author: negiizhao <[email protected]> Date: Fri Oct 20 20:06:29 2023 +0800 oops commit 9c3d72d Author: negiizhao <[email protected]> Date: Fri Oct 20 20:04:15 2023 +0800 fix merge commit 8a76d2e Author: negiizhao <[email protected]> Date: Fri Oct 20 20:01:16 2023 +0800 fix merge commit 7793f03 Author: negiizhao <[email protected]> Date: Fri Oct 20 19:59:08 2023 +0800 fix commit 659f503 Author: negiizhao <[email protected]> Date: Fri Oct 20 18:59:49 2023 +0800 fix merge commit a259cc5 Author: negiizhao <[email protected]> Date: Fri Oct 20 18:54:10 2023 +0800 fix commit d6eb31f Author: negiizhao <[email protected]> Date: Fri Oct 20 18:18:02 2023 +0800 fix commit 2650679 Author: negiizhao <[email protected]> Date: Fri Oct 20 16:31:11 2023 +0800 fix commit 5bfb9ec Merge: c5279c0 08a8af0 Author: negiizhao <[email protected]> Date: Fri Oct 20 16:19:14 2023 +0800 Merge branch 'master' into FR_canonically commit c5279c0 Author: negiizhao <[email protected]> Date: Mon Aug 7 02:47:06 2023 +0800 lint commit 19a377f Author: negiizhao <[email protected]> Date: Thu Aug 3 16:57:10 2023 +0800 lint commit 048b120 Author: negiizhao <[email protected]> Date: Thu Aug 3 15:43:32 2023 +0800 fix counterexamples commit 94663ee Author: negiizhao <[email protected]> Date: Thu Aug 3 14:22:22 2023 +0800 lint style commit 426dd03 Author: negiizhao <[email protected]> Date: Thu Aug 3 14:00:46 2023 +0800 refactor: make `CanonicallyOrdered...` mixin I think this is the proposed refactor. However it seems that all things get slower... :( Need more love to speed it up.
|
Yes, this is part of #20676. I have no idea to make this PR looks better... |
fpvandoorn
left a comment
There was a problem hiding this comment.
LGTM
I'm happy with this temporary performance hit, as long as the author plans to continue with the future performance improvements we get by removing classes and replacing them by these new ones.
|
LGTM, but I'd like a second opinion maintainer merge |
|
🚀 Pull request has been placed on the maintainer queue by fpvandoorn. |
sgouezel
left a comment
There was a problem hiding this comment.
I am fine with the idea of a transitory nonoptimal mathlib, given that having these as mixins is clearly a very good idea on the longer term. Still, having three pairs of eyes is better than two, so:
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by sgouezel. |
| -- TODO: assume weaker typeclasses | ||
|
|
||
| /-- An ordered (additive) monoid is a monoid with a partial order such that addition is monotone. -/ | ||
| class IsOrderedAddMonoid (α : Type*) [AddCommMonoid α] [PartialOrder α] where |
There was a problem hiding this comment.
I'm a bit uncomfortable with [AddCommMonoid α] since that would mean this doesn't apply to ordinals. What's the reason for including it here?
There was a problem hiding this comment.
Currently there are no weakening of any typeclass. One reason is to avoid the impact on performance. Also, a TODO has been left on the first line.
|
I am not a maintainer, but agree with the above: |
|
🚀 Pull request has been placed on the maintainer queue by grunweg. |
|
Ok, there seems to be clearly enough support for this. bors merge |
|
Pull request successfully merged into master. Build succeeded: |
CanonicallyOrdered...mixin #17444This PR is part of #20676.