Skip to content

[Merged by Bors] - refactor(PartialHomeomorph): make (s : Opens \alpha) implicit#10082

Closed
grunweg wants to merge 2 commits intomasterfrom
MR-refactor-subtypeRestr
Closed

[Merged by Bors] - refactor(PartialHomeomorph): make (s : Opens \alpha) implicit#10082
grunweg wants to merge 2 commits intomasterfrom
MR-refactor-subtypeRestr

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Jan 28, 2024

It is always used in conjunction with a hypothesis hs about s.

In Lean 3, these arguments were kept explicit on purpose: given a definition myDef {x : α} (hx : MyProp x),
if the proof of hx was nontrivial (not a variable), Lean would pretty-print it as myDef _.

In Lean 4, setting pp.proofs.withType or pp.proofs to true makes such terms pretty-print as myDef (x : MyProp).
Hence, this workaround is no longer necessary.

Follow-up to #9894.


Open in Gitpod

…is always used with a hypothesis involving s

Follow-up to #....
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 28, 2024

@winstonyin I'd be interested in your opinion on this, as you wrote #9894.

@urkud
Copy link
Copy Markdown
Member

urkud commented Jan 29, 2024

The reason why we kept these arguments explicit in Lean 3 was the following: if you have myDef {x : α} (hx : MyProp x) and the proof of hx is nontrivial (not just a variable), then Lean pretty prints it as myDef _. I don't know if this was fixed in Lean 4 (e.g., by printing the type of hx in this case). If not, then we should keep these explicit arguments for a while.

@urkud urkud added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Jan 29, 2024
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 29, 2024

Good point; I did not know that. I asked on zulip.

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 29, 2024
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 31, 2024

My understanding of the zulip discussion is that keeping the arguments explicit is no longer necessary. I have updated the commit message accordingly and propose that we move forward with this PR.

@grunweg grunweg added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Jan 31, 2024
@sgouezel
Copy link
Copy Markdown
Contributor

sgouezel commented Feb 6, 2024

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 6, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 6, 2024
It is always used in conjunction with a hypothesis `hs` about `s`.

In Lean 3, these arguments were kept explicit on purpose: given a definition `myDef {x : α} (hx : MyProp x)`,
if the proof of `hx` was nontrivial (not a variable), Lean would pretty-print it as `myDef _`.

In Lean 4, setting `pp.proofs.withType` or `pp.proofs` to true makes such terms pretty-print as `myDef (x : MyProp)`.
Hence, this workaround is no longer necessary.

Follow-up to #9894.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 6, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(PartialHomeomorph): make (s : Opens \alpha) implicit [Merged by Bors] - refactor(PartialHomeomorph): make (s : Opens \alpha) implicit Feb 6, 2024
@mathlib-bors mathlib-bors bot closed this Feb 6, 2024
@mathlib-bors mathlib-bors bot deleted the MR-refactor-subtypeRestr branch February 6, 2024 11:27
atarnoam pushed a commit that referenced this pull request Feb 9, 2024
It is always used in conjunction with a hypothesis `hs` about `s`.

In Lean 3, these arguments were kept explicit on purpose: given a definition `myDef {x : α} (hx : MyProp x)`,
if the proof of `hx` was nontrivial (not a variable), Lean would pretty-print it as `myDef _`.

In Lean 4, setting `pp.proofs.withType` or `pp.proofs` to true makes such terms pretty-print as `myDef (x : MyProp)`.
Hence, this workaround is no longer necessary.

Follow-up to #9894.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-differential-geometry Manifolds etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants