[Merged by Bors] - refactor: don't expose definitions of immersions#39002
[Merged by Bors] - refactor: don't expose definitions of immersions#39002grunweg wants to merge 4 commits intoleanprover-community:masterfrom
Conversation
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
PR summary dd8018895fImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
I think this is much better and more user friendly. I don't think the risk "downstream users now get to see the definition" is very big (I personally don't even think that this specific definition is so bad that it needs to be hidden). Long term, I would hope (/ expect) that every Lean project uses the module system by default.
|
I agree, and have thus turned this into a proper PR. |
|
🚀 Pull request has been placed on the maintainer queue by chrisflav. |
|
Thanks, I agree this is much better. bors merge |
Instead of using an `irreducible_def`, make it an unexposed definition. This has the same effect in other modules, but leads to much shorter code as we can remove all `rw [foo_def]` for the immersion definitions. It also allows removing the `@[expose]` section from the file (which is nice). There is a small downside: in downstream projects not using the module system, the definition of immersions will be unfolded now. At this point, this is a mostly hypothetical risk (and weighs lower than the real benefits of this change). The [discussion](#28793 (comment)) leading to this change did not have substantial evidence either. Inspired by the discussion in #35122.
|
Pull request successfully merged into master. Build succeeded: |
Instead of using an
irreducible_def, make it an unexposed definition. This has the same effect in other modules,but leads to much shorter code as we can remove all
rw [foo_def]for the immersion definitions.It also allows removing the
@[expose]section from the file (which is nice).There is a small downside: in downstream projects not using the module system, the definition of immersions
will be unfolded now. At this point, this is a mostly hypothetical risk (and weighs lower than the real benefits of this change). The discussion leading to this change did not have substantial evidence either.
Inspired by the discussion in #35122.