[Merged by Bors] - refactor(order/well_founded): ditch well_founded_iff_has_min' and well_founded_iff_has_max'#15071
[Merged by Bors] - refactor(order/well_founded): ditch well_founded_iff_has_min' and well_founded_iff_has_max'#15071
well_founded_iff_has_min' and well_founded_iff_has_max'#15071Conversation
well_founded_iff_has_max' and well_founded_iff_has_min'well_founded_iff_has_min' and well_founded_iff_has_max'
|
This PR/issue depends on: |
|
The change seems to make proofs smaller, or at least no bigger. |
Vierkantor
left a comment
There was a problem hiding this comment.
The evidence from the refactor seems to show that has_min' and has_max' are typically not the right way to go, so I'm okay with removing them.
Could you merge master before bors mergeing?
bors d+
|
✌️ vihdzp can now approve this pull request. To approve and merge a pull request, simply reply with |
|
|
||
| theorem is_artinian.set_has_minimal [is_artinian R M] (a : set $ submodule R M) (ha : a.nonempty) : | ||
| ∃ M' ∈ a, ∀ I ∈ a, I ≤ M' → I = M' := | ||
| ∃ M' ∈ a, ∀ I ∈ a, ¬ I < M' := |
There was a problem hiding this comment.
I'm not sure this is an improvement. ¬ a < b is the correct condition in the generality of preorders, but once you get to a partial_order a ≤ b → a = b is nicer empirically.
To be clear, I'm happy for you to ditch the two well-founded lemmas, but I think you shouldn't change unrelated lemma statements. You can keep the changes internal to the proofs.
There was a problem hiding this comment.
"A minimal element is one for which no other element is lesser". I believe my restatement of the lemma much better captures this. Besides, from I ≤ M' and ¬ I < M' one can directly prove I = M' by using eq_of_le_of_not_lt.
Anyways, I won't be petty about this. I thought that the current statement of this lemma reflected the statement of the lemma I deleted, and thus I changed it accordingly. But if you still think this change is unhelpful, I'll revert it.
There was a problem hiding this comment.
Yeah I think it's a matter of people not liking to write "a is such that if a ≤ b then a = b" on paper, even though it's better for formalisation.
|
bors r+ |
…well_founded_iff_has_max'` (#15071) The predicate `x ≤ y → y = x` is no more convenient than `¬ x < y`. For this reason, we ditch `well_founded.well_founded_iff_has_min'` and `well_founded.well_founded_iff_has_max'` in favor of `well_founded.well_founded_iff_has_min` (or in some cases, just `well_founded.has_min`. We also remove the misplaced lemma `well_founded.eq_iff_not_lt_of_le`, and we golf the theorems that used the removed theorems. The lemma `well_founded.well_founded_iff_has_min` has a misleading name when applied on `well_founded (>)`, and mildly screws over dot notation and rewriting by virtue of using `>`, but a future refactor will fix this.
|
Pull request successfully merged into master. Build succeeded: |
well_founded_iff_has_min' and well_founded_iff_has_max'well_founded_iff_has_min' and well_founded_iff_has_max'
* [`order.basic`@`de87d5053a9fe5cbde723172c0fb7e27e7436473`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/basic?range=de87d5053a9fe5cbde723172c0fb7e27e7436473..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.well_founded`@`1c521b4fb909320eca16b2bb6f8b5b0490b1cb5e`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/well_founded?range=1c521b4fb909320eca16b2bb6f8b5b0490b1cb5e..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.order_iso_nat`@`6623e6af705e97002a9054c1c05a980180276fc1`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/order_iso_nat?range=6623e6af705e97002a9054c1c05a980180276fc1..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.compactly_generated`@`861a26926586cd46ff80264d121cdb6fa0e35cc1`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/compactly_generated?range=861a26926586cd46ff80264d121cdb6fa0e35cc1..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`ring_theory.noetherian`@`da420a8c6dd5bdfb85c4ced85c34388f633bc6ff`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/ring_theory/noetherian?range=da420a8c6dd5bdfb85c4ced85c34388f633bc6ff..210657c4ea4a4a7b234392f70a3a2a83346dfa90) Mathlib 3: leanprover-community/mathlib3#15071
* [`order.basic`@`de87d5053a9fe5cbde723172c0fb7e27e7436473`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/basic?range=de87d5053a9fe5cbde723172c0fb7e27e7436473..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.well_founded`@`1c521b4fb909320eca16b2bb6f8b5b0490b1cb5e`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/well_founded?range=1c521b4fb909320eca16b2bb6f8b5b0490b1cb5e..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.order_iso_nat`@`6623e6af705e97002a9054c1c05a980180276fc1`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/order_iso_nat?range=6623e6af705e97002a9054c1c05a980180276fc1..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`order.compactly_generated`@`861a26926586cd46ff80264d121cdb6fa0e35cc1`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/order/compactly_generated?range=861a26926586cd46ff80264d121cdb6fa0e35cc1..210657c4ea4a4a7b234392f70a3a2a83346dfa90) * [`ring_theory.noetherian`@`da420a8c6dd5bdfb85c4ced85c34388f633bc6ff`..`210657c4ea4a4a7b234392f70a3a2a83346dfa90`](https://leanprover-community.github.io/mathlib-port-status/file/ring_theory/noetherian?range=da420a8c6dd5bdfb85c4ced85c34388f633bc6ff..210657c4ea4a4a7b234392f70a3a2a83346dfa90) Mathlib 3: leanprover-community/mathlib3#15071
The predicate
x ≤ y → y = xis no more convenient than¬ x < y. For this reason, we ditchwell_founded.well_founded_iff_has_min'andwell_founded.well_founded_iff_has_max'in favor ofwell_founded.well_founded_iff_has_min(or in some cases, justwell_founded.has_min. We also remove the misplaced lemmawell_founded.eq_iff_not_lt_of_le, and we golf the theorems that used the removed theorems.The lemma
well_founded.well_founded_iff_has_minhas a misleading name when applied onwell_founded (>), and mildly screws over dot notation and rewriting by virtue of using>, but a future refactor will fix this.well_founded.monotone_chain_conditionto preorders #15073If we wanted to, we could golf
eq_iff_not_lt_of_leand move it toorder/basic.lean, but I'd rather not bother. It's just the negation oflt_iff_le_and_ne.