I'm often confused at Notation
declarations.
Inductive term : Type :=
...
| LLNeg : term -> term
...
.
Notation "C '^False'" := LLNeg C.
Fails with Error: Syntax error: '.' expected after [vernac:syntax_command] (in [vernac_aux]).
.
Intuitively I'm not quantifying or binding in any way C
, so I get why maybe it's not gonna work. But I read a lot of code examples where this basically does work! and it works _sometimes_ for me just not this evening.
I think you want Notation … := (LLNeg C).
not := LLNeg C.
, those parentheses are _not_ redundant
that’s because you can write := (the expansion) (some information about the notation).
The Coq error message is very far from great, but it does say “Syntax error”, and the syntax analysis (parsing) comes before names are analysed (OTOH, notation scopes must be dealt after)
and the way you bind C
is perfectly fine :-)
ok fantastic, thanks!
Quinn has marked this topic as resolved.
Last updated: Oct 04 2023 at 23:01 UTC