2
\documentclass{article}
11
\title{Syntax of Coq V8}
13
%% Le _ est un caractère normal
16
\def_{\ifmmode\sb\else\subscr\fi}
18
\def\bfbar{\ensuremath{|\hskip -0.22em{}|\hskip -0.24em{}|}}
20
\def\TERMbarbar{\bfbar\bfbar}
22
\def\infx#1{\notv#1\notv}
25
%% Macros pour les grammaires
26
\def\GR#1{\text{\large(}#1\text{\large)}}
27
\def\NT#1{\langle\textit{#1}\rangle}
28
\def\NTL#1#2{\langle\textit{#1}\rangle_{#2}}
29
\def\TERM#1{{\bf\textrm{\bf #1}}}
30
%\def\TERM#1{{\bf\textsf{#1}}}
32
\def\ETERM#1{\TERM{#1}}
33
\def\CHAR#1{\TERM{#1}}
36
\def\STARGR#1{\GR{#1}*}
38
\def\PLUSGR#1{\GR{#1}+}
40
\def\OPTGR#1{\GR{#1}?}
41
%% Tableaux de definition de non-terminaux
42
\newenvironment{cadre}
43
{\begin{array}{|c|}\hline\\}
44
{\\\\\hline\end{array}}
45
\newenvironment{rulebox}
46
{$$\begin{cadre}\begin{array}{r@{~}c@{~}l@{}l@{}r}}
47
{\end{array}\end{cadre}$$}
48
\def\DEFNT#1{\NT{#1} & ::= &}
49
\def\EXTNT#1{\NT{#1} & ::= & ... \\&|&}
50
\def\RNAME#1{(\textsc{#1})}
54
\newenvironment{rules}
55
{\begin{center}\begin{rulebox}}
56
{\end{rulebox}\end{center}}
62
\section{Meta notations used in this document}
64
Non-terminals are printed between angle brackets (e.g. $\NT{non-terminal}$) and
65
terminal symbols are printed in bold font (e.g. $\ETERM{terminal}$). Lexemes
66
are displayed as non-terminals.
68
The usual operators on regular expressions:
71
\hfil notation & \hfil meaning \\
73
$\STAR{regexp}$ & repeat $regexp$ 0 or more times \\
74
$\PLUS{regexp}$ & repeat $regexp$ 1 or more times \\
75
$\OPT{regexp}$ & $regexp$ is optional \\
76
$regexp_1~\mid~regexp_2$ & alternative
80
Parenthesis are used to group regexps. Beware to distinguish this operator
81
$\GR{~}$ from the terminals $\ETERM{( )}$, and $\mid$ from terminal
84
Rules are optionaly annotated in the right margin with:
86
\item a precedence and associativity (L for left, R for right and N for no associativity), indicating how to solve conflicts;
87
lower levels are tighter;
90
In order to solve some conflicts, a non-terminal may be invoked with a
91
precedence (notation: $\NTL{entry}{prec}$), meaning that rules with higher
92
precedence do not apply.
94
\section{Lexical conventions}
96
Lexical categories are:
99
\STARGR{\NT{letter}\mid\CHAR{_}}
100
\STARGR{\NT{letter}\mid \NT{digit} \mid \CHAR{'} \mid \CHAR{_}}
102
\DEFNT{field} \CHAR{.}\NT{ident}
104
\DEFNT{meta-ident} \CHAR{?}\NT{ident}
106
\DEFNT{num} \PLUS{\NT{digit}}
108
\DEFNT{int} \NT{num} \mid \CHAR{-}\NT{num}
110
\DEFNT{digit} \CHAR{0}-\CHAR{9}
112
\DEFNT{letter} \CHAR{a}-\CHAR{z}\mid\CHAR{A}-\CHAR{Z}
113
\mid\NT{unicode-letter}
116
\DEFNT{string} \CHAR{"}~\STARGR{\CHAR{""}\mid\NT{unicode-char-but-"}}~\CHAR{"}
119
Reserved identifiers for the core syntax are:
141
Symbols used in the core syntax:
158
Note that \TERM{struct} is not a reserved identifier.
160
\section{Syntax of terms}
162
\subsection{Core syntax}
164
The main entry point of the term grammar is $\NTL{constr}{9}$. When no
165
conflict can appear, $\NTL{constr}{200}$ is also used as entry point.
169
\NT{binder-constr} &200R~~ &\RNAME{binders}
170
\nlsep \NT{constr}~\KWD{:}~\NT{constr} &100R &\RNAME{cast}
171
\nlsep \NT{constr}~\KWD{:}~\NT{binder-constr} &100R &\RNAME{cast'}
172
\nlsep \NT{constr}~\KWD{$\rightarrow$}~\NT{constr} &80R &\RNAME{arrow}
173
\nlsep \NT{constr}~\KWD{$\rightarrow$}~\NT{binder-constr} &80R &\RNAME{arrow'}
174
\nlsep \NT{constr}~\PLUS{\NT{appl-arg}} &10L &\RNAME{apply}
175
\nlsep \KWD{@}~\NT{reference}~\STAR{\NTL{constr}{9}} &10L &\RNAME{expl-apply}
176
\nlsep \NT{constr}~\KWD{.(}
177
~\NT{reference}~\STAR{\NT{appl-arg}}~\TERM{)} &1L & \RNAME{proj}
178
\nlsep \NT{constr}~\KWD{.(}~\TERM{@}
179
~\NT{reference}~\STAR{\NTL{constr}{9}}~\TERM{)} &1L & \RNAME{expl-proj}
180
\nlsep \NT{constr} ~ \KWD{\%} ~ \NT{ident} &1L &\RNAME{scope-chg}
181
\nlsep \NT{atomic-constr} &0
182
\nlsep \NT{match-expr} &0
183
\nlsep \KWD{(}~\NT{constr}~\KWD{)} &0
185
\DEFNT{binder-constr}
186
\KWD{forall}~\NT{binder-list}~\KWD{,}~\NTL{constr}{200}
188
\nlsep \KWD{fun} ~\NT{binder-list} ~\KWD{$\Rightarrow$}~\NTL{constr}{200}
191
\nlsep \KWD{let}~\NT{ident-with-params} ~\KWD{:=}~\NTL{constr}{200}
192
~\KWD{in}~\NTL{constr}{200} &&\RNAME{let}
193
\nlsep \KWD{let}~\NT{single-fix} ~\KWD{in}~\NTL{constr}{200}
195
\nlsep \KWD{let}~\KWD{(}~\OPT{\NT{let-pattern}}~\KWD{)}~\OPT{\NT{return-type}}
196
~\KWD{:=}~\NTL{constr}{200}~\KWD{in}~\NTL{constr}{200}
198
\nlsep \KWD{if}~\NT{if-item}
199
~\KWD{then}~\NTL{constr}{200}~\KWD{else}~\NTL{constr}{200}
203
\KWD{(}~\NT{ident}~\!\KWD{:=}~\NTL{constr}{200}~\KWD{)}
205
\nlsep \KWD{(}~\NT{num}~\!\KWD{:=}~\NTL{constr}{200}~\KWD{)}
207
\nlsep \NTL{constr}{9}
209
\DEFNT{atomic-constr}
210
\NT{reference} && \RNAME{variables}
211
\nlsep \NT{sort} && \RNAME{CIC-sort}
212
\nlsep \NT{num} && \RNAME{number}
213
\nlsep \KWD{_} && \RNAME{hole}
214
\nlsep \NT{meta-ident} && \RNAME{meta/evar}
220
\DEFNT{ident-with-params}
221
\NT{ident}~\STAR{\NT{binder-let}}~\NT{type-cstr}
224
\NT{binder}~\STAR{\NT{binder-let}}
225
\nlsep \PLUS{\NT{name}}~\KWD{:}~\NT{constr}
228
\NT{name} &&\RNAME{infer}
229
\nlsep \KWD{(}~\PLUS{\NT{name}}~\KWD{:}~\NT{constr}
230
~\KWD{)} &&\RNAME{binder}
234
\nlsep \KWD{(}~\NT{name}~\NT{type-cstr}~\KWD{:=}~\NT{constr}~\KWD{)}
238
\nlsep \NT{name} ~\KWD{,} ~\NT{let-pattern}
241
\OPTGR{\KWD{:}~\NT{constr}}
244
\NT{ident} && \RNAME{short-ident}
245
\nlsep \NT{ident}~\PLUS{\NT{field}} && \RNAME{qualid}
248
\KWD{Prop} ~\mid~ \KWD{Set} ~\mid~ \KWD{Type}
251
\NT{ident} ~\mid~ \KWD{_}
257
\nlsep \NT{single-fix}~\PLUSGR{\KWD{with}~\NT{fix-decl}}
258
~\KWD{for}~\NT{ident}
261
\NT{fix-kw}~\NT{fix-decl}
263
\DEFNT{fix-kw} \KWD{fix} ~\mid~ \KWD{cofix}
266
\NT{ident}~\STAR{\NT{binder-let}}~\OPT{\NT{annot}}~\NT{type-cstr}
267
~\KWD{:=}~\NTL{constr}{200}
270
\KWD{\{}~\TERM{struct}~\NT{ident}~\KWD{\}}
276
\KWD{match}~\NT{match-items}~\OPT{\NT{return-type}}~\KWD{with}
277
~\OPT{\TERMbar}~\OPT{\NT{branches}}~\KWD{end} &&\RNAME{match}
280
\NT{match-item} ~\KWD{,} ~\NT{match-items}
281
\nlsep \NT{match-item}
284
\NTL{constr}{100}~\OPTGR{\KWD{as}~\NT{name}}
285
~\OPTGR{\KWD{in}~\NTL{constr}{100}}
288
\KWD{return}~\NTL{constr}{100}
291
\NT{constr}~\OPTGR{\OPTGR{\KWD{as}~\NT{name}}~\NT{return-type}}
294
\NT{eqn}~\TERMbar~\NT{branches}
298
\NT{pattern} ~\STARGR{\KWD{,}~\NT{pattern}}
299
~\KWD{$\Rightarrow$}~\NT{constr}
302
\NT{reference}~\PLUS{\NT{pattern}} &1L~~ & \RNAME{constructor}
303
\nlsep \NT{pattern}~\KWD{as}~\NT{ident} &1L & \RNAME{alias}
304
\nlsep \NT{pattern}~\KWD{\%}~\NT{ident} &1L & \RNAME{scope-change}
305
\nlsep \NT{reference} &0 & \RNAME{pattern-var}
306
\nlsep \KWD{_} &0 & \RNAME{hole}
308
\nlsep \KWD{(}~\NT{tuple-pattern}~\KWD{)}
310
\DEFNT{tuple-pattern}
312
\nlsep \NT{tuple-pattern}~\KWD{,}~\NT{pattern} && \RNAME{pair}
315
\subsection{Notations of the prelude (logic and basic arithmetic)}
321
\text{Symbol} & \text{precedence} \\
324
\KWD{IF}~\notv~\KWD{then}~\notv~\KWD{else}~\notv
327
\infx{\leftrightarrow} & 95N \\
328
\infx{\rightarrow} & 90R \\
330
\infx{\wedge} & 80R \\
331
\tilde{}\notv & 75R \\
332
\begin{array}[c]{@{}l@{}}
333
\infx{=}\quad \infx{=}\KWD{$:>$}\notv \quad \infx{=}=\notv
334
\quad \infx{\neq} \quad \infx{\neq}\KWD{$:>$}\notv \\
335
\infx{<}\quad\infx{>} \quad \infx{\leq}\quad\infx{\geq}
336
\quad \infx{<}<\notv \quad \infx{<}\leq\notv
337
\quad \infx{\leq}<\notv \quad \infx{\leq}\leq\notv
339
\infx{+}\quad\infx{-}\quad -\notv & 50L \\
340
\infx{*}\quad\infx{/}\quad /\notv & 40L \\
344
Existential quantifiers follows the \KWD{forall} notation (with same
345
precedence 200), but only one quantified variable is allowed.
348
\EXTNT{binder-constr}
349
\NT{quantifier-kwd}~\NT{name}~\NT{type-cstr}~\KWD{,}~\NTL{constr}{200} \\
351
\DEFNT{quantifier-kwd}
352
\TERM{exists} && \RNAME{ex}
353
\nlsep \TERM{exists2} && \RNAME{ex2}
358
\text{Symbol} & \text{precedence} \\
360
\notv+\{\notv\} & 50 & \RNAME{sumor} \\
361
\{\notv:\notv~|~\notv\} & 0 & \RNAME{sig} \\
362
\{\notv:\notv~|~\notv \& \notv \} & 0 & \RNAME{sig2} \\
363
\{\notv:\notv~\&~\notv \} & 0 & \RNAME{sigS} \\
364
\{\notv:\notv~\&~\notv \& \notv \} & 0 & \RNAME{sigS2} \\
365
\{\notv\}+\{\notv\} & 0 & \RNAME{sumbool} \\
369
%% Strange: nat + {x:nat|x=x} * nat == ( + ) *
371
\section{Grammar of tactics}
373
\def\tacconstr{\NTL{constr}{9}}
374
\def\taclconstr{\NTL{constr}{200}}
376
Additional symbols are:
384
~~ \TERM{$\leftarrow$}
386
Additional reserved keywords are:
391
\subsection{Basic tactics}
394
\DEFNT{simple-tactic}
395
\TERM{intros}~\TERM{until}~\NT{quantified-hyp}
396
\nlsep \TERM{intros}~\NT{intro-patterns}
397
\nlsep \TERM{intro}~\OPT{\NT{ident}}~\OPTGR{\TERM{after}~\NT{ident}}
399
\nlsep \TERM{assumption}
400
\nlsep \TERM{exact}~\tacconstr
402
\nlsep \TERM{apply}~\NT{constr-with-bindings}
403
\nlsep \TERM{elim}~\NT{constr-with-bindings}~\OPT{\NT{eliminator}}
404
\nlsep \TERM{elimtype}~\tacconstr
405
\nlsep \TERM{case}~\NT{constr-with-bindings}
406
\nlsep \TERM{casetype}~\tacconstr
407
\nlsep \KWD{fix}~\OPT{\NT{ident}}~\NT{num}
408
\nlsep \KWD{fix}~\NT{ident}~\NT{num}~\KWD{with}~\PLUS{\NT{fix-spec}}
409
\nlsep \KWD{cofix}~\OPT{\NT{ident}}
410
\nlsep \KWD{cofix}~\NT{ident}~\PLUS{\NT{fix-spec}}
412
\nlsep \TERM{cut}~\tacconstr
413
\nlsep \TERM{assert}~\tacconstr
414
\nlsep \TERM{assert}~
415
\TERM{(}~\NT{ident}~\KWD{:}~\taclconstr~\TERM{)}
416
\nlsep \TERM{assert}~
417
\TERM{(}~\NT{ident}~\KWD{:=}~\taclconstr~\TERM{)}
418
\nlsep \TERM{pose}~\tacconstr
420
\TERM{(}~\NT{ident}~\KWD{:=}~\taclconstr~\TERM{)}
421
\nlsep \TERM{generalize}~\PLUS{\tacconstr}
422
\nlsep \TERM{generalize}~\TERM{dependent}~\tacconstr
423
\nlsep \TERM{set}~\tacconstr~\OPT{\NT{clause}}
425
\TERM{(}~\NT{ident}~\KWD{:=}~\taclconstr~\TERM{)}~\OPT{\NT{clause}}
426
\nlsep \TERM{instantiate}~
427
\TERM{(}~\NT{num}~\TERM{:=}~\taclconstr~\TERM{)}~\OPT{\NT{clause}}
429
\nlsep \TERM{specialize}~\OPT{\NT{num}}~\NT{constr-with-bindings}
430
\nlsep \TERM{lapply}~\tacconstr
432
\nlsep \TERM{simple}~\TERM{induction}~\NT{quantified-hyp}
433
\nlsep \TERM{induction}~\NT{induction-arg}~\OPT{\NT{with-names}}
434
~\OPT{\NT{eliminator}}
435
\nlsep \TERM{double}~\TERM{induction}~\NT{quantified-hyp}~\NT{quantified-hyp}
436
\nlsep \TERM{simple}~\TERM{destruct}~\NT{quantified-hyp}
437
\nlsep \TERM{destruct}~\NT{induction-arg}~\OPT{\NT{with-names}}
438
~\OPT{\NT{eliminator}}
439
\nlsep \TERM{decompose}~\TERM{record}~\tacconstr
440
\nlsep \TERM{decompose}~\TERM{sum}~\tacconstr
441
\nlsep \TERM{decompose}~\TERM{[}~\PLUS{\NT{reference}}~\TERM{]}
448
\EXTNT{simple-tactic}
449
\TERM{trivial}~\OPT{\NT{hint-bases}}
450
\nlsep \TERM{auto}~\OPT{\NT{num}}~\OPT{\NT{hint-bases}}
452
%%\nlsep \TERM{autotdb}~\OPT{\NT{num}}
453
%%\nlsep \TERM{cdhyp}~\NT{ident}
454
%%\nlsep \TERM{dhyp}~\NT{ident}
455
%%\nlsep \TERM{dconcl}
456
%%\nlsep \TERM{superauto}~\NT{auto-args}
457
\nlsep \TERM{auto}~\OPT{\NT{num}}~\TERM{decomp}~\OPT{\NT{num}}
459
\nlsep \TERM{clear}~\PLUS{\NT{ident}}
460
\nlsep \TERM{clearbody}~\PLUS{\NT{ident}}
461
\nlsep \TERM{move}~\NT{ident}~\TERM{after}~\NT{ident}
462
\nlsep \TERM{rename}~\NT{ident}~\TERM{into}~\NT{ident}
464
\nlsep \TERM{left}~\OPT{\NT{with-binding-list}}
465
\nlsep \TERM{right}~\OPT{\NT{with-binding-list}}
466
\nlsep \TERM{split}~\OPT{\NT{with-binding-list}}
467
\nlsep \TERM{exists}~\OPT{\NT{binding-list}}
468
\nlsep \TERM{constructor}~\NT{num}~\OPT{\NT{with-binding-list}}
469
\nlsep \TERM{constructor}~\OPT{\NT{tactic}}
471
\nlsep \TERM{reflexivity}
472
\nlsep \TERM{symmetry}~\OPTGR{\KWD{in}~\NT{ident}}
473
\nlsep \TERM{transitivity}~\tacconstr
475
\nlsep \NT{inversion-kwd}~\NT{quantified-hyp}~\OPT{\NT{with-names}}~\OPT{\NT{clause}}
476
\nlsep \TERM{dependent}~\NT{inversion-kwd}~\NT{quantified-hyp}
477
~\OPT{\NT{with-names}}~\OPTGR{\KWD{with}~\tacconstr}
478
\nlsep \TERM{inversion}~\NT{quantified-hyp}~\TERM{using}~\tacconstr~\OPT{\NT{clause}}
480
\nlsep \NT{red-expr}~\OPT{\NT{clause}}
481
\nlsep \TERM{change}~\NT{conversion}~\OPT{\NT{clause}}
484
\TERM{red} ~\mid~ \TERM{hnf} ~\mid~ \TERM{compute}
485
\nlsep \TERM{simpl}~\OPT{\NT{pattern-occ}}
486
\nlsep \TERM{cbv}~\PLUS{\NT{red-flag}}
487
\nlsep \TERM{lazy}~\PLUS{\NT{red-flag}}
488
\nlsep \TERM{unfold}~\NT{unfold-occ}~\STARGR{\KWD{,}~\NT{unfold-occ}}
489
\nlsep \TERM{fold}~\PLUS{\tacconstr}
490
\nlsep \TERM{pattern}~\NT{pattern-occ}~\STARGR{\KWD{,}~\NT{pattern-occ}}
493
\NT{pattern-occ}~\KWD{with}~\tacconstr
496
\DEFNT{inversion-kwd}
497
\TERM{inversion} ~\mid~ \TERM{invesion_clear} ~\mid~
498
\TERM{simple}~\TERM{inversion}
501
Conflicts exists between integers and constrs.
504
\DEFNT{quantified-hyp}
505
\NT{int}~\mid~\NT{ident}
507
\DEFNT{induction-arg}
508
\NT{int}~\mid~\tacconstr
511
\KWD{(}~\NT{ident}~\STAR{\NT{binder}}~\OPT{\NT{annot}}
512
~\KWD{:}~\taclconstr~\KWD{)}
514
\DEFNT{intro-patterns}
515
\STAR{\NT{intro-pattern}}
517
\DEFNT{intro-pattern}
519
\nlsep \TERM{[}~\NT{intro-patterns}~\STARGR{\TERMbar~\NT{intro-patterns}}
521
\nlsep \KWD{(}~\NT{intro-pattern}~\STARGR{\KWD{,}~\NT{intro-pattern}}
525
% \KWD{as}~\TERM{[}~\STAR{\NT{ident}}~\STARGR{\TERMbar~\STAR{\NT{ident}}}
527
\KWD{as}~\NT{intro-pattern}
530
\TERM{using}~\NT{constr-with-bindings}
532
\DEFNT{constr-with-bindings}
533
% dangling ``with'' of ``fix'' can conflict with ``with''
534
\tacconstr~\OPT{\NT{with-binding-list}}
536
\DEFNT{with-binding-list}
537
\KWD{with}~\NT{binding-list}
541
\nlsep \PLUS{\NT{simple-binding}}
543
\DEFNT{simple-binding}
544
\KWD{(}~\NT{quantified-hyp}~\KWD{:=}~\taclconstr~\KWD{)}
547
\TERM{beta} ~\mid~ \TERM{iota} ~\mid~ \TERM{zeta}
548
~\mid~ \TERM{delta} ~\mid~
549
\TERM{delta}~\OPT{\TERM{-}}~\TERM{[}~\PLUS{\NT{reference}}~\TERM{]}
553
\nlsep \KWD{in}~\TERM{*}~\KWD{$\vdash$}~\OPT{\NT{concl-occ}}
554
\nlsep \KWD{in}~\OPT{\NT{hyp-ident-list}} ~\KWD{$\vdash$} ~\OPT{\NT{concl-occ}}
555
\nlsep \KWD{in}~\OPT{\NT{hyp-ident-list}}
557
\DEFNT{hyp-ident-list}
559
\nlsep \NT{hyp-ident}~\KWD{,}~\NT{hyp-ident-list}
563
\nlsep \KWD{(}~\TERM{type}~\TERM{of}~\NT{ident}~\KWD{)}
564
\nlsep \KWD{(}~\TERM{value}~\TERM{of}~\NT{ident}~\KWD{)}
567
\TERM{*} ~\NT{occurrences}
570
\tacconstr ~\NT{occurrences}
573
\NT{reference}~\NT{occurrences}
576
~\OPTGR{\KWD{at}~\PLUS{\NT{int}}}
580
\nlsep \KWD{with}~\PLUS{\NT{ident}}
583
\OPT{\NT{num}}~\OPTGR{\TERM{adding}~\TERM{[}~\PLUS{\NT{reference}}
584
~\TERM{]}}~\OPT{\TERM{destructuring}}~\OPTGR{\TERM{using}~\TERM{tdb}}
589
%% Currently, there are conflicts with keyword \KWD{in}: in the following,
590
%% has the keyword to be associated to \KWD{let} or to tactic \TERM{simpl} ?
592
%% \texttt{let x := simpl in ...}
598
\NT{tactic} ~\KWD{;} ~\NT{tactic} &5 &\RNAME{Then}
599
\nlsep \NT{tactic} ~\KWD{;}~\TERM{[} ~\OPT{\NT{tactic-seq}} ~\TERM{]}
602
\nlsep \TERM{try} ~\NT{tactic} &3R &\RNAME{Try}
603
\nlsep \TERM{do} ~\NT{int-or-var} ~\NT{tactic}
604
\nlsep \TERM{repeat} ~\NT{tactic}
605
\nlsep \TERM{progress} ~\NT{tactic}
606
\nlsep \TERM{info} ~\NT{tactic}
607
\nlsep \TERM{abstract}~\NTL{tactic}{2}~\OPTGR{\TERM{using}~\NT{ident}}
609
\nlsep \NT{tactic} ~\TERMbarbar ~\NT{tactic} &2R &\RNAME{Orelse}
611
\nlsep \KWD{fun} ~\PLUS{\NT{name}} ~\KWD{$\Rightarrow$}
612
~\NT{tactic} &1 &\RNAME{Fun-tac}
613
\nlsep \KWD{let} ~\NT{let-clauses} ~\KWD{in} ~\NT{tactic}
614
\nlsep \KWD{let} ~\TERM{rec} ~\NT{rec-clauses} ~\KWD{in} ~\NT{tactic}
615
\nlsep \KWD{match}~\OPT{\TERM{reverse}}~\TERM{goal}~\KWD{with}
616
~\OPT{\TERMbar}~\OPT{\NT{match-goal-rules}} ~\KWD{end}
617
\nlsep \KWD{match} ~\NT{tactic} ~\KWD{with}
618
~\OPT{\TERMbar}~\OPT{\NT{match-rules}} ~\KWD{end}
619
\nlsep \TERM{first}~\TERM{[} ~\NT{tactic-seq} ~\TERM{]}
620
\nlsep \TERM{solve}~\TERM{[} ~\NT{tactic-seq} ~\TERM{]}
622
\nlsep \TERM{fail} ~\OPT{\NT{num}} ~\OPT{\NT{string}}
623
\nlsep \TERM{constr}~\KWD{:}~\tacconstr
624
\nlsep \TERM{ipattern}~\KWD{:}~\NT{intro-pattern}
625
\nlsep \NT{term-ltac}
626
\nlsep \NT{reference}~\STAR{\NT{tactic-arg}} &&\RNAME{call-tactic}
627
\nlsep \NT{simple-tactic}
629
\nlsep \NT{tactic-atom} &0 &\RNAME{atomic}
630
\nlsep \KWD{(} ~\NT{tactic} ~\KWD{)}
633
\TERM{ltac}~\KWD{:}~\NTL{tactic}{0}
634
\nlsep \TERM{ipattern}~\KWD{:}~\NT{intro-pattern}
635
\nlsep \NT{term-ltac}
636
\nlsep \NT{tactic-atom}
640
\TERM{fresh} ~\OPT{\NT{string}}
641
\nlsep \TERM{context} ~\NT{ident} ~\TERM{[} ~\taclconstr ~\TERM{]}
642
\nlsep \TERM{eval} ~\NT{red-expr} ~\KWD{in} ~\tacconstr
643
\nlsep \TERM{type} ~\tacconstr
650
\NT{tactic} ~\TERMbar ~\NT{tactic-seq}
658
\NT{let-clause} ~\STARGR{\KWD{with}~\NT{let-clause}}
661
\NT{ident} ~\STAR{\NT{name}} ~\KWD{:=} ~\NT{tactic}
664
\NT{rec-clause} ~\KWD{with} ~\NT{rec-clauses}
665
\nlsep \NT{rec-clause}
668
\NT{ident} ~\PLUS{\NT{name}} ~\KWD{:=} ~\NT{tactic}
670
\DEFNT{match-goal-rules}
672
\nlsep \NT{match-goal-rule} ~\TERMbar ~\NT{match-goal-rules}
674
\DEFNT{match-goal-rule}
675
\NT{match-hyps-list} ~\TERM{$\vdash$} ~\NT{match-pattern}
676
~\KWD{$\Rightarrow$} ~\NT{tactic}
677
\nlsep \KWD{[}~\NT{match-hyps-list} ~\TERM{$\vdash$} ~\NT{match-pattern}
678
~\KWD{]}~\KWD{$\Rightarrow$} ~\NT{tactic}
679
\nlsep \KWD{_} ~\KWD{$\Rightarrow$} ~\NT{tactic}
681
\DEFNT{match-hyps-list}
682
\NT{match-hyps} ~\KWD{,} ~\NT{match-hyps-list}
683
\nlsep \NT{match-hyps}
686
\NT{name} ~\KWD{:} ~\NT{match-pattern}
690
\nlsep \NT{match-rule} ~\TERMbar ~\NT{match-rules}
693
\NT{match-pattern} ~\KWD{$\Rightarrow$} ~\NT{tactic}
694
\nlsep \KWD{_} ~\KWD{$\Rightarrow$} ~\NT{tactic}
696
\DEFNT{match-pattern}
697
\TERM{context}~\OPT{\NT{ident}}
698
~\TERM{[} ~\NT{constr-pattern} ~\TERM{]} &&\RNAME{subterm}
699
\nlsep \NT{constr-pattern}
701
\DEFNT{constr-pattern}
705
\subsection{Other tactics}
708
\EXTNT{simple-tactic}
709
\TERM{rewrite} ~\NT{orient} ~\NT{constr-with-bindings}
710
~\OPTGR{\KWD{in}~\NT{ident}}
711
\nlsep \TERM{replace} ~\tacconstr ~\KWD{with} ~\tacconstr
712
~\OPTGR{\KWD{in}~\NT{ident}}
713
\nlsep \TERM{replace} ~\OPT{\NT{orient}} ~\tacconstr
714
~\OPTGR{\KWD{in}~\NT{ident}}
715
\nlsep \TERM{symplify_eq} ~\OPT{\NT{quantified-hyp}}
716
\nlsep \TERM{discriminate} ~\OPT{\NT{quantified-hyp}}
717
\nlsep \TERM{injection} ~\OPT{\NT{quantified-hyp}}
718
\nlsep \TERM{conditional}~\NT{tactic}~\TERM{rewrite}~\NT{orient}
719
~\NT{constr-with-bindings}~\OPTGR{\KWD{in}~\NT{ident}}
720
\nlsep \TERM{dependent}~\TERM{rewrite}~\NT{orient}~\NT{ident}
721
\nlsep \TERM{cutrewrite}~\NT{orient}~\tacconstr
722
~\OPTGR{\KWD{in}~\NT{ident}}
723
\nlsep \TERM{absurd} ~\tacconstr
724
\nlsep \TERM{contradiction}
725
\nlsep \TERM{autorewrite}~\NT{hint-bases}~\OPTGR{\KWD{using}~\NT{tactic}}
726
\nlsep \TERM{refine}~\tacconstr
727
\nlsep \TERM{setoid_replace} ~\tacconstr ~\KWD{with} ~\tacconstr
728
\nlsep \TERM{setoid_rewrite} ~\NT{orient} ~\tacconstr
729
\nlsep \TERM{subst} ~\STAR{\NT{ident}}
731
\nlsep \TERM{decide}~\TERM{equality} ~\OPTGR{\tacconstr~\tacconstr}
732
\nlsep \TERM{compare}~\tacconstr~\tacconstr
734
\nlsep \TERM{eexact}~\tacconstr
735
\nlsep \TERM{eapply}~\NT{constr-with-bindings}
736
\nlsep \TERM{prolog}~\TERM{[}~\STAR{\tacconstr}~\TERM{]}
738
\nlsep \TERM{eauto}~\OPT{\NT{quantified-hyp}}~\OPT{\NT{quantified-hyp}}
740
\nlsep \TERM{eautod}~\OPT{\NT{quantified-hyp}}~\OPT{\NT{quantified-hyp}}
744
\nlsep \TERM{simplif}
745
\nlsep \TERM{intuition}~\OPT{\NTL{tactic}{0}}
746
\nlsep \TERM{linearintuition}~\OPT{\NT{num}}
750
\nlsep \TERM{field}~\STAR{\tacconstr}
751
%% contrib/firstorder
752
\nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}}
753
\nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}}~\KWD{with}~\PLUS{\NT{reference}}
754
\nlsep \TERM{ground}~\OPT{\NTL{tactic}{0}}~\KWD{using}~\PLUS{\NT{ident}}
755
%%\nlsep \TERM{gtauto}
756
\nlsep \TERM{gintuition}~\OPT{\NTL{tactic}{0}}
758
\nlsep \TERM{fourierZ}
760
\nlsep \TERM{functional}~\TERM{induction}~\tacconstr~\PLUS{\tacconstr}
762
\nlsep \TERM{jp}~\OPT{\NT{num}}
766
\nlsep \TERM{quote}~\NT{ident}~\OPTGR{\KWD{[}~\PLUS{\NT{ident}}~\KWD{]}}
767
\nlsep \TERM{ring}~\STAR{\tacconstr}
772
\KWD{$\rightarrow$}~\mid~\KWD{$\leftarrow$}
775
\section{Grammar of commands}
789
\subsection{Classification of commands}
793
\TERM{Time}~\NT{vernac} &2~~ &\RNAME{Timing}
795
\nlsep \NT{gallina}~\TERM{.} &1
796
\nlsep \NT{command}~\TERM{.}
797
\nlsep \NT{syntax}~\TERM{.}
798
\nlsep \TERM{[}~\PLUS{\NT{vernac}}~\TERM{]}~\TERM{.}
800
\nlsep \OPTGR{\NT{num}~\KWD{:}}~\NT{subgoal-command}~\TERM{.} ~~~&0
802
\DEFNT{subgoal-command}
804
\nlsep %\OPT{\TERM{By}}~
805
\NT{tactic}~\OPT{\KWD{..}}
808
\subsection{Gallina and extensions}
812
\NT{thm-token}~\NT{ident}~\STAR{\NT{binder-let}}~\KWD{:}~\NT{constr}
813
\nlsep \NT{def-token}~\NT{ident}~\NT{def-body}
814
\nlsep \NT{assum-token}~\NT{assum-list}
815
\nlsep \NT{finite-token}~\NT{inductive-definition}
816
~\STARGR{\KWD{with}~\NT{inductive-definition}}
817
\nlsep \TERM{Fixpoint}~\NT{fix-decl}~\STARGR{\KWD{with}~\NT{fix-decl}}
818
\nlsep \TERM{CoFixpoint}~\NT{fix-decl}~\STARGR{\KWD{with}~\NT{fix-decl}}
819
\nlsep \TERM{Scheme}~\NT{scheme}~\STARGR{\KWD{with}~\NT{scheme}}
821
\nlsep \NT{record-tok}~\OPT{\TERM{$>$}}~\NT{ident}~\STAR{\NT{binder-let}}
822
~\KWD{:}~\NT{constr}~\KWD{:=}
823
~\OPT{\NT{ident}}~\KWD{\{}~\NT{field-list}~\KWD{\}}
824
\nlsep \TERM{Ltac}~\NT{ltac-def}~\STARGR{~\TERM{with}~\NT{ltac-def}}
829
\TERM{Theorem} ~\mid~ \TERM{Lemma} ~\mid~ \TERM{Fact} ~\mid~ \TERM{Remark}
832
\TERM{Definition} ~\mid~ \TERM{Let} ~\mid~
833
\OPT{\TERM{Local}}~\TERM{SubClass}
836
\TERM{Hypothesis} ~\mid~ \TERM{Variable} ~\mid~ \TERM{Axiom} ~\mid~
840
\TERM{Inductive} ~\mid~ \TERM{CoInductive}
843
\TERM{Record} ~\mid~ \TERM{Structure}
849
\STAR{\NT{binder-let}}~\NT{type-cstr}~\KWD{:=}
850
~\OPT{\NT{reduce}}~\NT{constr}
851
\nlsep \STAR{\NT{binder-let}}~\KWD{:}~\NT{constr}
854
\TERM{Eval}~\NT{red-expr}~\KWD{in}
857
\NT{ident}~\STAR{\NT{name}}~\KWD{:=}~\NT{tactic}
859
\DEFNT{rec-definition}
860
\NT{fix-decl}~\OPT{\NT{decl-notation}}
862
\DEFNT{inductive-definition}
863
\OPT{\NT{string}}~\NT{ident}~\STAR{\NT{binder-let}}~\KWD{:}
864
~\NT{constr}~\KWD{:=}
865
~\OPT{\TERMbar}~\OPT{\NT{constructor-list}}
866
~\OPT{\NT{decl-notation}}
868
\DEFNT{constructor-list}
869
\NT{constructor}~\TERMbar~\NT{constructor-list}
870
\nlsep \NT{constructor}
873
\NT{ident}~\STAR{\NT{binder-let}}\OPTGR{\NT{coerce-kwd}~\NT{constr}}
875
\DEFNT{decl-notation}
876
\TERM{where}~\NT{string}~\TERM{:=}~\NT{constr}
879
\NT{field}~\KWD{;}~\NT{field-list}
883
\NT{ident}~\OPTGR{\NT{coerce-kwd}~\NT{constr}}
884
\nlsep \NT{ident}~\NT{type-cstr-coe}~\KWD{:=}~\NT{constr}
887
\PLUS{\GR{\KWD{(}~\NT{simple-assum-coe}~\KWD{)}}}
888
\nlsep \NT{simple-assum-coe}
890
\DEFNT{simple-assum-coe}
891
\PLUS{\NT{ident}}~\NT{coerce-kwd}~\NT{constr}
893
\DEFNT{coerce-kwd} \TERM{:$>$} ~\mid~ \KWD{:}
895
\DEFNT{type-cstr-coe} \OPTGR{\NT{coerce-kwd}~\NT{constr}}
898
\NT{ident}~\KWD{:=}~\NT{dep-scheme}~\KWD{for}~\NT{reference}
899
~\TERM{Sort}~\NT{sort}
902
\TERM{Induction}~\mid~\TERM{Minimality}
905
\subsection{Modules and sections}
909
\TERM{Module}~\NT{ident}~\STAR{\NT{mbinder}}~\OPT{\NT{of-mod-type}}
910
~\OPTGR{\KWD{:=}~\NT{mod-expr}}
911
\nlsep \TERM{Module}~\KWD{Type}~\NT{ident}~\STAR{\NT{mbinder}}
912
~\OPTGR{\KWD{:=}~\NT{mod-type}}
913
\nlsep \TERM{Declare}~\TERM{Module}~\NT{ident}~\STAR{\NT{mbinder}}
914
~\OPT{\NT{of-mod-type}}
915
~\OPTGR{\KWD{:=}~\NT{mod-expr}}
916
\nlsep \TERM{Section}~\NT{ident}
917
\nlsep \TERM{Chapter}~\NT{ident}
918
\nlsep \TERM{End}~\NT{ident}
920
\nlsep \TERM{Require}~\OPT{\NT{export-token}}~\OPT{\NT{specif-token}}
921
~\PLUS{\NT{reference}}
922
\nlsep \TERM{Require}~\OPT{\NT{export-token}}~\OPT{\NT{specif-token}}
924
\nlsep \TERM{Import}~\PLUS{\NT{reference}}
925
\nlsep \TERM{Export}~\PLUS{\NT{reference}}
928
\TERM{Import} ~\mid~ \TERM{Export}
931
\TERM{Implementation} ~\mid~ \TERM{Specification}
935
\nlsep \NT{mod-expr}~\NT{mod-expr} & L
936
\nlsep \KWD{(}~\NT{mod-expr}~\KWD{)}
940
\nlsep \NT{mod-type}~\KWD{with}~\NT{with-declaration}
942
\DEFNT{with-declaration}
946
\TERM{Definition}~\NT{ident}~\KWD{:=}~\NTL{constr}{} %{100}
947
\nlsep \TERM{Module}~\NT{ident}~\KWD{:=}~\NT{reference}
950
\KWD{:}~\NT{mod-type}
951
\nlsep \TERM{$<$:}~\NT{mod-type}
954
\KWD{(}~\PLUS{\NT{ident}}~\KWD{:}~\NT{mod-type}~\KWD{)}
959
\TERM{Transparent}~\PLUS{\NT{reference}}
960
\nlsep \TERM{Opaque}~\PLUS{\NT{reference}}
961
\nlsep \TERM{Canonical}~\TERM{Structure}~\NT{reference}~\OPT{\NT{def-body}}
962
\nlsep \TERM{Coercion}~\OPT{\TERM{Local}}~\NT{reference}~\NT{def-body}
963
\nlsep \TERM{Coercion}~\OPT{\TERM{Local}}~\NT{reference}~\KWD{:}
964
~\NT{class-rawexpr}~\TERM{$>->$}~\NT{class-rawexpr}
965
\nlsep \TERM{Identity}~\TERM{Coercion}~\OPT{\TERM{Local}}~\NT{ident}~\KWD{:}
966
~\NT{class-rawexpr}~\TERM{$>->$}~\NT{class-rawexpr}
967
\nlsep \TERM{Implicit}~\TERM{Arguments}~\NT{reference}~\TERM{[}~\STAR{\NT{num}}~\TERM{]}
968
\nlsep \TERM{Implicit}~\TERM{Arguments}~\NT{reference}
969
\nlsep \TERM{Implicit}~\KWD{Type}~\PLUS{\NT{ident}}~\KWD{:}~\NT{constr}
972
\TERM{Comments}~\STAR{\NT{comment}}
974
\nlsep \TERM{Cd}~\OPT{\NT{string}}
975
\nlsep \TERM{Drop} ~\mid~ \TERM{ProtectedLoop} ~\mid~\TERM{Quit}
977
\nlsep \TERM{Load}~\OPT{\TERM{Verbose}}~\NT{ident}
978
\nlsep \TERM{Load}~\OPT{\TERM{Verbose}}~\NT{string}
979
\nlsep \TERM{Declare}~\TERM{ML}~\TERM{Module}~\PLUS{\NT{string}}
980
\nlsep \TERM{Dump}~\TERM{Universes}~\OPT{\NT{string}}
981
\nlsep \TERM{Locate}~\NT{locatable}
982
\nlsep \TERM{Add}~\OPT{\TERM{Rec}}~\TERM{LoadPath}~\NT{string}~\OPT{\NT{as-dirpath}}
983
\nlsep \TERM{Remove}~\TERM{LoadPath}~\NT{string}
984
\nlsep \TERM{Add}~\OPT{\TERM{Rec}}~\TERM{ML}~\TERM{Path}~\NT{string}
986
\nlsep \KWD{Type}~\NT{constr}
987
\nlsep \TERM{Print}~\NT{printable}
988
\nlsep \TERM{Print}~\NT{reference}
989
\nlsep \TERM{Inspect}~\NT{num}
990
\nlsep \TERM{About}~\NT{reference}
992
\nlsep \TERM{Search}~\NT{reference}~\OPT{\NT{in-out-modules}}
993
\nlsep \TERM{SearchPattern}~\NT{constr-pattern}~\OPT{\NT{in-out-modules}}
994
\nlsep \TERM{SearchRewrite}~\NT{constr-pattern}~\OPT{\NT{in-out-modules}}
995
\nlsep \TERM{SearchAbout}~\NT{reference}~\OPT{\NT{in-out-modules}}
996
\nlsep \TERM{SearchAbout}~\TERM{[}~\STAR{\NT{ref-or-string}}~\TERM{]}\OPT{\NT{in-out-modules}}
997
\nlsep \KWD{Set}~\NT{ident}~\OPT{\NT{opt-value}}
998
\nlsep \TERM{Unset}~\NT{ident}
999
\nlsep \KWD{Set}~\NT{ident}~\NT{ident}~\OPT{\NT{opt-value}}
1000
\nlsep \KWD{Set}~\NT{ident}~\NT{ident}~\PLUS{\NT{opt-ref-value}}
1001
\nlsep \TERM{Unset}~\NT{ident}~\NT{ident}~\STAR{\NT{opt-ref-value}}
1003
\nlsep \TERM{Print}~\TERM{Table}~\NT{ident}~\NT{ident}
1004
\nlsep \TERM{Print}~\TERM{Table}~\NT{ident}
1005
\nlsep \TERM{Add}~\NT{ident}~\OPT{\NT{ident}}~\PLUS{\NT{opt-ref-value}}
1007
\nlsep \TERM{Test}~\NT{ident}~\OPT{\NT{ident}}~\STAR{\NT{opt-ref-value}}
1009
\nlsep \TERM{Remove}~\NT{ident}~\OPT{\NT{ident}}~\PLUS{\NT{opt-ref-value}}
1011
\DEFNT{check-command}
1012
\TERM{Eval}~\NT{red-expr}~\KWD{in}~\NT{constr}
1013
\nlsep \TERM{Check}~\NT{constr}
1015
\DEFNT{ref-or-string}
1022
\TERM{Term}~\NT{reference}
1024
\nlsep \TERM{Section}~\NT{reference}
1025
\nlsep \TERM{Grammar}~\NT{ident}
1026
\nlsep \TERM{LoadPath}
1027
\nlsep \TERM{Module}~\OPT{\KWD{Type}}~\NT{reference}
1028
\nlsep \TERM{Modules}
1029
\nlsep \TERM{ML}~\TERM{Path}
1030
\nlsep \TERM{ML}~\TERM{Modules}
1032
\nlsep \TERM{Classes}
1033
\nlsep \TERM{Coercions}
1034
\nlsep \TERM{Coercion}~\TERM{Paths}~\NT{class-rawexpr}~\NT{class-rawexpr}
1035
\nlsep \TERM{Tables}
1036
% \nlsep \TERM{Proof}~\NT{reference} % Obsolete, useful in V6.3 ??
1037
\nlsep \TERM{Hint}~\OPT{\NT{reference}}
1038
\nlsep \TERM{Hint}~\TERM{*}
1039
\nlsep \TERM{HintDb}~\NT{ident}
1040
\nlsep \TERM{Scopes}
1041
\nlsep \TERM{Scope}~\NT{ident}
1042
\nlsep \TERM{Visibility}~\OPT{\NT{ident}}
1043
\nlsep \TERM{Implicit}~\NT{reference}
1045
\DEFNT{class-rawexpr}
1046
\TERM{Funclass}~\mid~\TERM{Sortclass}~\mid~\NT{reference}
1050
\nlsep \TERM{File}~\NT{string}
1051
\nlsep \TERM{Library}~\NT{reference}
1055
\NT{ident} ~\mid~ \NT{string}
1057
\DEFNT{opt-ref-value}
1058
\NT{reference} ~\mid~ \NT{string}
1061
\KWD{as}~\NT{reference}
1063
\DEFNT{in-out-modules}
1064
\TERM{inside}~\PLUS{\NT{reference}}
1065
\nlsep \TERM{outside}~\PLUS{\NT{reference}}
1072
\subsection{Other commands}
1074
%% TODO: min/maj pas a jour
1077
\TERM{Debug}~\TERM{On}
1078
\nlsep \TERM{Debug}~\TERM{Off}
1080
\nlsep \TERM{Add}~\TERM{setoid}~\tacconstr~\tacconstr~\tacconstr
1081
\nlsep \TERM{Add}~\TERM{morphism}~\tacconstr~\KWD{:}~\NT{ident}
1082
\nlsep \TERM{Derive}~\TERM{inversion_clear}
1083
~\OPT{\NT{num}}~\NT{ident}~\NT{ident}
1084
\nlsep \TERM{Derive}~\TERM{inversion_clear}
1085
~\NT{ident}~\KWD{with}~\tacconstr~\OPTGR{\TERM{Sort}~\NT{sort}}
1086
\nlsep \TERM{Derive}~\TERM{inversion}
1087
~\OPT{\NT{num}}~\NT{ident}~\NT{ident}
1088
\nlsep \TERM{Derive}~\TERM{inversion}
1089
~\NT{ident}~\KWD{with}~\tacconstr~\OPTGR{\TERM{Sort}~\NT{sort}}
1090
\nlsep \TERM{Derive}~\TERM{dependent}~\TERM{inversion_clear}
1091
~\NT{ident}~\KWD{with}~\tacconstr~\OPTGR{\TERM{Sort}~\NT{sort}}
1092
\nlsep \TERM{Derive}~\TERM{dependent}~\TERM{inversion}
1093
~\NT{ident}~\KWD{with}~\tacconstr~\OPTGR{\TERM{Sort}~\NT{sort}}
1094
%% Correctness: obsolete ?
1096
%\nlsep Global Variable
1098
\nlsep Extraction ...
1100
\nlsep \TERM{Add}~\TERM{Field}~\tacconstr~\tacconstr~\tacconstr
1101
~\tacconstr~\tacconstr~\tacconstr
1102
\nlcont~~~~\tacconstr~\tacconstr~\OPT{\NT{minus-div}}
1104
\nlsep \TERM{Functional}~\TERM{Scheme}~\NT{ident}~\KWD{:=}
1105
~\TERM{Induction}~\KWD{for}~\tacconstr
1106
~\OPTGR{\KWD{with}~\PLUS{\tacconstr}}
1108
\nlsep \TERM{Add}~\TERM{Ring}~\tacconstr~\tacconstr~\tacconstr
1109
~\tacconstr~\tacconstr~\tacconstr
1110
\nlcont~~~~\tacconstr~\tacconstr~\KWD{[}~\PLUS{\tacconstr}~\KWD{]}
1111
\nlsep \TERM{Add}~\TERM{Semi}~\TERM{Ring}~\tacconstr~\tacconstr~\tacconstr
1112
~\tacconstr~\tacconstr~\tacconstr
1113
\nlcont~~~~\tacconstr~\KWD{[}~\PLUS{\tacconstr}~\KWD{]}
1114
\nlsep \TERM{Add}~\TERM{Abstract}~\TERM{Ring}~\tacconstr~\tacconstr~\tacconstr
1115
~\tacconstr~\tacconstr~\tacconstr
1116
\nlcont~~~~\tacconstr~\tacconstr
1117
\nlsep \TERM{Add}~\TERM{Abstract}~\TERM{Semi}~\TERM{Ring}~\tacconstr
1118
~\tacconstr~\tacconstr~\tacconstr~\tacconstr~\tacconstr
1119
\nlcont~~~~\tacconstr
1120
\nlsep \TERM{Add}~\TERM{Setoid}~\TERM{Ring}~\tacconstr~\tacconstr~\tacconstr
1121
~\tacconstr~\tacconstr~\tacconstr
1122
\nlcont~~~~\tacconstr~\tacconstr~\tacconstr~\tacconstr~\tacconstr~\tacconstr
1123
~\tacconstr~\KWD{[}~\PLUS{\tacconstr}~\KWD{]}
1124
\nlsep \TERM{Add}~\TERM{Setoid}~\TERM{Semi}~\TERM{Ring}~\tacconstr~\tacconstr
1125
~\tacconstr~\tacconstr~\tacconstr~\tacconstr
1126
\nlcont~~~~\tacconstr~\tacconstr~\tacconstr~\tacconstr~\tacconstr
1127
~\KWD{[}~\PLUS{tacconstr}~\KWD{]}
1130
\KWD{with}~\NT{minus-arg}~\NT{div-arg}
1131
\nlsep \KWD{with}~\NT{div-arg}~\NT{minus-arg}
1134
\TERM{minus}~\KWD{:=}~\tacconstr
1137
\TERM{div}~\KWD{:=}~\tacconstr
1142
\TERM{Write}~\TERM{State}~\NT{ident}
1143
\nlsep \TERM{Write}~\TERM{State}~\NT{string}
1144
\nlsep \TERM{Restore}~\TERM{State}~\NT{ident}
1145
\nlsep \TERM{Restore}~\TERM{State}~\NT{string}
1146
\nlsep \TERM{Reset}~\NT{ident}
1147
\nlsep \TERM{Reset}~\TERM{Initial}
1148
\nlsep \TERM{Back}~\OPT{\NT{num}}
1151
\subsection{Proof-editing commands}
1155
\TERM{Goal}~\NT{constr}
1156
\nlsep \TERM{Proof}~\OPT{\NT{constr}}
1157
\nlsep \TERM{Proof}~\KWD{with}~\NT{tactic}
1158
\nlsep \TERM{Abort}~\OPT{\TERM{All}}
1159
\nlsep \TERM{Abort}~\NT{ident}
1160
\nlsep \TERM{Existential}~\NT{num}~\KWD{:=}~\NT{constr-body}
1162
\nlsep \TERM{Save}~\OPTGR{\NT{thm-token}~\NT{ident}}
1163
\nlsep \TERM{Defined}~\OPT{\NT{ident}}
1164
\nlsep \TERM{Suspend}
1165
\nlsep \TERM{Resume}~\OPT{\NT{ident}}
1166
\nlsep \TERM{Restart}
1167
\nlsep \TERM{Undo}~\OPT{\NT{num}}
1168
\nlsep \TERM{Focus}~\OPT{\NT{num}}
1169
\nlsep \TERM{Unfocus}
1170
\nlsep \TERM{Show}~\OPT{\NT{num}}
1171
\nlsep \TERM{Show}~\TERM{Implicit}~\TERM{Arguments}~\OPT{\NT{num}}
1172
\nlsep \TERM{Show}~\TERM{Node}
1173
\nlsep \TERM{Show}~\TERM{Script}
1174
\nlsep \TERM{Show}~\TERM{Existentials}
1175
\nlsep \TERM{Show}~\TERM{Tree}
1176
\nlsep \TERM{Show}~\TERM{Conjecture}
1177
\nlsep \TERM{Show}~\TERM{Proof}
1178
\nlsep \TERM{Show}~\TERM{Intro}
1179
\nlsep \TERM{Show}~\TERM{Intros}
1180
%% Correctness: obsolete ?
1181
%%\nlsep \TERM{Show}~\TERM{Programs}
1182
\nlsep \TERM{Explain}~\TERM{Proof}~\OPT{\TERM{Tree}}~\STAR{\NT{num}}
1183
%% Go not documented
1184
\nlsep \TERM{Hint}~\OPT{\TERM{Local}}~\NT{hint}~\OPT{\NT{inbases}}
1185
%% PrintConstr not documented
1191
\NT{type-cstr}~\KWD{:=}~\NT{constr}
1194
\TERM{Resolve}~\PLUS{\NTL{constr}{9}}
1195
\nlsep \TERM{Immediate}~\PLUS{\NTL{constr}{9}}
1196
\nlsep \TERM{Unfold}~\PLUS{\NT{reference}}
1197
\nlsep \TERM{Constructors}~\PLUS{\NT{reference}}
1198
\nlsep \TERM{Extern}~\NT{num}~\NT{constr}~\KWD{$\Rightarrow$}~\NT{tactic}
1199
\nlsep \TERM{Destruct}~\NT{ident}~\KWD{:=}~\NT{num}~\NT{destruct-loc}
1200
~\NT{constr}~\KWD{$\Rightarrow$}~\NT{tactic}
1201
\nlsep \TERM{Rewrite}~\NT{orient}~\PLUS{\NTL{constr}{9}}
1202
~\OPTGR{\KWD{using}~\NT{tactic}}
1205
\KWD{:}~\PLUS{\NT{ident}}
1207
\DEFNT{destruct-loc}
1209
\nlsep \OPT{\TERM{Discardable}}~\TERM{Hypothesis}
1213
\subsection{Syntax extensions}
1217
\TERM{Open}~\TERM{Scope}~\NT{ident}
1218
\nlsep \TERM{Close}~\TERM{Scope}~\NT{ident}
1219
\nlsep \TERM{Delimit}~\TERM{Scope}~\NT{ident}~\KWD{with}~\NT{ident}
1220
\nlsep \TERM{Bind}~\TERM{Scope}~\NT{ident}~\KWD{with}~\PLUS{\NT{class-rawexpr}}
1221
\nlsep \TERM{Arguments}~\TERM{Scope}~\NT{reference}
1222
~\TERM{[}~\PLUS{\NT{name}}~\TERM{]}
1223
\nlsep \TERM{Infix}~\OPT{\TERM{Local}} %%% ~\NT{prec}~\OPT{\NT{num}}
1224
~\NT{string}~\KWD{:=}~\NT{reference}~\OPT{\NT{modifiers}}
1225
~\OPT{\NT{in-scope}}
1226
\nlsep \TERM{Notation}~\OPT{\TERM{Local}}~\NT{string}~\KWD{:=}~\NT{constr}
1227
~\OPT{\NT{modifiers}}~\OPT{\NT{in-scope}}
1228
\nlsep \TERM{Notation}~\OPT{\TERM{Local}}~\NT{ident}~\KWD{:=}~\NT{constr}
1229
~\OPT{\KWD{(}\TERM{only~\TERM{parsing}\KWD{)}}}
1230
\nlsep \TERM{Reserved}~\TERM{Notation}~\OPT{\TERM{Local}}~\NT{string}
1231
~\OPT{\NT{modifiers}}
1232
\nlsep \TERM{Tactic}~\TERM{Notation}~\NT{string}~\STAR{\NT{tac-production}}
1233
~\KWD{:=}~\NT{tactic}
1236
\KWD{(}~\NT{mod-list}~\KWD{)}
1240
\nlsep \NT{modifier}~\KWD{,}~\NT{mod-list}
1243
\NT{ident}~\KWD{at}~\NT{num}
1244
\nlsep \NT{ident}~\STARGR{\KWD{,}~\NT{ident}}~\KWD{at}~\NT{num}
1245
\nlsep \KWD{at}~\TERM{next}~\TERM{level}
1246
\nlsep \KWD{at}~\TERM{level}~\NT{num}
1247
\nlsep \TERM{left}~\TERM{associativity}
1248
\nlsep \TERM{right}~\TERM{associativity}
1249
\nlsep \TERM{no}~\TERM{associativity}
1250
\nlsep \NT{ident}~\NT{syntax-entry}
1251
\nlsep \TERM{only}~\TERM{parsing}
1252
\nlsep \TERM{format}~\NT{string}
1257
\DEFNT{syntax-entry}
1258
\TERM{ident}~\mid~\TERM{global}~\mid~\TERM{bigint}
1260
\DEFNT{tac-production}
1262
\nlsep \NT{ident}~\TERM{(}~\NT{ident}~\TERM{)}
1265
%%% \TERM{LeftA}~\mid~\TERM{RightA}~\mid~\TERM{NonA}