Skip to content

[Merged by Bors] - feat: #noalign command; align.precheck option#663

Closed
digama0 wants to merge 1 commit intomasterfrom
align_precheck
Closed

[Merged by Bors] - feat: #noalign command; align.precheck option#663
digama0 wants to merge 1 commit intomasterfrom
align_precheck

Conversation

@digama0
Copy link
Copy Markdown
Member

@digama0 digama0 commented Nov 20, 2022

  • The #noalign command is like #align but it doesn't take a lean 4 name. The semantics are that mathport will delete the theorem which would have been translated at this point, and future references will use sorry instead. I am unsure how much we will need this, but it is good for documenting intentional deletions.

  • The #align command now checks that the lean 4 declaration (after stripping ) exists. It still requires that the lean 4 name be fully qualified, but it will tell you if you tried to reference something that was in scope. (I don't want it to do name resolution on its own because this will make it harder to compare with the lean 3 version.) You can disable the check using set_option align.precheck false.

  • The mk_iff command now does name resolution and attaches proper definition info to the input span.

  • As expected, the precheck caught a ton of naming bugs in ported files.

@dwrensha
Copy link
Copy Markdown
Member

👍 on the mk_iff modifications here.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 20, 2022

The precheck is great.

bors merge

bors bot pushed a commit that referenced this pull request Nov 20, 2022
* The `#noalign` command is like `#align` but it doesn't take a lean 4 name. The semantics are that mathport will delete the theorem which would have been translated at this point, and future references will use `sorry` instead. I am unsure how much we will need this, but it is good for documenting intentional deletions.

* The `#align` command now checks that the lean 4 declaration (after stripping `ₓ`) exists. It still requires that the lean 4 name be fully qualified, but it will tell you if you tried to reference something that was in scope. (I don't want it to do name resolution on its own because this will make it harder to compare with the lean 3 version.) You can disable the check using `set_option align.precheck false`.

* The `mk_iff` command now does name resolution and attaches proper definition info to the input span.

* As expected, the precheck caught a ton of naming bugs in ported files.
@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: #noalign command; align.precheck option [Merged by Bors] - feat: #noalign command; align.precheck option Nov 20, 2022
@bors bors bot closed this Nov 20, 2022
@bors bors bot deleted the align_precheck branch November 20, 2022 21:24
bors bot pushed a commit that referenced this pull request Nov 23, 2022
This note was added in #560. Since then, `@[mk_iff]` was implemented in #561, and was added to `IsWellFounded` in #663.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants