Repository navigation
[Merged by Bors] - refactor(Logic/Relation): move inclusion lemmas out of EqvGen - #43643
Sanghyeok0 wants to merge 14 commits into
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to Zulip and join the Lean community. |
PR summary 8b1ca9c5f0Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| lemma reflGen_le_eqvGen : ReflGen r ≤ EqvGen r | ||
| end EqvGen | ||
|
|
||
| lemma reflGen_le_eqvGen (r : α → α → Prop) : ReflGen r ≤ EqvGen r |
There was a problem hiding this comment.
Another option rather than closing and reopening the namespace is to name these _root_.Relation.reflGen_le_eqvGen
(but what you have is okay for now, I think)
Co-authored-by: Monica Omar <[email protected]>
|
-awaiting-author Thanks for the review. I’ve applied the I kept the current namespace structure because the |
themathqueen
left a comment
There was a problem hiding this comment.
I just want to note that in a lot of cases _root_. is preferable, especially when there are variables involved. You don't want to be introducing the same variables 3 times just to avoid doing _root_.. I guess here is fine because you're just making the variable explicit and not introducing anything.
Anyway,
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by themathqueen. |
I see. I'll try using Thanks for all the reviews. I've learned a lot from them. |
j-loreaux
left a comment
There was a problem hiding this comment.
I appreciate what you're trying to do here, but I think it doesn't make much sense. To be clear, I agree with removing the EqvGen namespace from these, but there are a bunch of lemmas surrounding this which could also have that namespace removed. So it doesn't make sense that we're only doing these few.
In fact, in this namespace EqvGen section, I think the only things that should actually be in that namespace are is_equivalence, setoid and mono. It should just be a section EqvGen and those three shoul dbe prefixed with EqvGen.
Sorry for the very late response. I've incorporated your feedback and updated the code so that only By the way, it seems that we no longer need both -awaiting-author |
| lemma eqvGen_mono {r r' : α → α → Prop} (h : r ≤ r') : EqvGen r ≤ EqvGen r' | ||
| | _, _, .refl _ => .refl _ | ||
| | _, _, .symm _ _ hxy => .symm _ _ (eqvGen_mono h _ _ hxy) | ||
| | _, _, .trans _ _ _ hxy hyz => .trans _ _ _ (eqvGen_mono h _ _ hxy) (eqvGen_mono h _ _ hyz) | ||
| | _, _, .rel _ _ hab => .rel _ _ (h _ _ hab) |
There was a problem hiding this comment.
right, one of these should go and be deprecated
I don't know which is nicer eqvGen_mono or EqvGen.mono
| variable (r) | ||
|
|
||
| theorem is_equivalence : Equivalence (@EqvGen α r) := | ||
| theorem EqvGen.is_equivalence : Equivalence (@EqvGen α r) := |
There was a problem hiding this comment.
this name should also maybe change to EqvGen.equivalence instead of is_equivalence?
Co-authored-by: Monica Omar <[email protected]>
|
Thanks for the suggestions! I kept I also renamed -awaiting-author |
This refactor was split out from #40368 following the review discussion there. Following further review, I moved all lemmas from the `Relation.EqvGen` namespace to `Relation`, except for `is_equivalence`, `setoid`, and `mono`, which retain their original names. The old names are preserved as deprecated aliases for backward compatibility. I also updated the reference in `Mathlib/Order/JordanHolder.lean` to use `Relation.eqvGen_le` instead of the deprecated name. **Changes:** * `Relation.EqvGen.eqvGen_le` → `Relation.eqvGen_le` * `Relation.EqvGen.eqvGen_mono` → `Relation.eqvGen_mono` * `Relation.EqvGen.reflGen_le_eqvGen` → `Relation.reflGen_le_eqvGen` * `Relation.EqvGen.symmGen_le_eqvGen` → `Relation.symmGen_le_eqvGen` * `Relation.EqvGen.transGen_le_eqvGen` → `Relation.transGen_le_eqvGen` * `Relation.EqvGen.reflTransGen_le_eqvGen` → `Relation.reflTransGen_le_eqvGen` * `Relation.EqvGen.eqvGen_reflGen` → `Relation.eqvGen_reflGen` * `Relation.EqvGen.eqvGen_transGen` → `Relation.eqvGen_transGen` * `Relation.EqvGen.eqvGen_symmGen` → `Relation.eqvGen_symmGen` * `Relation.EqvGen.eqvGen_reflTransGen` → `Relation.eqvGen_reflTransGen` * `Relation.EqvGen.eqvGen_eq_reflTransGen` → `Relation.eqvGen_eq_reflTransGen` * `Relation.EqvGen.reflTransGen_symmGen` → `Relation.reflTransGen_symmGen` Co-authored-by: unknown <[email protected]>
|
Pull request successfully merged into master. Build succeeded: |
Bumps Mathlib to [83e85ad](leanprover-community/mathlib4@83e85ad) and adapts to [breaking changes](https://leanprover.zulipchat.com/#narrow/channel/536994-ecosystem-infrastructure/topic/downstream-lean4.20breakages/near/641600658). [Mathlib #43643](leanprover-community/mathlib4#43643) moved the `EqvGen` inclusion lemmas into the `Relation` namespace, so Mathlib now has its own `Relation.reflTransGen_symmGen`. Here, we remove that theorem but keep its `simp` and `scoped grind =` attributes. Also, fix some deprecated and updated names from Mathlib. Supersedes leanprover#1226.
This refactor was split out from #40368 following the review discussion there.
Following further review, I moved all lemmas from the
Relation.EqvGennamespace toRelation, except foris_equivalence,setoid, andmono, which retain their original names.The old names are preserved as deprecated aliases for backward compatibility. I also updated the reference in
Mathlib/Order/JordanHolder.leanto useRelation.eqvGen_leinstead of the deprecated name.Changes:
Relation.EqvGen.eqvGen_le→Relation.eqvGen_leRelation.EqvGen.eqvGen_mono→Relation.eqvGen_monoRelation.EqvGen.reflGen_le_eqvGen→Relation.reflGen_le_eqvGenRelation.EqvGen.symmGen_le_eqvGen→Relation.symmGen_le_eqvGenRelation.EqvGen.transGen_le_eqvGen→Relation.transGen_le_eqvGenRelation.EqvGen.reflTransGen_le_eqvGen→Relation.reflTransGen_le_eqvGenRelation.EqvGen.eqvGen_reflGen→Relation.eqvGen_reflGenRelation.EqvGen.eqvGen_transGen→Relation.eqvGen_transGenRelation.EqvGen.eqvGen_symmGen→Relation.eqvGen_symmGenRelation.EqvGen.eqvGen_reflTransGen→Relation.eqvGen_reflTransGenRelation.EqvGen.eqvGen_eq_reflTransGen→Relation.eqvGen_eq_reflTransGenRelation.EqvGen.reflTransGen_symmGen→Relation.reflTransGen_symmGen