Created
September 28, 2019 09:23
-
-
Save Blaisorblade/80ac2ca21b3df86cf2eddc19730fcb3c to your computer and use it in GitHub Desktop.
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
Notation "⊤" := True : dms_scope. | |
Notation " {@ T1 } " := ( and T1 True ) (format "{@ T1 }"): dms_scope. | |
Notation " {@ T1 ; T2 ; .. ; Tn } " := | |
(and T1 (and T2 .. (and Tn True)..)) | |
(format "'[v' {@ '[' T1 ']' ; '//' '[' T2 ']' ; '//' .. ; '//' '[' Tn ']' } ']'") : dms_scope. | |
Open Scope dms_scope. | |
Close Scope dms_scope. | |
Delimit Scope dms_scope with dms. | |
Check {@ True ; True -> False ; False } % dms. |
The explicit boxes around T1
, T2
and Tn
are not needed. There is always a default hov box around any notation as soon as it is liable to be broken over several lines.
Maybe Coq could warn when seeing such '[' T1 ']'
?
A warning would help. I also didn't find this in the docs about defaulting, but a warning is easier to understand anyway :-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
3rd line gives error:
The format is not the same on the right- and left-hand sides of the special token "..".