Comments (17)
On Nov 5, 2014, at 3:52 PM, Benedikt Ahrens [email protected] wrote:
Notation "∀ x .. y , P" := (forall x, .. (forall y, P) ..)
(at level 200, x binder, y binder, right associativity) : type_scope.
Can you explain what it means (e.g. give a few examples)?
V.
from unimath.
On 11/05/2014 04:58 PM, Vladimir Voevodsky wrote:
On Nov 5, 2014, at 3:52 PM, Benedikt Ahrens [email protected] wrote:
Notation "∀ x .. y , P" := (forall x, .. (forall y, P) ..)
(at level 200, x binder, y binder, right associativity) : type_scope.Can you explain what it means (e.g. give a few examples)?
This particular notation is actually also defined in the Coq standard
library [1].
I use it in [2, see e.g. lines 87 - 91], where I also indicate implicit
arguments via {} as in the type annotation of
Definition I {C : folds_3_id_comp_eq} : ∀ {a : C}, a ⇒ a → UU := pr1
(pr1 (pr2 C)).
Concerning the individual data of the "Notation" command:
i) The level assigns a precedence to the notation - 200 is the lowest
precedence.
ii)saying that x and y are binders allows to write, e.g.,
∀ a b : T
instead of
∀ (a : T) (b : T)
(there are more variants for binders, documented in [3, sec. 12.1.13])
iii) right associativity is the same as for function spaces
So far, I have not come across a situation where ∀ behaves differently
from "forall".
[1] https://coq.inria.fr/distrib/current/stdlib/Coq.Unicode.Utf8_core.html
[2]
https://github.com/benediktahrens/folds/blob/master/coq/folds_pre_2_cat.v
[3] https://coq.inria.fr/distrib/current/refman/Reference-Manual014.html
from unimath.
Even though environments for other dependently typed systems (for example the Agda Emacs mode) make inputting Unicode very easy, they are essentially limited to either mimicking LaTeX commands, or support only few symbols; the rest has to be done by hand -- see e.g. [1]. What is your preferred approach in this case?
It may be old-fashioned, but not many things can go wrong when sticking with ASCII.
[1] http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.UnicodeInput
from unimath.
On 11/05/2014 06:09 PM, Alex Kavvos wrote:
Even though environments for other dependently typed systems (for
example the Agda Emacs mode) make inputting Unicode very easy, they
are essentially limited to either mimicking LaTeX commands, or
support only few symbols; the rest has to be done by hand -- see e.g.
[1]. What is your preferred approach in this case?
I am using the Agda input method in ProofGeneral for writing Unicode
characters in Coq files.
from unimath.
Actually the part that I did not understand is .. what does it stand for? Can I write
Sigma { x : A } ( y : B ) , P x y .
? If so then what will it mean? I am using Sigma instead of you unicode thing.
V.
On Nov 5, 2014, at 4:32 PM, Benedikt Ahrens [email protected] wrote:
On 11/05/2014 04:58 PM, Vladimir Voevodsky wrote:
On Nov 5, 2014, at 3:52 PM, Benedikt Ahrens [email protected] wrote:
Notation "∀ x .. y , P" := (forall x, .. (forall y, P) ..)
(at level 200, x binder, y binder, right associativity) : type_scope.Can you explain what it means (e.g. give a few examples)?
This particular notation is actually also defined in the Coq standard
library [1].I use it in [2, see e.g. lines 87 - 91], where I also indicate implicit
arguments via {} as in the type annotation of
Definition I {C : folds_3_id_comp_eq} : ∀ {a : C}, a ⇒ a → UU := pr1
(pr1 (pr2 C)).Concerning the individual data of the "Notation" command:
i) The level assigns a precedence to the notation - 200 is the lowest
precedence.
ii)saying that x and y are binders allows to write, e.g.,
∀ a b : T
instead of
∀ (a : T) (b : T)
(there are more variants for binders, documented in [3, sec. 12.1.13])
iii) right associativity is the same as for function spacesSo far, I have not come across a situation where ∀ behaves differently
from "forall".[1] https://coq.inria.fr/distrib/current/stdlib/Coq.Unicode.Utf8_core.html
[2]
https://github.com/benediktahrens/folds/blob/master/coq/folds_pre_2_cat.v[3] https://coq.inria.fr/distrib/current/refman/Reference-Manual014.html
—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
Yes, I would prefer ASCII for now as well. But I like this
Notation "'Σ' x .. y , P" := (total2 (fun x => .. (total2 (fun y => P)) ..))
(at level 200, x binder, y binder, right associativity) : type_scope.
with Sigma instead of the unicode thing.
Maybe lambda, also as a word.
We can have an infix for dirprod e.g. times. It would then be (( A times B ) times C) and if
we decide to use unicode later it will be a matter of a simple “replace”.
Does this
| A |
work for ishinh?
V.
On Nov 5, 2014, at 5:09 PM, Alex Kavvos [email protected] wrote:
Even though environments for other dependently typed systems (for example the Agda Emacs mode) make inputting Unicode very easy, they are essentially limited to either mimicking LaTeX commands, or support only few symbols; the rest has to be done by hand -- see e.g. [1]. What is your preferred approach in this case?
It may be old-fashioned, but not many things can go wrong when sticking with ASCII.
[1] http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.UnicodeInput http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.UnicodeInput
—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
On 11/05/2014 07:22 PM, Vladimir Voevodsky wrote:
Actually the part that I did not understand is .. what does it stand for? Can I write
Sigma { x : A } ( y : B ) , P x y .
? If so then what will it mean? I am using Sigma instead of you unicode thing.
The ".." stands for recursive patterns. A basic example from the Coq
documentation is for lists (Sec. 12.1.12):
Notation "[ x ; .. ; y ]" := (cons x .. (cons y nil) ..).
Usage examples for Sigma:
Require Import UniMath.Foundations.Generalities.uu0.
Notation "'Sigma' x .. y , P" := (total2 (fun x => .. (total2 (fun y =>
P)) ..))
(at level 200, x binder, y binder, right associativity) : type_scope.
Variable A : UU.
Variable B : A -> UU.
Variable C : forall a : A, B a -> UU.
Definition total3 := Sigma a b, C a b.
Definition total3':= Sigma (a : A) (b : B a), C a b.
Remark: I don't think there is a difference between {} and () for Sigma,
but both work, as in
Definition total3':= Sigma {a : A} b, C a b.
from unimath.
On 11/05/2014 07:30 PM, Vladimir Voevodsky wrote:
Does this
| A |
work for ishinh?
The "|" ("pipe") is used also in pattern matching, but that does not
seem to prevent usage in notations - see various usages of the pipe in
notations of the standard library:
https://coq.inria.fr/distrib/current/stdlib/Coq.Init.Notations.html
from unimath.
The I would prefer | | to the unicode one. Also, I have a question. How does one find out the meaning of a notation?
V.
On Nov 5, 2014, at 10:28 PM, Benedikt Ahrens [email protected] wrote:
On 11/05/2014 07:30 PM, Vladimir Voevodsky wrote:
Does this
| A |
work for ishinh?
The "|" ("pipe") is used also in pattern matching, but that does not
seem to prevent usage in notations - see various usages of the pipe in
notations of the standard library:https://coq.inria.fr/distrib/current/stdlib/Coq.Init.Notations.html
—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
On 11/06/2014 05:00 PM, Vladimir Voevodsky wrote:
The I would prefer | | to the unicode one. Also, I have a question.
How does one find out the meaning of a notation?
The Coq vernacular "Locate" should help here, as in
Locate "|".
from unimath.
Maybe we could add a line to README with this hint since we are planning to have all these notations?
V.
On Nov 6, 2014, at 9:16 PM, Benedikt Ahrens [email protected] wrote:
On 11/06/2014 05:00 PM, Vladimir Voevodsky wrote:
The I would prefer | | to the unicode one. Also, I have a question.
How does one find out the meaning of a notation?The Coq vernacular "Locate" should help here, as in
Locate "|".
—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
On 11/06/2014 10:45 PM, Vladimir Voevodsky wrote:
Maybe we could add a line to README with this hint since we are
planning to have all these notations?
I am a bit reluctant to turn the README into a Coq manual; it should
instead convey, as briefly as possible, the contents of the UniMath
repository and how to obtain/compile the code.
Instead, I suggest making a wiki page on Github to store such
information. The README can link to the wiki.
This solution scales better in case we turn it into a real "cheat sheet"
for Coq.
from unimath.
Sounds good to me. Such a cheat sheet can be very helpful.
On Nov 6, 2014, at 10:14 PM, Benedikt Ahrens [email protected] wrote:
On 11/06/2014 10:45 PM, Vladimir Voevodsky wrote:
Maybe we could add a line to README with this hint since we are
planning to have all these notations?I am a bit reluctant to turn the README into a Coq manual; it should
instead convey, as briefly as possible, the contents of the UniMath
repository and how to obtain/compile the code.Instead, I suggest making a wiki page on Github to store such
information. The README can link to the wiki.
This solution scales better in case we turn it into a real "cheat sheet"
for Coq.
—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
ProofGeneral provides that command on C-c C-a C-n
On Thu, Nov 6, 2014 at 9:45 PM, Vladimir Voevodsky <[email protected]
wrote:
Maybe we could add a line to README with this hint since we are planning
to have all these notations?
V.On Nov 6, 2014, at 9:16 PM, Benedikt Ahrens [email protected]
wrote:On 11/06/2014 05:00 PM, Vladimir Voevodsky wrote:
The I would prefer | | to the unicode one. Also, I have a question.
How does one find out the meaning of a notation?The Coq vernacular "Locate" should help here, as in
Locate "|".
—
Reply to this email directly or view it on GitHub <
https://github.com/UniMath/UniMath/issues/46#issuecomment-62052597>.—
Reply to this email directly or view it on GitHub
#46 (comment).
from unimath.
This kind of thing it would be good to have in the help file that Benedikt suggested.
V.
On Nov 7, 2014, at 10:40 AM, Daniel R. Grayson [email protected] wrote:
ProofGeneral provides that command on C-c C-a C-n
On Thu, Nov 6, 2014 at 9:45 PM, Vladimir Voevodsky <[email protected]
wrote:
Maybe we could add a line to README with this hint since we are planning
to have all these notations?
V.On Nov 6, 2014, at 9:16 PM, Benedikt Ahrens [email protected]
wrote:On 11/06/2014 05:00 PM, Vladimir Voevodsky wrote:
The I would prefer | | to the unicode one. Also, I have a question.
How does one find out the meaning of a notation?The Coq vernacular "Locate" should help here, as in
Locate "|".
—
Reply to this email directly or view it on GitHub <
https://github.com/UniMath/UniMath/issues/46#issuecomment-62052597>.—
Reply to this email directly or view it on GitHub
#46 (comment).—
Reply to this email directly or view it on GitHub #46 (comment).
from unimath.
It would be even better to have it in the ProofGeneral User Manual, where
it seems
not to appear :
11.1 Coq-specific commands
Coq Proof General supplies the following key-bindings:
C-c C-a C-i
Inserts “Intros ”
C-c C-a C-a
Inserts “Apply ”
C-c C-a C-s
Inserts “Section ”
C-c C-a C-e
Inserts “End <section-name>.” (this should work well with nested
sections).
C-c C-a C-o
Prompts for a SearchIsos argument.
On Fri, Nov 7, 2014 at 11:37 AM, Vladimir Voevodsky <
[email protected]> wrote:
This kind of thing it would be good to have in the help file that Benedikt
suggested.V.
On Nov 7, 2014, at 10:40 AM, Daniel R. Grayson [email protected]
wrote:ProofGeneral provides that command on C-c C-a C-n
On Thu, Nov 6, 2014 at 9:45 PM, Vladimir Voevodsky <
[email protected]wrote:
Maybe we could add a line to README with this hint since we are
planning
to have all these notations?
V.On Nov 6, 2014, at 9:16 PM, Benedikt Ahrens <
[email protected]>
wrote:On 11/06/2014 05:00 PM, Vladimir Voevodsky wrote:
The I would prefer | | to the unicode one. Also, I have a
question.
How does one find out the meaning of a notation?The Coq vernacular "Locate" should help here, as in
Locate "|".
—
Reply to this email directly or view it on GitHub <
https://github.com/UniMath/UniMath/issues/46#issuecomment-62052597>.—
Reply to this email directly or view it on GitHub
#46 (comment).—
Reply to this email directly or view it on GitHub <
https://github.com/UniMath/UniMath/issues/46#issuecomment-62125721>.—
Reply to this email directly or view it on GitHub
#46 (comment).
from unimath.
Closing this issue - Unicode will not be used for now.
from unimath.
Related Issues (20)
- Beta-reduction for pairs is problematic
- New package: order theory HOT 10
- Get rid of UU : UU warning?
- Code should be reactivated [was: Compilation seems to hang at Qed.] HOT 9
- Using PathOver in definitions and constructions of displayed things? HOT 3
- Error `/bin/sh: Argument list too long` when doing `$ make install` HOT 13
- there are competing implementations of a full subcategory HOT 9
- how to keep track of which .v files of UniMath are being compiled?
- which version of Coq are we allowed to use? HOT 2
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 HOT 4
- A warning HOT 4
- Defining objects, morphisms and categories separately or together HOT 3
- Error "Argument list too long" when running sanity checks HOT 3
- Who are contributors anonymous-1234567 and anonymous-13243557? HOT 3
- compilation problems in CI with Coq 8.20 (dev) HOT 2
- Please help debug ltac induced error HOT 2
- Updating names with "wrong capitalization" HOT 5
- Reversible coercions HOT 1
- Compile times for model categories HOT 3
- Coqdoc generation documentation and reduction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unimath.