Debian Codegraph @

doc/tools/docgram/orderedGrammar

raw
1 (* Defines the order to apply to editedGrammar to get the final grammar for the doc.
2 doc_grammar will modify this file to add/remove nonterminals and productions
3 to match editedGrammar, which will remove comments. Not compiled into Coq *)
4 DOC_GRAMMAR
5
6 term: [
7 | term100
8 ]
9
10 term100: [
11 | term_cast
12 | term99
13 ]
14
15 term99: [
16 | term10
17 ]
18
19 term10: [
20 | term_application
21 | term_forall_or_fun
22 | term_let
23 | term_fix
24 | term_cofix
25 | term_if
26 | one_term
27 ]
28
29 one_term: [
30 | term_explicit
31 | term1
32 ]
33
34 term1: [
35 | term_projection
36 | term_scope
37 | term0
38 ]
39
40 term0: [
41 | qualid_annotated
42 | sort
43 | number_or_string
44 | term_evar
45 | term_match
46 | term_record
47 | term_generalizing
48 | "[|" LIST0 term SEP ";" "|" term OPT ( ":" type ) "|]" OPT univ_annot
49 | term_ltac
50 | "(" term ")"
51 ]
52
53 qualid_annotated: [
54 | qualid OPT univ_annot
55 ]
56
57 term_ltac: [
58 | "ltac" ":" "(" ltac_expr ")"
59 ]
60
61 term_projection: [
62 | term1 ".(" qualid OPT univ_annot LIST0 arg ")"
63 | term1 ".(" "@" qualid OPT univ_annot LIST0 ( term1 ) ")"
64 ]
65
66 term_scope: [
67 | term1 "%" scope_key
68 | term1 "%_" scope_key
69 ]
70
71 term_evar: [
72 | "_"
73 | "?[" ident "]"
74 | "?[" "?" ident "]"
75 | "?" ident OPT ( "@{" LIST1 ( ident ":=" term ) SEP ";" "}" )
76 ]
77
78 dangling_pattern_extension_rule: [
79 | "@" "?" ident LIST1 ident
80 ]
81
82 term_application: [
83 | term10 LIST1 arg
84 | "@" qualid_annotated LIST1 term1
85 ]
86
87 arg: [
88 | "(" ident ":=" term ")"
89 | "(" natural ":=" term ")"
90 | term1
91 ]
92
93 term_explicit: [
94 | "@" qualid_annotated
95 ]
96
97 number_or_string: [
98 | number
99 | string
100 ]
101
102 assumption_token: [
103 | [ "Axiom" | "Axioms" ]
104 | [ "Conjecture" | "Conjectures" ]
105 | [ "Parameter" | "Parameters" ]
106 | [ "Hypothesis" | "Hypotheses" ]
107 | [ "Variable" | "Variables" ]
108 ]
109
110 assumpt: [
111 | LIST1 ident_decl of_type
112 ]
113
114 ident_decl: [
115 | ident OPT univ_decl
116 ]
117
118 of_type: [
119 | [ ":" | ":>" ] type
120 ]
121
122 qualid: [
123 | ident LIST0 ( "." ident )
124 ]
125
126 type: [
127 | term
128 ]
129
130 one_type: [
131 | one_term
132 ]
133
134 number: [
135 | OPT "-" decnat OPT ( "." LIST1 [ digit | "_" ] ) OPT ( [ "e" | "E" ] OPT [ "+" | "-" ] decnat )
136 | OPT "-" hexnat OPT ( "." LIST1 [ hexdigit | "_" ] ) OPT ( [ "p" | "P" ] OPT [ "+" | "-" ] decnat )
137 ]
138
139 integer: [
140 | bigint
141 ]
142
143 bigint: [
144 | OPT "-" bignat
145 ]
146
147 natural: [
148 | bignat
149 ]
150
151 bignat: [
152 | [ decnat | hexnat ]
153 ]
154
155 decnat: [
156 | digit LIST0 [ digit | "_" ]
157 ]
158
159 digit: [
160 | "0" ".." "9"
161 ]
162
163 hexnat: [
164 | [ "0x" | "0X" ] hexdigit LIST0 [ hexdigit | "_" ]
165 ]
166
167 hexdigit: [
168 | [ "0" ".." "9" | "a" ".." "f" | "A" ".." "F" ]
169 ]
170
171 ident: [
172 | first_letter LIST0 subsequent_letter
173 ]
174
175 first_letter: [
176 | [ "a" ".." "z" | "A" ".." "Z" | "_" | unicode_letter ]
177 ]
178
179 subsequent_letter: [
180 | [ first_letter | digit | "'" | unicode_id_part ]
181 ]
182
183 where: [
184 | "at" "top"
185 | "at" "bottom"
186 | "before" ident
187 | "after" ident
188 ]
189
190 add_zify: [
191 | [ "InjTyp" | "BinOp" | "UnOp" | "CstOp" | "BinRel" | "UnOpSpec" | "BinOpSpec" ] (* Micromega plugin *)
192 | [ "PropOp" | "PropBinOp" | "PropUOp" | "Saturate" ] (* Micromega plugin *)
193 ]
194
195 show_zify: [
196 | [ "InjTyp" | "BinOp" | "UnOp" | "CstOp" | "BinRel" | "UnOpSpec" | "BinOpSpec" | "Spec" ] (* Micromega plugin *)
197 ]
198
199 REACHABLE: [
200 | command
201 | simple_tactic
202 | NOTINRSTS
203 ]
204
205 NOTINRSTS: [
206 | command
207 | control_command
208 | simple_tactic
209 | hints_regexp
210 | REACHABLE
211 | NOTINRSTS
212 | l1_tactic
213 | l3_tactic
214 | l2_tactic
215 | value_tactic
216 | ltac2_entry
217 | q_intropatterns
218 | q_intropattern
219 | q_ident
220 | q_destruction_arg
221 | q_with_bindings
222 | q_bindings
223 | q_reductions
224 | q_reference
225 | q_clause
226 | q_occurrences
227 | q_induction_clause
228 | q_conversion
229 | q_rewriting
230 | q_dispatch
231 | q_hintdb
232 | q_move_location
233 | q_pose
234 | q_assert
235 | q_constr_matching
236 | q_goal_matching
237 ]
238
239 document: [
240 | LIST0 sentence
241 ]
242
243 nonterminal: [
244 ]
245
246 sentence: [
247 | OPT attributes command "."
248 | OPT attributes OPT ( natural ":" ) query_command "."
249 | OPT attributes OPT ( toplevel_selector ":" ) ltac_expr [ "." | "..." ]
250 | control_command
251 ]
252
253 control_command: [
254 ]
255
256 query_command: [
257 ]
258
259 attributes: [
260 | LIST0 ( "#[" LIST0 attribute SEP "," "]" ) LIST0 legacy_attr
261 ]
262
263 attribute: [
264 | ident OPT attr_value
265 ]
266
267 attr_value: [
268 | "=" string
269 | "=" qualid
270 | "(" LIST1 attribute SEP "," ")"
271 ]
272
273 legacy_attr: [
274 | [ "Local" | "Global" ]
275 | [ "Polymorphic" | "Monomorphic" ]
276 | [ "Cumulative" | "NonCumulative" ]
277 | "Private"
278 | "Program"
279 ]
280
281 sort: [
282 | "Set"
283 | "Prop"
284 | "SProp"
285 | "Type"
286 | "Type" "@{" "_" "}"
287 | "Type" "@{" OPT [ qualid [ "|" | ";" ] ] universe "}"
288 ]
289
290 universe: [
291 | "max" "(" LIST1 universe_expr SEP "," ")"
292 | "_"
293 | universe_expr
294 ]
295
296 universe_expr: [
297 | universe_name OPT ( "+" natural )
298 | natural
299 ]
300
301 universe_name: [
302 | qualid
303 | "Set"
304 | "Prop"
305 ]
306
307 univ_annot: [
308 | "@{" LIST0 univ_level_or_quality OPT [ [ "|" | ";" ] LIST0 univ_level_or_quality ] "}"
309 ]
310
311 univ_level_or_quality: [
312 | "0"
313 | "Set"
314 | "SProp"
315 | "Prop"
316 | "Type"
317 | "_"
318 | qualid
319 ]
320
321 sort_quality_var: [
322 | "Prop"
323 | "SProp"
324 | "Type"
325 | qualid
326 ]
327
328 univ_decl: [
329 | "@{" OPT [ LIST0 ident [ "|" | ";" ] ] LIST0 ident OPT "+" OPT [ "|" LIST0 sort_constraint SEP "," OPT "+" ] "}"
330 ]
331
332 cumul_univ_decl: [
333 | "@{" OPT [ LIST0 ident [ "|" | ";" ] ] LIST0 ( OPT [ "+" | "=" | "*" ] ident ) OPT "+" OPT [ "|" LIST0 sort_constraint SEP "," OPT "+" ] "}"
334 ]
335
336 sort_constraint: [
337 | universe_name [ "<" | "=" | "<=" ] universe_name
338 | sort_quality_var "->" sort_quality_var
339 ]
340
341 univ_decl_constraints: [
342 | "|" LIST0 sort_constraint SEP "," [ "+" | ] "}"
343 | [ "}" | "|}" ]
344 ]
345
346 term_fix: [
347 | "let" "fix" fix_decl "in" term
348 | "fix" fix_decl OPT ( LIST1 ( "with" fix_decl ) "for" ident )
349 ]
350
351 fix_decl: [
352 | ident LIST0 binder OPT fixannot OPT ( ":" type ) ":=" term
353 ]
354
355 fixannot: [
356 | "{" "struct" ident "}"
357 | "{" "wf" one_term ident "}"
358 | "{" "measure" one_term OPT ident OPT one_term "}"
359 ]
360
361 term_cofix: [
362 | "let" "cofix" cofix_body "in" term
363 | "cofix" cofix_body OPT ( LIST1 ( "with" cofix_body ) "for" ident )
364 ]
365
366 cofix_body: [
367 | ident LIST0 binder OPT ( ":" type ) ":=" term
368 ]
369
370 term_if: [
371 | "if" term OPT [ OPT [ "as" name ] "return" term100 ] "then" term "else" term
372 ]
373
374 term_let: [
375 | "let" name OPT ( ":" type ) ":=" term "in" term
376 | "let" name LIST1 binder OPT ( ":" type ) ":=" term "in" term
377 | destructuring_let
378 ]
379
380 destructuring_let: [
381 | "let" "(" LIST0 name SEP "," ")" OPT [ OPT [ "as" name ] "return" term100 ] ":=" term "in" term
382 | "let" "'" pattern OPT [ "in" pattern ] ":=" term OPT ( "return" term100 ) "in" term
383 ]
384
385 term_forall_or_fun: [
386 | "forall" open_binders "," type
387 | "fun" open_binders "=>" term
388 ]
389
390 open_binders: [
391 | LIST1 name ":" type
392 | LIST1 binder
393 ]
394
395 name: [
396 | "_"
397 | ident
398 ]
399
400 binder: [
401 | name
402 | "(" LIST1 name ":" type ")"
403 | "(" name OPT ( ":" type ) ":=" term ")"
404 | implicit_binders
405 | generalizing_binder
406 | "(" name ":" type "|" term ")"
407 | "'" pattern0
408 ]
409
410 implicit_binders: [
411 | "{" LIST1 name OPT ( ":" type ) "}"
412 | "[" LIST1 name OPT ( ":" type ) "]"
413 ]
414
415 generalizing_binder: [
416 | "`(" LIST1 typeclass_constraint SEP "," ")"
417 | "`{" LIST1 typeclass_constraint SEP "," "}"
418 | "`[" LIST1 typeclass_constraint SEP "," "]"
419 ]
420
421 typeclass_constraint: [
422 | OPT "!" term
423 | "{" name "}" ":" OPT "!" term
424 | name ":" OPT "!" term
425 ]
426
427 term_generalizing: [
428 | "`{" term "}"
429 | "`(" term ")"
430 ]
431
432 term_cast: [
433 | term99 "<:" type
434 | term99 "<<:" type
435 | term99 ":>" type
436 | term99 ":" type
437 ]
438
439 term_match: [
440 | "match" LIST1 case_item SEP "," OPT ( "return" term100 ) "with" OPT "|" LIST0 eqn SEP "|" "end"
441 ]
442
443 case_item: [
444 | term100 OPT ( "as" name ) OPT [ "in" pattern ]
445 ]
446
447 eqn: [
448 | LIST1 [ LIST1 pattern SEP "," ] SEP "|" "=>" term
449 ]
450
451 pattern: [
452 | pattern10 ":" term
453 | pattern10
454 ]
455
456 pattern10: [
457 | pattern10 "as" name
458 | pattern10 LIST0 pattern1
459 | "@" qualid LIST0 pattern1
460 ]
461
462 pattern1: [
463 | pattern1 "%" scope_key
464 | pattern1 "%_" scope_key
465 | pattern0
466 ]
467
468 pattern0: [
469 | qualid
470 | "{|" LIST0 ( qualid ":=" pattern ) "|}"
471 | "_"
472 | "(" LIST1 pattern SEP "|" ")"
473 | number
474 | string
475 ]
476
477 fix_definition: [
478 | ident_decl LIST0 binder OPT fixannot OPT ( ":" type ) OPT [ ":=" term ] OPT decl_notations
479 ]
480
481 thm_token: [
482 | "Theorem"
483 | "Lemma"
484 | "Fact"
485 | "Remark"
486 | "Corollary"
487 | "Proposition"
488 | "Property"
489 ]
490
491 def_body: [
492 | LIST0 binder OPT ( ":" type ) ":=" OPT reduce term
493 | LIST0 binder ":" type
494 ]
495
496 reduce: [
497 | "Eval" red_expr "in"
498 ]
499
500 red_expr: [
501 | "lazy" OPT reductions
502 | "cbv" OPT reductions
503 | "compute" OPT delta_reductions
504 | "vm_compute" OPT [ reference_occs | pattern_occs ]
505 | "native_compute" OPT [ reference_occs | pattern_occs ]
506 | "red"
507 | "hnf"
508 | "simpl" OPT "head" OPT delta_reductions OPT [ reference_occs | pattern_occs ]
509 | "cbn" OPT reductions
510 | "unfold" LIST1 reference_occs SEP ","
511 | "fold" LIST1 one_term
512 | "pattern" LIST1 pattern_occs SEP ","
513 | ident
514 ]
515
516 reductions: [
517 | LIST1 reduction
518 | OPT "head" delta_reductions
519 ]
520
521 reduction: [
522 | "head"
523 | "beta"
524 | "delta" OPT delta_reductions
525 | "match"
526 | "fix"
527 | "cofix"
528 | "iota"
529 | "zeta"
530 ]
531
532 delta_reductions: [
533 | OPT "-" "[" LIST1 reference "]"
534 ]
535
536 reference_occs: [
537 | reference OPT ( "at" occs_nums )
538 ]
539
540 pattern_occs: [
541 | one_term OPT ( "at" occs_nums )
542 ]
543
544 record_definition: [
545 | OPT ">" ident_decl LIST0 binder OPT [ ":" sort ] OPT ( ":=" OPT ident "{" OPT [ LIST1 record_field SEP ";" OPT ";" ] "}" OPT [ "as" ident ] )
546 ]
547
548 record_field: [
549 | LIST0 [ "#[" LIST1 attribute SEP "," "]" ] name OPT field_spec OPT [ "|" natural ] OPT decl_notations
550 ]
551
552 field_spec: [
553 | LIST0 binder of_type_inst
554 | LIST0 binder ":=" term
555 | LIST0 binder of_type_inst ":=" term
556 ]
557
558 of_type_inst: [
559 | [ ":" | ":>" | "::" | "::>" ] type
560 ]
561
562 term_record: [
563 | "{|" OPT [ LIST1 field_val SEP ";" OPT ";" ] "|}"
564 ]
565
566 field_val: [
567 | qualid LIST0 binder ":=" term
568 ]
569
570 inductive_definition: [
571 | ident OPT cumul_univ_decl LIST0 binder OPT [ "|" LIST0 binder ] OPT [ ":" type ] ":=" OPT [ OPT "|" LIST1 constructor SEP "|" ] OPT decl_notations
572 ]
573
574 constructor: [
575 | LIST0 [ "#[" LIST1 attribute SEP "," "]" ] ident LIST0 binder OPT of_type_inst
576 ]
577
578 import_categories: [
579 | OPT "-" "(" LIST1 qualid SEP "," ")"
580 ]
581
582 filtered_import: [
583 | qualid OPT [ "(" LIST1 ( qualid OPT [ "(" ".." ")" ] ) SEP "," ")" ]
584 ]
585
586 cofix_definition: [
587 | ident_decl LIST0 binder OPT ( ":" type ) OPT [ ":=" term ] OPT decl_notations
588 ]
589
590 rw_pattern: [
591 | term
592 ]
593
594 rewrite_rule: [
595 | OPT [ univ_decl "|-" ] rw_pattern "=>" term
596 ]
597
598 scheme_kind: [
599 | scheme_type "for" reference "Sort" sort_quality_or_set
600 ]
601
602 scheme_type: [
603 | "Induction"
604 | "Minimality"
605 | "Elimination"
606 | "Case"
607 ]
608
609 sort_quality_or_set: [
610 | "Prop"
611 | "SProp"
612 | "Set"
613 | "Type"
614 ]
615
616 hint_info: [
617 | "|" OPT natural OPT one_pattern
618 ]
619
620 one_pattern: [
621 | one_term
622 ]
623
624 module_binder: [
625 | "(" OPT ( [ "Import" | "Export" ] OPT import_categories ) LIST1 ident ":" module_type_inl ")"
626 ]
627
628 module_type_inl: [
629 | "!" module_type
630 | module_type OPT functor_app_annot
631 ]
632
633 functor_app_annot: [
634 | "[" "inline" "at" "level" natural "]"
635 | "[" "no" "inline" "]"
636 ]
637
638 module_type: [
639 | qualid
640 | "(" module_type ")"
641 | module_type module_expr_atom
642 | module_type "with" with_declaration
643 ]
644
645 with_declaration: [
646 | "Definition" qualid OPT univ_decl ":=" term
647 | "Module" qualid ":=" qualid
648 ]
649
650 module_expr_atom: [
651 | qualid
652 | "(" module_expr_atom ")"
653 ]
654
655 of_module_type: [
656 | ":" module_type_inl
657 | LIST0 ( "<:" module_type_inl )
658 ]
659
660 module_expr_inl: [
661 | "!" LIST1 module_expr_atom
662 | LIST1 module_expr_atom OPT functor_app_annot
663 ]
664
665 reference: [
666 | qualid
667 | string OPT [ "%" scope_key ]
668 ]
669
670 arg_specs: [
671 | argument_spec
672 | "/"
673 | "&"
674 | "(" LIST1 argument_spec ")" LIST0 [ "%" scope | "%_" scope ]
675 | "[" LIST1 argument_spec "]" LIST0 [ "%" scope | "%_" scope ]
676 | "{" LIST1 argument_spec "}" LIST0 [ "%" scope | "%_" scope ]
677 ]
678
679 argument_spec: [
680 | OPT "!" name LIST0 [ "%" scope | "%_" scope ]
681 ]
682
683 implicits_alt: [
684 | name
685 | "[" LIST1 name "]"
686 | "{" LIST1 name "}"
687 ]
688
689 args_modifier: [
690 | "simpl" "nomatch"
691 | "simpl" "never"
692 | "clear" "simpl"
693 | "default" "implicits"
694 | "clear" "implicits"
695 | "clear" "scopes"
696 | "clear" "bidirectionality" "hint"
697 | "rename"
698 | "assert"
699 | "extra" "scopes"
700 | "clear" "scopes" "and" "implicits"
701 | "clear" "implicits" "and" "scopes"
702 ]
703
704 scope: [
705 | scope_name
706 | scope_key
707 ]
708
709 scope_name: [
710 | ident
711 ]
712
713 scope_key: [
714 | ident
715 ]
716
717 strategy_level: [
718 | "opaque"
719 | integer
720 | "expand"
721 | "transparent"
722 ]
723
724 strategy_level_or_var: [
725 | strategy_level
726 | ident
727 ]
728
729 reserv_list: [
730 | LIST1 ( "(" simple_reserv ")" )
731 | simple_reserv
732 ]
733
734 simple_reserv: [
735 | LIST1 ident ":" type
736 ]
737
738 debug_univ_name: [
739 | qualid
740 | string
741 ]
742
743 command: [
744 | "Goal" type
745 | "Pwd"
746 | "Cd" OPT string
747 | "Load" OPT "Verbose" [ string | ident ]
748 | "Declare" "ML" "Module" LIST1 string
749 | "Locate" reference
750 | "Locate" "Term" reference
751 | "Locate" "Module" qualid
752 | "Info" natural ltac_expr
753 | "Add" "Zify" add_zify qualid (* Micromega plugin *)
754 | "Show" "Zify" show_zify (* Micromega plugin *)
755 | "Locate" "Ltac" qualid
756 | "Locate" "Library" qualid
757 | "Locate" "File" string
758 | "Type" term
759 | "Print" "All"
760 | "Print" "Section" qualid
761 | "Print" "Grammar" LIST0 ident
762 | "Print" "Custom" "Grammar" qualid
763 | "Print" "Keywords"
764 | "Print" "LoadPath" OPT dirpath
765 | "Print" "Libraries"
766 | "Print" "ML" "Path"
767 | "Print" "ML" "Modules"
768 | "Print" "Debug" "GC"
769 | "Print" "Graph"
770 | "Print" "Classes"
771 | "Print" "Typeclasses"
772 | "Print" "Instances" reference
773 | "Print" "Coercions"
774 | "Print" "Notation" string OPT [ "in" "custom" qualid ]
775 | "Print" "Coercion" "Paths" coercion_class coercion_class
776 | "Print" "Canonical" "Projections" LIST0 reference
777 | "Print" "Typing" "Flags"
778 | "Print" "Tables"
779 | "Print" "Options"
780 | "Print" "Hint" OPT [ "*" | reference ]
781 | "Print" "HintDb" ident
782 | "Print" "Scopes"
783 | "Print" "Scope" scope_name
784 | "Print" "Visibility" OPT scope_name
785 | "Print" "Implicit" reference
786 | "Print" OPT "Sorted" "Universes" OPT ( "Subgraph" "(" LIST0 debug_univ_name ")" ) OPT [ [ "With" | "Without" ] "Constraint" "Sources" ] OPT string
787 | "Print" "Sorts"
788 | "Print" "Assumptions" LIST1 reference
789 | "Print" "Opaque" "Dependencies" LIST1 reference
790 | "Print" "Transparent" "Dependencies" LIST1 reference
791 | "Print" "All" "Dependencies" LIST1 reference
792 | "Print" "Strategy" reference
793 | "Print" "Strategies"
794 | "Print" "Registered"
795 | "Print" "Registered" "Schemes"
796 | "Print" OPT "Term" reference OPT univ_name_list
797 | "Print" "Module" "Type" qualid
798 | "Print" "Module" qualid
799 | "Print" "Namespace" dirpath
800 | "Inspect" natural
801 | "Print" "Table" setting_name
802 | "Add" setting_name LIST1 [ qualid | string ]
803 | "Test" setting_name OPT ( "for" LIST1 [ qualid | string ] )
804 | "Remove" setting_name LIST1 [ qualid | string ]
805 | "Reset" "Initial"
806 | "Reset" ident
807 | "Back" OPT natural
808 | "Debug" [ "On" | "Off" ]
809 | "Declare" "Reduction" ident ":=" red_expr
810 | "Declare" "Custom" "Entry" ident
811 | "Derive" open_binders "SuchThat" type "As" ident
812 | "Derive" open_binders "in" type "as" ident
813 | "Extraction" qualid (* extraction plugin *)
814 | "Recursive" "Extraction" LIST1 qualid (* extraction plugin *)
815 | "Extraction" string LIST1 qualid (* extraction plugin *)
816 | "Extraction" "TestCompile" LIST1 qualid (* extraction plugin *)
817 | "Separate" "Extraction" LIST1 qualid (* extraction plugin *)
818 | "Extraction" "Library" ident (* extraction plugin *)
819 | "Recursive" "Extraction" "Library" ident (* extraction plugin *)
820 | "Extraction" "Language" language (* extraction plugin *)
821 | "Extraction" "Inline" LIST1 qualid (* extraction plugin *)
822 | "Extraction" "NoInline" LIST1 qualid (* extraction plugin *)
823 | "Print" "Extraction" "Inline" (* extraction plugin *)
824 | "Reset" "Extraction" "Inline" (* extraction plugin *)
825 | "Extraction" "Implicit" qualid "[" LIST0 [ ident | integer ] "]" (* extraction plugin *)
826 | "Extraction" "Blacklist" LIST1 ident (* extraction plugin *)
827 | "Print" "Extraction" "Blacklist" (* extraction plugin *)
828 | "Reset" "Extraction" "Blacklist" (* extraction plugin *)
829 | "Extract" "Callback" OPT string qualid (* extraction plugin *)
830 | "Print" "Extraction" "Callback" (* extraction plugin *)
831 | "Reset" "Extraction" "Callback" (* extraction plugin *)
832 | "Print" "Extraction" "Foreign" (* extraction plugin *)
833 | "Extract" "Constant" qualid LIST0 string "=>" [ ident | string ] (* extraction plugin *)
834 | "Extract" "Foreign" "Constant" qualid "=>" string (* extraction plugin *)
835 | "Extract" "Inlined" "Constant" qualid "=>" [ ident | string ] (* extraction plugin *)
836 | "Extract" "Inductive" qualid "=>" [ ident | string ] "[" LIST0 [ ident | string ] "]" OPT string (* extraction plugin *)
837 | "Show" "Extraction" (* extraction plugin *)
838 | "Proof"
839 | "Proof" "Mode" string
840 | "Proof" term
841 | "Abort" OPT "All"
842 | "Admitted"
843 | "Qed"
844 | "Save" ident
845 | "Defined" OPT ident
846 | "Restart"
847 | "Undo" OPT ( OPT "To" natural )
848 | "Focus" OPT natural
849 | "Unfocus"
850 | "Unfocused"
851 | "Show" OPT [ qualid | natural ]
852 | "Show" "Existentials"
853 | "Show" "Universes"
854 | "Show" "Conjectures"
855 | "Show" "Proof" OPT ( "Diffs" OPT "removed" )
856 | "Show" "Diffs" ident
857 | "Show" "Intro"
858 | "Show" "Intros"
859 | "Show" "Match" qualid
860 | "Guarded"
861 | "Validate" "Proof"
862 | "Create" "HintDb" ident OPT "discriminated"
863 | "Remove" "Hints" LIST1 qualid OPT ( ":" LIST1 ident )
864 | "Comments" LIST0 [ one_term | string | natural ]
865 | "Attributes" LIST1 attribute SEP ","
866 | "Declare" "Instance" ident_decl LIST0 binder ":" term OPT hint_info
867 | "Declare" "Scope" scope_name
868 | "Obligation" natural OPT ( "of" ident ) OPT ( "with" generic_tactic )
869 | "Next" "Obligation" OPT ( "of" ident ) OPT ( "with" generic_tactic )
870 | "Final" "Obligation" OPT ( "of" ident ) OPT ( "with" generic_tactic )
871 | "Solve" "Obligations" OPT ( "of" ident ) OPT ( "with" ltac_expr )
872 | "Solve" "All" "Obligations" OPT ( "with" ltac_expr )
873 | "Admit" "Obligations" OPT ( "of" ident )
874 | "Obligation" "Tactic" ":=" generic_tactic
875 | "Show" "Obligation" "Tactic"
876 | "Obligations" OPT ( "of" ident )
877 | "Preterm" OPT ( "of" ident )
878 | "Add" "Relation" one_term one_term OPT ( "reflexivity" "proved" "by" one_term ) OPT ( "symmetry" "proved" "by" one_term ) OPT ( "transitivity" "proved" "by" one_term ) "as" ident
879 | "Add" "Parametric" "Relation" LIST0 binder ":" one_term one_term OPT ( "reflexivity" "proved" "by" one_term ) OPT ( "symmetry" "proved" "by" one_term ) OPT ( "transitivity" "proved" "by" one_term ) "as" ident
880 | "Add" "Setoid" one_term one_term one_term "as" ident
881 | "Add" "Parametric" "Setoid" LIST0 binder ":" one_term one_term one_term "as" ident
882 | "Add" "Morphism" one_term ":" ident
883 | "Declare" "Morphism" one_term ":" ident
884 | "Add" "Morphism" one_term "with" "signature" term "as" ident
885 | "Add" "Parametric" "Morphism" LIST0 binder ":" one_term "with" "signature" term "as" ident
886 | "Unshelve"
887 | "Declare" "Equivalent" "Keys" one_term one_term
888 | "Print" "Equivalent" "Keys"
889 | "Optimize" "Proof"
890 | "Optimize" "Heap"
891 | "infoH" ltac_expr
892 | "Reset" "Ltac" "Profile"
893 | "Show" "Ltac" "Profile" OPT [ "CutOff" integer | string ]
894 | "Show" "Lia" "Profile" (* micromega plugin *)
895 | "Add" "Ring" ident ":" one_term OPT ( "(" LIST1 ring_mod SEP "," ")" ) (* ring plugin *)
896 | "Print" "Rings" (* ring plugin *)
897 | "Add" "Field" ident ":" one_term OPT ( "(" LIST1 field_mod SEP "," ")" ) (* ring plugin *)
898 | "Print" "Fields" (* ring plugin *)
899 | "Hint" "Cut" "[" hints_regexp "]" OPT ( ":" LIST1 ident )
900 | "Typeclasses" "Transparent" LIST1 qualid
901 | "Typeclasses" "Opaque" LIST1 qualid
902 | "Typeclasses" "eauto" ":=" OPT "debug" OPT ( "(" [ "bfs" | "dfs" ] ")" ) OPT natural
903 | "Proof" "with" generic_tactic OPT [ "using" section_var_expr ]
904 | "Proof" "using" section_var_expr OPT [ "with" generic_tactic ]
905 | "Tactic" "Notation" OPT ( "(" "at" "level" natural ")" ) LIST1 ltac_production_item ":=" ltac_expr
906 | "Print" "Rewrite" "HintDb" ident
907 | "Print" "Ltac" qualid
908 | "Ltac" tacdef_body LIST0 ( "with" tacdef_body )
909 | "Print" "Ltac" "Signatures"
910 | "Print" "Firstorder" "Solver"
911 | "Function" fix_definition LIST0 ( "with" fix_definition )
912 | "Functional" "Scheme" func_scheme_def LIST0 ( "with" func_scheme_def )
913 | "Functional" "Case" func_scheme_def (* funind plugin *)
914 | "Generate" "graph" "for" qualid (* funind plugin *)
915 | "Hint" "Rewrite" OPT [ "->" | "<-" ] LIST1 one_term OPT ( "using" generic_tactic ) OPT ( ":" LIST1 ident )
916 | "Create" "Rewrite" "HintDb" ident
917 | "Derive" "Inversion_clear" ident "with" one_term OPT ( "Sort" sort_quality_or_set )
918 | "Derive" "Inversion" ident "with" one_term OPT ( "Sort" sort_quality_or_set )
919 | "Derive" "Dependent" "Inversion" ident "with" one_term "Sort" sort_quality_or_set
920 | "Derive" "Dependent" "Inversion_clear" ident "with" one_term "Sort" sort_quality_or_set
921 | "Declare" "Left" "Step" one_term
922 | "Declare" "Right" "Step" one_term
923 | "Number" "Notation" qualid qualid qualid OPT ( "(" LIST1 number_modifier SEP "," ")" ) ":" scope_name
924 | "String" "Notation" qualid qualid qualid OPT ( "(" number_string_via ")" ) ":" scope_name
925 | "Ltac2" "Import" "Type" qualid "as" ident (* ltac2 plugin *)
926 | "Ltac2" "Custom" "Entry" ident (* ltac2 plugin *)
927 | "Ltac2" "Notation" LIST1 ltac2_syntax_class OPT [ ":" natural | ":" qualid OPT [ "(" natural ")" ] ] ":=" ltac2_expr (* ltac2 plugin *)
928 | "SubClass" ident_decl def_body
929 | thm_token ident_decl LIST0 binder ":" type LIST0 [ "with" ident_decl LIST0 binder ":" type ]
930 | assumption_token OPT ( "Inline" OPT ( "(" natural ")" ) ) [ assumpt | LIST1 ( "(" assumpt ")" ) ]
931 | [ "Definition" | "Example" ] ident_decl def_body
932 | [ "Symbol" | "Symbols" ] [ assumpt | LIST1 ( "(" assumpt ")" ) ]
933 | "Let" ident_decl def_body
934 | "Inductive" inductive_definition LIST0 ( "with" inductive_definition )
935 | "Inductive" record_definition LIST0 ( "with" record_definition )
936 | "Fixpoint" fix_definition LIST0 ( "with" fix_definition )
937 | "Let" "Fixpoint" fix_definition LIST0 ( "with" fix_definition )
938 | "CoFixpoint" cofix_definition LIST0 ( "with" cofix_definition )
939 | "Let" "CoFixpoint" cofix_definition LIST0 ( "with" cofix_definition )
940 | "Scheme" "All" "for" reference OPT [ "over" LIST1 ident SEP "," ]
941 | "Scheme" OPT ( ident ":=" ) scheme_kind LIST0 ( "with" OPT ( ident ":=" ) scheme_kind )
942 | "Scheme" "Rewriting" "for" reference
943 | "Scheme" OPT "Boolean" "Equality" "for" reference
944 | "Combined" "Scheme" ident "from" LIST1 ident SEP ","
945 | "Register" qualid "as" qualid
946 | "Register" "Scheme" qualid "as" qualid "for" qualid
947 | "Register" "Inline" qualid
948 | "Primitive" ident_decl OPT [ ":" term ] ":=" "#" ident
949 | "Universe" LIST1 ident
950 | "Universes" LIST1 ident
951 | "Sort" LIST1 ident
952 | "Sorts" LIST1 ident
953 | "Constraint" LIST1 sort_constraint SEP ","
954 | "Rewrite" [ "Rule" | "Rules" ] ident ":=" OPT "|" LIST1 rewrite_rule SEP "|"
955 | "CoInductive" inductive_definition LIST0 ( "with" inductive_definition )
956 | "CoInductive" record_definition LIST0 ( "with" record_definition )
957 | "Variant" ident_decl LIST0 binder OPT [ "|" LIST0 binder ] OPT [ ":" type ] ":=" OPT [ OPT "|" LIST1 constructor SEP "|" ] OPT decl_notations
958 | [ "Record" | "Structure" ] record_definition
959 | "Class" record_definition
960 | "Class" ident_decl LIST0 binder OPT [ ":" sort ] ":=" constructor
961 | "Module" OPT ( [ "Import" | "Export" ] OPT import_categories ) ident LIST0 module_binder OPT of_module_type OPT ( ":=" LIST1 module_expr_inl SEP "<+" )
962 | "Module" "Type" ident LIST0 module_binder LIST0 ( "<:" module_type_inl ) OPT ( ":=" LIST1 module_type_inl SEP "<+" )
963 | "Declare" "Module" OPT ( [ "Import" | "Export" ] OPT import_categories ) ident LIST0 module_binder ":" module_type_inl
964 | "Section" ident
965 | "End" ident
966 | "Collection" ident ":=" section_var_expr
967 | "From" dirpath "Extra" "Dependency" string OPT [ "as" ident ]
968 | OPT [ "From" dirpath ] "Require" OPT ( [ "Import" | "Export" ] OPT import_categories ) LIST1 filtered_import
969 | "Import" OPT import_categories LIST1 filtered_import
970 | "Export" OPT import_categories LIST1 filtered_import
971 | "Include" module_type_inl LIST0 ( "<+" module_type_inl )
972 | "Include" "Type" LIST1 module_type_inl SEP "<+"
973 | "Transparent" OPT "!" LIST1 reference
974 | "Opaque" OPT "!" LIST1 reference
975 | "Strategy" LIST1 [ strategy_level "[" LIST1 reference "]" ]
976 | "Canonical" OPT "Structure" ident_decl def_body
977 | "Canonical" OPT "Structure" reference
978 | "Coercion" ident_decl def_body
979 | "Identity" "Coercion" ident ":" coercion_class ">->" coercion_class
980 | "Coercion" reference OPT [ ":" coercion_class ">->" coercion_class ]
981 | "Context" LIST1 binder
982 | "Instance" OPT ( ident_decl LIST0 binder ) ":" type OPT hint_info OPT [ ":=" "{" LIST0 field_val "}" | ":=" term ]
983 | "Existing" "Instance" qualid OPT hint_info
984 | "Existing" "Instances" LIST1 qualid OPT [ "|" natural ]
985 | "Existing" "Class" qualid
986 | "Arguments" reference LIST0 arg_specs LIST0 [ "," LIST0 implicits_alt ] OPT [ ":" LIST1 args_modifier SEP "," ]
987 | "Implicit" [ "Type" | "Types" ] reserv_list
988 | "Generalizable" [ [ "Variable" | "Variables" ] LIST1 ident | "All" "Variables" | "No" "Variables" ]
989 | "Set" setting_name OPT [ integer | string ]
990 | "Unset" setting_name
991 | "Open" "Scope" scope
992 | "Close" "Scope" scope
993 | "Delimit" "Scope" scope_name "with" scope_key
994 | "Undelimit" "Scope" scope_name
995 | "Bind" "Scope" scope_name "with" LIST1 coercion_class
996 | "Infix" notation_declaration
997 | "Notation" ident LIST0 ident ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
998 | "Abbreviation" ident LIST0 ident ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
999 | "Notation" notation_declaration
1000 | "Reserved" "Infix" string OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
1001 | "Reserved" "Notation" string OPT ( "(" LIST1 syntax_modifier SEP "," ")" )
1002 | [ "Enable" | "Disable" ] "Notation" OPT [ string | qualid LIST0 ident ] OPT ( ":=" one_term ) OPT ( "(" LIST1 enable_notation_flag SEP "," ")" ) OPT [ ":" scope_name | ":" "no" "scope" ]
1003 | "Eval" red_expr "in" term
1004 | "Compute" term
1005 | "Check" term
1006 | "About" reference OPT univ_name_list
1007 | "SearchPattern" one_pattern OPT ( [ "inside" | "in" | "outside" ] LIST1 qualid )
1008 | "SearchRewrite" one_pattern OPT ( [ "inside" | "in" | "outside" ] LIST1 qualid )
1009 | "Search" LIST1 ( search_query ) OPT ( [ "inside" | "in" | "outside" ] LIST1 qualid )
1010 | "Ltac2" OPT "mutable" OPT "rec" tac2def_body LIST0 ( "with" tac2def_body )
1011 | "Ltac2" "Type" OPT "rec" tac2typ_def LIST0 ( "with" tac2typ_def )
1012 | "Ltac2" "@" "external" ident ":" ltac2_type ":=" string string
1013 | "Ltac2" "Abbreviation" ident ":=" ltac2_expr (* ltac2 plugin *)
1014 | "Ltac2" "Set" qualid OPT [ "as" ident ] ":=" ltac2_expr
1015 | "Ltac2" "Eval" ltac2_expr (* ltac2 plugin *)
1016 | "Print" "Ltac2" qualid (* ltac2 plugin *)
1017 | "Print" "Ltac2" "Type" qualid (* ltac2 plugin *)
1018 | "Locate" "Ltac2" qualid (* ltac2 plugin *)
1019 | "Print" "Ltac2" "Signatures" (* ltac2 plugin *)
1020 | "Ltac2" "Check" ltac2_expr (* ltac2 plugin *)
1021 | "Ltac2" "Globalize" ltac2_expr (* ltac2 plugin *)
1022 | "Hint" "Resolve" LIST1 [ qualid | one_term ] OPT hint_info OPT ( ":" LIST1 ident )
1023 | "Hint" "Resolve" [ "->" | "<-" ] LIST1 qualid OPT natural OPT ( ":" LIST1 ident )
1024 | "Hint" "Immediate" LIST1 [ qualid | one_term ] OPT ( ":" LIST1 ident )
1025 | "Hint" [ "Constants" | "Projections" | "Variables" ] [ "Transparent" | "Opaque" ] OPT ( ":" LIST1 ident )
1026 | "Hint" [ "Transparent" | "Opaque" ] LIST1 qualid OPT ( ":" LIST1 ident )
1027 | "Hint" "Mode" qualid LIST1 [ "+" | "!" | "-" ] OPT ( ":" LIST1 ident )
1028 | "Hint" "Unfold" LIST1 qualid OPT ( ":" LIST1 ident )
1029 | "Hint" "Constructors" LIST1 qualid OPT ( ":" LIST1 ident )
1030 | "Hint" "Extern" natural OPT one_pattern "=>" generic_tactic OPT ( ":" LIST1 ident )
1031 | "Time" sentence
1032 | "Instructions" sentence
1033 | "Profile" OPT string sentence
1034 | "Redirect" string sentence
1035 | "Timeout" natural sentence
1036 | "Fail" sentence
1037 | "Succeed" sentence
1038 | "Drop"
1039 | "Quit"
1040 | "BackTo" natural
1041 | "Show" "Goal" natural "at" natural
1042 ]
1043
1044 section_var_expr: [
1045 | LIST0 starred_ident_ref
1046 | OPT "-" section_var_expr50
1047 ]
1048
1049 section_var_expr50: [
1050 | section_var_expr0 "-" section_var_expr0
1051 | section_var_expr0 "+" section_var_expr0
1052 | section_var_expr0
1053 ]
1054
1055 section_var_expr0: [
1056 | starred_ident_ref
1057 | "()"
1058 | "(" section_var_expr ")" OPT "*"
1059 ]
1060
1061 starred_ident_ref: [
1062 | ident OPT "*"
1063 | "Type" OPT "*"
1064 | "All"
1065 ]
1066
1067 dirpath: [
1068 | LIST0 ( ident "." ) ident
1069 ]
1070
1071 setting_name: [
1072 | LIST1 ident
1073 ]
1074
1075 search_query: [
1076 | search_item
1077 | "-" search_query
1078 | "[" LIST1 ( LIST1 search_query ) SEP "|" "]"
1079 ]
1080
1081 search_item: [
1082 | OPT ( [ "head" | "hyp" | "concl" | "headhyp" | "headconcl" ] ":" ) string OPT ( "%" scope_key )
1083 | OPT ( [ "head" | "hyp" | "concl" | "headhyp" | "headconcl" ] ":" ) one_pattern
1084 | "is" ":" logical_kind
1085 ]
1086
1087 logical_kind: [
1088 | [ thm_token | assumption_token ]
1089 | [ "Definition" | "Example" | "Context" | "Primitive" | "Symbol" ]
1090 | [ "Coercion" | "Instance" | "Scheme" | "Canonical" | "SubClass" ]
1091 | [ "Fixpoint" | "CoFixpoint" | "Field" | "Method" ]
1092 ]
1093
1094 univ_name_list: [
1095 | "@{" LIST0 name "}"
1096 ]
1097
1098 enable_notation_flag: [
1099 | "all"
1100 | "only" "parsing"
1101 | "only" "printing"
1102 | "in" "custom" qualid
1103 | "in" "constr"
1104 ]
1105
1106 tacdef_body: [
1107 | qualid LIST0 name [ ":=" | "::=" ] ltac_expr
1108 ]
1109
1110 ltac_production_item: [
1111 | string
1112 | ident OPT ( "(" ident OPT ( "," string ) ")" )
1113 ]
1114
1115 ltac2_type: [
1116 | ltac2_type2 "->" ltac2_type (* ltac2 plugin *)
1117 | ltac2_type2 (* ltac2 plugin *)
1118 ]
1119
1120 ltac2_type2: [
1121 | ltac2_type1 "*" LIST1 ltac2_type1 SEP "*" (* ltac2 plugin *)
1122 | ltac2_type1 (* ltac2 plugin *)
1123 ]
1124
1125 ltac2_type1: [
1126 | ltac2_type1 qualid (* ltac2 plugin *)
1127 | ltac2_type0 (* ltac2 plugin *)
1128 ]
1129
1130 ltac2_type0: [
1131 | "(" LIST1 ltac2_type SEP "," ")" OPT qualid (* ltac2 plugin *)
1132 | ltac2_typevar (* ltac2 plugin *)
1133 | "_" (* ltac2 plugin *)
1134 | qualid (* ltac2 plugin *)
1135 ]
1136
1137 ltac2_typevar: [
1138 | "'" ident (* ltac2 plugin *)
1139 ]
1140
1141 occurrences: [
1142 | "at" occs_nums
1143 | "in" goal_occurrences
1144 ]
1145
1146 simple_occurrences: [
1147 | occurrences
1148 ]
1149
1150 occs_nums: [
1151 | OPT "-" LIST1 nat_or_var
1152 ]
1153
1154 nat_or_var: [
1155 | [ natural | ident ]
1156 ]
1157
1158 goal_occurrences: [
1159 | LIST1 hyp_occs SEP "," OPT ( "|-" OPT concl_occs )
1160 | "*" "|-" OPT concl_occs
1161 | "|-" OPT concl_occs
1162 | OPT concl_occs
1163 ]
1164
1165 hyp_occs: [
1166 | hypident OPT ( "at" occs_nums )
1167 ]
1168
1169 hypident: [
1170 | ident
1171 | "(" "type" "of" ident ")"
1172 | "(" "value" "of" ident ")"
1173 ]
1174
1175 concl_occs: [
1176 | "*" OPT ( "at" occs_nums )
1177 ]
1178
1179 q_intropatterns: [
1180 | ltac2_intropatterns (* ltac2 plugin *)
1181 ]
1182
1183 ltac2_intropatterns: [
1184 | LIST0 nonsimple_intropattern (* ltac2 plugin *)
1185 ]
1186
1187 nonsimple_intropattern: [
1188 | "*" (* ltac2 plugin *)
1189 | "**" (* ltac2 plugin *)
1190 | ltac2_simple_intropattern (* ltac2 plugin *)
1191 ]
1192
1193 q_intropattern: [
1194 | ltac2_simple_intropattern (* ltac2 plugin *)
1195 ]
1196
1197 ltac2_simple_intropattern: [
1198 | ltac2_simple_intropattern_closed LIST0 [ "%" term0 ] (* ltac2 plugin *)
1199 ]
1200
1201 ltac2_simple_intropattern_closed: [
1202 | ltac2_or_and_intropattern (* ltac2 plugin *)
1203 | ltac2_equality_intropattern (* ltac2 plugin *)
1204 | "_" (* ltac2 plugin *)
1205 | ltac2_naming_intropattern (* ltac2 plugin *)
1206 ]
1207
1208 ltac2_naming_intropattern: [
1209 | "?" ident (* ltac2 plugin *)
1210 | "?$" ident (* ltac2 plugin *)
1211 | "?" (* ltac2 plugin *)
1212 | ident_or_anti (* ltac2 plugin *)
1213 ]
1214
1215 ltac2_or_and_intropattern: [
1216 | "[" LIST1 ltac2_intropatterns SEP "|" "]" (* ltac2 plugin *)
1217 | "()" (* ltac2 plugin *)
1218 | "(" LIST1 ltac2_simple_intropattern SEP "," ")" (* Ltac2 plugin *)
1219 | "(" LIST1 ltac2_simple_intropattern SEP "&" ")" (* Ltac2 plugin *)
1220 ]
1221
1222 ltac2_equality_intropattern: [
1223 | "->" (* ltac2 plugin *)
1224 | "<-" (* ltac2 plugin *)
1225 | "[=" ltac2_intropatterns "]"
1226 ]
1227
1228 q_ident: [
1229 | ident_or_anti (* ltac2 plugin *)
1230 ]
1231
1232 ident_or_anti: [
1233 | ident
1234 | "$" ident (* ltac2 plugin *)
1235 ]
1236
1237 q_destruction_arg: [
1238 | ltac2_destruction_arg (* ltac2 plugin *)
1239 ]
1240
1241 ltac2_destruction_arg: [
1242 | natural (* ltac2 plugin *)
1243 | ident
1244 | ltac2_constr_with_bindings (* ltac2 plugin *)
1245 ]
1246
1247 ltac2_constr_with_bindings: [
1248 | term OPT ( "with" ltac2_bindings ) (* ltac2 plugin *)
1249 ]
1250
1251 q_bindings: [
1252 | ltac2_bindings (* ltac2 plugin *)
1253 ]
1254
1255 q_with_bindings: [
1256 | OPT ( "with" ltac2_bindings ) (* ltac2 plugin *)
1257 ]
1258
1259 ltac2_bindings: [
1260 | LIST1 ltac2_simple_binding (* ltac2 plugin *)
1261 | LIST1 term (* ltac2 plugin *)
1262 ]
1263
1264 ltac2_simple_binding: [
1265 | "(" qhyp ":=" term ")" (* ltac2 plugin *)
1266 ]
1267
1268 qhyp: [
1269 | "$" ident (* ltac2 plugin *)
1270 | natural (* ltac2 plugin *)
1271 | ident
1272 ]
1273
1274 language: [
1275 | "OCaml" (* extraction plugin *)
1276 | "Haskell" (* extraction plugin *)
1277 | "Scheme" (* extraction plugin *)
1278 | "JSON" (* extraction plugin *)
1279 ]
1280
1281 ring_mod: [
1282 | "decidable" one_term (* ring plugin *)
1283 | "abstract" (* ring plugin *)
1284 | "morphism" one_term (* ring plugin *)
1285 | "constants" "[" ltac_expr "]" (* ring plugin *)
1286 | "preprocess" "[" ltac_expr "]" (* ring plugin *)
1287 | "postprocess" "[" ltac_expr "]" (* ring plugin *)
1288 | "setoid" one_term one_term (* ring plugin *)
1289 | "sign" one_term (* ring plugin *)
1290 | "power" one_term "[" LIST1 qualid "]" (* ring plugin *)
1291 | "power_tac" one_term "[" ltac_expr "]" (* ring plugin *)
1292 | "div" one_term (* ring plugin *)
1293 | "closed" "[" LIST1 qualid "]" (* ring plugin *)
1294 ]
1295
1296 field_mod: [
1297 | ring_mod (* ring plugin *)
1298 | "completeness" one_term (* ring plugin *)
1299 ]
1300
1301 number_modifier: [
1302 | "warning" "after" bignat
1303 | "abstract" "after" bignat
1304 | number_string_via
1305 ]
1306
1307 number_string_via: [
1308 | "via" qualid "mapping" "[" LIST1 [ qualid "=>" qualid | "[" qualid "]" "=>" qualid ] SEP "," "]"
1309 ]
1310
1311 hints_regexp: [
1312 | hints_path1
1313 ]
1314
1315 hints_path1: [
1316 | hints_path1 "*"
1317 | hints_path1 "|" hints_path0
1318 | hints_path1 hints_path0
1319 | hints_path0
1320 ]
1321
1322 hints_path0: [
1323 | "(" hints_path1 ")"
1324 | "emp"
1325 | "eps"
1326 | LIST1 qualid
1327 | "_"
1328 ]
1329
1330 coercion_class: [
1331 | "Funclass"
1332 | "Sortclass"
1333 | reference
1334 ]
1335
1336 syntax_modifier: [
1337 | "at" "level" natural
1338 | "in" "custom" qualid OPT ( "at" "level" natural )
1339 | LIST1 ident SEP "," [ "at" level | "in" "scope" ident ]
1340 | ident "at" level OPT binder_interp
1341 | ident explicit_subentry
1342 | ident binder_interp
1343 | "left" "associativity"
1344 | "right" "associativity"
1345 | "no" "associativity"
1346 | "only" "parsing"
1347 | "format" string
1348 | "only" "printing"
1349 ]
1350
1351 explicit_subentry: [
1352 | "ident"
1353 | "name"
1354 | "global"
1355 | "bigint"
1356 | "strict" "pattern" OPT ( "at" "level" natural )
1357 | "binder"
1358 | "closed" "binder"
1359 | "constr" OPT ( "at" level ) OPT binder_interp
1360 | "custom" qualid OPT ( "at" level ) OPT binder_interp
1361 | "pattern" OPT ( "at" "level" natural )
1362 ]
1363
1364 binder_interp: [
1365 | "as" "ident"
1366 | "as" "name"
1367 | "as" "pattern"
1368 | "as" "strict" "pattern"
1369 ]
1370
1371 level: [
1372 | "level" natural
1373 | "next" "level"
1374 ]
1375
1376 decl_notations: [
1377 | "where" notation_declaration LIST0 ( "and" notation_declaration )
1378 ]
1379
1380 notation_declaration: [
1381 | string ":=" one_term OPT ( "(" LIST1 syntax_modifier SEP "," ")" ) OPT [ ":" scope_name ]
1382 ]
1383
1384 simple_tactic: [
1385 | "reflexivity"
1386 | "exact" one_term
1387 | "assumption"
1388 | "etransitivity"
1389 | "cut" one_type
1390 | "exact_no_check" one_term
1391 | "vm_cast_no_check" one_term
1392 | "native_cast_no_check" one_term
1393 | "lapply" one_term
1394 | "transitivity" one_term
1395 | "left" OPT ( "with" bindings )
1396 | "eleft" OPT ( "with" bindings )
1397 | "right" OPT ( "with" bindings )
1398 | "eright" OPT ( "with" bindings )
1399 | "constructor" OPT nat_or_var OPT ( "with" bindings )
1400 | "econstructor" OPT ( nat_or_var OPT ( "with" bindings ) )
1401 | "specialize" one_term_with_bindings OPT as_ipat
1402 | "symmetry" OPT simple_occurrences
1403 | "split" OPT ( "with" bindings )
1404 | "esplit" OPT ( "with" bindings )
1405 | "exists" LIST0 bindings SEP ","
1406 | "eexists" LIST0 bindings SEP ","
1407 | "intros" "until" [ ident | natural ]
1408 | "intro" OPT ident OPT where
1409 | "move" ident where
1410 | "rename" LIST1 ( ident "into" ident ) SEP ","
1411 | "revert" LIST1 ident
1412 | "simple" "induction" [ ident | natural ]
1413 | "simple" "destruct" [ ident | natural ]
1414 | "admit"
1415 | "clear" OPT ( OPT "-" LIST1 ident )
1416 | "clearbody" LIST1 ident
1417 | "simplify_eq" OPT induction_arg
1418 | "esimplify_eq" OPT induction_arg
1419 | "discriminate" OPT induction_arg
1420 | "ediscriminate" OPT induction_arg
1421 | "injection" OPT induction_arg OPT ( "as" LIST0 simple_intropattern )
1422 | "einjection" OPT induction_arg OPT ( "as" LIST0 simple_intropattern )
1423 | "simple" "injection" OPT induction_arg
1424 | "replace" OPT [ "->" | "<-" ] one_term OPT occurrences
1425 | "replace" OPT [ "->" | "<-" ] one_term "with" one_term OPT occurrences OPT ( "by" ltac_expr3 )
1426 | "typeclasses" "eauto" OPT [ "bfs" | "dfs" | "best_effort" ] OPT nat_or_var OPT ( "with" LIST1 ident )
1427 | "setoid_replace" one_term "with" one_term OPT ( "using" "relation" one_term ) OPT ( "in" ident ) OPT ( "at" LIST1 int_or_var ) OPT ( "by" ltac_expr3 )
1428 | OPT ( [ natural | "[" qualid "]" ] ":" ) "{"
1429 | [ LIST1 "-" | LIST1 "+" | LIST1 "*" ]
1430 | "}"
1431 | "try" ltac_expr3
1432 | "do" nat_or_var ltac_expr3
1433 | "timeout" nat_or_var ltac_expr3
1434 | "time" OPT string ltac_expr3
1435 | "repeat" ltac_expr3
1436 | "progress" ltac_expr3
1437 | "once" ltac_expr3
1438 | "exactly_once" ltac_expr3
1439 | "abstract" ltac_expr2 OPT ( "using" ident )
1440 | "only" goal_selector ":" ltac_expr3
1441 | "tryif" ltac_expr "then" ltac_expr "else" ltac_expr2
1442 | "first" "[" LIST0 ltac_expr SEP "|" "]"
1443 | "first" ident
1444 | "solve" "[" LIST0 ltac_expr SEP "|" "]"
1445 | "solve" ident
1446 | "idtac" LIST0 [ ident | string | natural ]
1447 | [ "fail" | "gfail" ] OPT nat_or_var LIST0 [ ident | string | natural ]
1448 | "eval" red_expr "in" term
1449 | "context" ident "[" term "]"
1450 | "type" "of" term
1451 | "fresh" LIST0 [ string | qualid ]
1452 | "type_term" one_term
1453 | "numgoals"
1454 | "fun" LIST1 name "=>" ltac_expr
1455 | "let" OPT "rec" let_clause LIST0 ( "with" let_clause ) "in" ltac_expr
1456 | ltac_expr4 ";" ltac_expr3
1457 | ltac_expr4 ";" "[" for_each_goal "]"
1458 | ltac_expr1 "+" ltac_expr2
1459 | ltac_expr1 "||" ltac_expr2
1460 | "[>" for_each_goal "]"
1461 | toplevel_selector ":" ltac_expr
1462 | ltac2_match_key ltac2_expr "with" ltac2_match_list "end"
1463 | ltac2_match_key OPT "reverse" "goal" "with" goal_match_list "end"
1464 | "case_eq" one_term
1465 | "dependent" "rewrite" OPT [ "->" | "<-" ] one_term OPT ( "in" ident )
1466 | "decompose" "sum" one_term
1467 | "decompose" "record" one_term
1468 | "absurd" one_type
1469 | "contradiction" OPT one_term_with_bindings
1470 | "autorewrite" OPT "*" "with" LIST1 ident OPT occurrences OPT ( "using" ltac_expr )
1471 | "rewrite" "*" OPT [ "->" | "<-" ] one_term OPT ( "in" ident ) OPT ( "at" rewrite_occs ) OPT ( "by" ltac_expr3 )
1472 | "rewrite" "*" OPT [ "->" | "<-" ] one_term "at" rewrite_occs "in" ident OPT ( "by" ltac_expr3 )
1473 | OPT "simple" OPT "notypeclasses" "refine" one_term
1474 | "solve_constraints"
1475 | "subst" LIST0 ident
1476 | "simple" "subst"
1477 | "evar" "(" ident ":" type ")"
1478 | "evar" one_type
1479 | "instantiate" "(" ident ":=" term ")"
1480 | "instantiate" "(" natural ":=" term ")" OPT hloc
1481 | "stepl" one_term OPT ( "by" ltac_expr )
1482 | "stepr" one_term OPT ( "by" ltac_expr )
1483 | "generalize_eqs" ident
1484 | "dependent" "generalize_eqs" ident
1485 | "generalize_eqs_vars" ident
1486 | "dependent" "generalize_eqs_vars" ident
1487 | "specialize_eqs" ident
1488 | "transparent_abstract" ltac_expr3 OPT ( "using" ident )
1489 | "constr_eq" one_term one_term
1490 | "constr_eq_strict" one_term one_term
1491 | "constr_eq_nounivs" one_term one_term
1492 | "is_evar" one_term
1493 | "has_evar" one_term
1494 | "is_var" one_term
1495 | "is_fix" one_term
1496 | "is_cofix" one_term
1497 | "is_ind" one_term
1498 | "is_constructor" one_term
1499 | "is_proj" one_term
1500 | "is_const" one_term
1501 | "shelve"
1502 | "shelve_unifiable"
1503 | "unshelve" ltac_expr1
1504 | "give_up"
1505 | "cycle" int_or_var
1506 | "swap" int_or_var int_or_var
1507 | "revgoals"
1508 | "guard" int_or_var comparison int_or_var
1509 | "decompose" "[" LIST1 one_term "]" one_term
1510 | "optimize_heap"
1511 | "with_strategy" strategy_level_or_var "[" LIST1 reference "]" ltac_expr3
1512 | "start" "ltac" "profiling"
1513 | "stop" "ltac" "profiling"
1514 | "reset" "ltac" "profile"
1515 | "show" "ltac" "profile" OPT [ "cutoff" integer | string ]
1516 | "restart_timer" OPT string
1517 | "finish_timing" OPT ( "(" string ")" ) OPT string
1518 | "eassumption"
1519 | "eexact" one_term
1520 | "trivial" OPT auto_using OPT hintbases
1521 | "info_trivial" OPT auto_using OPT hintbases
1522 | "debug" "trivial" OPT auto_using OPT hintbases
1523 | "auto" OPT nat_or_var OPT auto_using OPT hintbases
1524 | "info_auto" OPT nat_or_var OPT auto_using OPT hintbases
1525 | "debug" "auto" OPT nat_or_var OPT auto_using OPT hintbases
1526 | "eauto" OPT nat_or_var OPT auto_using OPT hintbases
1527 | "debug" "eauto" OPT nat_or_var OPT auto_using OPT hintbases
1528 | "info_eauto" OPT nat_or_var OPT auto_using OPT hintbases
1529 | "autounfold" OPT hintbases OPT simple_occurrences
1530 | "autounfold_one" OPT hintbases OPT ( "in" ident )
1531 | "unify" one_term one_term OPT ( "with" ident )
1532 | "convert" one_term one_term
1533 | "not_evar" one_term
1534 | "is_ground" one_term
1535 | "autoapply" one_term "with" ident
1536 | "rewrite_strat" rewstrategy OPT ( "in" ident )
1537 | "rewrite_db" ident OPT ( "in" ident )
1538 | "substitute" OPT [ "->" | "<-" ] one_term_with_bindings
1539 | "setoid_rewrite" OPT [ "->" | "<-" ] one_term_with_bindings OPT ( "at" rewrite_occs ) OPT ( "in" ident )
1540 | "setoid_rewrite" OPT [ "->" | "<-" ] one_term_with_bindings "in" ident "at" rewrite_occs
1541 | "setoid_symmetry" OPT ( "in" ident )
1542 | "setoid_reflexivity"
1543 | "setoid_transitivity" one_term
1544 | "setoid_etransitivity"
1545 | "intros" LIST0 intropattern
1546 | "eintros" LIST0 intropattern
1547 | "decide" "equality"
1548 | "compare" one_term one_term
1549 | "apply" LIST1 one_term_with_bindings SEP "," OPT in_hyp_as
1550 | "eapply" LIST1 one_term_with_bindings SEP "," OPT in_hyp_as
1551 | "simple" "apply" LIST1 one_term_with_bindings SEP "," OPT in_hyp_as
1552 | "simple" "eapply" LIST1 one_term_with_bindings SEP "," OPT in_hyp_as
1553 | "elim" one_term_with_bindings OPT ( "using" one_term_with_bindings )
1554 | "eelim" one_term_with_bindings OPT ( "using" one_term_with_bindings )
1555 | "case" LIST1 induction_clause SEP "," OPT induction_principle
1556 | "ecase" LIST1 induction_clause SEP "," OPT induction_principle
1557 | "fix" ident natural OPT ( "with" LIST1 ( "(" ident LIST0 simple_binder OPT ( "{" "struct" name "}" ) ":" type ")" ) )
1558 | "cofix" ident OPT ( "with" LIST1 ( "(" ident LIST0 simple_binder ":" type ")" ) )
1559 | "pose" alias_definition
1560 | "pose" one_term OPT as_name
1561 | "epose" alias_definition
1562 | "epose" one_term OPT as_name
1563 | "pose" "proof" "(" ident ":=" term ")"
1564 | "pose" "proof" term OPT as_ipat
1565 | "epose" "proof" "(" ident ":=" term ")"
1566 | "epose" "proof" term OPT as_ipat
1567 | "set" alias_definition OPT occurrences
1568 | "set" one_term OPT as_name OPT occurrences
1569 | "eset" alias_definition OPT occurrences
1570 | "eset" one_term OPT as_name OPT occurrences
1571 | "remember" one_term OPT as_name OPT ( "eqn" ":" naming_intropattern ) OPT ( "in" goal_occurrences )
1572 | "eremember" one_term OPT as_name OPT ( "eqn" ":" naming_intropattern ) OPT ( "in" goal_occurrences )
1573 | "assert" "(" ident ":" type ")" OPT ( "by" ltac_expr3 )
1574 | "assert" "(" ident ":=" term ")"
1575 | "assert" one_type OPT as_ipat OPT ( "by" ltac_expr3 )
1576 | "eassert" "(" ident ":" type ")" OPT ( "by" ltac_expr3 )
1577 | "eassert" "(" ident ":=" term ")"
1578 | "eassert" one_type OPT as_ipat OPT ( "by" ltac_expr3 )
1579 | "enough" "(" ident ":" type ")" OPT ( "by" ltac_expr3 )
1580 | "eenough" "(" ident ":" type ")" OPT ( "by" ltac_expr3 )
1581 | "enough" one_type OPT as_ipat OPT ( "by" ltac_expr3 )
1582 | "eenough" one_type OPT as_ipat OPT ( "by" ltac_expr3 )
1583 | "generalize" "dependent" one_term
1584 | "generalize" LIST1 one_term
1585 | "generalize" LIST1 [ pattern_occs OPT as_name ] SEP ","
1586 | "induction" LIST1 induction_clause SEP "," OPT induction_principle
1587 | "einduction" LIST1 induction_clause SEP "," OPT induction_principle
1588 | "destruct" LIST1 induction_clause SEP "," OPT induction_principle
1589 | "edestruct" LIST1 induction_clause SEP "," OPT induction_principle
1590 | "rewrite" LIST1 oriented_rewriter SEP "," OPT occurrences OPT ( "by" ltac_expr3 )
1591 | "erewrite" LIST1 oriented_rewriter SEP "," OPT occurrences OPT ( "by" ltac_expr3 )
1592 | "simple" "inversion" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT ( "in" LIST1 ident )
1593 | "inversion" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT ( "in" LIST1 ident )
1594 | "inversion_clear" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT ( "in" LIST1 ident )
1595 | "inversion" [ ident | natural ] "using" one_term OPT ( "in" LIST1 ident )
1596 | "red" simple_occurrences
1597 | "hnf" simple_occurrences
1598 | "simpl" OPT "head" OPT delta_reductions OPT [ reference_occs | pattern_occs ] simple_occurrences
1599 | "cbv" OPT reductions simple_occurrences
1600 | "cbn" OPT reductions simple_occurrences
1601 | "lazy" OPT reductions simple_occurrences
1602 | "compute" OPT delta_reductions simple_occurrences
1603 | "vm_compute" OPT [ reference_occs | pattern_occs ] OPT occurrences
1604 | "native_compute" OPT [ reference_occs | pattern_occs ] OPT occurrences
1605 | "unfold" LIST1 reference_occs SEP "," OPT occurrences
1606 | "fold" LIST1 one_term simple_occurrences
1607 | "pattern" LIST1 pattern_occs SEP "," OPT occurrences
1608 | "change" OPT ( one_term OPT ( "at" occs_nums ) "with" ) one_term OPT occurrences
1609 | "change_no_check" OPT ( one_term OPT ( "at" occs_nums ) "with" ) one_term OPT occurrences
1610 | "btauto"
1611 | "rtauto"
1612 | "congruence" OPT natural OPT ( "with" LIST1 one_term )
1613 | "simple" "congruence" OPT natural OPT ( "with" LIST1 one_term )
1614 | "f_equal"
1615 | "firstorder" OPT ltac_expr OPT ( "using" LIST1 qualid SEP "," ) OPT ( "with" LIST1 ident )
1616 | "functional" "inversion" [ ident | natural ] OPT qualid (* funind plugin *)
1617 | "functional" "induction" term OPT ( "using" one_term_with_bindings ) OPT ( "as" simple_intropattern ) (* funind plugin *)
1618 | "soft" "functional" "induction" LIST1 one_term OPT ( "using" one_term_with_bindings ) OPT ( "as" simple_intropattern ) (* funind plugin *)
1619 | "xlra_Q" ltac_expr (* micromega plugin *)
1620 | "wlra_Q" ident one_term (* micromega plugin *)
1621 | "xlra_R" ltac_expr (* micromega plugin *)
1622 | "xlia" ltac_expr (* micromega plugin *)
1623 | "wlia" ident one_term (* micromega plugin *)
1624 | "xnra_Q" ltac_expr (* micromega plugin *)
1625 | "wnra_Q" ident one_term (* micromega plugin *)
1626 | "xnra_R" ltac_expr (* micromega plugin *)
1627 | "xnia" ltac_expr (* micromega plugin *)
1628 | "wnia" ident one_term (* micromega plugin *)
1629 | "xsos_Z" ltac_expr (* micromega plugin *)
1630 | "wsos_Z" ident one_term (* micromega plugin *)
1631 | "xsos_Q" ltac_expr (* micromega plugin *)
1632 | "wsos_Q" ident one_term (* micromega plugin *)
1633 | "xsos_R" ltac_expr (* micromega plugin *)
1634 | "xpsatz_Z" nat_or_var ltac_expr (* micromega plugin *)
1635 | "wpsatz_Z" nat_or_var ident one_term (* micromega plugin *)
1636 | "xpsatz_Q" nat_or_var ltac_expr (* micromega plugin *)
1637 | "wpsatz_Q" nat_or_var ident one_term (* micromega plugin *)
1638 | "xpsatz_R" nat_or_var ltac_expr (* micromega plugin *)
1639 | "zify_iter_specs" (* micromega plugin *)
1640 | "zify_op" (* micromega plugin *)
1641 | "zify_saturate" (* micromega plugin *)
1642 | "zify_iter_let" ltac_expr (* micromega plugin *)
1643 | "zify_elim_let" (* micromega plugin *)
1644 | "nsatz_compute" one_term (* nsatz plugin *)
1645 | "protect_fv" string OPT ( "in" ident )
1646 | "ring_lookup" ltac_expr0 "[" LIST0 one_term "]" LIST1 one_term (* ring plugin *)
1647 | "field_lookup" ltac_expr "[" LIST0 one_term "]" LIST1 one_term (* ring plugin *)
1648 | "ring_lookup" ltac_expr0 "[" LIST0 one_term "]" LIST1 one_term (* ring plugin *)
1649 | "field_lookup" ltac_expr "[" LIST0 one_term "]" LIST1 one_term (* ring plugin *)
1650 | match_key OPT "reverse" "goal" "with" OPT "|" LIST1 ( goal_pattern "=>" ltac_expr ) SEP "|" "end"
1651 | match_key ltac_expr "with" OPT "|" LIST1 ( match_pattern "=>" ltac_expr ) SEP "|" "end"
1652 | "dependent" "inversion" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT [ "with" one_term ]
1653 | "dependent" "simple" "inversion" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT [ "with" one_term ]
1654 | "dependent" "inversion_clear" [ ident | natural ] OPT ( "as" or_and_intropattern ) OPT [ "with" one_term ]
1655 | "classical_left"
1656 | "classical_right"
1657 | "contradict" ident
1658 | "dintuition" OPT ltac_expr
1659 | "dtauto"
1660 | "easy"
1661 | "exfalso"
1662 | "inversion_sigma" OPT ( ident OPT ( "as" simple_intropattern ) )
1663 | "lia"
1664 | "lra"
1665 | "nia"
1666 | "now_show" one_type
1667 | "nra"
1668 | "rapply" one_term
1669 | "tauto"
1670 | "time_constr" ltac_expr
1671 | "zify"
1672 | "assert_fails" ltac_expr3
1673 | "assert_succeeds" ltac_expr3
1674 | "clear" "dependent" ident
1675 | "decide" one_term "with" one_term
1676 | "dependent" "destruction" ident OPT ( "generalizing" LIST1 ident ) OPT ( "using" one_term )
1677 | "dependent" "induction" ident OPT ( [ "generalizing" | "in" ] LIST1 ident ) OPT ( "using" one_term )
1678 | "field" OPT ( "[" LIST1 one_term "]" )
1679 | "field_simplify" OPT ( "[" LIST1 one_term "]" ) LIST1 one_term OPT ( "in" ident )
1680 | "field_simplify_eq" OPT ( "[" LIST1 one_term "]" ) OPT ( "in" ident )
1681 | "intuition" OPT ltac_expr
1682 | "now" ltac_expr
1683 | "nsatz" OPT ( "with" "radicalmax" ":=" one_term "strategy" ":=" one_term "parameters" ":=" one_term "variables" ":=" one_term )
1684 | "ensatz" OPT ( "with" "strategy" ":=" one_term )
1685 | "psatz" one_term OPT nat_or_var
1686 | "revert" "dependent" ident
1687 | "ring" OPT ( "[" LIST1 one_term "]" )
1688 | "ring_simplify" OPT ( "[" LIST1 one_term "]" ) LIST1 one_term OPT ( "in" ident )
1689 | "match" ltac2_expr5 "with" OPT ltac2_branches "end"
1690 | "if" ltac2_expr5 "then" ltac2_expr5 "else" ltac2_expr5
1691 | qualid LIST1 tactic_arg
1692 ]
1693
1694 hloc: [
1695 | "in" "|-" "*"
1696 | "in" ident
1697 | "in" "(" "type" "of" ident ")"
1698 | "in" "(" "value" "of" ident ")"
1699 ]
1700
1701 in_hyp_as: [
1702 | "in" LIST1 [ ident OPT as_ipat ] SEP ","
1703 ]
1704
1705 as_ipat: [
1706 | "as" simple_intropattern
1707 ]
1708
1709 oriented_rewriter: [
1710 | OPT [ "->" | "<-" ] OPT natural OPT [ "?" | "!" ] one_term_with_bindings
1711 ]
1712
1713 induction_clause: [
1714 | induction_arg OPT ( "as" or_and_intropattern ) OPT ( "eqn" ":" naming_intropattern ) OPT occurrences
1715 ]
1716
1717 induction_arg: [
1718 | one_term_with_bindings
1719 | natural
1720 ]
1721
1722 induction_principle: [
1723 | "using" one_term_with_bindings OPT occurrences
1724 ]
1725
1726 auto_using: [
1727 | "using" LIST1 one_term SEP ","
1728 ]
1729
1730 hintbases: [
1731 | "with" "*"
1732 | "with" LIST1 ident
1733 ]
1734
1735 intropattern: [
1736 | "*"
1737 | "**"
1738 | simple_intropattern
1739 ]
1740
1741 simple_intropattern: [
1742 | simple_intropattern_closed LIST0 [ "%" term0 ]
1743 ]
1744
1745 simple_intropattern_closed: [
1746 | naming_intropattern
1747 | "_"
1748 | or_and_intropattern
1749 | equality_intropattern
1750 ]
1751
1752 naming_intropattern: [
1753 | ident
1754 | "?"
1755 | "?" ident
1756 ]
1757
1758 or_and_intropattern: [
1759 | "[" LIST0 ( LIST0 intropattern ) SEP "|" "]"
1760 | "(" LIST0 simple_intropattern SEP "," ")"
1761 | "(" LIST0 simple_intropattern SEP "&" ")"
1762 ]
1763
1764 equality_intropattern: [
1765 | "->"
1766 | "<-"
1767 | "[=" LIST0 intropattern "]"
1768 ]
1769
1770 one_term_with_bindings: [
1771 | one_term OPT ( "with" bindings )
1772 ]
1773
1774 bindings: [
1775 | LIST1 one_term
1776 | LIST1 ( "(" [ ident | natural ] ":=" term ")" )
1777 ]
1778
1779 int_or_var: [
1780 | [ integer | ident ]
1781 ]
1782
1783 comparison: [
1784 | "="
1785 | "<"
1786 | "<="
1787 | ">"
1788 | ">="
1789 ]
1790
1791 alias_definition: [
1792 | "(" ident LIST0 simple_binder ":=" term ")"
1793 ]
1794
1795 simple_binder: [
1796 | name
1797 | "(" LIST1 name ":" term ")"
1798 ]
1799
1800 as_name: [
1801 | "as" ident
1802 ]
1803
1804 q_clause: [
1805 | ltac2_clause (* Ltac2 plugin *)
1806 ]
1807
1808 ltac2_clause: [
1809 | "in" ltac2_in_clause (* ltac2 plugin *)
1810 | "at" ltac2_occs_nums (* ltac2 plugin *)
1811 ]
1812
1813 ltac2_in_clause: [
1814 | "*" OPT ltac2_occs (* ltac2 plugin *)
1815 | "*" "|-" OPT ltac2_concl_occ (* ltac2 plugin *)
1816 | LIST0 ltac2_hypident_occ SEP "," OPT ( "|-" OPT ltac2_concl_occ ) (* Ltac2 plugin *)
1817 ]
1818
1819 ltac2_constr_delimiters_arg: [
1820 | scope_key
1821 | "delimiters" "(" LIST1 scope_key SEP "," ")"
1822 ]
1823
1824 ltac2_constr_synclass_arg: [
1825 | ltac2_constr_delimiters_arg
1826 | "custom" "(" qualid ")"
1827 | "level" "(" natural ")"
1828 ]
1829
1830 q_occurrences: [
1831 | OPT ltac2_occs (* ltac2 plugin *)
1832 ]
1833
1834 ltac2_occs: [
1835 | "at" ltac2_occs_nums (* ltac2 plugin *)
1836 ]
1837
1838 ltac2_occs_nums: [
1839 | OPT "-" LIST1 [ natural | "$" ident ] (* Ltac2 plugin *)
1840 ]
1841
1842 ltac2_concl_occ: [
1843 | "*" OPT ltac2_occs (* ltac2 plugin *)
1844 ]
1845
1846 ltac2_hypident_occ: [
1847 | ltac2_hypident OPT ltac2_occs (* ltac2 plugin *)
1848 ]
1849
1850 ltac2_hypident: [
1851 | ident_or_anti (* ltac2 plugin *)
1852 | "(" "type" "of" ident_or_anti ")" (* ltac2 plugin *)
1853 | "(" "value" "of" ident_or_anti ")" (* ltac2 plugin *)
1854 ]
1855
1856 q_induction_clause: [
1857 | ltac2_induction_clause (* ltac2 plugin *)
1858 ]
1859
1860 ltac2_induction_clause: [
1861 | ltac2_destruction_arg OPT ltac2_as_or_and_ipat OPT ltac2_eqn_ipat OPT ltac2_clause (* Ltac2 plugin *)
1862 ]
1863
1864 ltac2_as_or_and_ipat: [
1865 | "as" ltac2_or_and_intropattern (* ltac2 plugin *)
1866 ]
1867
1868 ltac2_eqn_ipat: [
1869 | "eqn" ":" ltac2_naming_intropattern (* ltac2 plugin *)
1870 ]
1871
1872 q_conversion: [
1873 | ltac2_conversion (* ltac2 plugin *)
1874 ]
1875
1876 ltac2_conversion: [
1877 | term (* ltac2 plugin *)
1878 | term "with" term (* ltac2 plugin *)
1879 ]
1880
1881 q_rewriting: [
1882 | ltac2_oriented_rewriter (* ltac2 plugin *)
1883 ]
1884
1885 ltac2_oriented_rewriter: [
1886 | OPT q_orient ltac2_rewriter (* ltac2 plugin *)
1887 ]
1888
1889 q_orient: [
1890 | OPT [ "->" | "<-" ]
1891 ]
1892
1893 ltac2_rewriter: [
1894 | OPT natural OPT [ "?" | "!" ] ltac2_constr_with_bindings
1895 ]
1896
1897 q_dispatch: [
1898 | ltac2_for_each_goal (* ltac2 plugin *)
1899 ]
1900
1901 ltac2_for_each_goal: [
1902 | ltac2_goal_tactics (* Ltac2 plugin *)
1903 | OPT ( ltac2_goal_tactics "|" ) OPT ltac2_expr ".." OPT ( "|" ltac2_goal_tactics ) (* Ltac2 plugin *)
1904 ]
1905
1906 ltac2_goal_tactics: [
1907 | LIST0 ( OPT ltac2_expr ) SEP "|" (* Ltac2 plugin *)
1908 ]
1909
1910 q_reductions: [
1911 | ltac2_reductions (* ltac2 plugin *)
1912 ]
1913
1914 ltac2_reductions: [
1915 | LIST1 ltac2_red_flag (* ltac2 plugin *)
1916 | OPT ltac2_delta_reductions (* ltac2 plugin *)
1917 ]
1918
1919 ltac2_red_flag: [
1920 | "beta" (* ltac2 plugin *)
1921 | "iota" (* ltac2 plugin *)
1922 | "match" (* ltac2 plugin *)
1923 | "fix" (* ltac2 plugin *)
1924 | "cofix" (* ltac2 plugin *)
1925 | "zeta" (* ltac2 plugin *)
1926 | "delta" OPT ltac2_delta_reductions (* ltac2 plugin *)
1927 | "head" (* ltac2 plugin *)
1928 ]
1929
1930 ltac2_delta_reductions: [
1931 | OPT "-" "[" LIST1 refglobal "]"
1932 ]
1933
1934 q_reference: [
1935 | refglobal (* ltac2 plugin *)
1936 ]
1937
1938 refglobal: [
1939 | "&" ident (* ltac2 plugin *)
1940 | qualid (* ltac2 plugin *)
1941 | "$" ident (* ltac2 plugin *)
1942 ]
1943
1944 q_hintdb: [
1945 | hintdb (* ltac2 plugin *)
1946 ]
1947
1948 hintdb: [
1949 | "*" (* ltac2 plugin *)
1950 | LIST1 ident_or_anti (* ltac2 plugin *)
1951 ]
1952
1953 q_constr_matching: [
1954 | ltac2_match_list (* ltac2 plugin *)
1955 ]
1956
1957 ltac2_match_key: [
1958 | "lazy_match!"
1959 | "match!"
1960 | "multi_match!"
1961 ]
1962
1963 ltac2_match_list: [
1964 | OPT "|" LIST1 ltac2_match_rule SEP "|"
1965 ]
1966
1967 ltac2_match_rule: [
1968 | ltac2_match_pattern "=>" ltac2_expr (* ltac2 plugin *)
1969 ]
1970
1971 ltac2_match_pattern: [
1972 | cpattern (* ltac2 plugin *)
1973 | "context" OPT ident "[" cpattern "]" (* ltac2 plugin *)
1974 ]
1975
1976 q_goal_matching: [
1977 | goal_match_list (* ltac2 plugin *)
1978 ]
1979
1980 goal_match_list: [
1981 | OPT "|" LIST1 gmatch_rule SEP "|" (* ltac2 plugin *)
1982 ]
1983
1984 gmatch_rule: [
1985 | gmatch_pattern "=>" ltac2_expr (* ltac2 plugin *)
1986 ]
1987
1988 gmatch_pattern: [
1989 | "[" LIST0 gmatch_hyp_pattern SEP "," "|-" ltac2_match_pattern "]" (* ltac2 plugin *)
1990 ]
1991
1992 gmatch_hyp_pattern: [
1993 | name ":" ltac2_match_pattern (* ltac2 plugin *)
1994 | name ":=" "[" ltac2_match_pattern "]" ":" ltac2_match_pattern (* ltac2 plugin *)
1995 | name ":=" ltac2_match_pattern (* ltac2 plugin *)
1996 ]
1997
1998 q_move_location: [
1999 | move_location (* ltac2 plugin *)
2000 ]
2001
2002 move_location: [
2003 | "at" "top" (* ltac2 plugin *)
2004 | "at" "bottom" (* ltac2 plugin *)
2005 | "after" ident_or_anti (* ltac2 plugin *)
2006 | "before" ident_or_anti (* ltac2 plugin *)
2007 ]
2008
2009 q_pose: [
2010 | pose (* ltac2 plugin *)
2011 ]
2012
2013 pose: [
2014 | "(" ident_or_anti ":=" term ")" (* ltac2 plugin *)
2015 | term OPT ltac2_as_name (* ltac2 plugin *)
2016 ]
2017
2018 ltac2_as_name: [
2019 | "as" ident_or_anti (* ltac2 plugin *)
2020 ]
2021
2022 q_assert: [
2023 | assertion (* ltac2 plugin *)
2024 ]
2025
2026 assertion: [
2027 | "(" ident_or_anti ":=" term ")" (* ltac2 plugin *)
2028 | "(" ident_or_anti ":" term ")" OPT ltac2_by_tactic (* ltac2 plugin *)
2029 | term OPT ltac2_as_ipat OPT ltac2_by_tactic (* ltac2 plugin *)
2030 ]
2031
2032 ltac2_as_ipat: [
2033 | "as" ltac2_simple_intropattern (* ltac2 plugin *)
2034 ]
2035
2036 ltac2_by_tactic: [
2037 | "by" ltac2_expr5 (* ltac2 plugin *)
2038 ]
2039
2040 ltac2_entry: [
2041 ]
2042
2043 ltac2_selector: [
2044 | toplevel_selector ":"
2045 ]
2046
2047 ltac2_use_default: [
2048 | "." (* ltac2 plugin *)
2049 | "..." (* ltac2 plugin *)
2050 ]
2051
2052 tac2def_body: [
2053 | [ "_" | ident ] LIST0 tac2pat0 OPT ( ":" ltac2_type ) ":=" ltac2_expr (* ltac2 plugin *)
2054 ]
2055
2056 tac2typ_def: [
2057 | OPT tac2typ_prm qualid OPT ( [ ":=" | "::=" ] tac2typ_knd ) (* ltac2 plugin *)
2058 ]
2059
2060 tac2typ_prm: [
2061 | ltac2_typevar (* ltac2 plugin *)
2062 | "(" LIST1 ltac2_typevar SEP "," ")" (* ltac2 plugin *)
2063 ]
2064
2065 tac2typ_knd: [
2066 | ltac2_type (* ltac2 plugin *)
2067 | "[" OPT ( OPT "|" LIST1 tac2alg_constructor SEP "|" ) "]" (* ltac2 plugin *)
2068 | "[" ".." "]" (* ltac2 plugin *)
2069 | "{" OPT ( LIST1 tac2rec_field SEP ";" OPT ";" ) "}" (* ltac2 plugin *)
2070 ]
2071
2072 tac2alg_constructor: [
2073 | LIST0 [ "#[" LIST1 attribute SEP "," "]" ] ident (* ltac2 plugin *)
2074 | LIST0 [ "#[" LIST1 attribute SEP "," "]" ] ident "(" LIST0 ltac2_type SEP "," ")" (* ltac2 plugin *)
2075 ]
2076
2077 tac2rec_field: [
2078 | OPT "mutable" ident ":" ltac2_type (* ltac2 plugin *)
2079 ]
2080
2081 ltac2_syntax_class: [
2082 | string (* ltac2 plugin *)
2083 | integer (* ltac2 plugin *)
2084 | name (* Ltac2 plugin *)
2085 | name "(" LIST1 ltac2_syntax_class SEP "," ")" (* Ltac2 plugin *)
2086 ]
2087
2088 ltac2_expr: [
2089 | ltac2_expr5 ";" ltac2_expr (* ltac2 plugin *)
2090 | ltac2_expr5 (* ltac2 plugin *)
2091 ]
2092
2093 ltac2_expr5: [
2094 | "fun" LIST1 tac2pat0 OPT ( ":" ltac2_type ) "=>" ltac2_expr (* ltac2 plugin *)
2095 | "let" OPT "rec" ltac2_let_clause LIST0 ( "with" ltac2_let_clause ) "in" ltac2_expr (* Ltac2 plugin *)
2096 | ltac2_expr3 (* ltac2 plugin *)
2097 ]
2098
2099 ltac2_let_clause: [
2100 | LIST1 tac2pat0 OPT ( ":" ltac2_type ) ":=" ltac2_expr (* ltac2 plugin *)
2101 ]
2102
2103 ltac2_expr3: [
2104 | LIST1 ltac2_expr2 SEP "," (* Ltac2 plugin *)
2105 ]
2106
2107 ltac2_expr2: [
2108 | ltac2_expr1 "::" ltac2_expr2 (* ltac2 plugin *)
2109 | ltac2_expr1 (* ltac2 plugin *)
2110 ]
2111
2112 ltac2_expr1: [
2113 | ltac2_expr1 LIST1 ltac2_expr0 (* ltac2 plugin *)
2114 | ltac2_expr1 ".(" qualid ")" (* ltac2 plugin *)
2115 | ltac2_expr1 ".(" qualid ")" ":=" ltac2_expr5 (* ltac2 plugin *)
2116 | ltac2_expr0 (* ltac2 plugin *)
2117 ]
2118
2119 tac2rec_fieldexpr: [
2120 | qualid OPT [ ":=" ltac2_expr1 ] (* ltac2 plugin *)
2121 ]
2122
2123 ltac2_expr0: [
2124 | "(" ltac2_expr ")" (* ltac2 plugin *)
2125 | "(" ltac2_expr ":" ltac2_type ")" (* ltac2 plugin *)
2126 | "()" (* ltac2 plugin *)
2127 | "[" "|" LIST0 ltac2_expr5 SEP ";" "|" "]" (* ltac2 plugin *)
2128 | "[" LIST0 ltac2_expr5 SEP ";" "]" (* ltac2 plugin *)
2129 | "{" ltac2_expr0 "with" OPT ( LIST1 tac2rec_fieldexpr SEP ";" OPT ";" ) "}" (* ltac2 plugin *)
2130 | "{" OPT ( LIST1 tac2rec_fieldexpr SEP ";" OPT ";" ) "}" (* ltac2 plugin *)
2131 | ltac2_atom (* ltac2 plugin *)
2132 ]
2133
2134 tac2rec_fieldpats: [
2135 | tac2rec_fieldpat ";" OPT tac2rec_fieldpats (* ltac2 plugin *)
2136 | tac2rec_fieldpat ";" (* ltac2 plugin *)
2137 | tac2rec_fieldpat (* ltac2 plugin *)
2138 ]
2139
2140 tac2rec_fieldpat: [
2141 | qualid OPT [ ":=" tac2pat3 ] (* ltac2 plugin *)
2142 ]
2143
2144 ltac2_atom: [
2145 | integer (* ltac2 plugin *)
2146 | string (* ltac2 plugin *)
2147 | qualid (* ltac2 plugin *)
2148 | "@" ident (* ltac2 plugin *)
2149 | "&" ident (* ltac2 plugin *)
2150 | "'" term (* ltac2 plugin *)
2151 | ltac2_quotations
2152 ]
2153
2154 ltac2_quotations: [
2155 | "ident" ":" "(" ident ")"
2156 | "constr" ":" "(" term ")"
2157 | "open_constr" ":" "(" term ")"
2158 | "preterm" ":" "(" term ")"
2159 | "pat" ":" "(" cpattern ")"
2160 | "reference" ":" "(" [ "&" ident | qualid ] ")"
2161 | "ltac1" ":" "(" ltac1_expr_in_env ")"
2162 | "ltac1val" ":" "(" ltac1_expr_in_env ")"
2163 ]
2164
2165 ltac1_expr_in_env: [
2166 | ltac_expr (* ltac2_ltac1 plugin *)
2167 | LIST0 ident "|-" ltac_expr (* ltac2_ltac1 plugin *)
2168 ]
2169
2170 generic_tactic: [
2171 | ltac_expr
2172 ]
2173
2174 ltac2_branches: [
2175 | OPT "|" LIST1 ( OPT atomic_tac2pat "=>" ltac2_expr ) SEP "|"
2176 ]
2177
2178 tac2pat3: [
2179 | tac2pat3 "|" LIST1 tac2pat2 SEP "|" (* ltac2 plugin *)
2180 | tac2pat3 "as" ident (* ltac2 plugin *)
2181 | tac2pat2 (* ltac2 plugin *)
2182 ]
2183
2184 tac2pat2: [
2185 | tac2pat1 "::" tac2pat2 (* ltac2 plugin *)
2186 | tac2pat1 (* ltac2 plugin *)
2187 ]
2188
2189 tac2pat1: [
2190 | qualid LIST1 tac2pat0 (* ltac2 plugin *)
2191 | qualid (* ltac2 plugin *)
2192 | tac2pat0 (* ltac2 plugin *)
2193 ]
2194
2195 tac2pat0: [
2196 | "_" (* ltac2 plugin *)
2197 | "()" (* ltac2 plugin *)
2198 | integer (* ltac2 plugin *)
2199 | string (* ltac2 plugin *)
2200 | qualid (* ltac2 plugin *)
2201 | "(" OPT atomic_tac2pat ")" (* ltac2 plugin *)
2202 | "{" OPT tac2rec_fieldpats "}" (* ltac2 plugin *)
2203 | "[" LIST0 tac2pat3 SEP ";" "]" (* ltac2 plugin *)
2204 ]
2205
2206 atomic_tac2pat: [
2207 | tac2pat3 ":" ltac2_type (* ltac2 plugin *)
2208 | tac2pat3 "," LIST0 tac2pat3 SEP "," (* ltac2 plugin *)
2209 | tac2pat3 (* ltac2 plugin *)
2210 ]
2211
2212 func_scheme_def: [
2213 | ident ":=" "Induction" "for" qualid "Sort" sort_quality_or_set (* funind plugin *)
2214 ]
2215
2216 rewrite_occs: [
2217 | LIST1 integer
2218 | ident
2219 ]
2220
2221 rewstrategy: [
2222 | "fix" ident ":=" rewstrategy1
2223 | LIST1 rewstrategy1 SEP ";"
2224 ]
2225
2226 rewstrategy1: [
2227 | "<-" one_term
2228 | "progress" rewstrategy1
2229 | "try" rewstrategy1
2230 | "choice" LIST1 rewstrategy0
2231 | "repeat" rewstrategy1
2232 | "any" rewstrategy1
2233 | "subterm" rewstrategy1
2234 | "subterms" rewstrategy1
2235 | "innermost" rewstrategy1
2236 | "outermost" rewstrategy1
2237 | "bottomup" rewstrategy1
2238 | "topdown" rewstrategy1
2239 | "hints" ident
2240 | "terms" LIST0 one_term
2241 | "eval" red_expr
2242 | "fold" one_term
2243 | rewstrategy0
2244 | "old_hints" ident
2245 ]
2246
2247 rewstrategy0: [
2248 | one_term
2249 | "fail"
2250 | "id"
2251 | "refl"
2252 | "(" rewstrategy ")"
2253 ]
2254
2255 l3_tactic: [
2256 ]
2257
2258 l2_tactic: [
2259 ]
2260
2261 l1_tactic: [
2262 ]
2263
2264 value_tactic: [
2265 ]
2266
2267 syn_value: [
2268 | ident ":" "(" nonterminal ")"
2269 ]
2270
2271 ltac_expr: [
2272 | ltac_expr4
2273 ]
2274
2275 ltac_expr4: [
2276 | ltac_expr4 ";" ltac_expr3
2277 | ltac_expr4 ";" "[" for_each_goal "]"
2278 | ltac_expr3
2279 ]
2280
2281 ltac_expr3: [
2282 | l3_tactic
2283 | ltac_expr2
2284 ]
2285
2286 ltac_expr2: [
2287 | ltac_expr1 "+" ltac_expr2
2288 | ltac_expr1 "||" ltac_expr2
2289 | l2_tactic
2290 | ltac_expr1
2291 ]
2292
2293 ltac_expr1: [
2294 | tactic_value
2295 | qualid LIST1 tactic_arg
2296 | l1_tactic
2297 | ltac_expr0
2298 ]
2299
2300 tactic_value: [
2301 | [ value_tactic | syn_value ]
2302 ]
2303
2304 tactic_arg: [
2305 | tactic_value
2306 | term
2307 | "()"
2308 ]
2309
2310 ltac_expr0: [
2311 | "(" ltac_expr ")"
2312 | "[>" for_each_goal "]"
2313 | tactic_atom
2314 ]
2315
2316 tactic_atom: [
2317 | integer
2318 | qualid
2319 | "()"
2320 ]
2321
2322 let_clause: [
2323 | name ":=" ltac_expr
2324 | ident LIST1 name ":=" ltac_expr
2325 ]
2326
2327 for_each_goal: [
2328 | goal_tactics
2329 | OPT ( goal_tactics "|" ) OPT ltac_expr ".." OPT ( "|" goal_tactics )
2330 ]
2331
2332 goal_tactics: [
2333 | LIST0 ( OPT ltac_expr ) SEP "|"
2334 ]
2335
2336 toplevel_selector: [
2337 | goal_selector
2338 | "all"
2339 | "!"
2340 | "par"
2341 ]
2342
2343 goal_selector: [
2344 | LIST1 range_selector SEP ","
2345 ]
2346
2347 range_selector: [
2348 | natural
2349 | "[" qualid "]"
2350 | natural "-" natural
2351 ]
2352
2353 match_key: [
2354 | "lazymatch"
2355 | "match"
2356 | "multimatch"
2357 ]
2358
2359 match_pattern: [
2360 | cpattern
2361 | "context" OPT ident "[" cpattern "]"
2362 ]
2363
2364 cpattern: [
2365 | term
2366 ]
2367
2368 goal_pattern: [
2369 | LIST0 match_hyp SEP "," "|-" match_pattern
2370 | "[" LIST0 match_hyp SEP "," "|-" match_pattern "]"
2371 | "_"
2372 ]
2373
2374 match_hyp: [
2375 | name ":" match_pattern
2376 | name ":=" match_pattern
2377 | name ":=" "[" match_pattern "]" ":" match_pattern
2378 ]
2379