coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Antoine Voizard <voizard AT seas.upenn.edu>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Question about notations
- Date: Thu, 30 Jun 2016 19:22:43 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=voizard AT seas.upenn.edu; spf=Pass smtp.mailfrom=voizard AT seas.upenn.edu; spf=None smtp.helo=postmaster AT hound.seas.upenn.edu
- Ironport-phdr: 9a23:wBAFOBEnqguUkyOSDuebTZ1GYnF86YWxBRYc798ds5kLTJ75pMmwAkXT6L1XgUPTWs2DsrQf2rKQ6vCrAzVIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14Luh6vootX6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0/MlZFK7+Yq4QTLpCDT1gPXpmytfssEzqSxeI530RGlsRkwhBGQSNuA/9X4X4qCfSred0w2+HJcDwS/Y5VSn0vPQjcwPhlCpSb21xy2rQkMEl1K8=
Hi all,
I just ran into a problem that I already had a couple of times, and I can't figure out what I'm doing wrong. The general idea is that, when declaring a new notation close to some existing ones, all the sudden Coq's parser won't recognize the old ones, by looking exclusively for the new one.
In this case, I needed an "inlined" version of subsets of pair types (simpler to use than an actual {x : A * B | ...}), so I just adapted the stdlib code:
Inductive sig2el (A:Type) (B:Type) (P : A -> B -> Prop) : Type :=
exist2el : forall (x : A) (y : B), P x y -> sig2el P.
Notation "{ x , y | P }" := (sig2el(fun x y => P)) : type_scope.
But then, the following gives a syntax error because Coq expects a comma (I tried changing the notation with other characters as well - same result)
Lemma in_dec : forall x L, {x `in` L} + {¬ x `in` L}.
Could you tell me what's the issue?
Thanks,
Antoine
- [Coq-Club] Question about notations, Antoine Voizard, 07/01/2016
- Re: [Coq-Club] Question about notations, Antoine Voizard, 07/01/2016
Archive powered by MHonArc 2.6.18.