-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let with Qed: produce really-Qed side definition
cf discussion in #17544 This does have a tradeoff as the side definition still exists after the section is closed unlike usual.
- Loading branch information
1 parent
32df4c3
commit f77e8a2
Showing
7 changed files
with
74 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(* Let doesn't respect (default) Proof using *) | ||
|
||
(* Maybe we will want to change this behaviour someday | ||
but keep in mind that if we do then "bar'" should somehow get 2 A arguments. | ||
*) | ||
|
||
Set Default Proof Using "Type". | ||
Set Warnings "-opaque-let". | ||
|
||
Section S. | ||
|
||
Variable A : Type. | ||
Variable a : A. | ||
|
||
Let foo : A. | ||
Proof. exact a. Qed. | ||
|
||
Definition bar := foo. | ||
|
||
Variable b : A. | ||
|
||
Let foo' : A. | ||
Proof using a b. | ||
exact b. | ||
Qed. | ||
|
||
Definition bar' := foo'. | ||
|
||
End S. | ||
|
||
Check bar : forall A, A -> A. | ||
Check bar' : forall A, A -> A. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters