Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] On the persistence of notations across and beyond sections

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] On the persistence of notations across and beyond sections


Chronological Thread 
  • From: Théo Zimmermann <theo.zimmi AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] On the persistence of notations across and beyond sections
  • Date: Thu, 24 Nov 2016 08:36:50 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f47.google.com
  • Ironport-phdr: 9a23:C+r2kRcNrd6LH2F37Ge468S1lGMj4u6mDksu8pMizoh2WeGdxcu+YB7h7PlgxGXEQZ/co6odzbGH6Oa6CSdZuMzJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBu7oR/PusQVjoduN7s9xgXUqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+uqBJ/zIzUbo+bN/RwY73Tcs8BSGVbQspcTTZMDp+gY4YNCecKIOZWr5P6p1sLtRawGwmsA/noyjBQhXD23Kg60+E/HgHc2QwvBdQOsHLJp9jyKKcSUf66zK7SwTTCbvNW3DL96InTfxAupPGDR7Nwcc7LxUYzEAPFi0ydpIr4ND2b0eQNtnKU7+tmVe+3im4nrRtxojm1ycs2hInJnIQYwU3H+yVh2Is4J9K1RFRmbdK6EJZcrSKXO5VsTs4tQWxlvjsxxKcctp6hZicKzYwqxx7BZPyDdIiF+hfjW/yQITd8nX5kdre/iwqr/UiuxeDxVNO40FlNripCndnMsm4C2wbP5ciAT/tx5kah2TCR2ADP8uxJI085mbDGJ5I/wrM8jJkevVrZEiL5mkj6lKqWeV8l+uis5eTneLLmppqEOo9oigHxLKMulta+AOQ5NwgOWmmb9P+z1L3m50L5QbFKgucqnanetZDWPd4bqbKhAw9JzoYj7A6yACuh0NQBhHUIMFZFeA+cgIXyIFHPIPX4De+ljFi2kTdrwerGPrz7DZnXIHjDiuSpQbEo4ElFjQE30Np35pROC7hHLuigdFX2sYnkDp4+BD61xuPqEtB00IVWDX6PD6jfIqLXtF6g6ecmIu3Kb4gQ7mWuY8M57uLj2Cdq0WQWerOkiMMa

Hi all, hi Valentin,

It looks to me like the section mechanism is both super useful, which makes people continue to use it, and a constant pain, which makes people keep reporting bugs or feature-requests related to it.

In order for the Coq developers team to improve it, it would be good to know precisely what people use it for. I'm not saying that no one in the Coq developers team know what its uses are but it looks to me that at least some of them are lacking the knowledge of at least some of its uses.

In particular there is a more recent mechanism called Generalizable Variables https://coq.inria.fr/distrib/8.5pl3/refman/Reference-Manual004.html#hevea_command71 (introduced in 8.3 while sections go back as far as I can see in CHANGES, that is beyond 7.0).
What do you want to do with sections that you cannot do with Generalizable Variables? In particular, could the use of the latter instead of the former solve the particular problem you are having (since anyway, wanting to define the same notation inside and outside the section probably means that your section variables are implicit anyways).

Cheers,
Théo

Le mer. 23 nov. 2016 à 23:22, Vadim Zaliva <vzaliva AT cmu.edu> a écrit :
I usually go with your option #1 and as you mentioned it is not perfect.
I would be great to have "Global" modifier for "Notation" command like we have for 
"Instance".

Vadim

--
CMU ECE PhD candidate


On Tue, Nov 22, 2016 at 4:13 PM, Valentin Robert <valentin.robert.42 AT gmail.com> wrote:
Dear club,

According to the reference manual:
"Notations do not survive the end of sections."

I would like to understand whether a) this is a wanted feature b) this is a constraint or c) a choice of the current implementation, or d) this is due to some theoretical issue with trying to make them survive.

In particular, I often find myself in the following conundrum:
- I open a section and define some section context (variables and definitions).
- I define something that I'd like to use a notation for.
- I want to use the notation within the rest of the section, but also outside the section.

It seems my options are:

i)
Define the notation once for within the section, and then again after leaving the section.
Not great if I later decide to change the notation and want to keeps things uniform.

ii)
Abandon the idea of having the notation within the section.
Makes the section theorems harder to read from the source code point of view.

iii)
Close the section. Define the notation. Open a similar section.
Not great if the section setup is heavy, and this artificially breaks sections into weird notation-separated-blocks.

Is there a better way of going about this I'm missing? Otherwise, which poison do people pick?

- Valentin




Archive powered by MHonArc 2.6.18.

Top of Page