coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jakob Botsch Nielsen <jakob.botsch.nielsen AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Notation oddities
- Date: Wed, 20 Feb 2019 16:22:54 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jakob.botsch.nielsen AT gmail.com; spf=Pass smtp.mailfrom=jakob.botsch.nielsen AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot1-f52.google.com
- Ironport-phdr: 9a23:ljjgMBOrFVlvigOOi4El6mtUPXoX/o7sNwtQ0KIMzox0Lfr4rarrMEGX3/hxlliBBdydt6oUzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlLiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhSgINzA3/mLZhNFugq1Hux+uvQBzzpTObY2JKPZzfKXQds4aS2pbWcZRUjRMDIemYIsMCOoOJvtTopT6p1sSthuxGQmsD/73xD9JmHD22bY63PonEQrb2wEgHcgBsHfTrNruLqsdSue1zLXTzTrfb/NawzH96InWfRAluvGDQ7RwfNHeyUkqDQzFj1GQpZb5MDOS0+QAqm6W5PdjW+K3k2MrtR19rzy1ysovioTFnJwZxk3Y+SljwIs5O9u1Q1Nhb9G+CptfrSSaOpN2Qsw8R2Fovz43yrgctp66eCgG0ZMnxwLCZ/CefYiF4gzvWPyeITd/g3Jld7a/iAio/Ue8ze38U9G40FdMriVbjtnBrm4B2wDX58SdSfZw/l2t1SiS2wzP8O1JIV44mbLeK5E7w74wkpQTsV7EHi/zgEj2jrWZdkYj+uez8ejoebLmpoOHN4BoigHyKKIums2hDuQ8KQgBQW6b9P+z1L3m50L5QbFKgucqnanetZDWPd4bqbKhAw9JzoYj7A6yACuh0NQBhHUIMFZFeA+cgIXyIFHPIPX4De+ljFi2kTdrwerGPrz7DZnXIHjDiuSpQbEo4ElFjQE30Np35pROC7hHLuigdFX2sYn6Bxw+OUSexPr8A9U18IITXXmCBOfNMqrRtlXO7OUzOOKMIokUtTLmJv4N6PvnjHt/klgYK/r6laALYWy1S6w1a36SZmDh149YQDU6+zEmRemvs2WsFDtaZnK8RaU5v2hpB4evDIOFTYeo0uXYgHWLW6ZOb2UDMWiiVG/yftzdCfgJYSOWZMRml25cDOXze8oazRir8TTC5f9nI+7ToHBKsJvi0J1y+7SWm0xoszNzCMuZ3ieGSGQmxm4=
Hi,
In experimenting with notations I have come up with an example I am having
trouble understanding. See the following Coq program:
Close Scope core_scope.
Close Scope function_scope.
Close Scope type_scope.
Close Scope nat_scope.
Print Visibility.
(* Empty: no other notations to conflict with *)
Notation "[ x ]" := x.
(* "Setting notation at level 0." *)
(* A: *)
Notation "x [ proj := v ]" := O (at level 12, left associativity).
(* B: *)
(*Notation "x [ proj := v ]" := O (at level 10, left associativity).*)
Print Visibility.
(*
Lonely notations
"[ x ]" := x
"x [ proj := v ]" := O
*)
Definition example := O [ _ := _ ].
Here is the behavior with Coq 8.9.0:
* If the "[ x ]" notation is not defined, then the example works with either of
A or B (so level 10 or level 12 does not matter).
* If the "[ x ]" notation is defined, then the definition of A (at level 12) is
fine, but parsing of the example fails.
* If the "[ x ]" notation is defined, then the definition of B (at level 10) is
fine, and the example parses fine.
Why does the definition of "[ x ]" (which is a notation at level 0) affect the
other notation in this way?
Best,
Jakob
- [Coq-Club] Notation oddities, Jakob Botsch Nielsen, 02/20/2019
Archive powered by MHonArc 2.6.18.