File: fullGrammar

package info (click to toggle)
coq 8.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 36,468 kB
  • sloc: ml: 210,451; sh: 3,345; python: 3,008; ansic: 2,482; makefile: 793; lisp: 224; javascript: 63; xml: 24; sed: 2
file content (2523 lines) | stat: -rw-r--r-- 52,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
(* Coq grammar generated from .mlg files.  Do not edit by hand.  Not compiled into Coq *)
DOC_GRAMMAR

Constr.ident: [
| Prim.ident
]

Prim.name: [
| "_"
]

global: [
| Prim.reference
]

constr_pattern: [
| constr
]

lconstr_pattern: [
| lconstr
]

sort: [
| "Set"
| "Prop"
| "SProp"
| "Type"
| "Type" "@{" "_" "}"
| "Type" "@{" universe "}"
]

sort_family: [
| "Set"
| "Prop"
| "SProp"
| "Type"
]

universe_increment: [
| "+" natural
|
]

universe_name: [
| global
| "Set"
| "Prop"
]

universe_expr: [
| universe_name universe_increment
]

universe: [
| "max" "(" LIST1 universe_expr SEP "," ")"
| universe_expr
]

lconstr: [
| operconstr200
| l_constr
]

constr: [
| operconstr8
| "@" global univ_instance
]

operconstr200: [
| binder_constr
| operconstr100
]

operconstr100: [
| operconstr99 "<:" operconstr200
| operconstr99 "<<:" operconstr200
| operconstr99 ":" operconstr200
| operconstr99 ":>"
| operconstr99
]

operconstr99: [
| operconstr90
]

operconstr90: [
| operconstr10
]

operconstr10: [
| operconstr9 LIST1 appl_arg
| "@" global univ_instance LIST0 operconstr9
| "@" pattern_identref LIST1 identref
| operconstr9
]

operconstr9: [
| ".." operconstr0 ".."
| operconstr8
]

operconstr8: [
| operconstr1
]

operconstr1: [
| operconstr0 ".(" global LIST0 appl_arg ")"
| operconstr0 ".(" "@" global LIST0 ( operconstr9 ) ")"
| operconstr0 "%" IDENT
| operconstr0
]

operconstr0: [
| atomic_constr
| match_constr
| "(" operconstr200 ")"
| "{|" record_declaration bar_cbrace
| "{" binder_constr "}"
| "`{" operconstr200 "}"
| "`(" operconstr200 ")"
| "ltac" ":" "(" Pltac.tactic_expr ")"
]

record_declaration: [
| fields_def
]

fields_def: [
| field_def ";" fields_def
| field_def
|
]

field_def: [
| global binders ":=" lconstr
]

binder_constr: [
| "forall" open_binders "," operconstr200
| "fun" open_binders "=>" operconstr200
| "let" name binders let_type_cstr ":=" operconstr200 "in" operconstr200
| "let" "fix" fix_decl "in" operconstr200
| "let" "cofix" cofix_decl "in" operconstr200
| "let" [ "(" LIST0 name SEP "," ")" | "()" ] return_type ":=" operconstr200 "in" operconstr200
| "let" "'" pattern200 ":=" operconstr200 "in" operconstr200
| "let" "'" pattern200 ":=" operconstr200 case_type "in" operconstr200
| "let" "'" pattern200 "in" pattern200 ":=" operconstr200 case_type "in" operconstr200
| "if" operconstr200 return_type "then" operconstr200 "else" operconstr200
| "fix" fix_decls
| "cofix" cofix_decls
]

appl_arg: [
| test_lpar_id_coloneq "(" ident ":=" lconstr ")"
| operconstr9
]

atomic_constr: [
| global univ_instance
| sort
| NUMERAL
| string
| "_"
| "?" "[" ident "]"
| "?" "[" pattern_ident "]"
| pattern_ident evar_instance
]

inst: [
| ident ":=" lconstr
]

evar_instance: [
| "@{" LIST1 inst SEP ";" "}"
|
]

univ_instance: [
| "@{" LIST0 universe_level "}"
|
]

universe_level: [
| "Set"
| "Prop"
| "Type"
| "_"
| global
]

fix_decls: [
| fix_decl
| fix_decl "with" LIST1 fix_decl SEP "with" "for" identref
]

cofix_decls: [
| cofix_decl
| cofix_decl "with" LIST1 cofix_decl SEP "with" "for" identref
]

fix_decl: [
| identref binders_fixannot type_cstr ":=" operconstr200
]

cofix_decl: [
| identref binders type_cstr ":=" operconstr200
]

match_constr: [
| "match" LIST1 case_item SEP "," OPT case_type "with" branches "end"
]

case_item: [
| operconstr100 OPT [ "as" name ] OPT [ "in" pattern200 ]
]

case_type: [
| "return" operconstr100
]

return_type: [
| OPT [ OPT [ "as" name ] case_type ]
]

branches: [
| OPT "|" LIST0 eqn SEP "|"
]

mult_pattern: [
| LIST1 pattern200 SEP ","
]

eqn: [
| LIST1 mult_pattern SEP "|" "=>" lconstr
]

record_pattern: [
| global ":=" pattern200
]

record_patterns: [
| record_pattern ";" record_patterns
| record_pattern
|
]

pattern200: [
| pattern100
]

pattern100: [
| pattern99 ":" operconstr200
| pattern99
]

pattern99: [
| pattern90
]

pattern90: [
| pattern10
]

pattern10: [
| pattern1 "as" name
| pattern1 LIST1 pattern1
| "@" Prim.reference LIST0 pattern1
| pattern1
]

pattern1: [
| pattern0 "%" IDENT
| pattern0
]

pattern0: [
| Prim.reference
| "{|" record_patterns bar_cbrace
| "_"
| "(" pattern200 ")"
| "(" pattern200 "|" LIST1 pattern200 SEP "|" ")"
| NUMERAL
| string
]

fixannot: [
| "{" "struct" identref "}"
| "{" "wf" constr identref "}"
| "{" "measure" constr OPT identref OPT constr "}"
]

binders_fixannot: [
| ensure_fixannot fixannot
| binder binders_fixannot
|
]

open_binders: [
| name LIST0 name ":" lconstr
| name LIST0 name binders
| name ".." name
| closed_binder binders
]

binders: [
| LIST0 binder
| Pcoq.Constr.binders
]

binder: [
| name
| closed_binder
]

closed_binder: [
| "(" name LIST1 name ":" lconstr ")"
| "(" name ":" lconstr ")"
| "(" name ":=" lconstr ")"
| "(" name ":" lconstr ":=" lconstr ")"
| "{" name "}"
| "{" name LIST1 name ":" lconstr "}"
| "{" name ":" lconstr "}"
| "{" name LIST1 name "}"
| "[" name "]"
| "[" name LIST1 name ":" lconstr "]"
| "[" name ":" lconstr "]"
| "[" name LIST1 name "]"
| "`(" LIST1 typeclass_constraint SEP "," ")"
| "`{" LIST1 typeclass_constraint SEP "," "}"
| "`[" LIST1 typeclass_constraint SEP "," "]"
| "'" pattern0
]

typeclass_constraint: [
| "!" operconstr200
| "{" name "}" ":" [ "!" | ] operconstr200
| test_name_colon name ":" [ "!" | ] operconstr200
| operconstr200
]

type_cstr: [
| ":" lconstr
|
]

let_type_cstr: [
| OPT [ ":" lconstr ]
]

preident: [
| IDENT
]

ident: [
| IDENT
]

pattern_ident: [
| LEFTQMARK ident
]

pattern_identref: [
| pattern_ident
]

var: [
| ident
]

identref: [
| ident
]

field: [
| FIELD
]

fields: [
| field fields
| field
]

fullyqualid: [
| ident fields
| ident
]

name: [
| "_"
| ident
]

reference: [
| ident fields
| ident
]

qualid: [
| reference
]

by_notation: [
| ne_string OPT [ "%" IDENT ]
]

smart_global: [
| reference
| by_notation
]

ne_string: [
| STRING
]

ne_lstring: [
| ne_string
]

dirpath: [
| ident LIST0 field
]

string: [
| STRING
]

lstring: [
| string
]

integer: [
| bigint
]

natural: [
| bignat
| _natural
]

bigint: [
| NUMERAL
| test_minus_nat "-" NUMERAL
]

bignat: [
| NUMERAL
]

bar_cbrace: [
| test_pipe_closedcurly "|" "}"
]

strategy_level: [
| "expand"
| "opaque"
| integer
| "transparent"
| strategy_level0
]

vernac_toplevel: [
| "Drop" "."
| "Quit" "."
| "BackTo" natural "."
| test_show_goal "Show" "Goal" natural "at" natural "."
| "Show" "Proof" "Diffs" OPT "removed" "."
| Pvernac.Vernac_.main_entry
]

opt_hintbases: [
|
| ":" LIST1 IDENT
]

command: [
| "Goal" lconstr
| "Proof"
| "Proof" "Mode" string
| "Proof" lconstr
| "Abort"
| "Abort" "All"
| "Abort" identref
| "Existential" natural constr_body
| "Admitted"
| "Qed"
| "Save" identref
| "Defined"
| "Defined" identref
| "Restart"
| "Undo"
| "Undo" natural
| "Undo" "To" natural
| "Focus"
| "Focus" natural
| "Unfocus"
| "Unfocused"
| "Show"
| "Show" natural
| "Show" ident
| "Show" "Existentials"
| "Show" "Universes"
| "Show" "Conjectures"
| "Show" "Proof"
| "Show" "Intro"
| "Show" "Intros"
| "Show" "Match" reference
| "Guarded"
| "Create" "HintDb" IDENT; [ "discriminated" | ]
| "Remove" "Hints" LIST1 global opt_hintbases
| "Hint" hint opt_hintbases
| "Comments" LIST0 comment
| "Declare" "Instance" ident_decl binders ":" operconstr200 hint_info
| "Declare" "Scope" IDENT
| "Pwd"
| "Cd"
| "Cd" ne_string
| "Load" [ "Verbose" | ] [ ne_string | IDENT ]
| "Declare" "ML" "Module" LIST1 ne_string
| "Locate" locatable
| "Add" "LoadPath" ne_string "as" dirpath
| "Add" "Rec" "LoadPath" ne_string "as" dirpath
| "Remove" "LoadPath" ne_string
| "Type" lconstr
| "Print" printable
| "Print" smart_global OPT univ_name_list
| "Print" "Module" "Type" global
| "Print" "Module" global
| "Print" "Namespace" dirpath
| "Inspect" natural
| "Add" "ML" "Path" ne_string
| "Set" option_table option_setting
| "Unset" option_table
| "Print" "Table" option_table
| "Add" IDENT IDENT LIST1 table_value
| "Add" IDENT LIST1 table_value
| "Test" option_table "for" LIST1 table_value
| "Test" option_table
| "Remove" IDENT IDENT LIST1 table_value
| "Remove" IDENT LIST1 table_value
| "Write" "State" IDENT
| "Write" "State" ne_string
| "Restore" "State" IDENT
| "Restore" "State" ne_string
| "Reset" "Initial"
| "Reset" identref
| "Back"
| "Back" natural
| "Debug" "On"
| "Debug" "Off"
| "Declare" "Reduction" IDENT; ":=" red_expr
| "Declare" "Custom" "Entry" IDENT
| "Derive" ident "SuchThat" constr "As" ident      (* derive plugin *)
| "Extraction" global      (* extraction plugin *)
| "Recursive" "Extraction" LIST1 global      (* extraction plugin *)
| "Extraction" string LIST1 global      (* extraction plugin *)
| "Extraction" "TestCompile" LIST1 global      (* extraction plugin *)
| "Separate" "Extraction" LIST1 global      (* extraction plugin *)
| "Extraction" "Library" ident      (* extraction plugin *)
| "Recursive" "Extraction" "Library" ident      (* extraction plugin *)
| "Extraction" "Language" language      (* extraction plugin *)
| "Extraction" "Inline" LIST1 global      (* extraction plugin *)
| "Extraction" "NoInline" LIST1 global      (* extraction plugin *)
| "Print" "Extraction" "Inline"      (* extraction plugin *)
| "Reset" "Extraction" "Inline"      (* extraction plugin *)
| "Extraction" "Implicit" global "[" LIST0 int_or_id "]"      (* extraction plugin *)
| "Extraction" "Blacklist" LIST1 ident      (* extraction plugin *)
| "Print" "Extraction" "Blacklist"      (* extraction plugin *)
| "Reset" "Extraction" "Blacklist"      (* extraction plugin *)
| "Extract" "Constant" global LIST0 string "=>" mlname      (* extraction plugin *)
| "Extract" "Inlined" "Constant" global "=>" mlname      (* extraction plugin *)
| "Extract" "Inductive" global "=>" mlname "[" LIST0 mlname "]" OPT string      (* extraction plugin *)
| "Show" "Extraction"      (* extraction plugin *)
| "Set" "Firstorder" "Solver" tactic
| "Print" "Firstorder" "Solver"
| "Function" LIST1 function_rec_definition_loc SEP "with"      (* funind plugin *)
| "Functional" "Scheme" LIST1 fun_scheme_arg SEP "with"      (* funind plugin *)
| "Functional" "Case" fun_scheme_arg      (* funind plugin *)
| "Generate" "graph" "for" reference      (* funind plugin *)
| "Hint" "Rewrite" orient LIST1 constr ":" LIST0 preident
| "Hint" "Rewrite" orient LIST1 constr "using" tactic ":" LIST0 preident
| "Hint" "Rewrite" orient LIST1 constr
| "Hint" "Rewrite" orient LIST1 constr "using" tactic
| "Derive" "Inversion_clear" ident "with" constr "Sort" sort_family
| "Derive" "Inversion_clear" ident "with" constr
| "Derive" "Inversion" ident "with" constr "Sort" sort_family
| "Derive" "Inversion" ident "with" constr
| "Derive" "Dependent" "Inversion" ident "with" constr "Sort" sort_family
| "Derive" "Dependent" "Inversion_clear" ident "with" constr "Sort" sort_family
| "Declare" "Left" "Step" constr
| "Declare" "Right" "Step" constr
| "Grab" "Existential" "Variables"
| "Unshelve"
| "Declare" "Equivalent" "Keys" constr constr
| "Print" "Equivalent" "Keys"
| "Optimize" "Proof"
| "Optimize" "Heap"
| "Hint" "Cut" "[" hints_path "]" opthints
| "Typeclasses" "Transparent" LIST0 reference
| "Typeclasses" "Opaque" LIST0 reference
| "Typeclasses" "eauto" ":=" debug eauto_search_strategy OPT int
| "Proof" "with" Pltac.tactic OPT [ "using" G_vernac.section_subset_expr ]
| "Proof" "using" G_vernac.section_subset_expr OPT [ "with" Pltac.tactic ]
| "Tactic" "Notation" OPT ltac_tactic_level LIST1 ltac_production_item ":=" tactic
| "Print" "Ltac" reference
| "Locate" "Ltac" reference
| "Ltac" LIST1 ltac_tacdef_body SEP "with"
| "Print" "Ltac" "Signatures"
| "Obligation" integer "of" ident ":" lglob withtac
| "Obligation" integer "of" ident withtac
| "Obligation" integer ":" lglob withtac
| "Obligation" integer withtac
| "Next" "Obligation" "of" ident withtac
| "Next" "Obligation" withtac
| "Solve" "Obligation" integer "of" ident "with" tactic
| "Solve" "Obligation" integer "with" tactic
| "Solve" "Obligations" "of" ident "with" tactic
| "Solve" "Obligations" "with" tactic
| "Solve" "Obligations"
| "Solve" "All" "Obligations" "with" tactic
| "Solve" "All" "Obligations"
| "Admit" "Obligations" "of" ident
| "Admit" "Obligations"
| "Obligation" "Tactic" ":=" tactic
| "Show" "Obligation" "Tactic"
| "Obligations" "of" ident
| "Obligations"
| "Preterm" "of" ident
| "Preterm"
| "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "as" ident
| "Add" "Relation" constr constr "symmetry" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Relation" constr constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "symmetry" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Parametric" "Relation" binders ":" constr constr "transitivity" "proved" "by" constr "as" ident
| "Add" "Setoid" constr constr constr "as" ident
| "Add" "Parametric" "Setoid" binders ":" constr constr constr "as" ident
| "Add" "Morphism" constr ":" ident
| "Declare" "Morphism" constr ":" ident
| "Add" "Morphism" constr "with" "signature" lconstr "as" ident
| "Add" "Parametric" "Morphism" binders ":" constr "with" "signature" lconstr "as" ident
| "Print" "Rewrite" "HintDb" preident
| "Reset" "Ltac" "Profile"
| "Show" "Ltac" "Profile"
| "Show" "Ltac" "Profile" "CutOff" int
| "Show" "Ltac" "Profile" string
| "Show" "Lia" "Profile"      (* micromega plugin *)
| "Add" "InjTyp" constr      (* micromega plugin *)
| "Add" "BinOp" constr      (* micromega plugin *)
| "Add" "UnOp" constr      (* micromega plugin *)
| "Add" "CstOp" constr      (* micromega plugin *)
| "Add" "BinRel" constr      (* micromega plugin *)
| "Add" "PropOp" constr      (* micromega plugin *)
| "Add" "PropBinOp" constr      (* micromega plugin *)
| "Add" "PropUOp" constr      (* micromega plugin *)
| "Add" "Spec" constr      (* micromega plugin *)
| "Add" "BinOpSpec" constr      (* micromega plugin *)
| "Add" "UnOpSpec" constr      (* micromega plugin *)
| "Add" "Saturate" constr      (* micromega plugin *)
| "Show" "Zify" "InjTyp"      (* micromega plugin *)
| "Show" "Zify" "BinOp"      (* micromega plugin *)
| "Show" "Zify" "UnOp"      (* micromega plugin *)
| "Show" "Zify" "CstOp"      (* micromega plugin *)
| "Show" "Zify" "BinRel"      (* micromega plugin *)
| "Show" "Zify" "Spec"      (* micromega plugin *)
| "Add" "Ring" ident ":" constr OPT ring_mods      (* setoid_ring plugin *)
| "Print" "Rings"      (* setoid_ring plugin *)
| "Add" "Field" ident ":" constr OPT field_mods      (* setoid_ring plugin *)
| "Print" "Fields"      (* setoid_ring plugin *)
| "Numeral" "Notation" reference reference reference ":" ident numnotoption
| "String" "Notation" reference reference reference ":" ident
]

reference_or_constr: [
| global
| constr
]

hint: [
| "Resolve" LIST1 reference_or_constr hint_info
| "Resolve" "->" LIST1 global OPT natural
| "Resolve" "<-" LIST1 global OPT natural
| "Immediate" LIST1 reference_or_constr
| "Variables" "Transparent"
| "Variables" "Opaque"
| "Constants" "Transparent"
| "Constants" "Opaque"
| "Transparent" LIST1 global
| "Opaque" LIST1 global
| "Mode" global mode
| "Unfold" LIST1 global
| "Constructors" LIST1 global
| "Extern" natural OPT Constr.constr_pattern "=>" Pltac.tactic
]

constr_body: [
| ":=" lconstr
| ":" lconstr ":=" lconstr
]

mode: [
| LIST1 [ "+" | "!" | "-" ]
]

vernac_control: [
| "Time" vernac_control
| "Redirect" ne_string vernac_control
| "Timeout" natural vernac_control
| "Fail" vernac_control
| decorated_vernac
]

decorated_vernac: [
| LIST0 quoted_attributes vernac
]

quoted_attributes: [
| "#[" attribute_list "]"
]

attribute_list: [
| LIST0 attribute SEP ","
]

attribute: [
| ident attribute_value
]

attribute_value: [
| "=" string
| "(" attribute_list ")"
|
]

legacy_attr: [
| "Local"
| "Global"
| "Polymorphic"
| "Monomorphic"
| "Cumulative"
| "NonCumulative"
| "Private"
| "Program"
]

vernac: [
| LIST0 legacy_attr vernac_aux
]

vernac_aux: [
| gallina "."
| gallina_ext "."
| command "."
| syntax "."
| subprf
| command_entry
]

noedit_mode: [
| query_command
]

subprf: [
| BULLET
| "{"
| "}"
]

gallina: [
| thm_token ident_decl binders ":" lconstr LIST0 [ "with" ident_decl binders ":" lconstr ]
| assumption_token inline assum_list
| assumptions_token inline assum_list
| def_token ident_decl def_body
| "Let" ident_decl def_body
| finite_token LIST1 inductive_definition SEP "with"
| "Fixpoint" LIST1 rec_definition SEP "with"
| "Let" "Fixpoint" LIST1 rec_definition SEP "with"
| "CoFixpoint" LIST1 corec_definition SEP "with"
| "Let" "CoFixpoint" LIST1 corec_definition SEP "with"
| "Scheme" LIST1 scheme SEP "with"
| "Combined" "Scheme" identref "from" LIST1 identref SEP ","
| "Register" global "as" qualid
| "Register" "Inline" global
| "Primitive" identref OPT [ ":" lconstr ] ":=" register_token
| "Universe" LIST1 identref
| "Universes" LIST1 identref
| "Constraint" LIST1 univ_constraint SEP ","
]

register_token: [
| test_hash_ident "#" IDENT
]

thm_token: [
| "Theorem"
| "Lemma"
| "Fact"
| "Remark"
| "Corollary"
| "Proposition"
| "Property"
]

def_token: [
| "Definition"
| "Example"
| "SubClass"
]

assumption_token: [
| "Hypothesis"
| "Variable"
| "Axiom"
| "Parameter"
| "Conjecture"
]

assumptions_token: [
| "Hypotheses"
| "Variables"
| "Axioms"
| "Parameters"
| "Conjectures"
]

inline: [
| "Inline" "(" natural ")"
| "Inline"
|
]

univ_constraint: [
| universe_name [ "<" | "=" | "<=" ] universe_name
]

univ_decl: [
| "@{" LIST0 identref [ "+" | ] [ "|" LIST0 univ_constraint SEP "," [ "+" | ] "}" | [ "}" | bar_cbrace ] ]
]

ident_decl: [
| identref OPT univ_decl
]

finite_token: [
| "Inductive"
| "CoInductive"
| "Variant"
| "Record"
| "Structure"
| "Class"
]

def_body: [
| binders ":=" reduce lconstr
| binders ":" lconstr ":=" reduce lconstr
| binders ":" lconstr
]

reduce: [
| "Eval" red_expr "in"
|
]

decl_notation: [
| ne_lstring ":=" constr only_parsing OPT [ ":" IDENT ]
]

decl_sep: [
| "and"
]

decl_notations: [
| "where" LIST1 decl_notation SEP decl_sep
|
]

opt_constructors_or_fields: [
| ":=" constructor_list_or_record_decl
|
]

inductive_definition: [
| opt_coercion ident_decl binders OPT [ "|" binders ] OPT [ ":" lconstr ] opt_constructors_or_fields decl_notations
]

constructor_list_or_record_decl: [
| "|" LIST1 constructor SEP "|"
| identref constructor_type "|" LIST1 constructor SEP "|"
| identref constructor_type
| identref "{" record_fields "}"
| "{" record_fields "}"
|
]

opt_coercion: [
| ">"
|
]

rec_definition: [
| ident_decl binders_fixannot type_cstr OPT [ ":=" lconstr ] decl_notations
]

corec_definition: [
| ident_decl binders type_cstr OPT [ ":=" lconstr ] decl_notations
]

scheme: [
| scheme_kind
| identref ":=" scheme_kind
]

scheme_kind: [
| "Induction" "for" smart_global "Sort" sort_family
| "Minimality" "for" smart_global "Sort" sort_family
| "Elimination" "for" smart_global "Sort" sort_family
| "Case" "for" smart_global "Sort" sort_family
| "Equality" "for" smart_global
]

record_field: [
| LIST0 quoted_attributes record_binder OPT [ "|" natural ] decl_notations
]

record_fields: [
| record_field ";" record_fields
| record_field
|
]

record_binder_body: [
| binders of_type_with_opt_coercion lconstr
| binders of_type_with_opt_coercion lconstr ":=" lconstr
| binders ":=" lconstr
]

record_binder: [
| name
| name record_binder_body
]

assum_list: [
| LIST1 assum_coe
| simple_assum_coe
]

assum_coe: [
| "(" simple_assum_coe ")"
]

simple_assum_coe: [
| LIST1 ident_decl of_type_with_opt_coercion lconstr
]

constructor_type: [
| binders [ of_type_with_opt_coercion lconstr | ]
]

constructor: [
| identref constructor_type
]

of_type_with_opt_coercion: [
| ":>>"
| ":>" ">"
| ":>"
| ":" ">" ">"
| ":" ">"
| ":"
]

gallina_ext: [
| "Module" export_token identref LIST0 module_binder of_module_type is_module_expr
| "Module" "Type" identref LIST0 module_binder check_module_types is_module_type
| "Declare" "Module" export_token identref LIST0 module_binder ":" module_type_inl
| "Section" identref
| "End" identref
| "Collection" identref ":=" section_subset_expr
| "Require" export_token LIST1 global
| "From" global "Require" export_token LIST1 global
| "Import" LIST1 filtered_import
| "Export" LIST1 filtered_import
| "Include" module_type_inl LIST0 ext_module_expr
| "Include" "Type" module_type_inl LIST0 ext_module_type
| "Transparent" LIST1 smart_global
| "Opaque" LIST1 smart_global
| "Strategy" LIST1 [ strategy_level "[" LIST1 smart_global "]" ]
| "Canonical" OPT "Structure" global OPT [ OPT univ_decl def_body ]
| "Canonical" OPT "Structure" by_notation
| "Coercion" global OPT univ_decl def_body
| "Identity" "Coercion" identref ":" class_rawexpr ">->" class_rawexpr
| "Coercion" global ":" class_rawexpr ">->" class_rawexpr
| "Coercion" by_notation ":" class_rawexpr ">->" class_rawexpr
| "Context" LIST1 binder
| "Instance" instance_name ":" operconstr200 hint_info [ ":=" "{" record_declaration "}" | ":=" lconstr | ]
| "Existing" "Instance" global hint_info
| "Existing" "Instances" LIST1 global OPT [ "|" natural ]
| "Existing" "Class" global
| "Arguments" smart_global LIST0 argument_spec_block OPT [ "," LIST1 [ LIST0 more_implicits_block ] SEP "," ] OPT [ ":" LIST1 arguments_modifier SEP "," ]
| "Implicit" "Type" reserv_list
| "Implicit" "Types" reserv_list
| "Generalizable" [ "All" "Variables" | "No" "Variables" | [ "Variable" | "Variables" ] LIST1 identref ]
| "Export" "Set" option_table option_setting
| "Export" "Unset" option_table
]

filtered_import: [
| global
| global "(" LIST1 one_import_filter_name SEP "," ")"
]

one_import_filter_name: [
| global OPT [ "(" ".." ")" ]
]

export_token: [
| "Import"
| "Export"
|
]

ext_module_type: [
| "<+" module_type_inl
]

ext_module_expr: [
| "<+" module_expr_inl
]

check_module_type: [
| "<:" module_type_inl
]

check_module_types: [
| LIST0 check_module_type
]

of_module_type: [
| ":" module_type_inl
| check_module_types
]

is_module_type: [
| ":=" module_type_inl LIST0 ext_module_type
|
]

is_module_expr: [
| ":=" module_expr_inl LIST0 ext_module_expr
|
]

functor_app_annot: [
| "[" "inline" "at" "level" natural "]"
| "[" "no" "inline" "]"
|
]

module_expr_inl: [
| "!" module_expr
| module_expr functor_app_annot
]

module_type_inl: [
| "!" module_type
| module_type functor_app_annot
]

module_binder: [
| "(" export_token LIST1 identref ":" module_type_inl ")"
]

module_expr: [
| module_expr_atom
| module_expr module_expr_atom
]

module_expr_atom: [
| qualid
| "(" module_expr ")"
]

with_declaration: [
| "Definition" fullyqualid OPT univ_decl ":=" Constr.lconstr
| "Module" fullyqualid ":=" qualid
]

module_type: [
| qualid
| "(" module_type ")"
| module_type module_expr_atom
| module_type "with" with_declaration
]

section_subset_expr: [
| test_only_starredidentrefs LIST0 starredidentref
| ssexpr35
]

starredidentref: [
| identref
| identref "*"
| "Type"
| "Type" "*"
]

ssexpr35: [
| "-" ssexpr50
| ssexpr50
]

ssexpr50: [
| ssexpr0 "-" ssexpr0
| ssexpr0 "+" ssexpr0
| ssexpr0
]

ssexpr0: [
| starredidentref
| "(" test_only_starredidentrefs LIST0 starredidentref ")"
| "(" test_only_starredidentrefs LIST0 starredidentref ")" "*"
| "(" ssexpr35 ")"
| "(" ssexpr35 ")" "*"
]

arguments_modifier: [
| "simpl" "nomatch"
| "simpl" "never"
| "default" "implicits"
| "clear" "implicits"
| "clear" "scopes"
| "clear" "bidirectionality" "hint"
| "rename"
| "assert"
| "extra" "scopes"
| "clear" "scopes" "and" "implicits"
| "clear" "implicits" "and" "scopes"
]

scope_delimiter: [
| "%" IDENT
]

argument_spec: [
| OPT "!" name OPT scope_delimiter
]

argument_spec_block: [
| argument_spec
| "/"
| "&"
| "(" LIST1 argument_spec ")" OPT scope_delimiter
| "[" LIST1 argument_spec "]" OPT scope_delimiter
| "{" LIST1 argument_spec "}" OPT scope_delimiter
]

more_implicits_block: [
| name
| "[" LIST1 name "]"
| "{" LIST1 name "}"
]

instance_name: [
| ident_decl binders
|
]

hint_info: [
| "|" OPT natural OPT constr_pattern
|
]

reserv_list: [
| LIST1 reserv_tuple
| simple_reserv
]

reserv_tuple: [
| "(" simple_reserv ")"
]

simple_reserv: [
| LIST1 identref ":" lconstr
]

query_command: [
| "Eval" red_expr "in" lconstr "."
| "Compute" lconstr "."
| "Check" lconstr "."
| "About" smart_global OPT univ_name_list "."
| "SearchHead" constr_pattern in_or_out_modules "."
| "SearchPattern" constr_pattern in_or_out_modules "."
| "SearchRewrite" constr_pattern in_or_out_modules "."
| "Search" search_query search_queries "."
]

printable: [
| "Term" smart_global OPT univ_name_list
| "All"
| "Section" global
| "Grammar" IDENT
| "Custom" "Grammar" IDENT
| "LoadPath" OPT dirpath
| "Modules"
| "Libraries"
| "ML" "Path"
| "ML" "Modules"
| "Debug" "GC"
| "Graph"
| "Classes"
| "TypeClasses"
| "Instances" smart_global
| "Coercions"
| "Coercion" "Paths" class_rawexpr class_rawexpr
| "Canonical" "Projections" LIST0 smart_global
| "Typing" "Flags"
| "Tables"
| "Options"
| "Hint"
| "Hint" smart_global
| "Hint" "*"
| "HintDb" IDENT
| "Scopes"
| "Scope" IDENT
| "Visibility" OPT IDENT
| "Implicit" smart_global
| [ "Sorted" | ] "Universes" OPT printunivs_subgraph OPT ne_string
| "Assumptions" smart_global
| "Opaque" "Dependencies" smart_global
| "Transparent" "Dependencies" smart_global
| "All" "Dependencies" smart_global
| "Strategy" smart_global
| "Strategies"
| "Registered"
]

printunivs_subgraph: [
| "Subgraph" "(" LIST0 reference ")"
]

class_rawexpr: [
| "Funclass"
| "Sortclass"
| smart_global
]

locatable: [
| smart_global
| "Term" smart_global
| "File" ne_string
| "Library" global
| "Module" global
]

option_setting: [
|
| integer
| STRING
]

table_value: [
| global
| STRING
]

option_table: [
| LIST1 IDENT
]

ne_in_or_out_modules: [
| "inside" LIST1 global
| "outside" LIST1 global
]

in_or_out_modules: [
| ne_in_or_out_modules
|
]

comment: [
| constr
| STRING
| natural
]

positive_search_mark: [
| "-"
|
]

search_query: [
| positive_search_mark search_item
| positive_search_mark "[" LIST1 ( LIST1 search_query ) SEP "|" "]"
]

search_item: [
| test_id_colon search_where ":" ne_string OPT scope_delimiter
| "is" ":" logical_kind
| ne_string OPT scope_delimiter
| test_id_colon search_where ":" constr_pattern
| constr_pattern
]

logical_kind: [
| thm_token
| assumption_token
| "Context"
| extended_def_token
| "Primitive"
]

extended_def_token: [
| def_token
| "Coercion"
| "Instance"
| "Scheme"
| "Canonical"
| "Field"
| "Method"
]

search_where: [
| "head"
| "hyp"
| "concl"
| "headhyp"
| "headconcl"
]

search_queries: [
| ne_in_or_out_modules
| search_query search_queries
|
]

univ_name_list: [
| "@{" LIST0 name "}"
]

syntax: [
| "Open" "Scope" IDENT
| "Close" "Scope" IDENT
| "Delimit" "Scope" IDENT; "with" IDENT
| "Undelimit" "Scope" IDENT
| "Bind" "Scope" IDENT; "with" LIST1 class_rawexpr
| "Infix" ne_lstring ":=" constr [ "(" LIST1 syntax_modifier SEP "," ")" | ] OPT [ ":" IDENT ]
| "Notation" identref LIST0 ident ":=" constr only_parsing
| "Notation" lstring ":=" constr [ "(" LIST1 syntax_modifier SEP "," ")" | ] OPT [ ":" IDENT ]
| "Format" "Notation" STRING STRING STRING
| "Reserved" "Infix" ne_lstring [ "(" LIST1 syntax_modifier SEP "," ")" | ]
| "Reserved" "Notation" ne_lstring [ "(" LIST1 syntax_modifier SEP "," ")" | ]
]

only_parsing: [
| "(" "only" "parsing" ")"
|
]

level: [
| "level" natural
| "next" "level"
]

syntax_modifier: [
| "at" "level" natural
| "in" "custom" IDENT
| "in" "custom" IDENT; "at" "level" natural
| "left" "associativity"
| "right" "associativity"
| "no" "associativity"
| "only" "printing"
| "only" "parsing"
| "format" STRING OPT STRING
| IDENT; "," LIST1 IDENT SEP "," "at" level
| IDENT; "at" level OPT constr_as_binder_kind
| IDENT constr_as_binder_kind
| IDENT syntax_extension_type
]

syntax_extension_type: [
| "ident"
| "global"
| "bigint"
| "binder"
| "constr"
| "constr" at_level_opt OPT constr_as_binder_kind
| "pattern"
| "pattern" "at" "level" natural
| "strict" "pattern"
| "strict" "pattern" "at" "level" natural
| "closed" "binder"
| "custom" IDENT at_level_opt OPT constr_as_binder_kind
]

at_level_opt: [
| "at" level
|
]

constr_as_binder_kind: [
| "as" "ident"
| "as" "pattern"
| "as" "strict" "pattern"
]

simple_tactic: [
| "btauto"
| "congruence"
| "congruence" integer
| "congruence" "with" LIST1 constr
| "congruence" integer "with" LIST1 constr
| "f_equal"
| "firstorder" OPT tactic firstorder_using
| "firstorder" OPT tactic "with" LIST1 preident
| "firstorder" OPT tactic firstorder_using "with" LIST1 preident
| "gintuition" OPT tactic
| "functional" "inversion" quantified_hypothesis OPT reference      (* funind plugin *)
| "functional" "induction" lconstr fun_ind_using with_names      (* funind plugin *)
| "soft" "functional" "induction" LIST1 constr fun_ind_using with_names      (* funind plugin *)
| "reflexivity"
| "exact" casted_constr
| "assumption"
| "etransitivity"
| "cut" constr
| "exact_no_check" constr
| "vm_cast_no_check" constr
| "native_cast_no_check" constr
| "casetype" constr
| "elimtype" constr
| "lapply" constr
| "transitivity" constr
| "left"
| "eleft"
| "left" "with" bindings
| "eleft" "with" bindings
| "right"
| "eright"
| "right" "with" bindings
| "eright" "with" bindings
| "constructor"
| "constructor" int_or_var
| "constructor" int_or_var "with" bindings
| "econstructor"
| "econstructor" int_or_var
| "econstructor" int_or_var "with" bindings
| "specialize" constr_with_bindings
| "specialize" constr_with_bindings "as" simple_intropattern
| "symmetry"
| "symmetry" "in" in_clause
| "split"
| "esplit"
| "split" "with" bindings
| "esplit" "with" bindings
| "exists"
| "exists" LIST1 bindings SEP ","
| "eexists"
| "eexists" LIST1 bindings SEP ","
| "intros" "until" quantified_hypothesis
| "intro"
| "intro" ident
| "intro" ident "at" "top"
| "intro" ident "at" "bottom"
| "intro" ident "after" hyp
| "intro" ident "before" hyp
| "intro" "at" "top"
| "intro" "at" "bottom"
| "intro" "after" hyp
| "intro" "before" hyp
| "move" hyp "at" "top"
| "move" hyp "at" "bottom"
| "move" hyp "after" hyp
| "move" hyp "before" hyp
| "rename" LIST1 rename SEP ","
| "revert" LIST1 hyp
| "simple" "induction" quantified_hypothesis
| "simple" "destruct" quantified_hypothesis
| "double" "induction" quantified_hypothesis quantified_hypothesis
| "admit"
| "fix" ident natural
| "cofix" ident
| "clear" LIST0 hyp
| "clear" "-" LIST1 hyp
| "clearbody" LIST1 hyp
| "generalize" "dependent" constr
| "replace" uconstr "with" constr clause by_arg_tac
| "replace" "->" uconstr clause
| "replace" "<-" uconstr clause
| "replace" uconstr clause
| "simplify_eq"
| "simplify_eq" destruction_arg
| "esimplify_eq"
| "esimplify_eq" destruction_arg
| "discriminate"
| "discriminate" destruction_arg
| "ediscriminate"
| "ediscriminate" destruction_arg
| "injection"
| "injection" destruction_arg
| "einjection"
| "einjection" destruction_arg
| "injection" "as" LIST0 simple_intropattern
| "injection" destruction_arg "as" LIST0 simple_intropattern
| "einjection" "as" LIST0 simple_intropattern
| "einjection" destruction_arg "as" LIST0 simple_intropattern
| "simple" "injection"
| "simple" "injection" destruction_arg
| "dependent" "rewrite" orient constr
| "dependent" "rewrite" orient constr "in" hyp
| "cutrewrite" orient constr
| "cutrewrite" orient constr "in" hyp
| "decompose" "sum" constr
| "decompose" "record" constr
| "absurd" constr
| "contradiction" OPT constr_with_bindings
| "autorewrite" "with" LIST1 preident clause
| "autorewrite" "with" LIST1 preident clause "using" tactic
| "autorewrite" "*" "with" LIST1 preident clause
| "autorewrite" "*" "with" LIST1 preident clause "using" tactic
| "rewrite" "*" orient uconstr "in" hyp "at" occurrences by_arg_tac
| "rewrite" "*" orient uconstr "at" occurrences "in" hyp by_arg_tac
| "rewrite" "*" orient uconstr "in" hyp by_arg_tac
| "rewrite" "*" orient uconstr "at" occurrences by_arg_tac
| "rewrite" "*" orient uconstr by_arg_tac
| "refine" uconstr
| "simple" "refine" uconstr
| "notypeclasses" "refine" uconstr
| "simple" "notypeclasses" "refine" uconstr
| "solve_constraints"
| "subst" LIST1 var
| "subst"
| "simple" "subst"
| "evar" test_lpar_id_colon "(" ident ":" lconstr ")"
| "evar" constr
| "instantiate" "(" ident ":=" lglob ")"
| "instantiate" "(" integer ":=" lglob ")" hloc
| "instantiate"
| "stepl" constr "by" tactic
| "stepl" constr
| "stepr" constr "by" tactic
| "stepr" constr
| "generalize_eqs" hyp
| "dependent" "generalize_eqs" hyp
| "generalize_eqs_vars" hyp
| "dependent" "generalize_eqs_vars" hyp
| "specialize_eqs" hyp
| "hresolve_core" "(" ident ":=" constr ")" "at" int_or_var "in" constr
| "hresolve_core" "(" ident ":=" constr ")" "in" constr
| "hget_evar" int_or_var
| "destauto"
| "destauto" "in" hyp
| "transparent_abstract" tactic3
| "transparent_abstract" tactic3 "using" ident
| "constr_eq" constr constr
| "constr_eq_strict" constr constr
| "constr_eq_nounivs" constr constr
| "is_evar" constr
| "has_evar" constr
| "is_var" constr
| "is_fix" constr
| "is_cofix" constr
| "is_ind" constr
| "is_constructor" constr
| "is_proj" constr
| "is_const" constr
| "shelve"
| "shelve_unifiable"
| "unshelve" tactic1
| "give_up"
| "cycle" int_or_var
| "swap" int_or_var int_or_var
| "revgoals"
| "guard" test
| "decompose" "[" LIST1 constr "]" constr
| "optimize_heap"
| "with_strategy" strategy_level_or_var "[" LIST1 smart_global "]" tactic3
| "eassumption"
| "eexact" constr
| "trivial" auto_using hintbases
| "info_trivial" auto_using hintbases
| "debug" "trivial" auto_using hintbases
| "auto" OPT int_or_var auto_using hintbases
| "info_auto" OPT int_or_var auto_using hintbases
| "debug" "auto" OPT int_or_var auto_using hintbases
| "eauto" OPT int_or_var OPT int_or_var auto_using hintbases
| "new" "auto" OPT int_or_var auto_using hintbases
| "debug" "eauto" OPT int_or_var OPT int_or_var auto_using hintbases
| "info_eauto" OPT int_or_var OPT int_or_var auto_using hintbases
| "dfs" "eauto" OPT int_or_var auto_using hintbases
| "autounfold" hintbases clause_dft_concl
| "autounfold_one" hintbases "in" hyp
| "autounfold_one" hintbases
| "unify" constr constr
| "unify" constr constr "with" preident
| "convert_concl_no_check" constr
| "typeclasses" "eauto" "bfs" OPT int_or_var "with" LIST1 preident
| "typeclasses" "eauto" OPT int_or_var "with" LIST1 preident
| "typeclasses" "eauto" OPT int_or_var
| "head_of_constr" ident constr
| "not_evar" constr
| "is_ground" constr
| "autoapply" constr "using" preident
| "autoapply" constr "with" preident
| "progress_evars" tactic
| "decide" "equality"
| "compare" constr constr
| "rewrite_strat" rewstrategy "in" hyp
| "rewrite_strat" rewstrategy
| "rewrite_db" preident "in" hyp
| "rewrite_db" preident
| "substitute" orient glob_constr_with_bindings
| "setoid_rewrite" orient glob_constr_with_bindings
| "setoid_rewrite" orient glob_constr_with_bindings "in" hyp
| "setoid_rewrite" orient glob_constr_with_bindings "at" occurrences
| "setoid_rewrite" orient glob_constr_with_bindings "at" occurrences "in" hyp
| "setoid_rewrite" orient glob_constr_with_bindings "in" hyp "at" occurrences
| "setoid_symmetry"
| "setoid_symmetry" "in" hyp
| "setoid_reflexivity"
| "setoid_transitivity" constr
| "setoid_etransitivity"
| "intros" ne_intropatterns
| "intros"
| "eintros" ne_intropatterns
| "eintros"
| "apply" LIST1 constr_with_bindings_arg SEP "," in_hyp_as
| "eapply" LIST1 constr_with_bindings_arg SEP "," in_hyp_as
| "simple" "apply" LIST1 constr_with_bindings_arg SEP "," in_hyp_as
| "simple" "eapply" LIST1 constr_with_bindings_arg SEP "," in_hyp_as
| "elim" constr_with_bindings_arg OPT eliminator
| "eelim" constr_with_bindings_arg OPT eliminator
| "case" induction_clause_list
| "ecase" induction_clause_list
| "fix" ident natural "with" LIST1 fixdecl
| "cofix" ident "with" LIST1 cofixdecl
| "pose" bindings_with_parameters
| "pose" constr as_name
| "epose" bindings_with_parameters
| "epose" constr as_name
| "set" bindings_with_parameters clause_dft_concl
| "set" constr as_name clause_dft_concl
| "eset" bindings_with_parameters clause_dft_concl
| "eset" constr as_name clause_dft_concl
| "remember" constr as_name eqn_ipat clause_dft_all
| "eremember" constr as_name eqn_ipat clause_dft_all
| "assert" test_lpar_id_coloneq "(" identref ":=" lconstr ")"
| "eassert" test_lpar_id_coloneq "(" identref ":=" lconstr ")"
| "assert" test_lpar_id_colon "(" identref ":" lconstr ")" by_tactic
| "eassert" test_lpar_id_colon "(" identref ":" lconstr ")" by_tactic
| "enough" test_lpar_id_colon "(" identref ":" lconstr ")" by_tactic
| "eenough" test_lpar_id_colon "(" identref ":" lconstr ")" by_tactic
| "assert" constr as_ipat by_tactic
| "eassert" constr as_ipat by_tactic
| "pose" "proof" test_lpar_id_coloneq "(" identref ":=" lconstr ")"
| "epose" "proof" test_lpar_id_coloneq "(" identref ":=" lconstr ")"
| "pose" "proof" lconstr as_ipat
| "epose" "proof" lconstr as_ipat
| "enough" constr as_ipat by_tactic
| "eenough" constr as_ipat by_tactic
| "generalize" constr
| "generalize" constr LIST1 constr
| "generalize" constr lookup_at_as_comma occs as_name LIST0 [ "," pattern_occ as_name ]
| "induction" induction_clause_list
| "einduction" induction_clause_list
| "destruct" induction_clause_list
| "edestruct" induction_clause_list
| "rewrite" LIST1 oriented_rewriter SEP "," clause_dft_concl by_tactic
| "erewrite" LIST1 oriented_rewriter SEP "," clause_dft_concl by_tactic
| "dependent" [ "simple" "inversion" | "inversion" | "inversion_clear" ] quantified_hypothesis as_or_and_ipat OPT [ "with" constr ]
| "simple" "inversion" quantified_hypothesis as_or_and_ipat in_hyp_list
| "inversion" quantified_hypothesis as_or_and_ipat in_hyp_list
| "inversion_clear" quantified_hypothesis as_or_and_ipat in_hyp_list
| "inversion" quantified_hypothesis "using" constr in_hyp_list
| "red" clause_dft_concl
| "hnf" clause_dft_concl
| "simpl" delta_flag OPT ref_or_pattern_occ clause_dft_concl
| "cbv" strategy_flag clause_dft_concl
| "cbn" strategy_flag clause_dft_concl
| "lazy" strategy_flag clause_dft_concl
| "compute" delta_flag clause_dft_concl
| "vm_compute" OPT ref_or_pattern_occ clause_dft_concl
| "native_compute" OPT ref_or_pattern_occ clause_dft_concl
| "unfold" LIST1 unfold_occ SEP "," clause_dft_concl
| "fold" LIST1 constr clause_dft_concl
| "pattern" LIST1 pattern_occ SEP "," clause_dft_concl
| "change" conversion clause_dft_concl
| "change_no_check" conversion clause_dft_concl
| "start" "ltac" "profiling"
| "stop" "ltac" "profiling"
| "reset" "ltac" "profile"
| "show" "ltac" "profile"
| "show" "ltac" "profile" "cutoff" int
| "show" "ltac" "profile" string
| "restart_timer" OPT string
| "finish_timing" OPT string
| "finish_timing" "(" string ")" OPT string
| "psatz_Z" int_or_var tactic      (* micromega plugin *)
| "psatz_Z" tactic      (* micromega plugin *)
| "xlia" tactic      (* micromega plugin *)
| "xnlia" tactic      (* micromega plugin *)
| "xnra" tactic      (* micromega plugin *)
| "xnqa" tactic      (* micromega plugin *)
| "sos_Z" tactic      (* micromega plugin *)
| "sos_Q" tactic      (* micromega plugin *)
| "sos_R" tactic      (* micromega plugin *)
| "lra_Q" tactic      (* micromega plugin *)
| "lra_R" tactic      (* micromega plugin *)
| "psatz_R" int_or_var tactic      (* micromega plugin *)
| "psatz_R" tactic      (* micromega plugin *)
| "psatz_Q" int_or_var tactic      (* micromega plugin *)
| "psatz_Q" tactic      (* micromega plugin *)
| "zify_iter_specs"      (* micromega plugin *)
| "zify_op"      (* micromega plugin *)
| "zify_saturate"      (* micromega plugin *)
| "zify_iter_let" tactic      (* micromega plugin *)
| "zify_elim_let"      (* micromega plugin *)
| "nsatz_compute" constr      (* nsatz plugin *)
| "omega"      (* omega plugin *)
| "rtauto"
| "protect_fv" string "in" ident      (* setoid_ring plugin *)
| "protect_fv" string      (* setoid_ring plugin *)
| "ring_lookup" tactic0 "[" LIST0 constr "]" LIST1 constr      (* setoid_ring plugin *)
| "field_lookup" tactic "[" LIST0 constr "]" LIST1 constr      (* setoid_ring plugin *)
]

mlname: [
| preident      (* extraction plugin *)
| string      (* extraction plugin *)
]

int_or_id: [
| preident      (* extraction plugin *)
| integer      (* extraction plugin *)
]

language: [
| "Ocaml"      (* extraction plugin *)
| "OCaml"      (* extraction plugin *)
| "Haskell"      (* extraction plugin *)
| "Scheme"      (* extraction plugin *)
| "JSON"      (* extraction plugin *)
]

firstorder_using: [
| "using" reference
| "using" reference "," LIST1 reference SEP ","
| "using" reference reference LIST0 reference
|
]

fun_ind_using: [
| "using" constr_with_bindings      (* funind plugin *)
|      (* funind plugin *)
]

with_names: [
| "as" simple_intropattern      (* funind plugin *)
|      (* funind plugin *)
]

constr_comma_sequence': [
| constr "," constr_comma_sequence'      (* funind plugin *)
| constr      (* funind plugin *)
]

auto_using': [
| "using" constr_comma_sequence'      (* funind plugin *)
|      (* funind plugin *)
]

function_rec_definition_loc: [
| Vernac.rec_definition      (* funind plugin *)
]

fun_scheme_arg: [
| ident ":=" "Induction" "for" reference "Sort" sort_family      (* funind plugin *)
]

orient: [
| "->"
| "<-"
|
]

occurrences: [
| LIST1 integer
| var
]

glob: [
| constr
]

lglob: [
| lconstr
]

casted_constr: [
| constr
]

hloc: [
|
| "in" "|-" "*"
| "in" ident
| "in" "(" "Type" "of" ident ")"
| "in" "(" "Value" "of" ident ")"
| "in" "(" "type" "of" ident ")"
| "in" "(" "value" "of" ident ")"
]

rename: [
| ident "into" ident
]

by_arg_tac: [
| "by" tactic3
|
]

in_clause: [
| in_clause'
| "*" occs
| "*" "|-" concl_occ
| LIST0 hypident_occ SEP "," "|-" concl_occ
| LIST0 hypident_occ SEP ","
]

test_lpar_id_colon: [
| local_test_lpar_id_colon
]

strategy_level_or_var: [
| strategy_level
| identref
]

comparison: [
| "="
| "<"
| "<="
| ">"
| ">="
]

test: [
| int_or_var comparison int_or_var
]

hintbases: [
| "with" "*"
| "with" LIST1 preident
|
]

auto_using: [
| "using" LIST1 uconstr SEP ","
|
]

hints_path_atom: [
| LIST1 global
| "_"
]

hints_path: [
| "(" hints_path ")"
| hints_path "*"
| "emp"
| "eps"
| hints_path "|" hints_path
| hints_path_atom
| hints_path hints_path
]

opthints: [
| ":" LIST1 preident
|
]

debug: [
| "debug"
|
]

eauto_search_strategy_name: [
| "bfs"
| "dfs"
]

eauto_search_strategy: [
| "(" eauto_search_strategy_name ")"
|
]

tactic_then_last: [
| "|" LIST0 ( OPT tactic_expr5 ) SEP "|"
|
]

tactic_then_gen: [
| tactic_expr5 "|" tactic_then_gen
| tactic_expr5 ".." tactic_then_last
| ".." tactic_then_last
| tactic_expr5
| "|" tactic_then_gen
|
]

tactic_then_locality: [
| "[" OPT ">"
]

tactic_expr5: [
| binder_tactic
| tactic_expr4
]

tactic_expr4: [
| tactic_expr3 ";" binder_tactic
| tactic_expr3 ";" tactic_expr3
| tactic_expr3 ";" tactic_then_locality tactic_then_gen "]"
| tactic_expr3
]

tactic_expr3: [
| "try" tactic_expr3
| "do" int_or_var tactic_expr3
| "timeout" int_or_var tactic_expr3
| "time" OPT string tactic_expr3
| "repeat" tactic_expr3
| "progress" tactic_expr3
| "once" tactic_expr3
| "exactly_once" tactic_expr3
| "infoH" tactic_expr3
| "abstract" tactic_expr2
| "abstract" tactic_expr2 "using" ident
| selector tactic_expr3
| tactic_expr2
]

tactic_expr2: [
| tactic_expr1 "+" binder_tactic
| tactic_expr1 "+" tactic_expr2
| "tryif" tactic_expr5 "then" tactic_expr5 "else" tactic_expr2
| tactic_expr1 "||" binder_tactic
| tactic_expr1 "||" tactic_expr2
| tactic_expr1
]

tactic_expr1: [
| match_key "goal" "with" match_context_list "end"
| match_key "reverse" "goal" "with" match_context_list "end"
| match_key tactic_expr5 "with" match_list "end"
| "first" "[" LIST0 tactic_expr5 SEP "|" "]"
| "solve" "[" LIST0 tactic_expr5 SEP "|" "]"
| "idtac" LIST0 message_token
| failkw [ int_or_var | ] LIST0 message_token
| simple_tactic
| tactic_arg
| reference LIST0 tactic_arg_compat
| tactic_expr0
]

tactic_expr0: [
| "(" tactic_expr5 ")"
| "[" ">" tactic_then_gen "]"
| tactic_atom
]

failkw: [
| "fail"
| "gfail"
]

binder_tactic: [
| "fun" LIST1 input_fun "=>" tactic_expr5
| "let" [ "rec" | ] LIST1 let_clause SEP "with" "in" tactic_expr5
| "info" tactic_expr5
]

tactic_arg_compat: [
| tactic_arg
| Constr.constr
| "()"
]

tactic_arg: [
| constr_eval
| "fresh" LIST0 fresh_id
| "type_term" uconstr
| "numgoals"
]

fresh_id: [
| STRING
| qualid
]

constr_eval: [
| "eval" red_expr "in" Constr.constr
| "context" identref "[" Constr.lconstr "]"
| "type" "of" Constr.constr
]

constr_may_eval: [
| constr_eval
| Constr.constr
]

tactic_atom: [
| integer
| reference
| "()"
]

match_key: [
| "match"
| "lazymatch"
| "multimatch"
]

input_fun: [
| "_"
| ident
]

let_clause: [
| identref ":=" tactic_expr5
| "_" ":=" tactic_expr5
| identref LIST1 input_fun ":=" tactic_expr5
]

match_pattern: [
| "context" OPT Constr.ident "[" Constr.lconstr_pattern "]"
| Constr.lconstr_pattern
]

match_hyps: [
| name ":" match_pattern
| name ":=" "[" match_pattern "]" ":" match_pattern
| name ":=" match_pattern
]

match_context_rule: [
| LIST0 match_hyps SEP "," "|-" match_pattern "=>" tactic_expr5
| "[" LIST0 match_hyps SEP "," "|-" match_pattern "]" "=>" tactic_expr5
| "_" "=>" tactic_expr5
]

match_context_list: [
| LIST1 match_context_rule SEP "|"
| "|" LIST1 match_context_rule SEP "|"
]

match_rule: [
| match_pattern "=>" tactic_expr5
| "_" "=>" tactic_expr5
]

match_list: [
| LIST1 match_rule SEP "|"
| "|" LIST1 match_rule SEP "|"
]

message_token: [
| identref
| STRING
| integer
]

ltac_def_kind: [
| ":="
| "::="
]

tacdef_body: [
| Constr.global LIST1 input_fun ltac_def_kind tactic_expr5
| Constr.global ltac_def_kind tactic_expr5
]

tactic: [
| tactic_expr5
]

range_selector: [
| natural "-" natural
| natural
]

range_selector_or_nth: [
| natural "-" natural OPT [ "," LIST1 range_selector SEP "," ]
| natural OPT [ "," LIST1 range_selector SEP "," ]
]

selector_body: [
| range_selector_or_nth
| test_bracket_ident "[" ident "]"
]

selector: [
| "only" selector_body ":"
]

toplevel_selector: [
| selector_body ":"
| "!" ":"
| "all" ":"
]

tactic_mode: [
| OPT toplevel_selector G_vernac.query_command
| OPT toplevel_selector "{"
| OPT ltac_selector OPT ltac_info tactic ltac_use_default
| "par" ":" OPT ltac_info tactic ltac_use_default
]

ltac_selector: [
| toplevel_selector
]

ltac_info: [
| "Info" natural
]

ltac_use_default: [
| "."
| "..."
]

ltac_tactic_level: [
| "(" "at" "level" natural ")"
]

ltac_production_sep: [
| "," string
]

ltac_production_item: [
| string
| ident "(" ident OPT ltac_production_sep ")"
| ident
]

ltac_tacdef_body: [
| tacdef_body
]

withtac: [
| "with" Tactic.tactic
|
]

Constr.closed_binder: [
| "(" Prim.name ":" Constr.lconstr "|" Constr.lconstr ")"
]

glob_constr_with_bindings: [
| constr_with_bindings
]

rewstrategy: [
| glob
| "<-" constr
| "subterms" rewstrategy
| "subterm" rewstrategy
| "innermost" rewstrategy
| "outermost" rewstrategy
| "bottomup" rewstrategy
| "topdown" rewstrategy
| "id"
| "fail"
| "refl"
| "progress" rewstrategy
| "try" rewstrategy
| "any" rewstrategy
| "repeat" rewstrategy
| rewstrategy ";" rewstrategy
| "(" rewstrategy ")"
| "choice" rewstrategy rewstrategy
| "old_hints" preident
| "hints" preident
| "terms" LIST0 constr
| "eval" red_expr
| "fold" constr
]

int_or_var: [
| integer
| identref
]

nat_or_var: [
| natural
| identref
]

id_or_meta: [
| identref
]

open_constr: [
| constr
]

uconstr: [
| constr
]

destruction_arg: [
| natural
| test_lpar_id_rpar constr_with_bindings
| constr_with_bindings_arg
]

constr_with_bindings_arg: [
| ">" constr_with_bindings
| constr_with_bindings
]

quantified_hypothesis: [
| ident
| natural
]

conversion: [
| constr
| constr "with" constr
| constr "at" occs_nums "with" constr
]

occs_nums: [
| LIST1 nat_or_var
| "-" nat_or_var LIST0 int_or_var
]

occs: [
| "at" occs_nums
|
]

pattern_occ: [
| constr occs
]

ref_or_pattern_occ: [
| smart_global occs
| constr occs
]

unfold_occ: [
| smart_global occs
]

intropatterns: [
| LIST0 intropattern
]

ne_intropatterns: [
| LIST1 intropattern
]

or_and_intropattern: [
| "[" LIST1 intropatterns SEP "|" "]"
| "()"
| "(" simple_intropattern ")"
| "(" simple_intropattern "," LIST1 simple_intropattern SEP "," ")"
| "(" simple_intropattern "&" LIST1 simple_intropattern SEP "&" ")"
]

equality_intropattern: [
| "->"
| "<-"
| "[=" intropatterns "]"
]

naming_intropattern: [
| pattern_ident
| "?"
| ident
]

intropattern: [
| simple_intropattern
| "*"
| "**"
]

simple_intropattern: [
| simple_intropattern_closed LIST0 [ "%" operconstr0 ]
]

simple_intropattern_closed: [
| or_and_intropattern
| equality_intropattern
| "_"
| naming_intropattern
]

simple_binding: [
| "(" ident ":=" lconstr ")"
| "(" natural ":=" lconstr ")"
]

bindings: [
| test_lpar_idnum_coloneq LIST1 simple_binding
| LIST1 constr
]

constr_with_bindings: [
| constr with_bindings
]

with_bindings: [
| "with" bindings
|
]

red_flags: [
| "beta"
| "iota"
| "match"
| "fix"
| "cofix"
| "zeta"
| "delta" delta_flag
]

delta_flag: [
| "-" "[" LIST1 smart_global "]"
| "[" LIST1 smart_global "]"
|
]

strategy_flag: [
| LIST1 red_flags
| delta_flag
]

red_expr: [
| "red"
| "hnf"
| "simpl" delta_flag OPT ref_or_pattern_occ
| "cbv" strategy_flag
| "cbn" strategy_flag
| "lazy" strategy_flag
| "compute" delta_flag
| "vm_compute" OPT ref_or_pattern_occ
| "native_compute" OPT ref_or_pattern_occ
| "unfold" LIST1 unfold_occ SEP ","
| "fold" LIST1 constr
| "pattern" LIST1 pattern_occ SEP ","
| IDENT
]

hypident: [
| id_or_meta
| "(" "type" "of" id_or_meta ")"
| "(" "value" "of" id_or_meta ")"
]

hypident_occ: [
| hypident occs
]

clause_dft_concl: [
| "in" in_clause
| occs
|
]

clause_dft_all: [
| "in" in_clause
|
]

opt_clause: [
| "in" in_clause
| "at" occs_nums
|
]

concl_occ: [
| "*" occs
|
]

in_hyp_list: [
| "in" LIST1 id_or_meta
|
]

in_hyp_as: [
| "in" id_or_meta as_ipat
|
]

orient_rw: [
| "->"
| "<-"
|
]

simple_binder: [
| name
| "(" LIST1 name ":" lconstr ")"
]

fixdecl: [
| "(" ident LIST0 simple_binder struct_annot ":" lconstr ")"
]

struct_annot: [
| "{" "struct" name "}"
|
]

cofixdecl: [
| "(" ident LIST0 simple_binder ":" lconstr ")"
]

bindings_with_parameters: [
| check_for_coloneq "(" ident LIST0 simple_binder ":=" lconstr ")"
]

eliminator: [
| "using" constr_with_bindings
]

as_ipat: [
| "as" simple_intropattern
|
]

or_and_intropattern_loc: [
| or_and_intropattern
| identref
]

as_or_and_ipat: [
| "as" or_and_intropattern_loc
|
]

eqn_ipat: [
| "eqn" ":" naming_intropattern
|
]

as_name: [
| "as" ident
|
]

by_tactic: [
| "by" tactic_expr3
|
]

rewriter: [
| "!" constr_with_bindings_arg
| [ "?" | LEFTQMARK ] constr_with_bindings_arg
| natural "!" constr_with_bindings_arg
| natural [ "?" | LEFTQMARK ] constr_with_bindings_arg
| natural constr_with_bindings_arg
| constr_with_bindings_arg
]

oriented_rewriter: [
| orient_rw rewriter
]

induction_clause: [
| destruction_arg as_or_and_ipat eqn_ipat opt_clause
]

induction_clause_list: [
| LIST1 induction_clause SEP "," OPT eliminator opt_clause
]

ring_mod: [
| "decidable" constr      (* setoid_ring plugin *)
| "abstract"      (* setoid_ring plugin *)
| "morphism" constr      (* setoid_ring plugin *)
| "constants" "[" tactic "]"      (* setoid_ring plugin *)
| "closed" "[" LIST1 global "]"      (* setoid_ring plugin *)
| "preprocess" "[" tactic "]"      (* setoid_ring plugin *)
| "postprocess" "[" tactic "]"      (* setoid_ring plugin *)
| "setoid" constr constr      (* setoid_ring plugin *)
| "sign" constr      (* setoid_ring plugin *)
| "power" constr "[" LIST1 global "]"      (* setoid_ring plugin *)
| "power_tac" constr "[" tactic "]"      (* setoid_ring plugin *)
| "div" constr      (* setoid_ring plugin *)
]

ring_mods: [
| "(" LIST1 ring_mod SEP "," ")"      (* setoid_ring plugin *)
]

field_mod: [
| ring_mod      (* setoid_ring plugin *)
| "completeness" constr      (* setoid_ring plugin *)
]

field_mods: [
| "(" LIST1 field_mod SEP "," ")"      (* setoid_ring plugin *)
]

numnotoption: [
|
| "(" "warning" "after" bignat ")"
| "(" "abstract" "after" bignat ")"
]