| 1 |
(************************************************************************) |
| 2 |
(* * The Rocq Prover / The Rocq Development Team *) |
| 3 |
(* v * Copyright INRIA, CNRS and contributors *) |
| 4 |
(* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 |
(* \VV/ **************************************************************) |
| 6 |
(* // * This file is distributed under the terms of the *) |
| 7 |
(* * GNU Lesser General Public License Version 2.1 *) |
| 8 |
(* * (see LICENSE file for the text of the license) *) |
| 9 |
(************************************************************************) |
| 10 |
|
| 11 |
(* Defines additional productions and edits for use in documentation. Not compiled into Coq *) |
| 12 |
|
| 13 |
DOC_GRAMMAR |
| 14 |
|
| 15 |
(* defined in ml *) |
| 16 |
generic_tactic: [ |
| 17 |
| tactic |
| 18 |
] |
| 19 |
|
| 20 |
(* first, fixup symbols duplicated across files *) |
| 21 |
lglob: [ |
| 22 |
| lconstr |
| 23 |
| DELETE EXTRAARGS_lconstr |
| 24 |
] |
| 25 |
|
| 26 |
hint: [ |
| 27 |
| REPLACE "Resolve" "->" LIST1 global OPT natural |
| 28 |
| WITH "Resolve" [ "->" | "<-" ] LIST1 global OPT natural |
| 29 |
| DELETE "Resolve" "<-" LIST1 global OPT natural |
| 30 |
| REPLACE "Variables" "Transparent" |
| 31 |
| WITH [ "Constants" | "Projections" | "Variables" ] [ "Transparent" | "Opaque" ] |
| 32 |
| DELETE "Variables" "Opaque" |
| 33 |
| DELETE "Constants" "Transparent" |
| 34 |
| DELETE "Constants" "Opaque" |
| 35 |
| DELETE "Projections" "Transparent" |
| 36 |
| DELETE "Projections" "Opaque" |
| 37 |
| REPLACE "Transparent" LIST1 global |
| 38 |
| WITH [ "Transparent" | "Opaque" ] LIST1 global |
| 39 |
| DELETE "Opaque" LIST1 global |
| 40 |
|
| 41 |
| REPLACE "Extern" natural OPT Constr.constr_pattern "=>" generic_tactic |
| 42 |
| WITH "Extern" natural OPT constr_pattern "=>" generic_tactic |
| 43 |
| INSERTALL "Hint" |
| 44 |
| APPENDALL opt_hintbases |
| 45 |
] |
| 46 |
|
| 47 |
(* todo: does ARGUMENT EXTEND make the symbol global? It is in both extraargs and extratactics *) |
| 48 |
strategy_level_or_var: [ |
| 49 |
| DELETE EXTRAARGS_strategy_level |
| 50 |
| strategy_level |
| 51 |
] |
| 52 |
|
| 53 |
EXTRAARGS_natural: [ | DELETENT ] |
| 54 |
EXTRAARGS_lconstr: [ | DELETENT ] |
| 55 |
EXTRAARGS_strategy_level: [ | DELETENT ] |
| 56 |
|
| 57 |
binders: [ |
| 58 |
| DELETE Procq.Constr.binders |
| 59 |
] |
| 60 |
|
| 61 |
G_TACTIC_in_clause: [ |
| 62 |
| in_clause |
| 63 |
| MOVEALLBUT in_clause |
| 64 |
| in_clause |
| 65 |
] |
| 66 |
|
| 67 |
SPLICE: [ |
| 68 |
| G_TACTIC_in_clause |
| 69 |
] |
| 70 |
|
| 71 |
RENAME: [ |
| 72 |
| G_LTAC2_delta_flag ltac2_delta_reductions |
| 73 |
| G_LTAC2_strategy_flag ltac2_reductions |
| 74 |
| G_LTAC2_binder ltac2_binder |
| 75 |
| G_LTAC2_branches ltac2_branches |
| 76 |
| G_LTAC2_let_clause ltac2_let_clause |
| 77 |
| G_LTAC2_rewriter ltac2_rewriter |
| 78 |
| G_LTAC2_constr_with_bindings ltac2_constr_with_bindings |
| 79 |
| G_LTAC2_match_rule ltac2_match_rule |
| 80 |
| G_LTAC2_match_pattern ltac2_match_pattern |
| 81 |
| G_LTAC2_intropatterns ltac2_intropatterns |
| 82 |
| G_LTAC2_simple_intropattern ltac2_simple_intropattern |
| 83 |
| G_LTAC2_simple_intropattern_closed ltac2_simple_intropattern_closed |
| 84 |
| G_LTAC2_or_and_intropattern ltac2_or_and_intropattern |
| 85 |
| G_LTAC2_equality_intropattern ltac2_equality_intropattern |
| 86 |
| G_LTAC2_naming_intropattern ltac2_naming_intropattern |
| 87 |
| G_LTAC2_destruction_arg ltac2_destruction_arg |
| 88 |
| G_LTAC2_with_bindings ltac2_with_bindings |
| 89 |
| G_LTAC2_bindings ltac2_bindings |
| 90 |
| G_LTAC2_simple_binding ltac2_simple_binding |
| 91 |
| G_LTAC2_in_clause ltac2_in_clause |
| 92 |
| G_LTAC2_occs ltac2_occs |
| 93 |
| G_LTAC2_occs_nums ltac2_occs_nums |
| 94 |
| G_LTAC2_concl_occ ltac2_concl_occ |
| 95 |
| G_LTAC2_hypident_occ ltac2_hypident_occ |
| 96 |
| G_LTAC2_hypident ltac2_hypident |
| 97 |
| G_LTAC2_induction_clause ltac2_induction_clause |
| 98 |
| G_LTAC2_as_or_and_ipat ltac2_as_or_and_ipat |
| 99 |
| G_LTAC2_eqn_ipat ltac2_eqn_ipat |
| 100 |
| G_LTAC2_conversion ltac2_conversion |
| 101 |
| G_LTAC2_oriented_rewriter ltac2_oriented_rewriter |
| 102 |
| G_LTAC2_for_each_goal ltac2_for_each_goal |
| 103 |
| G_LTAC2_tactic_then_last ltac2_tactic_then_last |
| 104 |
| G_LTAC2_as_name ltac2_as_name |
| 105 |
| G_LTAC2_as_ipat ltac2_as_ipat |
| 106 |
| G_LTAC2_by_tactic ltac2_by_tactic |
| 107 |
| G_LTAC2_match_list ltac2_match_list |
| 108 |
] |
| 109 |
|
| 110 |
(* Renames to eliminate qualified names. |
| 111 |
Put other renames at the end *) |
| 112 |
RENAME: [ |
| 113 |
(* map missing names for rhs *) |
| 114 |
| Constr.constr term |
| 115 |
| Constr.term0 term0 |
| 116 |
| Constr.global global |
| 117 |
| Constr.lconstr lconstr |
| 118 |
| Constr.cpattern cpattern |
| 119 |
| G_vernac.section_subset_expr section_var_expr |
| 120 |
| Prim.ident ident |
| 121 |
| Prim.identref identref |
| 122 |
| Prim.reference reference |
| 123 |
| Prim.string string |
| 124 |
| Prim.integer integer |
| 125 |
| Prim.qualid qualid |
| 126 |
| Prim.natural natural |
| 127 |
| Pvernac.Vernac_.main_entry vernac_control |
| 128 |
| Pltac.ltac_expr ltac_expr5 |
| 129 |
|
| 130 |
(* |
| 131 |
| G_vernac.def_body def_body |
| 132 |
| Prim.by_notation by_notation |
| 133 |
| Prim.natural natural |
| 134 |
*) |
| 135 |
| Vernac.fix_definition fix_definition |
| 136 |
] |
| 137 |
|
| 138 |
(* written in OCaml *) |
| 139 |
impl_ident_head: [ |
| 140 |
| "{" ident |
| 141 |
] |
| 142 |
|
| 143 |
lpar_id_coloneq: [ |
| 144 |
| "(" ident; ":=" |
| 145 |
] |
| 146 |
|
| 147 |
(* lookahead symbols *) |
| 148 |
DELETE: [ |
| 149 |
| check_for_coloneq |
| 150 |
| local_test_lpar_id_colon |
| 151 |
| lookup_at_as_comma |
| 152 |
| test_only_starredidentrefs |
| 153 |
| test_bracket_ident |
| 154 |
| test_hash_ident |
| 155 |
| test_id_colon |
| 156 |
| test_lpar_id_colon |
| 157 |
| test_lpar_id_coloneq (* todo: grammar seems incorrect, repeats the "(" IDENT ":=" *) |
| 158 |
| test_lpar_nat_coloneq |
| 159 |
| test_lpar_id_rpar |
| 160 |
| test_lpar_idnum_coloneq |
| 161 |
| test_show_goal |
| 162 |
| test_show_natural |
| 163 |
| test_name_colon |
| 164 |
| test_pipe_closedcurly |
| 165 |
| ensure_fixannot |
| 166 |
| test_array_opening |
| 167 |
| test_array_closing |
| 168 |
| test_variance_ident |
| 169 |
| test_qualid_with_or_lpar_or_rbrac |
| 170 |
| test_leftsquarebracket_equal |
| 171 |
| test_old_sort_qvar |
| 172 |
| test_sort_qvar |
| 173 |
| test_ltac2_ident |
| 174 |
| test_doublepipe_univ_decl |
| 175 |
| test_doublepipe_cumul_univ_decl |
| 176 |
| test_semicolon_cumul_univ_decl |
| 177 |
| test_univ_cst |
| 178 |
] |
| 179 |
|
| 180 |
(* additional nts to be spliced *) |
| 181 |
|
| 182 |
tactic_then_last: [ |
| 183 |
| REPLACE "|" LIST0 ( OPT ltac_expr5 ) SEP "|" |
| 184 |
| WITH LIST0 ( "|" ( OPT ltac_expr5 ) ) |
| 185 |
] |
| 186 |
|
| 187 |
goal_tactics: [ |
| 188 |
| LIST0 ( OPT ltac_expr5 ) SEP "|" |
| 189 |
] |
| 190 |
|
| 191 |
for_each_goal: [ | DELETENT ] |
| 192 |
|
| 193 |
for_each_goal: [ |
| 194 |
| goal_tactics |
| 195 |
| OPT ( goal_tactics "|" ) OPT ltac_expr5 ".." OPT ( "|" goal_tactics ) |
| 196 |
] |
| 197 |
|
| 198 |
ltac2_tactic_then_last: [ |
| 199 |
| REPLACE "|" LIST0 ( OPT ltac2_expr6 ) SEP "|" (* Ltac2 plugin *) |
| 200 |
| WITH LIST0 ( "|" OPT ltac2_expr6 ) TAG Ltac2 |
| 201 |
] |
| 202 |
|
| 203 |
ltac2_goal_tactics: [ |
| 204 |
| LIST0 ( OPT ltac2_expr6 ) SEP "|" TAG Ltac2 |
| 205 |
] |
| 206 |
|
| 207 |
ltac2_for_each_goal: [ | DELETENT ] |
| 208 |
|
| 209 |
ltac2_for_each_goal: [ |
| 210 |
| ltac2_goal_tactics TAG Ltac2 |
| 211 |
| OPT ( ltac2_goal_tactics "|" ) OPT ltac2_expr6 ".." OPT ( "|" ltac2_goal_tactics ) TAG Ltac2 |
| 212 |
] |
| 213 |
|
| 214 |
reference: [ | DELETENT ] |
| 215 |
|
| 216 |
reference: [ |
| 217 |
| qualid |
| 218 |
] |
| 219 |
|
| 220 |
fullyqualid: [ | DELETENT ] |
| 221 |
|
| 222 |
fullyqualid: [ |
| 223 |
| qualid |
| 224 |
] |
| 225 |
|
| 226 |
qualid: [ | DELETENT ] |
| 227 |
|
| 228 |
qualid: [ |
| 229 |
| ident LIST0 ("." ident) |
| 230 |
] |
| 231 |
|
| 232 |
field: [ | DELETENT ] |
| 233 |
fields: [ | DELETENT ] |
| 234 |
|
| 235 |
dirpath: [ |
| 236 |
| REPLACE ident LIST0 field |
| 237 |
| WITH LIST0 ( ident "." ) ident |
| 238 |
] |
| 239 |
|
| 240 |
let_type_cstr: [ |
| 241 |
| DELETE OPT [ ":" lconstr ] |
| 242 |
| type_cstr |
| 243 |
] |
| 244 |
|
| 245 |
case_item: [ |
| 246 |
| REPLACE term100 OPT [ "as" name ] OPT [ "in" pattern200 ] |
| 247 |
| WITH term100 OPT ("as" name) OPT [ "in" pattern200 ] |
| 248 |
] |
| 249 |
|
| 250 |
type: [ |
| 251 |
| term200 |
| 252 |
] |
| 253 |
|
| 254 |
one_type: [ |
| 255 |
| constr |
| 256 |
] |
| 257 |
|
| 258 |
term_forall_or_fun: [ |
| 259 |
| "forall" open_binders "," type |
| 260 |
] |
| 261 |
|
| 262 |
binder_constr: [ |
| 263 |
| DELETE "forall" open_binders "," term200 |
| 264 |
| MOVETO term_forall_or_fun "fun" open_binders "=>" term200 |
| 265 |
| MOVETO term_let "let" name binders let_type_cstr ":=" term200 "in" term200 |
| 266 |
| MOVETO term_if "if" term200 as_return_type "then" term200 "else" term200 |
| 267 |
| MOVETO term_fix "let" "fix" fix_decl "in" term200 |
| 268 |
| MOVETO term_cofix "let" "cofix" cofix_body "in" term200 |
| 269 |
| MOVETO term_let "let" [ "(" LIST0 name SEP "," ")" | "()" ] as_return_type ":=" term200 "in" term200 |
| 270 |
| MOVETO term_let "let" "'" pattern200 OPT [ "in" pattern200 ] ":=" term200 OPT case_type "in" term200 |
| 271 |
| MOVETO term_fix "fix" fix_decls |
| 272 |
| MOVETO term_cofix "cofix" cofix_decls |
| 273 |
] |
| 274 |
|
| 275 |
term_let: [ |
| 276 |
| REPLACE "let" name binders let_type_cstr ":=" term200 "in" term200 |
| 277 |
| WITH "let" name let_type_cstr ":=" term200 "in" term200 |
| 278 |
| "let" name LIST1 binder let_type_cstr ":=" term200 "in" term200 |
| 279 |
(* Don't need to document that "( )" is equivalent to "()" *) |
| 280 |
| REPLACE "let" [ "(" LIST0 name SEP "," ")" | "()" ] as_return_type ":=" term200 "in" term200 |
| 281 |
| WITH "let" "(" LIST0 name SEP "," ")" as_return_type ":=" term200 "in" term200 |
| 282 |
| MOVETO destructuring_let "let" "(" LIST0 name SEP "," ")" as_return_type ":=" term200 "in" term200 |
| 283 |
| MOVETO destructuring_let "let" "'" pattern200 OPT [ "in" pattern200 ] ":=" term200 OPT case_type "in" term200 |
| 284 |
] |
| 285 |
|
| 286 |
qualid_annotated: [ |
| 287 |
| global univ_annot |
| 288 |
] |
| 289 |
|
| 290 |
atomic_constr: [ |
| 291 |
| qualid_annotated |
| 292 |
| MOVETO term_evar "_" |
| 293 |
| REPLACE "?" "[" identref "]" |
| 294 |
| WITH "?[" identref "]" |
| 295 |
| MOVETO term_evar "?[" identref "]" |
| 296 |
| REPLACE "?" "[" pattern_ident "]" |
| 297 |
| WITH "?[" pattern_ident "]" |
| 298 |
| MOVETO term_evar "?[" pattern_ident "]" |
| 299 |
| MOVETO term_evar pattern_ident evar_instance |
| 300 |
] |
| 301 |
|
| 302 |
ltac_expr0: [ |
| 303 |
| REPLACE "[" ">" for_each_goal "]" |
| 304 |
| WITH "[>" for_each_goal "]" |
| 305 |
] |
| 306 |
|
| 307 |
(* lexer token *) |
| 308 |
IDENT: [ |
| 309 |
| ident |
| 310 |
] |
| 311 |
|
| 312 |
scope_key: [ |
| 313 |
| IDENT |
| 314 |
] |
| 315 |
|
| 316 |
scope_name: [ |
| 317 |
| IDENT |
| 318 |
] |
| 319 |
|
| 320 |
scope: [ |
| 321 |
| scope_name |
| 322 |
| scope_key |
| 323 |
] |
| 324 |
|
| 325 |
scope_delimiter: [ |
| 326 |
| REPLACE "%" IDENT |
| 327 |
| WITH "%" scope |
| 328 |
| REPLACE "%_" IDENT |
| 329 |
| WITH "%_" scope |
| 330 |
] |
| 331 |
|
| 332 |
sort: [ |
| 333 |
| REPLACE "Type" "@{" reference ";" universe "}" |
| 334 |
| WITH "Type" "@{" OPT [ qualid [ "|" | ";" ] ] universe "}" |
| 335 |
| DELETE "Type" "@{" universe "}" |
| 336 |
| DELETE "Type" "@{" reference "|" universe "}" |
| 337 |
] |
| 338 |
|
| 339 |
term100: [ |
| 340 |
| REPLACE term99 "<:" term200 |
| 341 |
| WITH term99 "<:" type |
| 342 |
| MOVETO term_cast term99 "<:" type |
| 343 |
| REPLACE term99 "<<:" term200 |
| 344 |
| WITH term99 "<<:" type |
| 345 |
| MOVETO term_cast term99 "<<:" type |
| 346 |
| REPLACE term99 ":>" term200 |
| 347 |
| WITH term99 ":>" type |
| 348 |
| MOVETO term_cast term99 ":>" type |
| 349 |
| REPLACE term99 ":" term200 |
| 350 |
| WITH term99 ":" type |
| 351 |
| MOVETO term_cast term99 ":" type |
| 352 |
] |
| 353 |
|
| 354 |
constr: [ |
| 355 |
| REPLACE "@" global univ_annot |
| 356 |
| WITH "@" qualid_annotated |
| 357 |
| MOVETO term_explicit "@" qualid_annotated |
| 358 |
] |
| 359 |
|
| 360 |
term10: [ |
| 361 |
(* Separate this LIST0 in the nonempty and the empty case *) |
| 362 |
(* The empty case is covered by constr *) |
| 363 |
| REPLACE "@" global univ_annot LIST0 term9 |
| 364 |
| WITH "@" qualid_annotated LIST1 term9 |
| 365 |
| REPLACE term9 |
| 366 |
| WITH constr |
| 367 |
| MOVETO term_application term10 LIST1 arg |
| 368 |
| MOVETO term_application "@" qualid_annotated LIST1 term9 |
| 369 |
(* fixme: add in as a prodn somewhere *) |
| 370 |
| MOVETO dangling_pattern_extension_rule "@" pattern_ident LIST1 identref |
| 371 |
| DELETE dangling_pattern_extension_rule |
| 372 |
] |
| 373 |
|
| 374 |
term9: [ |
| 375 |
(* @Zimmi48: Special token .. is for use in the Notation command. (see bug_3304.v) *) |
| 376 |
| DELETE ".." term0 ".." |
| 377 |
] |
| 378 |
|
| 379 |
term1: [ |
| 380 |
| REPLACE term1 ".(" global univ_annot LIST0 arg ")" |
| 381 |
| WITH term1 ".(" global univ_annot LIST0 arg ")" (* huh? *) |
| 382 |
| REPLACE term1 "%" IDENT |
| 383 |
| WITH term1 "%" scope_key |
| 384 |
| MOVETO term_scope term1 "%" scope_key |
| 385 |
| REPLACE term1 "%_" IDENT |
| 386 |
| WITH term1 "%_" scope_key |
| 387 |
| MOVETO term_scope term1 "%_" scope_key |
| 388 |
| MOVETO term_projection term1 ".(" global univ_annot LIST0 arg ")" |
| 389 |
| MOVETO term_projection term1 ".(" "@" global univ_annot LIST0 ( term9 ) ")" |
| 390 |
] |
| 391 |
|
| 392 |
term0: [ |
| 393 |
| DELETE reference univ_annot |
| 394 |
| REPLACE "{|" record_declaration bar_cbrace |
| 395 |
| WITH "{|" OPT [ LIST1 field_def SEP ";" OPT ";" ] bar_cbrace |
| 396 |
| MOVETO number_or_string NUMBER |
| 397 |
| MOVETO number_or_string string |
| 398 |
| MOVETO term_record "{|" OPT [ LIST1 field_def SEP ";" OPT ";" ] bar_cbrace |
| 399 |
| MOVETO term_generalizing "`{" term200 "}" |
| 400 |
| MOVETO term_generalizing "`(" term200 ")" |
| 401 |
| MOVETO term_ltac "ltac" ":" "(" ltac_expr5 ")" |
| 402 |
| REPLACE "[" "|" array_elems "|" lconstr type_cstr "|" "]" univ_annot |
| 403 |
| WITH "[|" array_elems "|" lconstr type_cstr "|]" univ_annot |
| 404 |
] |
| 405 |
|
| 406 |
fix_decls: [ |
| 407 |
| DELETE fix_decl |
| 408 |
| REPLACE fix_decl "with" LIST1 fix_decl SEP "with" "for" identref |
| 409 |
| WITH fix_decl OPT ( LIST1 ("with" fix_decl) "for" identref ) |
| 410 |
] |
| 411 |
|
| 412 |
cofix_decls: [ |
| 413 |
| DELETE cofix_body |
| 414 |
| REPLACE cofix_body "with" LIST1 cofix_body SEP "with" "for" identref |
| 415 |
| WITH cofix_body OPT ( LIST1 ( "with" cofix_body ) "for" identref ) |
| 416 |
] |
| 417 |
|
| 418 |
fields_def: [ |
| 419 |
| REPLACE field_def ";" fields_def |
| 420 |
| WITH LIST1 field_def SEP ";" |
| 421 |
| DELETE field_def |
| 422 |
] |
| 423 |
|
| 424 |
binders_fixannot: [ |
| 425 |
| DELETE binder binders_fixannot |
| 426 |
| DELETE fixannot |
| 427 |
| DELETE (* empty *) |
| 428 |
| LIST0 binder OPT fixannot |
| 429 |
] |
| 430 |
|
| 431 |
binder: [ |
| 432 |
| DELETE name |
| 433 |
] |
| 434 |
|
| 435 |
open_binders: [ |
| 436 |
| REPLACE name LIST0 name ":" lconstr |
| 437 |
| WITH LIST1 name ":" type |
| 438 |
(* @Zimmi48: Special token .. is for use in the Notation command. (see bug_3304.v) *) |
| 439 |
| DELETE name ".." name |
| 440 |
| REPLACE name LIST0 name binders |
| 441 |
| WITH LIST1 binder |
| 442 |
| DELETE closed_binder binders |
| 443 |
] |
| 444 |
|
| 445 |
closed_binder: [ |
| 446 |
| name |
| 447 |
|
| 448 |
| REPLACE "(" name LIST1 name ":" lconstr ")" |
| 449 |
| WITH "(" LIST1 name ":" type ")" |
| 450 |
| DELETE "(" name ":" lconstr ")" |
| 451 |
|
| 452 |
| DELETE "(" name ":=" lconstr ")" |
| 453 |
|
| 454 |
| REPLACE "(" name ":" lconstr ":=" lconstr ")" |
| 455 |
| WITH "(" name type_cstr ":=" lconstr ")" |
| 456 |
|
| 457 |
| DELETE "{" name "}" |
| 458 |
| DELETE "{" name LIST1 name "}" |
| 459 |
|
| 460 |
| REPLACE "{" name LIST1 name ":" lconstr "}" |
| 461 |
| WITH "{" LIST1 name type_cstr "}" |
| 462 |
| DELETE "{" name ":" lconstr "}" |
| 463 |
| MOVETO implicit_binders "{" LIST1 name type_cstr "}" |
| 464 |
|
| 465 |
| DELETE "[" name "]" |
| 466 |
| DELETE "[" name LIST1 name "]" |
| 467 |
|
| 468 |
| REPLACE "[" name LIST1 name ":" lconstr "]" |
| 469 |
| WITH "[" LIST1 name type_cstr "]" |
| 470 |
| DELETE "[" name ":" lconstr "]" |
| 471 |
| MOVETO implicit_binders "[" LIST1 name type_cstr "]" |
| 472 |
|
| 473 |
| REPLACE "(" name ":" lconstr "|" lconstr ")" |
| 474 |
| WITH "(" name ":" type "|" lconstr ")" |
| 475 |
|
| 476 |
| MOVETO generalizing_binder "`(" LIST1 typeclass_constraint SEP "," ")" |
| 477 |
| MOVETO generalizing_binder "`{" LIST1 typeclass_constraint SEP "," "}" |
| 478 |
| MOVETO generalizing_binder "`[" LIST1 typeclass_constraint SEP "," "]" |
| 479 |
] |
| 480 |
|
| 481 |
(* next two used internally for declaring notations *) |
| 482 |
one_closed_binder: [ |
| 483 |
| DELETENT |
| 484 |
] |
| 485 |
|
| 486 |
one_open_binder: [ |
| 487 |
| DELETENT |
| 488 |
] |
| 489 |
|
| 490 |
name_colon: [ |
| 491 |
| name ":" |
| 492 |
] |
| 493 |
|
| 494 |
typeclass_constraint: [ |
| 495 |
| EDIT ADD_OPT "!" term200 |
| 496 |
| REPLACE "{" name "}" ":" [ "!" | ] term200 |
| 497 |
| WITH "{" name "}" ":" OPT "!" term200 |
| 498 |
| REPLACE name ":" [ "!" | ] term200 |
| 499 |
| WITH name ":" OPT "!" term200 |
| 500 |
] |
| 501 |
|
| 502 |
(* ?? From the grammar, Prim.name seems to be only "_" but ident is also accepted "*) |
| 503 |
Prim.name: [ |
| 504 |
| REPLACE "_" |
| 505 |
| WITH name |
| 506 |
] |
| 507 |
|
| 508 |
oriented_rewriter: [ |
| 509 |
| REPLACE orient_rw rewriter |
| 510 |
| WITH orient rewriter |
| 511 |
] |
| 512 |
|
| 513 |
DELETE: [ |
| 514 |
| orient_rw |
| 515 |
] |
| 516 |
|
| 517 |
pattern10: [ |
| 518 |
| REPLACE pattern10 LIST1 pattern1 |
| 519 |
| WITH pattern10 LIST0 pattern1 |
| 520 |
| DELETE pattern1 |
| 521 |
] |
| 522 |
|
| 523 |
pattern1: [ |
| 524 |
| REPLACE pattern1 "%" IDENT |
| 525 |
| WITH pattern1 "%" scope_key |
| 526 |
| REPLACE pattern1 "%_" IDENT |
| 527 |
| WITH pattern1 "%_" scope_key |
| 528 |
] |
| 529 |
|
| 530 |
pattern0: [ |
| 531 |
| REPLACE "(" pattern200 ")" |
| 532 |
| WITH "(" LIST1 pattern200 SEP "|" ")" |
| 533 |
| DELETE "(" pattern200 "|" LIST1 pattern200 SEP "|" ")" |
| 534 |
| REPLACE "{|" record_patterns bar_cbrace |
| 535 |
| WITH "{|" LIST0 record_pattern bar_cbrace |
| 536 |
] |
| 537 |
|
| 538 |
DELETE: [ |
| 539 |
| record_patterns |
| 540 |
] |
| 541 |
|
| 542 |
eqn: [ |
| 543 |
| REPLACE LIST1 mult_pattern SEP "|" "=>" lconstr |
| 544 |
| WITH LIST1 [ LIST1 pattern100 SEP "," ] SEP "|" "=>" lconstr |
| 545 |
] |
| 546 |
|
| 547 |
(* No constructor syntax, OPT [ "|" binders ] is not supported for Record *) |
| 548 |
record_definition: [ |
| 549 |
| opt_coercion ident_decl binders OPT [ ":" sort ] OPT ( ":=" OPT [ identref ] "{" record_fields "}" OPT [ "as" identref ] ) |
| 550 |
] |
| 551 |
|
| 552 |
(* No mixed inductive-record definitions, opt_coercion is meaningless for Inductive *) |
| 553 |
inductive_definition: [ |
| 554 |
| cumul_ident_decl binders OPT [ "|" binders ] OPT [ ":" type ] ":=" OPT [ OPT "|" LIST1 constructor SEP "|" ] decl_notations |
| 555 |
] |
| 556 |
|
| 557 |
(* No mutual recursion, no inductive classes, type must be a sort *) |
| 558 |
(* constructor is optional but "Class record_definition" covers that case *) |
| 559 |
singleton_class_definition: [ |
| 560 |
| ident_decl binders OPT [ ":" sort ] ":=" constructor |
| 561 |
] |
| 562 |
|
| 563 |
(* No record syntax, opt_coercion not supported for Variant, := ... required *) |
| 564 |
variant_definition: [ |
| 565 |
| ident_decl binders OPT [ "|" binders ] OPT [ ":" type ] ":=" OPT [ OPT "|" LIST1 constructor SEP "|" ] decl_notations |
| 566 |
] |
| 567 |
|
| 568 |
gallina: [ |
| 569 |
| REPLACE thm_token ident_decl binders ":" lconstr LIST0 [ "with" ident_decl binders ":" lconstr ] |
| 570 |
| WITH thm_token ident_decl binders ":" type LIST0 [ "with" ident_decl binders ":" type ] |
| 571 |
| DELETE assumptions_token inline assum_list |
| 572 |
| DELETE "Symbols" assum_list |
| 573 |
| REPLACE "Symbol" assum_list |
| 574 |
| WITH [ "Symbol" | "Symbols" ] assum_list |
| 575 |
| REPLACE inductive_token LIST1 inductive_or_record_definition SEP "with" |
| 576 |
| WITH "Inductive" inductive_definition LIST0 ( "with" inductive_definition ) |
| 577 |
| "Inductive" record_definition LIST0 ( "with" record_definition ) |
| 578 |
| "CoInductive" inductive_definition LIST0 ( "with" inductive_definition ) |
| 579 |
| "CoInductive" record_definition LIST0 ( "with" record_definition ) |
| 580 |
| REPLACE finite_token inductive_or_record_definition |
| 581 |
| WITH "Variant" variant_definition |
| 582 |
| [ "Record" | "Structure" ] record_definition |
| 583 |
| "Class" record_definition |
| 584 |
| "Class" singleton_class_definition |
| 585 |
| REPLACE "Fixpoint" LIST1 fix_definition SEP "with" |
| 586 |
| WITH "Fixpoint" fix_definition LIST0 ( "with" fix_definition ) |
| 587 |
| REPLACE "Let" "Fixpoint" LIST1 fix_definition SEP "with" |
| 588 |
| WITH "Let" "Fixpoint" fix_definition LIST0 ( "with" fix_definition ) |
| 589 |
| REPLACE "CoFixpoint" LIST1 cofix_definition SEP "with" |
| 590 |
| WITH "CoFixpoint" cofix_definition LIST0 ( "with" cofix_definition ) |
| 591 |
| REPLACE "Let" "CoFixpoint" LIST1 cofix_definition SEP "with" |
| 592 |
| WITH "Let" "CoFixpoint" cofix_definition LIST0 ( "with" cofix_definition ) |
| 593 |
| REPLACE "Scheme" LIST1 scheme SEP "with" |
| 594 |
| WITH "Scheme" scheme LIST0 ( "with" scheme ) |
| 595 |
| DELETE "Scheme" "Boolean" "Equality" "for" smart_global |
| 596 |
| DELETE "Scheme" "Equality" "for" smart_global |
| 597 |
| "Scheme" OPT "Boolean" "Equality" "for" smart_global |
| 598 |
| DELETE "Rewrite" "Rules" identref ":=" OPT "|" LIST1 rewrite_rule SEP "|" |
| 599 |
| REPLACE "Rewrite" "Rule" identref ":=" OPT "|" LIST1 rewrite_rule SEP "|" |
| 600 |
| WITH "Rewrite" [ "Rule" | "Rules" ] identref ":=" OPT "|" LIST1 rewrite_rule SEP "|" |
| 601 |
] |
| 602 |
|
| 603 |
SPLICE: [ |
| 604 |
| variant_definition |
| 605 |
] |
| 606 |
|
| 607 |
finite_token: [ |
| 608 |
| DELETENT |
| 609 |
] |
| 610 |
|
| 611 |
inductive_token: [ |
| 612 |
| DELETENT |
| 613 |
] |
| 614 |
|
| 615 |
inductive_or_record_definition: [ |
| 616 |
| DELETENT |
| 617 |
] |
| 618 |
|
| 619 |
constructors_or_record: [ |
| 620 |
| DELETENT |
| 621 |
] |
| 622 |
|
| 623 |
record_fields: [ |
| 624 |
| REPLACE record_field ";" record_fields |
| 625 |
| WITH OPT [ LIST1 record_field SEP ";" OPT ";" ] |
| 626 |
| DELETE record_field |
| 627 |
| DELETE (* empty *) |
| 628 |
] |
| 629 |
|
| 630 |
assumptions_token: [ |
| 631 |
| DELETENT |
| 632 |
] |
| 633 |
|
| 634 |
inline: [ |
| 635 |
| REPLACE "Inline" "(" natural ")" |
| 636 |
| WITH "Inline" OPT ( "(" natural ")" ) |
| 637 |
| DELETE "Inline" |
| 638 |
] |
| 639 |
|
| 640 |
univ_level_or_quality: [ |
| 641 |
| REPLACE NUMBER "0" |
| 642 |
| WITH "0" |
| 643 |
] |
| 644 |
|
| 645 |
univ_decl: [ |
| 646 |
| REPLACE "@{" LIST0 identref ";" LIST0 identref [ "+" | ] univ_decl_constraints |
| 647 |
| WITH "@{" OPT [ LIST0 identref [ "|" | ";" ] ] LIST0 identref OPT "+" OPT [ "|" LIST0 sort_constraint SEP "," OPT "+" ] "}" |
| 648 |
| DELETE "@{" LIST0 identref [ "+" | ] univ_decl_constraints |
| 649 |
| DELETE "@{" LIST0 identref "|" LIST0 identref [ "+" | ] univ_decl_constraints |
| 650 |
] |
| 651 |
|
| 652 |
cumul_univ_decl: [ |
| 653 |
| REPLACE "@{" LIST0 identref ";" LIST0 variance_identref [ "+" | ] univ_decl_constraints |
| 654 |
| WITH "@{" OPT [ LIST0 identref [ "|" | ";" ] ] LIST0 variance_identref OPT "+" OPT [ "|" LIST0 sort_constraint SEP "," OPT "+" ] "}" |
| 655 |
| DELETE "@{" LIST0 variance_identref [ "+" | ] univ_decl_constraints |
| 656 |
| DELETE "@{" LIST0 identref "|" LIST0 variance_identref [ "+" | ] univ_decl_constraints |
| 657 |
] |
| 658 |
|
| 659 |
of_type: [ |
| 660 |
| DELETENT |
| 661 |
] |
| 662 |
|
| 663 |
of_type: [ |
| 664 |
| [ ":" | ":>" ] type |
| 665 |
] |
| 666 |
|
| 667 |
of_type_inst: [ |
| 668 |
| DELETENT |
| 669 |
] |
| 670 |
|
| 671 |
of_type_inst: [ |
| 672 |
| [ ":" | ":>" | "::" | "::>" ] type |
| 673 |
] |
| 674 |
|
| 675 |
def_body: [ |
| 676 |
| DELETE binders ":=" reduce lconstr |
| 677 |
| REPLACE binders ":" lconstr ":=" reduce lconstr |
| 678 |
| WITH LIST0 binder OPT (":" type) ":=" reduce lconstr |
| 679 |
| REPLACE binders ":" lconstr |
| 680 |
| WITH LIST0 binder ":" type |
| 681 |
] |
| 682 |
|
| 683 |
delta_flag: [ |
| 684 |
| REPLACE "-" "[" LIST1 smart_global "]" |
| 685 |
| WITH OPT "-" "[" LIST1 smart_global "]" |
| 686 |
| DELETE "[" LIST1 smart_global "]" |
| 687 |
| OPTINREF |
| 688 |
] |
| 689 |
|
| 690 |
ltac2_delta_reductions: [ |
| 691 |
| EDIT ADD_OPT "-" "[" refglobals "]" (* Ltac2 plugin *) |
| 692 |
] |
| 693 |
|
| 694 |
ltac2_branches: [ |
| 695 |
| EDIT ADD_OPT "|" LIST1 branch SEP "|" (* Ltac2 plugin *) |
| 696 |
] |
| 697 |
|
| 698 |
strategy_flag: [ |
| 699 |
| REPLACE OPT "head" OPT delta_flag |
| 700 |
| WITH OPT "head" delta_flag |
| 701 |
(*| REPLACE LIST1 red_flags |
| 702 |
| WITH LIST1 red_flag*) |
| 703 |
| (* empty *) |
| 704 |
] |
| 705 |
|
| 706 |
filtered_import: [ |
| 707 |
| REPLACE global "(" LIST1 one_import_filter_name SEP "," ")" |
| 708 |
| WITH global OPT [ "(" LIST1 one_import_filter_name SEP "," ")" ] |
| 709 |
| DELETE global |
| 710 |
] |
| 711 |
|
| 712 |
is_module_expr: [ |
| 713 |
| REPLACE ":=" module_expr_inl LIST0 ext_module_expr |
| 714 |
| WITH ":=" LIST1 module_expr_inl SEP "<+" |
| 715 |
] |
| 716 |
|
| 717 |
is_module_type: [ |
| 718 |
| REPLACE ":=" module_type_inl LIST0 ext_module_type |
| 719 |
| WITH ":=" LIST1 module_type_inl SEP "<+" |
| 720 |
] |
| 721 |
|
| 722 |
gallina_ext: [ |
| 723 |
| REPLACE "Arguments" smart_global LIST0 arg_specs OPT [ "," LIST1 [ LIST0 implicits_alt ] SEP "," ] OPT [ ":" LIST1 args_modifier SEP "," ] |
| 724 |
| WITH "Arguments" smart_global LIST0 arg_specs LIST0 [ "," LIST0 implicits_alt ] OPT [ ":" LIST1 args_modifier SEP "," ] |
| 725 |
| REPLACE "Implicit" "Type" reserv_list |
| 726 |
| WITH "Implicit" [ "Type" | "Types" ] reserv_list |
| 727 |
| DELETE "Implicit" "Types" reserv_list |
| 728 |
|
| 729 |
(* Per @Zimmi48, the global (qualid) must be a simple identifier if def_body is present |
| 730 |
Note that smart_global is "qualid | by_notation" and that |
| 731 |
ident_decl is "ident OPT univ_decl"; move |
| 732 |
*) |
| 733 |
| REPLACE "Canonical" OPT "Structure" global OPT [ OPT univ_decl def_body ] |
| 734 |
| WITH "Canonical" OPT "Structure" ident_decl def_body |
| 735 |
| REPLACE "Canonical" OPT "Structure" by_notation |
| 736 |
| WITH "Canonical" OPT "Structure" smart_global |
| 737 |
|
| 738 |
| DELETE "Coercion" global ":" coercion_class ">->" coercion_class |
| 739 |
| REPLACE "Coercion" by_notation ":" coercion_class ">->" coercion_class |
| 740 |
| WITH "Coercion" smart_global OPT [ ":" coercion_class ">->" coercion_class ] |
| 741 |
|
| 742 |
(* semantically restricted per https://github.com/rocq-prover/rocq/pull/12936#discussion_r492705820 *) |
| 743 |
(* global OPT univ_decl is just ident_decl, the first OPT is moved to the rule above *) |
| 744 |
| REPLACE "Coercion" global OPT [ OPT univ_decl def_body ] |
| 745 |
| WITH "Coercion" ident_decl def_body |
| 746 |
|
| 747 |
| REPLACE "Include" "Type" module_type_inl LIST0 ext_module_type |
| 748 |
| WITH "Include" "Type" LIST1 module_type_inl SEP "<+" |
| 749 |
|
| 750 |
| REPLACE "Generalizable" [ "All" "Variables" | "No" "Variables" | [ "Variable" | "Variables" ] LIST1 identref ] |
| 751 |
| WITH "Generalizable" [ [ "Variable" | "Variables" ] LIST1 identref | "All" "Variables" | "No" "Variables" ] |
| 752 |
|
| 753 |
(* don't show Export for Set, Unset *) |
| 754 |
| DELETE "Export" "Set" setting_name option_setting |
| 755 |
| REPLACE "Export" "Unset" setting_name |
| 756 |
| WITH "Unset" setting_name |
| 757 |
| REPLACE "Instance" instance_name ":" term200 hint_info [ ":=" "{" record_declaration "}" | ":=" lconstr | ] |
| 758 |
| WITH "Instance" instance_name ":" type hint_info OPT [ ":=" "{" record_declaration "}" | ":=" lconstr ] |
| 759 |
|
| 760 |
| DELETE "Require" export_token LIST1 filtered_import |
| 761 |
| REPLACE "From" global "Require" export_token LIST1 filtered_import |
| 762 |
| WITH OPT [ "From" dirpath ] "Require" export_token LIST1 filtered_import |
| 763 |
|
| 764 |
| REPLACE "From" global "Extra" "Dependency" ne_string OPT [ "as" IDENT ] |
| 765 |
| WITH "From" dirpath "Extra" "Dependency" ne_string OPT [ "as" IDENT ] |
| 766 |
] |
| 767 |
|
| 768 |
export_token: [ |
| 769 |
| REPLACE "Import" OPT import_categories |
| 770 |
| WITH [ "Import" | "Export" ] OPT import_categories |
| 771 |
| DELETE "Export" OPT import_categories |
| 772 |
] |
| 773 |
|
| 774 |
(* lexer stuff *) |
| 775 |
LEFTQMARK: [ |
| 776 |
| "?" |
| 777 |
] |
| 778 |
|
| 779 |
digit: [ |
| 780 |
| "0" ".." "9" |
| 781 |
] |
| 782 |
|
| 783 |
decnat: [ |
| 784 |
| digit LIST0 [ digit | "_" ] |
| 785 |
] |
| 786 |
|
| 787 |
hexdigit: [ |
| 788 |
| [ "0" ".." "9" | "a" ".." "f" | "A" ".." "F" ] |
| 789 |
] |
| 790 |
|
| 791 |
hexnat: [ |
| 792 |
| [ "0x" | "0X" ] hexdigit LIST0 [ hexdigit | "_" ] |
| 793 |
] |
| 794 |
|
| 795 |
bignat: [ |
| 796 |
| REPLACE NUMBER |
| 797 |
| WITH [ decnat | hexnat ] |
| 798 |
] |
| 799 |
|
| 800 |
number: [ |
| 801 |
| OPT "-" decnat OPT ( "." LIST1 [ digit | "_" ] ) OPT ( [ "e" | "E" ] OPT [ "+" | "-" ] decnat ) |
| 802 |
| OPT "-" hexnat OPT ( "." LIST1 [ hexdigit | "_" ] ) OPT ( [ "p" | "P" ] OPT [ "+" | "-" ] decnat ) |
| 803 |
] |
| 804 |
|
| 805 |
bigint: [ |
| 806 |
| DELETE bignat |
| 807 |
| REPLACE test_minus_nat "-" bignat |
| 808 |
| WITH OPT "-" bignat |
| 809 |
] |
| 810 |
|
| 811 |
first_letter: [ |
| 812 |
| [ "a" ".." "z" | "A" ".." "Z" | "_" | unicode_letter ] |
| 813 |
] |
| 814 |
|
| 815 |
subsequent_letter: [ |
| 816 |
| [ first_letter | digit | "'" | unicode_id_part ] |
| 817 |
] |
| 818 |
|
| 819 |
ident: [ |
| 820 |
| DELETE IDENT |
| 821 |
| first_letter LIST0 subsequent_letter |
| 822 |
] |
| 823 |
|
| 824 |
NUMBER: [ |
| 825 |
| number |
| 826 |
] |
| 827 |
|
| 828 |
(* todo: QUOTATION only used in a test suite .mlg files, is it documented/useful? *) |
| 829 |
|
| 830 |
string: [ | DELETENT ] |
| 831 |
STRING: [ |
| 832 |
| string |
| 833 |
] |
| 834 |
|
| 835 |
|
| 836 |
(* todo: is "bigint" useful?? *) |
| 837 |
(* todo: "check_int" in g_prim.mlg should be "check_num" *) |
| 838 |
|
| 839 |
(* added productions *) |
| 840 |
|
| 841 |
command_entry: [ |
| 842 |
| noedit_mode |
| 843 |
] |
| 844 |
|
| 845 |
DELETE: [ |
| 846 |
| tactic_then_locality |
| 847 |
] |
| 848 |
|
| 849 |
ltac_constructs: [ |
| 850 |
(* repeated in main ltac grammar - need to create a COPY edit *) |
| 851 |
| ltac_expr4 ";" [ ltac_expr3 ] |
| 852 |
| ltac_expr4 ";" "[" for_each_goal "]" |
| 853 |
|
| 854 |
| ltac_expr1 "+" [ ltac_expr2 ] |
| 855 |
| ltac_expr1 "||" [ ltac_expr2 ] |
| 856 |
|
| 857 |
(* | qualid LIST0 tactic_value add later due renaming tactic_value *) |
| 858 |
|
| 859 |
| "[>" for_each_goal "]" |
| 860 |
| toplevel_selector ltac_expr5 |
| 861 |
] |
| 862 |
|
| 863 |
(* temporarily render left-associativity manually, see #21029 *) |
| 864 |
ltac_expr4: [ |
| 865 |
| REPLACE ltac_expr4 ";" for_each_goal "]" |
| 866 |
| WITH ltac_expr4 ";" "[" for_each_goal "]" |
| 867 |
] |
| 868 |
|
| 869 |
l3_tactic: [ ] |
| 870 |
|
| 871 |
ltac_expr3: [ |
| 872 |
| DELETE "abstract" ltac_expr2 |
| 873 |
| REPLACE "abstract" ltac_expr2 "using" ident |
| 874 |
| WITH "abstract" ltac_expr2 OPT ( "using" ident ) |
| 875 |
| l3_tactic |
| 876 |
| MOVEALLBUT ltac_builtins |
| 877 |
| l3_tactic |
| 878 |
| ltac_expr2 |
| 879 |
] |
| 880 |
|
| 881 |
l2_tactic: [ ] |
| 882 |
|
| 883 |
ltac_expr2: [ |
| 884 |
| MOVETO ltac_builtins "tryif" ltac_expr5 "then" ltac_expr5 "else" ltac_expr2 |
| 885 |
| l2_tactic |
| 886 |
| DELETE ltac_builtins |
| 887 |
] |
| 888 |
|
| 889 |
l1_tactic: [ ] |
| 890 |
|
| 891 |
ltac_expr1: [ |
| 892 |
| REPLACE "let" [ "rec" | ] LIST1 let_clause SEP "with" "in" ltac_expr5 |
| 893 |
| WITH "let" OPT "rec" let_clause LIST0 ( "with" let_clause ) "in" ltac_expr5 |
| 894 |
| EDIT match_key ADD_OPT "reverse" "goal" "with" match_context_list "end" |
| 895 |
| MOVETO simple_tactic match_key OPT "reverse" "goal" "with" match_context_list "end" |
| 896 |
| MOVETO simple_tactic match_key ltac_expr5 "with" match_list "end" |
| 897 |
| REPLACE failkw [ nat_or_var | ] LIST0 message_token |
| 898 |
| WITH failkw OPT nat_or_var LIST0 message_token |
| 899 |
| REPLACE reference LIST0 tactic_arg |
| 900 |
| WITH reference LIST1 tactic_arg |
| 901 |
| l1_tactic |
| 902 |
| DELETE simple_tactic |
| 903 |
| MOVEALLBUT ltac_builtins |
| 904 |
| l1_tactic |
| 905 |
| tactic_value |
| 906 |
| reference LIST1 tactic_arg |
| 907 |
| ltac_expr0 |
| 908 |
] |
| 909 |
|
| 910 |
(* split match_context_rule *) |
| 911 |
goal_pattern: [ |
| 912 |
| LIST0 match_hyp SEP "," "|-" match_pattern |
| 913 |
| "[" LIST0 match_hyp SEP "," "|-" match_pattern "]" |
| 914 |
| "_" |
| 915 |
] |
| 916 |
|
| 917 |
match_context_rule: [ |
| 918 |
| DELETE LIST0 match_hyp SEP "," "|-" match_pattern "=>" ltac_expr5 |
| 919 |
| DELETE "[" LIST0 match_hyp SEP "," "|-" match_pattern "]" "=>" ltac_expr5 |
| 920 |
| DELETE "_" "=>" ltac_expr5 |
| 921 |
| goal_pattern "=>" ltac_expr5 |
| 922 |
] |
| 923 |
|
| 924 |
match_context_list: [ |
| 925 |
| EDIT ADD_OPT "|" LIST1 match_context_rule SEP "|" |
| 926 |
] |
| 927 |
|
| 928 |
match_list: [ |
| 929 |
| EDIT ADD_OPT "|" LIST1 match_rule SEP "|" |
| 930 |
] |
| 931 |
|
| 932 |
match_rule: [ |
| 933 |
(* redundant; match_pattern -> term -> _ *) |
| 934 |
| DELETE "_" "=>" ltac_expr5 |
| 935 |
] |
| 936 |
|
| 937 |
firstorder_rhs: [ |
| 938 |
| firstorder_using |
| 939 |
| "with" LIST1 preident |
| 940 |
| firstorder_using "with" LIST1 preident |
| 941 |
] |
| 942 |
|
| 943 |
where: [ |
| 944 |
| "at" "top" |
| 945 |
| "at" "bottom" |
| 946 |
| "after" ident |
| 947 |
| "before" ident |
| 948 |
] |
| 949 |
|
| 950 |
simple_occurrences: [ |
| 951 |
(* placeholder (yuck) *) |
| 952 |
] |
| 953 |
|
| 954 |
simple_tactic: [ |
| 955 |
| REPLACE "assert" "(" identref ":" lconstr ")" by_tactic |
| 956 |
| WITH "assert" "(" identref ":" type ")" by_tactic |
| 957 |
| REPLACE "assert" constr as_ipat by_tactic |
| 958 |
| WITH "assert" one_type as_ipat by_tactic |
| 959 |
| REPLACE "eassert" "(" identref ":" lconstr ")" by_tactic |
| 960 |
| WITH "eassert" "(" identref ":" type ")" by_tactic |
| 961 |
| REPLACE "eassert" constr as_ipat by_tactic |
| 962 |
| WITH "eassert" one_type as_ipat by_tactic |
| 963 |
| REPLACE "cut" constr |
| 964 |
| WITH "cut" one_type |
| 965 |
| REPLACE "evar" constr |
| 966 |
| WITH "evar" one_type |
| 967 |
| REPLACE "absurd" constr |
| 968 |
| WITH "absurd" one_type |
| 969 |
| REPLACE "enough" "(" identref ":" lconstr ")" by_tactic |
| 970 |
| WITH "enough" "(" identref ":" type ")" by_tactic |
| 971 |
| REPLACE "enough" constr as_ipat by_tactic |
| 972 |
| WITH "enough" one_type as_ipat by_tactic |
| 973 |
| REPLACE "eenough" "(" identref ":" lconstr ")" by_tactic |
| 974 |
| WITH "eenough" "(" identref ":" type ")" by_tactic |
| 975 |
| REPLACE "eenough" constr as_ipat by_tactic |
| 976 |
| WITH "eenough" one_type as_ipat by_tactic |
| 977 |
| DELETE "autorewrite" "with" LIST1 preident clause |
| 978 |
| DELETE "autorewrite" "with" LIST1 preident clause "using" tactic |
| 979 |
| DELETE "autorewrite" "*" "with" LIST1 preident clause |
| 980 |
| REPLACE "autorewrite" "*" "with" LIST1 preident clause "using" tactic |
| 981 |
| WITH "autorewrite" OPT "*" "with" LIST1 preident clause OPT ( "using" tactic ) |
| 982 |
| REPLACE "autounfold" hintbases clause_dft_concl |
| 983 |
| WITH "autounfold" hintbases OPT simple_occurrences |
| 984 |
| REPLACE "red" clause_dft_concl |
| 985 |
| WITH "red" simple_occurrences |
| 986 |
| REPLACE "simpl" OPT "head" OPT delta_flag OPT ref_or_pattern_occ clause_dft_concl |
| 987 |
| WITH "simpl" OPT "head" OPT delta_flag OPT ref_or_pattern_occ simple_occurrences |
| 988 |
| REPLACE "hnf" clause_dft_concl |
| 989 |
| WITH "hnf" simple_occurrences |
| 990 |
| REPLACE "cbv" strategy_flag clause_dft_concl |
| 991 |
| WITH "cbv" strategy_flag simple_occurrences |
| 992 |
| REPLACE "compute" OPT delta_flag clause_dft_concl |
| 993 |
| WITH "compute" OPT delta_flag simple_occurrences |
| 994 |
| REPLACE "lazy" strategy_flag clause_dft_concl |
| 995 |
| WITH "lazy" strategy_flag simple_occurrences |
| 996 |
| REPLACE "cbn" strategy_flag clause_dft_concl |
| 997 |
| WITH "cbn" strategy_flag simple_occurrences |
| 998 |
| REPLACE "fold" LIST1 constr clause_dft_concl |
| 999 |
| WITH "fold" LIST1 constr simple_occurrences |
| 1000 |
| DELETE "clear" LIST0 hyp |
| 1001 |
| REPLACE "clear" "-" LIST1 hyp |
| 1002 |
| WITH "clear" OPT ( OPT "-" LIST1 hyp ) |
| 1003 |
| DELETE "cofix" ident |
| 1004 |
| REPLACE "cofix" ident "with" LIST1 cofixdecl |
| 1005 |
| WITH "cofix" ident OPT ( "with" LIST1 cofixdecl ) |
| 1006 |
| DELETE "constructor" |
| 1007 |
| DELETE "constructor" nat_or_var |
| 1008 |
| REPLACE "constructor" nat_or_var "with" bindings |
| 1009 |
| WITH "constructor" OPT nat_or_var OPT ( "with" bindings ) |
| 1010 |
| DELETE "econstructor" |
| 1011 |
| DELETE "econstructor" nat_or_var |
| 1012 |
| REPLACE "econstructor" nat_or_var "with" bindings |
| 1013 |
| WITH "econstructor" OPT ( nat_or_var OPT ( "with" bindings ) ) |
| 1014 |
| DELETE "dependent" [ "simple" "inversion" | "inversion" | "inversion_clear" ] quantified_hypothesis as_or_and_ipat OPT [ "with" constr ] |
| 1015 |
| "dependent" "inversion" quantified_hypothesis as_or_and_ipat OPT [ "with" constr ] |
| 1016 |
| "dependent" "simple" "inversion" quantified_hypothesis as_or_and_ipat OPT [ "with" constr ] |
| 1017 |
| "dependent" "inversion_clear" quantified_hypothesis as_or_and_ipat OPT [ "with" constr ] |
| 1018 |
| DELETE "dependent" "rewrite" orient constr |
| 1019 |
| REPLACE "dependent" "rewrite" orient constr "in" hyp |
| 1020 |
| WITH "dependent" "rewrite" orient constr OPT ( "in" hyp ) |
| 1021 |
| "firstorder" OPT tactic firstorder_rhs |
| 1022 |
| DELETE "firstorder" OPT tactic firstorder_using |
| 1023 |
| DELETE "firstorder" OPT tactic "with" LIST1 preident |
| 1024 |
| DELETE "firstorder" OPT tactic firstorder_using "with" LIST1 preident |
| 1025 |
| DELETE "fix" ident natural |
| 1026 |
| REPLACE "fix" ident natural "with" LIST1 fixdecl |
| 1027 |
| WITH "fix" ident natural OPT ( "with" LIST1 fixdecl ) |
| 1028 |
| DELETE "generalize" constr |
| 1029 |
| REPLACE "generalize" constr LIST1 constr |
| 1030 |
| WITH "generalize" LIST1 constr |
| 1031 |
| REPLACE "generalize" constr occs as_name LIST0 [ "," pattern_occ as_name ] |
| 1032 |
| WITH "generalize" LIST1 [ pattern_occ as_name ] SEP "," |
| 1033 |
| REPLACE "evar" "(" ident ":" lconstr ")" |
| 1034 |
| WITH "evar" "(" ident ":" type ")" |
| 1035 |
| EDIT "simplify_eq" ADD_OPT destruction_arg |
| 1036 |
| EDIT "esimplify_eq" ADD_OPT destruction_arg |
| 1037 |
| EDIT "discriminate" ADD_OPT destruction_arg |
| 1038 |
| EDIT "ediscriminate" ADD_OPT destruction_arg |
| 1039 |
| DELETE "injection" |
| 1040 |
| DELETE "injection" destruction_arg |
| 1041 |
| DELETE "injection" "as" LIST0 simple_intropattern |
| 1042 |
| REPLACE "injection" destruction_arg "as" LIST0 simple_intropattern |
| 1043 |
| WITH "injection" OPT destruction_arg OPT ( "as" LIST0 simple_intropattern ) |
| 1044 |
| DELETE "einjection" |
| 1045 |
| DELETE "einjection" destruction_arg |
| 1046 |
| DELETE "einjection" "as" LIST0 simple_intropattern |
| 1047 |
| REPLACE "einjection" destruction_arg "as" LIST0 simple_intropattern |
| 1048 |
| WITH "einjection" OPT destruction_arg OPT ( "as" LIST0 simple_intropattern ) |
| 1049 |
| EDIT "simple" "injection" ADD_OPT destruction_arg |
| 1050 |
| DELETE "intro" (* todo: change the mlg to simplify! *) |
| 1051 |
| DELETE "intro" ident |
| 1052 |
| DELETE "intro" ident "at" "top" |
| 1053 |
| DELETE "intro" ident "at" "bottom" |
| 1054 |
| DELETE "intro" ident "after" hyp |
| 1055 |
| DELETE "intro" ident "before" hyp |
| 1056 |
| DELETE "intro" "at" "top" |
| 1057 |
| DELETE "intro" "at" "bottom" |
| 1058 |
| DELETE "intro" "after" hyp |
| 1059 |
| DELETE "intro" "before" hyp |
| 1060 |
| "intro" OPT ident OPT where |
| 1061 |
| DELETE "intros" |
| 1062 |
| REPLACE "intros" ne_intropatterns |
| 1063 |
| WITH "intros" intropatterns |
| 1064 |
| DELETE "eintros" |
| 1065 |
| REPLACE "eintros" ne_intropatterns |
| 1066 |
| WITH "eintros" intropatterns |
| 1067 |
| DELETE "move" hyp "at" "top" |
| 1068 |
| DELETE "move" hyp "at" "bottom" |
| 1069 |
| DELETE "move" hyp "after" hyp |
| 1070 |
| DELETE "move" hyp "before" hyp |
| 1071 |
| "move" ident where |
| 1072 |
| REPLACE "refine" uconstr |
| 1073 |
| WITH OPT "simple" OPT "notypeclasses" "refine" uconstr |
| 1074 |
| DELETE "simple" "refine" uconstr |
| 1075 |
| DELETE "notypeclasses" "refine" uconstr |
| 1076 |
| DELETE "simple" "notypeclasses" "refine" uconstr |
| 1077 |
| DELETE "replace" "->" uconstr clause |
| 1078 |
| DELETE "replace" "<-" uconstr clause |
| 1079 |
| DELETE "replace" uconstr clause |
| 1080 |
| "replace" orient uconstr clause |
| 1081 |
| REPLACE "replace" uconstr "with" constr clause by_arg_tac |
| 1082 |
| WITH "replace" orient constr "with" constr clause OPT ( "by" ltac_expr3 ) |
| 1083 |
| DELETE "replace" "->" uconstr "with" constr clause by_arg_tac |
| 1084 |
| DELETE "replace" "<-" uconstr "with" constr clause by_arg_tac |
| 1085 |
| REPLACE "rewrite" "*" orient uconstr "in" hyp "at" occurrences by_arg_tac |
| 1086 |
| WITH "rewrite" "*" orient uconstr OPT ( "in" hyp ) OPT ( "at" occurrences ) by_arg_tac |
| 1087 |
| DELETE "rewrite" "*" orient uconstr "in" hyp by_arg_tac |
| 1088 |
| DELETE "rewrite" "*" orient uconstr "at" occurrences by_arg_tac |
| 1089 |
| DELETE "rewrite" "*" orient uconstr by_arg_tac |
| 1090 |
| DELETE "setoid_rewrite" orient glob_constr_with_bindings |
| 1091 |
| DELETE "setoid_rewrite" orient glob_constr_with_bindings "in" hyp |
| 1092 |
| DELETE "setoid_rewrite" orient glob_constr_with_bindings "at" occurrences |
| 1093 |
| REPLACE "setoid_rewrite" orient glob_constr_with_bindings "at" occurrences "in" hyp |
| 1094 |
| WITH "setoid_rewrite" orient glob_constr_with_bindings OPT ( "at" occurrences ) OPT ( "in" hyp ) |
| 1095 |
| REPLACE "stepl" constr "by" tactic |
| 1096 |
| WITH "stepl" constr OPT ( "by" tactic ) |
| 1097 |
| DELETE "stepl" constr |
| 1098 |
| REPLACE "stepr" constr "by" tactic |
| 1099 |
| WITH "stepr" constr OPT ( "by" tactic ) |
| 1100 |
| DELETE "stepr" constr |
| 1101 |
| DELETE "unify" constr constr |
| 1102 |
| REPLACE "unify" constr constr "with" preident |
| 1103 |
| WITH "unify" constr constr OPT ( "with" preident ) |
| 1104 |
| REPLACE "autounfold_one" hintbases "in" hyp |
| 1105 |
| WITH "autounfold_one" hintbases OPT ( "in" hyp ) |
| 1106 |
| DELETE "autounfold_one" hintbases |
| 1107 |
| REPLACE "rewrite_db" preident "in" hyp |
| 1108 |
| WITH "rewrite_db" preident OPT ( "in" hyp ) |
| 1109 |
| DELETE "rewrite_db" preident |
| 1110 |
| DELETE "setoid_symmetry" |
| 1111 |
| REPLACE "setoid_symmetry" "in" hyp |
| 1112 |
| WITH "setoid_symmetry" OPT ( "in" hyp ) |
| 1113 |
| REPLACE "rewrite_strat" rewstrategy "in" hyp |
| 1114 |
| WITH "rewrite_strat" rewstrategy OPT ( "in" hyp ) |
| 1115 |
| DELETE "rewrite_strat" rewstrategy |
| 1116 |
| REPLACE "protect_fv" string "in" ident |
| 1117 |
| WITH "protect_fv" string OPT ( "in" ident ) |
| 1118 |
| DELETE "protect_fv" string |
| 1119 |
| DELETE "symmetry" |
| 1120 |
| REPLACE "symmetry" "in" in_clause |
| 1121 |
| WITH "symmetry" OPT simple_occurrences |
| 1122 |
| DELETE "split" |
| 1123 |
| REPLACE "split" "with" bindings |
| 1124 |
| WITH "split" OPT ( "with" bindings ) |
| 1125 |
| DELETE "esplit" |
| 1126 |
| REPLACE "esplit" "with" bindings |
| 1127 |
| WITH "esplit" OPT ( "with" bindings ) |
| 1128 |
| DELETE "specialize" constr_with_bindings |
| 1129 |
| REPLACE "specialize" constr_with_bindings "as" simple_intropattern |
| 1130 |
| WITH "specialize" constr_with_bindings as_ipat |
| 1131 |
| DELETE "exists" |
| 1132 |
| REPLACE "exists" LIST1 bindings SEP "," |
| 1133 |
| WITH "exists" LIST0 bindings SEP "," |
| 1134 |
| DELETE "eexists" |
| 1135 |
| REPLACE "eexists" LIST1 bindings SEP "," |
| 1136 |
| WITH "eexists" LIST0 bindings SEP "," |
| 1137 |
| DELETE "left" |
| 1138 |
| REPLACE "left" "with" bindings |
| 1139 |
| WITH "left" OPT ( "with" bindings ) |
| 1140 |
| DELETE "eleft" |
| 1141 |
| REPLACE "eleft" "with" bindings |
| 1142 |
| WITH "eleft" OPT ( "with" bindings ) |
| 1143 |
| DELETE "right" |
| 1144 |
| REPLACE "right" "with" bindings |
| 1145 |
| WITH "right" OPT ( "with" bindings ) |
| 1146 |
| DELETE "eright" |
| 1147 |
| REPLACE "eright" "with" bindings |
| 1148 |
| WITH "eright" OPT ( "with" bindings ) |
| 1149 |
| DELETE "finish_timing" OPT string |
| 1150 |
| REPLACE "finish_timing" "(" string ")" OPT string |
| 1151 |
| WITH "finish_timing" OPT ( "(" string ")" ) OPT string |
| 1152 |
| REPLACE "subst" LIST1 hyp |
| 1153 |
| WITH "subst" LIST0 hyp |
| 1154 |
| DELETE "subst" |
| 1155 |
| DELETE "congruence" OPT natural |
| 1156 |
| REPLACE "congruence" OPT natural "with" LIST1 constr |
| 1157 |
| WITH "congruence" OPT natural OPT ( "with" LIST1 constr ) |
| 1158 |
| DELETE "simple" "congruence" OPT natural |
| 1159 |
| REPLACE "simple" "congruence" OPT natural "with" LIST1 constr |
| 1160 |
| WITH "simple" "congruence" OPT natural OPT ( "with" LIST1 constr ) |
| 1161 |
| DELETE "show" "ltac" "profile" |
| 1162 |
| REPLACE "show" "ltac" "profile" "cutoff" integer |
| 1163 |
| WITH "show" "ltac" "profile" OPT [ "cutoff" integer | string ] |
| 1164 |
| DELETE "show" "ltac" "profile" string |
| 1165 |
(* perversely, the mlg uses "tactic3" instead of "ltac_expr3" *) |
| 1166 |
| DELETE "transparent_abstract" tactic3 |
| 1167 |
| REPLACE "transparent_abstract" tactic3 "using" ident |
| 1168 |
| WITH "transparent_abstract" ltac_expr3 OPT ( "using" ident ) |
| 1169 |
| "typeclasses" "eauto" OPT [ "bfs" | "dfs" | "best_effort" ] OPT nat_or_var OPT ( "with" LIST1 preident ) |
| 1170 |
| DELETE "typeclasses" "eauto" "dfs" OPT nat_or_var "with" LIST1 preident |
| 1171 |
| DELETE "typeclasses" "eauto" "dfs" OPT nat_or_var |
| 1172 |
| DELETE "typeclasses" "eauto" "bfs" OPT nat_or_var "with" LIST1 preident |
| 1173 |
| DELETE "typeclasses" "eauto" "bfs" OPT nat_or_var |
| 1174 |
| DELETE "typeclasses" "eauto" "best_effort" OPT nat_or_var "with" LIST1 preident |
| 1175 |
| DELETE "typeclasses" "eauto" "best_effort" OPT nat_or_var |
| 1176 |
| DELETE "typeclasses" "eauto" OPT nat_or_var "with" LIST1 preident |
| 1177 |
| DELETE "typeclasses" "eauto" OPT nat_or_var |
| 1178 |
(* first/solve variants defined with register_list_tactical in coretactics.mlg *) |
| 1179 |
| "first" ident |
| 1180 |
| "solve" ident |
| 1181 |
(* in Tactic Notation: *) |
| 1182 |
| "setoid_replace" constr "with" constr OPT ( "using" "relation" constr ) OPT ( "in" hyp ) |
| 1183 |
OPT ( "at" LIST1 int_or_var ) OPT ( "by" ltac_expr3 ) |
| 1184 |
] |
| 1185 |
|
| 1186 |
(* todo: don't use DELETENT for this *) |
| 1187 |
ne_intropatterns: [ | DELETENT ] |
| 1188 |
|
| 1189 |
or_and_intropattern: [ |
| 1190 |
| REPLACE "[" LIST1 intropatterns SEP "|" "]" |
| 1191 |
| WITH "[" LIST0 (LIST0 intropattern) SEP "|" "]" |
| 1192 |
| DELETE "()" |
| 1193 |
| DELETE "(" simple_intropattern ")" |
| 1194 |
| REPLACE "(" simple_intropattern "," LIST1 simple_intropattern SEP "," ")" |
| 1195 |
| WITH "(" LIST0 simple_intropattern SEP "," ")" |
| 1196 |
(* makes the grammar a little ambiguous for "()" and "( simple_intropattern )" |
| 1197 |
but semantically doesn't matter *) |
| 1198 |
| REPLACE "(" simple_intropattern "&" LIST1 simple_intropattern SEP "&" ")" |
| 1199 |
| WITH "(" LIST0 simple_intropattern SEP "&" ")" |
| 1200 |
] |
| 1201 |
|
| 1202 |
equality_intropattern: [ |
| 1203 |
| REPLACE "[" "=" intropatterns "]" |
| 1204 |
| WITH "[=" intropatterns "]" |
| 1205 |
] |
| 1206 |
|
| 1207 |
bar_cbrace: [ |
| 1208 |
| REPLACE "|" "}" |
| 1209 |
| WITH "|}" |
| 1210 |
] |
| 1211 |
|
| 1212 |
printable: [ |
| 1213 |
| REPLACE "Scope" IDENT |
| 1214 |
| WITH "Scope" scope_name |
| 1215 |
| REPLACE "Visibility" OPT IDENT |
| 1216 |
| WITH "Visibility" OPT scope_name |
| 1217 |
| REPLACE [ "Sorted" | ] "Universes" OPT printunivs_subgraph OPT [ [ "With" | "Without" ] "Constraint" "Sources" ] OPT ne_string |
| 1218 |
| WITH OPT "Sorted" "Universes" OPT printunivs_subgraph OPT [ [ "With" | "Without" ] "Constraint" "Sources" ] OPT ne_string |
| 1219 |
| DELETE "Term" smart_global OPT univ_name_list (* readded in commands *) |
| 1220 |
| REPLACE "Hint" |
| 1221 |
| WITH "Hint" OPT [ "*" | smart_global ] |
| 1222 |
| DELETE "Hint" smart_global |
| 1223 |
| DELETE "Hint" "*" |
| 1224 |
| DELETE "Notation" string |
| 1225 |
| REPLACE "Notation" string "in" "custom" qualid |
| 1226 |
| WITH "Notation" string OPT [ "in" "custom" qualid ] |
| 1227 |
|
| 1228 |
| INSERTALL "Print" |
| 1229 |
] |
| 1230 |
|
| 1231 |
add_zify: [ |
| 1232 |
| [ "InjTyp" | "BinOp" | "UnOp" | "CstOp" | "BinRel" | "UnOpSpec" | "BinOpSpec" ] TAG Micromega |
| 1233 |
| [ "PropOp" | "PropBinOp" | "PropUOp" | "Saturate" ]TAG Micromega |
| 1234 |
] |
| 1235 |
|
| 1236 |
show_zify: [ |
| 1237 |
| [ "InjTyp" | "BinOp" | "UnOp" | "CstOp" | "BinRel" | "UnOpSpec" | "BinOpSpec" | "Spec" ] TAG Micromega |
| 1238 |
] |
| 1239 |
|
| 1240 |
command: [ |
| 1241 |
| REPLACE "Print" printable |
| 1242 |
| WITH printable |
| 1243 |
| REPLACE "Hint" hint opt_hintbases |
| 1244 |
| WITH hint |
| 1245 |
| "SubClass" ident_decl def_body |
| 1246 |
| REPLACE "Ltac" LIST1 ltac_tacdef_body SEP "with" |
| 1247 |
| WITH "Ltac" ltac_tacdef_body LIST0 ( "with" ltac_tacdef_body ) |
| 1248 |
| REPLACE "Function" LIST1 function_fix_definition SEP "with" (* funind plugin *) |
| 1249 |
| WITH "Function" function_fix_definition LIST0 ( "with" function_fix_definition ) (* funind plugin *) |
| 1250 |
| REPLACE "Functional" "Scheme" LIST1 fun_scheme_arg SEP "with" (* funind plugin *) |
| 1251 |
| WITH "Functional" "Scheme" fun_scheme_arg LIST0 ( "with" fun_scheme_arg ) (* funind plugin *) |
| 1252 |
| DELETE "Cd" |
| 1253 |
| REPLACE "Cd" ne_string |
| 1254 |
| WITH "Cd" OPT ne_string |
| 1255 |
| DELETE "Back" |
| 1256 |
| REPLACE "Back" natural |
| 1257 |
| WITH "Back" OPT natural |
| 1258 |
| REPLACE "Load" [ "Verbose" | ] [ ne_string | IDENT ] |
| 1259 |
| WITH "Load" OPT "Verbose" [ ne_string | IDENT ] |
| 1260 |
| DELETE "Unset" setting_name |
| 1261 |
| REPLACE "Test" setting_name "for" LIST1 table_value |
| 1262 |
| WITH "Test" setting_name OPT ( "for" LIST1 table_value ) |
| 1263 |
| DELETE "Test" setting_name |
| 1264 |
|
| 1265 |
(* hide the fact that table names are limited to 2 IDENTs *) |
| 1266 |
| REPLACE "Add" IDENT IDENT LIST1 table_value |
| 1267 |
| WITH "Add" setting_name LIST1 table_value |
| 1268 |
| DELETE "Add" IDENT LIST1 table_value |
| 1269 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "as" identref |
| 1270 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "as" identref |
| 1271 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1272 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1273 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "symmetry" "proved" "by" constr "as" identref |
| 1274 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1275 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "transitivity" "proved" "by" constr "as" identref |
| 1276 |
| DELETE "Add" "Parametric" "Relation" binders ":" constr constr "as" identref |
| 1277 |
| "Add" "Parametric" "Relation" binders ":" constr constr OPT ( "reflexivity" "proved" "by" constr ) OPT ( "symmetry" "proved" "by" constr ) OPT ("transitivity" "proved" "by" constr ) "as" identref |
| 1278 |
| DELETE "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "as" identref |
| 1279 |
| DELETE "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "as" identref |
| 1280 |
| DELETE "Add" "Relation" constr constr "as" identref |
| 1281 |
| DELETE "Add" "Relation" constr constr "symmetry" "proved" "by" constr "as" identref |
| 1282 |
| DELETE "Add" "Relation" constr constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1283 |
| DELETE "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1284 |
| DELETE "Add" "Relation" constr constr "reflexivity" "proved" "by" constr "symmetry" "proved" "by" constr "transitivity" "proved" "by" constr "as" identref |
| 1285 |
| DELETE "Add" "Relation" constr constr "transitivity" "proved" "by" constr "as" identref |
| 1286 |
| "Add" "Relation" constr constr OPT ( "reflexivity" "proved" "by" constr ) OPT ( "symmetry" "proved" "by" constr ) OPT ( "transitivity" "proved" "by" constr ) "as" identref |
| 1287 |
| REPLACE "Admit" "Obligations" "of" identref |
| 1288 |
| WITH "Admit" "Obligations" OPT ( "of" identref ) |
| 1289 |
| DELETE "Admit" "Obligations" |
| 1290 |
| REPLACE "Create" "HintDb" IDENT; [ "discriminated" | ] |
| 1291 |
| WITH "Create" "HintDb" IDENT; OPT "discriminated" |
| 1292 |
| DELETE "Debug" "On" |
| 1293 |
| REPLACE "Debug" "Off" |
| 1294 |
| WITH "Debug" [ "On" | "Off" ] |
| 1295 |
| EDIT "Defined" ADD_OPT identref |
| 1296 |
| REPLACE "Derive" "Inversion" identref "with" constr "Sort" sort_quality_or_set |
| 1297 |
| WITH "Derive" "Inversion" identref "with" constr OPT ( "Sort" sort_quality_or_set ) |
| 1298 |
| DELETE "Derive" "Inversion" identref "with" constr |
| 1299 |
| REPLACE "Derive" "Inversion_clear" identref "with" constr "Sort" sort_quality_or_set |
| 1300 |
| WITH "Derive" "Inversion_clear" identref "with" constr OPT ( "Sort" sort_quality_or_set ) |
| 1301 |
| DELETE "Derive" "Inversion_clear" identref "with" constr |
| 1302 |
| EDIT "Focus" ADD_OPT natural |
| 1303 |
| DELETE "Hint" "Rewrite" orient LIST1 constr ":" LIST1 preident |
| 1304 |
| REPLACE "Hint" "Rewrite" orient LIST1 constr "using" generic_tactic ":" LIST1 preident |
| 1305 |
| WITH "Hint" "Rewrite" orient LIST1 constr OPT ( "using" generic_tactic ) OPT ( ":" LIST1 preident ) |
| 1306 |
| DELETE "Hint" "Rewrite" orient LIST1 constr |
| 1307 |
| DELETE "Hint" "Rewrite" orient LIST1 constr "using" generic_tactic |
| 1308 |
| REPLACE "Next" "Obligation" "of" identref withtac |
| 1309 |
| WITH "Next" "Obligation" OPT ( "of" identref ) withtac |
| 1310 |
| DELETE "Next" "Obligation" withtac |
| 1311 |
| REPLACE "Final" "Obligation" "of" identref withtac |
| 1312 |
| WITH "Final" "Obligation" OPT ( "of" identref ) withtac |
| 1313 |
| DELETE "Final" "Obligation" withtac |
| 1314 |
| REPLACE "Obligation" natural "of" identref withtac |
| 1315 |
| WITH "Obligation" natural OPT ( "of" identref ) withtac |
| 1316 |
| DELETE "Obligation" natural withtac |
| 1317 |
| REPLACE "Obligations" "of" identref |
| 1318 |
| WITH "Obligations" OPT ( "of" identref ) |
| 1319 |
| DELETE "Obligations" |
| 1320 |
| REPLACE "Preterm" "of" identref |
| 1321 |
| WITH "Preterm" OPT ( "of" identref ) |
| 1322 |
| DELETE "Preterm" |
| 1323 |
| REPLACE "Proof" "using" section_var_expr "with" generic_tactic |
| 1324 |
| WITH "Proof" "using" section_subset_expr OPT [ "with" generic_tactic ] |
| 1325 |
| DELETE "Proof" "using" section_var_expr |
| 1326 |
|
| 1327 |
(* hide the fact that table names are limited to 2 IDENTs *) |
| 1328 |
| REPLACE "Remove" IDENT IDENT LIST1 table_value |
| 1329 |
| WITH "Remove" setting_name LIST1 table_value |
| 1330 |
| DELETE "Remove" IDENT LIST1 table_value |
| 1331 |
|
| 1332 |
(* hide special case command that looks like a "Set" command *) |
| 1333 |
| DELETE "Set" "Firstorder" "Solver" generic_tactic |
| 1334 |
|
| 1335 |
| DELETE "Show" |
| 1336 |
| DELETE "Show" natural |
| 1337 |
| DELETE "Show" qualid |
| 1338 |
| "Show" OPT [ qualid | natural ] |
| 1339 |
| DELETE "Show" "Ltac" "Profile" |
| 1340 |
| REPLACE "Show" "Ltac" "Profile" "CutOff" integer |
| 1341 |
| WITH "Show" "Ltac" "Profile" OPT [ "CutOff" integer | string ] |
| 1342 |
| DELETE "Show" "Ltac" "Profile" string |
| 1343 |
| DELETE "Show" "Proof" (* combined with Show Proof Diffs in vernac_toplevel *) |
| 1344 |
| REPLACE "Solve" "All" "Obligations" withtac |
| 1345 |
| WITH "Solve" "All" "Obligations" OPT ( "with" tactic ) |
| 1346 |
| REPLACE "Solve" "Obligations" "of" identref withtac |
| 1347 |
| WITH "Solve" "Obligations" OPT ( "of" identref ) OPT ( "with" tactic ) |
| 1348 |
| DELETE "Solve" "Obligations" withtac |
| 1349 |
| DELETE "Undo" |
| 1350 |
| DELETE "Undo" natural |
| 1351 |
| REPLACE "Undo" "To" natural |
| 1352 |
| WITH "Undo" OPT ( OPT "To" natural ) |
| 1353 |
| DELETE "Abort" "All" |
| 1354 |
| REPLACE "Abort" |
| 1355 |
| WITH "Abort" OPT [ "All" ] |
| 1356 |
|
| 1357 |
(* show the locate options as separate commands *) |
| 1358 |
| DELETE "Locate" locatable |
| 1359 |
| locatable |
| 1360 |
| REPLACE "Print" smart_global OPT univ_name_list |
| 1361 |
| WITH "Print" OPT "Term" smart_global OPT univ_name_list |
| 1362 |
|
| 1363 |
| REPLACE "Declare" "Scope" IDENT |
| 1364 |
| WITH "Declare" "Scope" scope_name |
| 1365 |
|
| 1366 |
| REPLACE "Derive" open_binders "SuchThat" constr "As" identref (* derive plugin *) |
| 1367 |
| WITH "Derive" open_binders "SuchThat" type "As" ident (* derive plugin *) |
| 1368 |
|
| 1369 |
| REPLACE "Derive" open_binders "in" constr "as" identref (* derive plugin *) |
| 1370 |
| WITH "Derive" open_binders "in" type "as" ident (* derive plugin *) |
| 1371 |
|
| 1372 |
(* odd that these are in command while other notation-related ones are in syntax *) |
| 1373 |
| REPLACE "Number" "Notation" reference reference reference OPT number_options ":" preident |
| 1374 |
| WITH "Number" "Notation" reference reference reference OPT number_options ":" scope_name |
| 1375 |
| REPLACE "String" "Notation" reference reference reference OPT string_option ":" preident |
| 1376 |
| WITH "String" "Notation" reference reference reference OPT string_option ":" scope_name |
| 1377 |
|
| 1378 |
| DELETE "Ltac2" ltac2_entry (* was split up *) |
| 1379 |
| DELETE "Add" "Zify" "InjTyp" reference (* micromega plugin *) |
| 1380 |
| DELETE "Add" "Zify" "BinOp" reference (* micromega plugin *) |
| 1381 |
| DELETE "Add" "Zify" "UnOp" reference (* micromega plugin *) |
| 1382 |
| DELETE "Add" "Zify" "CstOp" reference (* micromega plugin *) |
| 1383 |
| DELETE "Add" "Zify" "BinRel" reference (* micromega plugin *) |
| 1384 |
| DELETE "Add" "Zify" "PropOp" reference (* micromega plugin *) |
| 1385 |
| DELETE "Add" "Zify" "PropBinOp" reference (* micromega plugin *) |
| 1386 |
| DELETE "Add" "Zify" "PropUOp" reference (* micromega plugin *) |
| 1387 |
| DELETE "Add" "Zify" "BinOpSpec" reference (* micromega plugin *) |
| 1388 |
| DELETE "Add" "Zify" "UnOpSpec" reference (* micromega plugin *) |
| 1389 |
| DELETE "Add" "Zify" "Saturate" reference (* micromega plugin *) |
| 1390 |
| "Add" "Zify" add_zify reference TAG Micromega |
| 1391 |
|
| 1392 |
| DELETE "Show" "Zify" "InjTyp" (* micromega plugin *) |
| 1393 |
| DELETE "Show" "Zify" "BinOp" (* micromega plugin *) |
| 1394 |
| DELETE "Show" "Zify" "UnOp" (* micromega plugin *) |
| 1395 |
| DELETE "Show" "Zify" "CstOp" (* micromega plugin *) |
| 1396 |
| DELETE "Show" "Zify" "BinRel" (* micromega plugin *) |
| 1397 |
| DELETE "Show" "Zify" "UnOpSpec" (* micromega plugin *) |
| 1398 |
| DELETE "Show" "Zify" "BinOpSpec" (* micromega plugin *) |
| 1399 |
(* keep this one | "Show" "Zify" "Spec" (* micromega plugin *)*) |
| 1400 |
| "Show" "Zify" show_zify TAG Micromega |
| 1401 |
| REPLACE "Goal" lconstr |
| 1402 |
| WITH "Goal" type |
| 1403 |
] |
| 1404 |
|
| 1405 |
syntax: [ |
| 1406 |
| REPLACE "Open" "Scope" IDENT |
| 1407 |
| WITH "Open" "Scope" scope |
| 1408 |
| REPLACE "Close" "Scope" IDENT |
| 1409 |
| WITH "Close" "Scope" scope |
| 1410 |
| REPLACE "Delimit" "Scope" IDENT; "with" IDENT |
| 1411 |
| WITH "Delimit" "Scope" scope_name; "with" scope_key |
| 1412 |
| REPLACE "Undelimit" "Scope" IDENT |
| 1413 |
| WITH "Undelimit" "Scope" scope_name |
| 1414 |
| REPLACE "Bind" "Scope" IDENT; "with" LIST1 coercion_class |
| 1415 |
| WITH "Bind" "Scope" scope_name; "with" LIST1 coercion_class |
| 1416 |
] |
| 1417 |
|
| 1418 |
opt_scope: [ |
| 1419 |
| REPLACE ":" IDENT |
| 1420 |
| WITH ":" scope_name |
| 1421 |
] |
| 1422 |
|
| 1423 |
syntax_modifier: [ |
| 1424 |
| DELETE "in" "custom" qualid |
| 1425 |
| REPLACE "in" "custom" qualid; "at" "level" natural |
| 1426 |
| WITH "in" "custom" qualid OPT ( "at" "level" natural ) |
| 1427 |
| DELETE IDENT; "in" "scope" IDENT |
| 1428 |
| REPLACE IDENT; "," LIST1 IDENT SEP "," [ "at" level | "in" "scope" IDENT ] |
| 1429 |
| WITH LIST1 IDENT SEP "," [ "at" level | "in" "scope" IDENT ] |
| 1430 |
] |
| 1431 |
|
| 1432 |
explicit_subentry: [ |
| 1433 |
| REPLACE "strict" "pattern" "at" "level" natural |
| 1434 |
| WITH "strict" "pattern" OPT ( "at" "level" natural ) |
| 1435 |
| DELETE "strict" "pattern" |
| 1436 |
| DELETE "pattern" |
| 1437 |
| REPLACE "pattern" "at" "level" natural |
| 1438 |
| WITH "pattern" OPT ( "at" "level" natural ) |
| 1439 |
| DELETE "constr" (* covered by another prod *) |
| 1440 |
] |
| 1441 |
|
| 1442 |
field_body: [ |
| 1443 |
| REPLACE binders of_type_inst lconstr |
| 1444 |
| WITH binders of_type_inst |
| 1445 |
| REPLACE binders of_type_inst lconstr ":=" lconstr |
| 1446 |
| WITH binders of_type_inst ":=" lconstr |
| 1447 |
] |
| 1448 |
|
| 1449 |
assum_list: [ |
| 1450 |
| DELETE LIST1 assum_coe |
| 1451 |
| LIST1 assum_coe |
| 1452 |
] |
| 1453 |
|
| 1454 |
assumpt: [ |
| 1455 |
| REPLACE LIST1 ident_decl of_type lconstr |
| 1456 |
| WITH LIST1 ident_decl of_type |
| 1457 |
] |
| 1458 |
|
| 1459 |
constructor_type: [ |
| 1460 |
| REPLACE binders [ of_type_inst lconstr | ] |
| 1461 |
| WITH binders OPT of_type_inst |
| 1462 |
] |
| 1463 |
|
| 1464 |
(* todo: is this really correct? Search for "Pvernac.register_proof_mode" *) |
| 1465 |
(* consider tactic_command vs tac2mode *) |
| 1466 |
vernac_aux: [ |
| 1467 |
| tactic_mode "." |
| 1468 |
] |
| 1469 |
|
| 1470 |
def_token: [ |
| 1471 |
| DELETE "SubClass" (* document separately from Definition and Example *) |
| 1472 |
] |
| 1473 |
|
| 1474 |
assumption_token: [ |
| 1475 |
| REPLACE "Axiom" |
| 1476 |
| WITH [ "Axiom" | "Axioms" ] |
| 1477 |
| REPLACE "Conjecture" |
| 1478 |
| WITH [ "Conjecture" | "Conjectures" ] |
| 1479 |
| REPLACE "Hypothesis" |
| 1480 |
| WITH [ "Hypothesis" | "Hypotheses" ] |
| 1481 |
| REPLACE "Parameter" |
| 1482 |
| WITH [ "Parameter" | "Parameters" ] |
| 1483 |
| REPLACE "Variable" |
| 1484 |
| WITH [ "Variable" | "Variables" ] |
| 1485 |
] |
| 1486 |
|
| 1487 |
attributes: [ |
| 1488 |
| LIST0 ( "#[" LIST0 attribute SEP "," "]" ) LIST0 legacy_attr |
| 1489 |
] |
| 1490 |
|
| 1491 |
legacy_attr: [ |
| 1492 |
| REPLACE "Local" |
| 1493 |
| WITH [ "Local" | "Global" ] |
| 1494 |
| DELETE "Global" |
| 1495 |
| REPLACE "Polymorphic" |
| 1496 |
| WITH [ "Polymorphic" | "Monomorphic" ] |
| 1497 |
| DELETE "Monomorphic" |
| 1498 |
| REPLACE "Cumulative" |
| 1499 |
| WITH [ "Cumulative" | "NonCumulative" ] |
| 1500 |
| DELETE "NonCumulative" |
| 1501 |
] |
| 1502 |
|
| 1503 |
sentence: [ ] (* productions defined below *) |
| 1504 |
|
| 1505 |
fix_definition: [ |
| 1506 |
| REPLACE ident_decl binders_fixannot type_cstr OPT [ ":=" lconstr ] decl_notations |
| 1507 |
| WITH ident_decl binders_fixannot type_cstr OPT [ ":=" lconstr ] decl_notations |
| 1508 |
] |
| 1509 |
|
| 1510 |
cofix_definition: [ |
| 1511 |
| REPLACE ident_decl binders type_cstr OPT [ ":=" lconstr ] decl_notations |
| 1512 |
| WITH ident_decl binders type_cstr OPT [ ":=" lconstr ] decl_notations |
| 1513 |
] |
| 1514 |
|
| 1515 |
type_cstr: [ |
| 1516 |
| REPLACE ":" lconstr |
| 1517 |
| WITH ":" type |
| 1518 |
] |
| 1519 |
|
| 1520 |
record_binder: [ |
| 1521 |
| REPLACE name field_body |
| 1522 |
| WITH name OPT field_body |
| 1523 |
| DELETE name |
| 1524 |
] |
| 1525 |
|
| 1526 |
query_command: [ |
| 1527 |
| REPLACE "Eval" red_expr "in" lconstr "." |
| 1528 |
| WITH "Eval" red_expr "in" lconstr |
| 1529 |
| REPLACE "Compute" lconstr "." |
| 1530 |
| WITH "Compute" lconstr |
| 1531 |
| REPLACE "Check" lconstr "." |
| 1532 |
| WITH "Check" lconstr |
| 1533 |
| REPLACE "About" smart_global OPT univ_name_list "." |
| 1534 |
| WITH "About" smart_global OPT univ_name_list |
| 1535 |
| REPLACE "SearchPattern" constr_pattern in_or_out_modules "." |
| 1536 |
| WITH "SearchPattern" constr_pattern in_or_out_modules |
| 1537 |
| REPLACE "SearchRewrite" constr_pattern in_or_out_modules "." |
| 1538 |
| WITH "SearchRewrite" constr_pattern in_or_out_modules |
| 1539 |
| REPLACE "Search" search_query search_queries "." |
| 1540 |
| WITH "Search" search_queries |
| 1541 |
] |
| 1542 |
|
| 1543 |
vernac_toplevel: [ |
| 1544 |
(* note these commands can't be referenced by vernac_control commands *) |
| 1545 |
| REPLACE "Drop" "." |
| 1546 |
| WITH "Drop" |
| 1547 |
| REPLACE "Quit" "." |
| 1548 |
| WITH "Quit" |
| 1549 |
| REPLACE "BackTo" natural "." |
| 1550 |
| WITH "BackTo" natural |
| 1551 |
| REPLACE "Show" "Goal" natural "at" natural "." |
| 1552 |
| WITH "Show" "Goal" natural "at" natural |
| 1553 |
| REPLACE "Show" "Proof" "Diffs" OPT "removed" "." |
| 1554 |
| WITH "Show" "Proof" OPT ( "Diffs" OPT "removed" ) |
| 1555 |
| DELETE vernac_control |
| 1556 |
| DELETE "Show" "." |
| 1557 |
| DELETE "Show" natural "." |
| 1558 |
| REPLACE "Show" "Diffs" qualid "." |
| 1559 |
| WITH "Show" "Diffs" ident |
| 1560 |
] |
| 1561 |
|
| 1562 |
(* Pretend that control flags are commands *) |
| 1563 |
control_flag: [ |
| 1564 |
(* using sentence is cheating a little; |
| 1565 |
after a control_flag can't refer to the vernac_toplevel commands. |
| 1566 |
cover this in the descriptions of these commands *) |
| 1567 |
| REPLACE "Time" |
| 1568 |
| WITH "Time" sentence |
| 1569 |
| REPLACE "Instructions" |
| 1570 |
| WITH "Instructions" sentence |
| 1571 |
| REPLACE "Profile" OPT STRING |
| 1572 |
| WITH "Profile" OPT STRING sentence |
| 1573 |
| REPLACE "Redirect" ne_string |
| 1574 |
| WITH "Redirect" ne_string sentence |
| 1575 |
| REPLACE "Timeout" natural |
| 1576 |
| WITH "Timeout" natural sentence |
| 1577 |
| REPLACE "Fail" |
| 1578 |
| WITH "Fail" sentence |
| 1579 |
| REPLACE "Succeed" |
| 1580 |
| WITH "Succeed" sentence |
| 1581 |
] |
| 1582 |
|
| 1583 |
vernac_control: [ |
| 1584 |
| DELETE LIST0 control_flag decorated_vernac |
| 1585 |
| control_flag |
| 1586 |
] |
| 1587 |
|
| 1588 |
of_module_type: [ |
| 1589 |
| (* empty *) |
| 1590 |
] |
| 1591 |
|
| 1592 |
rewriter: [ |
| 1593 |
| DELETE "!" constr_with_bindings_arg |
| 1594 |
| DELETE [ "?" | LEFTQMARK ] constr_with_bindings_arg |
| 1595 |
| DELETE natural "!" constr_with_bindings_arg |
| 1596 |
| DELETE natural [ "?" | LEFTQMARK ] constr_with_bindings_arg |
| 1597 |
| DELETE natural constr_with_bindings_arg |
| 1598 |
| DELETE constr_with_bindings_arg |
| 1599 |
| OPT natural OPT [ "?" | "!" ] constr_with_bindings_arg |
| 1600 |
] |
| 1601 |
|
| 1602 |
ltac2_rewriter: [ |
| 1603 |
| DELETE "!" ltac2_constr_with_bindings (* Ltac2 plugin *) |
| 1604 |
| DELETE [ "?" | LEFTQMARK ] ltac2_constr_with_bindings |
| 1605 |
| DELETE lnatural "!" ltac2_constr_with_bindings (* Ltac2 plugin *) |
| 1606 |
| DELETE lnatural [ "?" | LEFTQMARK ] ltac2_constr_with_bindings |
| 1607 |
| DELETE lnatural ltac2_constr_with_bindings (* Ltac2 plugin *) |
| 1608 |
| DELETE ltac2_constr_with_bindings (* Ltac2 plugin *) |
| 1609 |
| OPT natural OPT [ "?" | "!" ] ltac2_constr_with_bindings |
| 1610 |
] |
| 1611 |
|
| 1612 |
ltac2_expr0: [ |
| 1613 |
| DELETE "(" ")" |
| 1614 |
] |
| 1615 |
|
| 1616 |
tac2type_body: [ |
| 1617 |
| REPLACE ":=" tac2typ_knd (* Ltac2 plugin *) |
| 1618 |
| WITH [ ":=" | "::=" ] tac2typ_knd TAG Ltac2 |
| 1619 |
| DELETE "::=" tac2typ_knd (* Ltac2 plugin *) |
| 1620 |
] |
| 1621 |
|
| 1622 |
record_declaration: [ |
| 1623 |
| DELETE fields_def |
| 1624 |
| LIST0 field_def |
| 1625 |
] |
| 1626 |
|
| 1627 |
fields_def: [ | DELETENT ] |
| 1628 |
|
| 1629 |
scheme: [ |
| 1630 |
| DELETE scheme_kind |
| 1631 |
| REPLACE identref ":=" scheme_kind |
| 1632 |
| WITH OPT ( identref ":=" ) scheme_kind |
| 1633 |
] |
| 1634 |
|
| 1635 |
simple_reserv: [ |
| 1636 |
| REPLACE LIST1 identref ":" lconstr |
| 1637 |
| WITH LIST1 identref ":" type |
| 1638 |
] |
| 1639 |
|
| 1640 |
in_clause: [ |
| 1641 |
| DELETE in_clause' |
| 1642 |
| REPLACE LIST1 hypident_occ SEP "," "|-" concl_occ |
| 1643 |
| WITH LIST1 hypident_occ SEP "," OPT ( "|-" concl_occ ) |
| 1644 |
| DELETE LIST1 hypident_occ SEP "," |
| 1645 |
| REPLACE "*" occs |
| 1646 |
| WITH concl_occ |
| 1647 |
(* todo: perhaps concl_occ should be "*" | "at" occs_nums *) |
| 1648 |
] |
| 1649 |
|
| 1650 |
ltac2_in_clause: [ |
| 1651 |
| REPLACE LIST0 ltac2_hypident_occ SEP "," "|-" ltac2_concl_occ (* Ltac2 plugin *) |
| 1652 |
| WITH LIST0 ltac2_hypident_occ SEP "," OPT ( "|-" ltac2_concl_occ ) TAG Ltac2 |
| 1653 |
| DELETE LIST0 ltac2_hypident_occ SEP "," (* Ltac2 plugin *) |
| 1654 |
] |
| 1655 |
|
| 1656 |
decl_notations: [ |
| 1657 |
| REPLACE "where" LIST1 notation_declaration SEP decl_sep |
| 1658 |
| WITH "where" notation_declaration LIST0 (decl_sep notation_declaration ) |
| 1659 |
] |
| 1660 |
|
| 1661 |
module_expr: [ |
| 1662 |
| REPLACE module_expr_atom |
| 1663 |
| WITH LIST1 module_expr_atom |
| 1664 |
| DELETE module_expr module_expr_atom |
| 1665 |
] |
| 1666 |
|
| 1667 |
locatable: [ |
| 1668 |
| INSERTALL "Locate" |
| 1669 |
] |
| 1670 |
|
| 1671 |
ne_in_or_out_modules: [ |
| 1672 |
| REPLACE "inside" LIST1 global |
| 1673 |
| WITH [ "inside" | "in" | "outside" ] LIST1 global |
| 1674 |
| DELETE "in" LIST1 global |
| 1675 |
| DELETE "outside" LIST1 global |
| 1676 |
] |
| 1677 |
|
| 1678 |
search_queries: [ |
| 1679 |
| DELETE ne_in_or_out_modules |
| 1680 |
| REPLACE search_query search_queries |
| 1681 |
| WITH LIST1 ( search_query ) OPT ne_in_or_out_modules |
| 1682 |
| DELETE (* empty *) |
| 1683 |
] |
| 1684 |
|
| 1685 |
positive_search_mark: [ |
| 1686 |
| OPTINREF |
| 1687 |
] |
| 1688 |
|
| 1689 |
SPLICE: [ |
| 1690 |
| positive_search_mark |
| 1691 |
] |
| 1692 |
|
| 1693 |
search_query: [ |
| 1694 |
| REPLACE OPT "-" search_item |
| 1695 |
| WITH search_item |
| 1696 |
| "-" search_query |
| 1697 |
| REPLACE OPT "-" "[" LIST1 ( LIST1 search_query ) SEP "|" "]" |
| 1698 |
| WITH "[" LIST1 ( LIST1 search_query ) SEP "|" "]" |
| 1699 |
] |
| 1700 |
|
| 1701 |
search_item: [ |
| 1702 |
| REPLACE search_where ":" ne_string OPT scope_delimiter |
| 1703 |
| WITH OPT ( search_where ":" ) ne_string OPT ( "%" scope_key ) |
| 1704 |
| DELETE ne_string OPT scope_delimiter |
| 1705 |
| REPLACE search_where ":" constr_pattern |
| 1706 |
| WITH OPT ( search_where ":" ) constr_pattern |
| 1707 |
| DELETE constr_pattern |
| 1708 |
] |
| 1709 |
|
| 1710 |
by_notation: [ |
| 1711 |
| REPLACE ne_string OPT [ "%" IDENT ] |
| 1712 |
| WITH ne_string OPT [ "%" scope_key ] |
| 1713 |
] |
| 1714 |
|
| 1715 |
notation_declaration: [ |
| 1716 |
| REPLACE lstring ":=" constr syntax_modifiers OPT [ ":" IDENT ] |
| 1717 |
| WITH lstring ":=" constr syntax_modifiers OPT [ ":" scope_name ] |
| 1718 |
] |
| 1719 |
|
| 1720 |
ltac_production_item: [ |
| 1721 |
| REPLACE ident "(" ident OPT ltac_production_sep ")" |
| 1722 |
| WITH ident OPT ( "(" ident OPT ltac_production_sep ")" ) |
| 1723 |
| DELETE ident |
| 1724 |
] |
| 1725 |
|
| 1726 |
input_fun: [ |
| 1727 |
| DELETE ident |
| 1728 |
| DELETE "_" |
| 1729 |
| name |
| 1730 |
] |
| 1731 |
|
| 1732 |
let_clause: [ |
| 1733 |
| DELETE identref ":=" ltac_expr5 |
| 1734 |
| REPLACE "_" ":=" ltac_expr5 |
| 1735 |
| WITH name ":=" ltac_expr5 |
| 1736 |
] |
| 1737 |
|
| 1738 |
subprf_with_selector: [ |
| 1739 |
| DELETE query_command |
| 1740 |
] |
| 1741 |
|
| 1742 |
SPLICE: [ |
| 1743 |
| subprf_with_selector |
| 1744 |
] |
| 1745 |
|
| 1746 |
tactic_mode: [ |
| 1747 |
(* todo: make sure to document this production! *) |
| 1748 |
(* deleting to allow splicing query_command into command *) |
| 1749 |
| DELETE OPT ltac_selector OPT ltac_info tactic ltac_use_default |
| 1750 |
| DELETE "par" ":" OPT ltac_info tactic "." |
| 1751 |
(* Ignore attributes (none apply) and "...". *) |
| 1752 |
| ltac_info tactic |
| 1753 |
| MOVETO command ltac_info tactic |
| 1754 |
| MOVETO simple_tactic subprf |
| 1755 |
| REPLACE OPT toplevel_selector "{" |
| 1756 |
(* semantically restricted *) |
| 1757 |
| WITH OPT ( [ natural | "[" fullyqualid "]" ] ":" ) "{" |
| 1758 |
| MOVETO simple_tactic OPT ( [ natural | "[" fullyqualid "]" ] ":" ) "{" |
| 1759 |
| DELETE command |
| 1760 |
| DELETENT |
| 1761 |
] |
| 1762 |
|
| 1763 |
SPLICE: [ |
| 1764 |
| subprf |
| 1765 |
] |
| 1766 |
|
| 1767 |
ltac2_syntax_class: [ |
| 1768 |
| REPLACE syn_node (* Ltac2 plugin *) |
| 1769 |
| WITH name TAG Ltac2 |
| 1770 |
| REPLACE syn_node "(" LIST1 ltac2_syntax_class SEP "," ")" (* Ltac2 plugin *) |
| 1771 |
| WITH name "(" LIST1 ltac2_syntax_class SEP "," ")" TAG Ltac2 |
| 1772 |
] |
| 1773 |
|
| 1774 |
tac2mode: [ |
| 1775 |
| DELETENT |
| 1776 |
] |
| 1777 |
|
| 1778 |
(* not sure how this is used *) |
| 1779 |
tac2expr_in_env: [ |
| 1780 |
| DELETENT |
| 1781 |
] |
| 1782 |
|
| 1783 |
syn_node: [ | DELETENT ] |
| 1784 |
|
| 1785 |
RENAME: [ |
| 1786 |
| toplevel_selector toplevel_selector_temp |
| 1787 |
] |
| 1788 |
|
| 1789 |
toplevel_selector: [ |
| 1790 |
| goal_selector |
| 1791 |
| "all" |
| 1792 |
| "!" |
| 1793 |
(* par is accepted even though it's not in the .mlg *) |
| 1794 |
| "par" |
| 1795 |
] |
| 1796 |
|
| 1797 |
toplevel_selector_temp: [ |
| 1798 |
| DELETE goal_selector ":" |
| 1799 |
| DELETE "all" ":" |
| 1800 |
| DELETE "!" ":" |
| 1801 |
| toplevel_selector ":" |
| 1802 |
] |
| 1803 |
|
| 1804 |
(* not included in insertprodn; defined in rst with :production: *) |
| 1805 |
control_command: [ ] |
| 1806 |
|
| 1807 |
(* move all commands under "command" *) |
| 1808 |
|
| 1809 |
vernac_aux: [ |
| 1810 |
| DELETE gallina "." |
| 1811 |
| DELETE gallina_ext "." |
| 1812 |
| DELETE syntax "." |
| 1813 |
| DELETE command_entry |
| 1814 |
| DELETENT |
| 1815 |
] |
| 1816 |
|
| 1817 |
command: [ |
| 1818 |
| gallina |
| 1819 |
| gallina_ext |
| 1820 |
| syntax |
| 1821 |
| query_command |
| 1822 |
| vernac_control |
| 1823 |
| vernac_toplevel |
| 1824 |
] |
| 1825 |
|
| 1826 |
SPLICE: [ |
| 1827 |
| query_command |
| 1828 |
| control_flag |
| 1829 |
] |
| 1830 |
|
| 1831 |
query_command: [ ] (* re-add as a placeholder *) |
| 1832 |
|
| 1833 |
sentence: [ |
| 1834 |
| OPT attributes command "." |
| 1835 |
| OPT attributes OPT ( natural ":" ) query_command "." |
| 1836 |
| OPT attributes OPT ( toplevel_selector ":" ) ltac_expr5 [ "." | "..." ] |
| 1837 |
| control_command |
| 1838 |
] |
| 1839 |
|
| 1840 |
document: [ |
| 1841 |
| LIST0 sentence |
| 1842 |
] |
| 1843 |
|
| 1844 |
(* add in ltac and Tactic Notation tactics that appear in the doc: *) |
| 1845 |
ltac_defined_tactics: [ |
| 1846 |
| "case_eq" constr |
| 1847 |
(* | "case_eq" induction_clause_list ??? *) |
| 1848 |
| "classical_left" |
| 1849 |
| "classical_right" |
| 1850 |
| "contradict" ident |
| 1851 |
| "easy" |
| 1852 |
| "inversion_sigma" OPT ( ident OPT ( "as" simple_intropattern ) ) |
| 1853 |
| "lia" |
| 1854 |
| "lra" |
| 1855 |
| "nia" |
| 1856 |
| "now_show" one_type |
| 1857 |
| "nra" |
| 1858 |
| "rapply" constr |
| 1859 |
| "tauto" |
| 1860 |
| "time_constr" ltac_expr5 |
| 1861 |
| "zify" |
| 1862 |
] |
| 1863 |
|
| 1864 |
(* todo: need careful review; assume that "[" ... "]" are literals *) |
| 1865 |
tactic_notation_tactics: [ |
| 1866 |
| "assert_fails" ltac_expr3 |
| 1867 |
| "clear" "dependent" hyp |
| 1868 |
| "decide" constr "with" constr |
| 1869 |
| "dependent" "destruction" ident OPT ( "generalizing" LIST1 hyp ) OPT ( "using" constr ) |
| 1870 |
| "dependent" "induction" ident OPT ( [ "generalizing" | "in" ] LIST1 hyp ) OPT ( "using" constr ) |
| 1871 |
| "dintuition" OPT ltac_expr5 |
| 1872 |
| "dtauto" |
| 1873 |
| "field" OPT ( "[" LIST1 constr "]" ) |
| 1874 |
| "field_simplify" OPT ( "[" LIST1 constr "]" ) LIST1 constr OPT ( "in" ident ) |
| 1875 |
| "field_simplify_eq" OPT ( "[" LIST1 constr "]" ) OPT ( "in" ident ) |
| 1876 |
| "intuition" OPT ltac_expr5 (* todo: Not too keen on things like "with_power_flags" in tauto.ml, not easy to follow *) |
| 1877 |
| "now" ltac_expr5 |
| 1878 |
| "nsatz" OPT ( "with" "radicalmax" ":=" constr "strategy" ":=" constr "parameters" ":=" constr "variables" ":=" constr ) |
| 1879 |
| "ensatz" OPT ( "with" "strategy" ":=" constr ) |
| 1880 |
| "psatz" constr OPT nat_or_var |
| 1881 |
| "revert" "dependent" hyp |
| 1882 |
| "ring" OPT ( "[" LIST1 constr "]" ) |
| 1883 |
| "ring_simplify" OPT ( "[" LIST1 constr "]" ) LIST1 constr OPT ( "in" ident ) (* todo: ident was "hyp", worth keeping? *) |
| 1884 |
] |
| 1885 |
|
| 1886 |
(* defined in OCaml outside of mlgs *) |
| 1887 |
tactic_value: [ |
| 1888 |
| MOVEALLBUT simple_tactic |
| 1889 |
] |
| 1890 |
|
| 1891 |
nonterminal: [ ] |
| 1892 |
|
| 1893 |
value_tactic: [ ] |
| 1894 |
|
| 1895 |
syn_value: [ |
| 1896 |
| IDENT; ":" "(" nonterminal ")" |
| 1897 |
] |
| 1898 |
|
| 1899 |
tactic_value: [ |
| 1900 |
| [ value_tactic | syn_value ] |
| 1901 |
] |
| 1902 |
|
| 1903 |
|
| 1904 |
(* defined in Ltac2/Notations.v *) |
| 1905 |
|
| 1906 |
ltac2_match_key: [ |
| 1907 |
| "lazy_match!" |
| 1908 |
| "match!" |
| 1909 |
| "multi_match!" |
| 1910 |
] |
| 1911 |
|
| 1912 |
ltac2_constructs: [ |
| 1913 |
| ltac2_match_key ltac2_expr6 "with" ltac2_match_list "end" |
| 1914 |
| ltac2_match_key OPT "reverse" "goal" "with" goal_match_list "end" |
| 1915 |
] |
| 1916 |
|
| 1917 |
simple_tactic: [ |
| 1918 |
| ltac_builtins |
| 1919 |
| ltac_constructs |
| 1920 |
| ltac2_constructs |
| 1921 |
| ltac_defined_tactics |
| 1922 |
| tactic_notation_tactics |
| 1923 |
] |
| 1924 |
|
| 1925 |
tacdef_body: [ |
| 1926 |
| REPLACE global LIST1 input_fun ltac_def_kind ltac_expr5 |
| 1927 |
| WITH global LIST0 input_fun ltac_def_kind ltac_expr5 |
| 1928 |
| DELETE global ltac_def_kind ltac_expr5 |
| 1929 |
] |
| 1930 |
|
| 1931 |
tac2def_typ: [ |
| 1932 |
| REPLACE "Type" rec_flag LIST1 tac2typ_def SEP "with" (* Ltac2 plugin *) |
| 1933 |
| WITH "Type" rec_flag tac2typ_def LIST0 ( "with" tac2typ_def ) TAG Ltac2 |
| 1934 |
] |
| 1935 |
|
| 1936 |
tac2def_val: [ |
| 1937 |
| REPLACE mut_flag rec_flag LIST1 tac2def_body SEP "with" (* Ltac2 plugin *) |
| 1938 |
| WITH mut_flag rec_flag tac2def_body LIST0 ( "with" tac2def_body ) TAG Ltac1 |
| 1939 |
] |
| 1940 |
|
| 1941 |
tac2alg_constructors: [ |
| 1942 |
| REPLACE "|" LIST1 tac2alg_constructor SEP "|" (* Ltac2 plugin *) |
| 1943 |
| WITH OPT "|" LIST1 tac2alg_constructor SEP "|" TAG Ltac2 |
| 1944 |
| DELETE LIST0 tac2alg_constructor SEP "|" (* Ltac2 plugin *) |
| 1945 |
| (* empty *) |
| 1946 |
| OPTINREF |
| 1947 |
] |
| 1948 |
|
| 1949 |
SPLICE: [ |
| 1950 |
| def_token |
| 1951 |
| extended_def_token |
| 1952 |
] |
| 1953 |
|
| 1954 |
logical_kind: [ |
| 1955 |
| DELETE thm_token |
| 1956 |
| DELETE assumption_token |
| 1957 |
| [ thm_token | assumption_token ] |
| 1958 |
| DELETE "Definition" |
| 1959 |
| DELETE "Example" |
| 1960 |
| DELETE "Context" |
| 1961 |
| DELETE "Primitive" |
| 1962 |
| DELETE "Symbol" |
| 1963 |
(* SubClass was deleted from def_token *) |
| 1964 |
| [ "Definition" | "Example" | "Context" | "Primitive" | "Symbol" ] |
| 1965 |
| DELETE "Coercion" |
| 1966 |
| DELETE "Instance" |
| 1967 |
| DELETE "Scheme" |
| 1968 |
| DELETE "Canonical" |
| 1969 |
| [ "Coercion" | "Instance" | "Scheme" | "Canonical" | "SubClass" ] |
| 1970 |
| DELETE "Fixpoint" |
| 1971 |
| DELETE "CoFixpoint" |
| 1972 |
| DELETE "Field" |
| 1973 |
| DELETE "Method" |
| 1974 |
| [ "Fixpoint" | "CoFixpoint" | "Field" | "Method" ] |
| 1975 |
] |
| 1976 |
|
| 1977 |
(* ltac2 *) |
| 1978 |
|
| 1979 |
DELETE: [ |
| 1980 |
| test_ltac1_env |
| 1981 |
] |
| 1982 |
|
| 1983 |
rec_flag: [ |
| 1984 |
| OPTINREF |
| 1985 |
] |
| 1986 |
|
| 1987 |
q_orient: [ |
| 1988 |
| DELETE "<-" |
| 1989 |
| REPLACE "->" |
| 1990 |
| WITH OPT ["->" | "<-"] |
| 1991 |
] |
| 1992 |
|
| 1993 |
(* todo: should |
| 1994 |
| tac2pat1 "," LIST0 tac2pat1 SEP "," |
| 1995 |
use LIST1? *) |
| 1996 |
|
| 1997 |
SPLICE: [ |
| 1998 |
| ltac2_expr4 |
| 1999 |
] |
| 2000 |
|
| 2001 |
ltac2_expr3: [ |
| 2002 |
| REPLACE ltac2_expr2 "," LIST1 ltac2_expr2 SEP "," (* Ltac2 plugin *) |
| 2003 |
| WITH LIST1 ltac2_expr2 SEP "," TAG Ltac2 |
| 2004 |
| DELETE ltac2_expr2 (* Ltac2 plugin *) |
| 2005 |
] |
| 2006 |
|
| 2007 |
tac2rec_fieldexprs: [ |
| 2008 |
| DELETE tac2rec_fieldexpr ";" tac2rec_fieldexprs |
| 2009 |
| DELETE tac2rec_fieldexpr ";" |
| 2010 |
| DELETE tac2rec_fieldexpr |
| 2011 |
| LIST1 tac2rec_fieldexpr SEP ";" OPT ";" |
| 2012 |
] |
| 2013 |
|
| 2014 |
tac2rec_fields: [ |
| 2015 |
| DELETE tac2rec_field ";" tac2rec_fields |
| 2016 |
| DELETE tac2rec_field ";" |
| 2017 |
| DELETE tac2rec_field |
| 2018 |
| LIST1 tac2rec_field SEP ";" OPT ";" TAG Ltac2 |
| 2019 |
] |
| 2020 |
|
| 2021 |
int_or_var: [ |
| 2022 |
| REPLACE integer |
| 2023 |
| WITH [ integer | identref ] |
| 2024 |
| DELETE identref |
| 2025 |
] |
| 2026 |
|
| 2027 |
nat_or_var: [ |
| 2028 |
| REPLACE natural |
| 2029 |
| WITH [ natural | identref ] |
| 2030 |
| DELETE identref |
| 2031 |
] |
| 2032 |
|
| 2033 |
ltac2_occs_nums: [ |
| 2034 |
| DELETE LIST1 nat_or_anti (* Ltac2 plugin *) |
| 2035 |
| REPLACE "-" nat_or_anti LIST0 nat_or_anti (* Ltac2 plugin *) |
| 2036 |
| WITH OPT "-" LIST1 nat_or_anti TAG Ltac2 |
| 2037 |
] |
| 2038 |
|
| 2039 |
ltac2_entry: [ |
| 2040 |
| REPLACE tac2def_typ (* Ltac2 plugin *) |
| 2041 |
| WITH "Ltac2" tac2def_typ |
| 2042 |
| REPLACE tac2def_mut (* Ltac2 plugin *) |
| 2043 |
| WITH "Ltac2" tac2def_mut |
| 2044 |
| REPLACE tac2def_val (* Ltac2 plugin *) |
| 2045 |
| WITH "Ltac2" tac2def_val |
| 2046 |
| REPLACE tac2def_ext (* Ltac2 plugin *) |
| 2047 |
| WITH "Ltac2" tac2def_ext |
| 2048 |
| MOVEALLBUT command |
| 2049 |
(* todo: MOVEALLBUT should ignore tag on "but" prodns *) |
| 2050 |
] |
| 2051 |
|
| 2052 |
ltac2_match_list: [ |
| 2053 |
| EDIT ADD_OPT "|" LIST1 ltac2_match_rule SEP "|" (* Ltac2 plugin *) |
| 2054 |
] |
| 2055 |
|
| 2056 |
ltac2_or_and_intropattern: [ |
| 2057 |
| DELETE "(" ltac2_simple_intropattern ")" (* Ltac2 plugin *) |
| 2058 |
| REPLACE "(" ltac2_simple_intropattern "," LIST1 ltac2_simple_intropattern SEP "," ")" (* Ltac2 plugin *) |
| 2059 |
| WITH "(" LIST1 ltac2_simple_intropattern SEP "," ")" TAG Ltac2 |
| 2060 |
| REPLACE "(" ltac2_simple_intropattern "&" LIST1 ltac2_simple_intropattern SEP "&" ")" (* Ltac2 plugin *) |
| 2061 |
| WITH "(" LIST1 ltac2_simple_intropattern SEP "&" ")" TAG Ltac2 |
| 2062 |
] |
| 2063 |
|
| 2064 |
ltac2_equality_intropattern: [ |
| 2065 |
| REPLACE "[" "=" ltac2_intropatterns "]" |
| 2066 |
| WITH "[=" ltac2_intropatterns "]" |
| 2067 |
] |
| 2068 |
|
| 2069 |
SPLICE: [ |
| 2070 |
| tac2def_val |
| 2071 |
| tac2def_typ |
| 2072 |
| tac2def_ext |
| 2073 |
| tac2def_syn |
| 2074 |
| tac2abbrev_syn |
| 2075 |
| ltac2def_syn |
| 2076 |
| ltac2abbrev_syn |
| 2077 |
| tac2def_mut |
| 2078 |
| rec_flag |
| 2079 |
| tac2alg_constructors |
| 2080 |
| ltac2_binder |
| 2081 |
| branch |
| 2082 |
| anti |
| 2083 |
| array_literal |
| 2084 |
| list_literal |
| 2085 |
] |
| 2086 |
|
| 2087 |
ltac2_expr5: [ |
| 2088 |
| REPLACE "let" OPT "rec" LIST1 ltac2_let_clause SEP "with" "in" ltac2_expr6 (* Ltac2 plugin *) |
| 2089 |
| WITH "let" OPT "rec" ltac2_let_clause LIST0 ( "with" ltac2_let_clause ) "in" ltac2_expr6 TAG Ltac2 |
| 2090 |
| MOVETO simple_tactic "match" ltac2_expr5 "with" ltac2_branches "end" (* Ltac2 plugin *) |
| 2091 |
| MOVETO simple_tactic "if" ltac2_expr5 "then" ltac2_expr5 "else" ltac2_expr5 (* Ltac2 plugin *) |
| 2092 |
| DELETE simple_tactic |
| 2093 |
] |
| 2094 |
|
| 2095 |
ltac2_quotations: [ |
| 2096 |
|
| 2097 |
] |
| 2098 |
|
| 2099 |
ltac2_atom: [ |
| 2100 |
| MOVETO ltac2_quotations "constr" ":" "(" lconstr ")" (* Ltac2 plugin *) |
| 2101 |
| MOVETO ltac2_quotations "open_constr" ":" "(" lconstr ")" (* Ltac2 plugin *) |
| 2102 |
| MOVETO ltac2_quotations "preterm" ":" "(" lconstr ")" (* Ltac2 plugin *) |
| 2103 |
| MOVETO ltac2_quotations "ident" ":" "(" identref ")" (* Ltac2 plugin *) |
| 2104 |
| MOVETO ltac2_quotations "pat" ":" "(" cpattern ")" (* Ltac2 plugin *) |
| 2105 |
| MOVETO ltac2_quotations "reference" ":" "(" globref ")" (* Ltac2 plugin *) |
| 2106 |
| MOVETO ltac2_quotations "ltac1" ":" "(" ltac1_expr_in_env ")" (* Ltac2 plugin *) |
| 2107 |
| MOVETO ltac2_quotations "ltac1val" ":" "(" ltac1_expr_in_env ")" (* Ltac2 plugin *) |
| 2108 |
] |
| 2109 |
|
| 2110 |
(* non-Ltac2 "clause" is really clause_dft_concl + there is an ltac2 "clause" *) |
| 2111 |
ltac2_clause: [ ] |
| 2112 |
|
| 2113 |
clause: [ |
| 2114 |
| MOVEALLBUT ltac2_clause |
| 2115 |
] |
| 2116 |
|
| 2117 |
clause: [ |
| 2118 |
| clause_dft_concl |
| 2119 |
] |
| 2120 |
|
| 2121 |
q_clause: [ |
| 2122 |
| REPLACE clause |
| 2123 |
| WITH ltac2_clause TAG Ltac2 |
| 2124 |
] |
| 2125 |
|
| 2126 |
ltac2_induction_clause: [ |
| 2127 |
| REPLACE ltac2_destruction_arg ltac2_as_or_and_ipat ltac2_eqn_ipat OPT clause (* Ltac2 plugin *) |
| 2128 |
| WITH ltac2_destruction_arg ltac2_as_or_and_ipat ltac2_eqn_ipat OPT ltac2_clause TAG Ltac2 |
| 2129 |
] |
| 2130 |
|
| 2131 |
ltac2_constr_delimiters_arg: [ |
| 2132 |
| scope_key |
| 2133 |
| "delimiters" "(" LIST1 scope_key SEP "," ")" |
| 2134 |
] |
| 2135 |
|
| 2136 |
ltac2_constr_synclass_arg: [ |
| 2137 |
| ltac2_constr_delimiters_arg |
| 2138 |
| "custom" "(" qualid ")" |
| 2139 |
| "level" "(" natural ")" |
| 2140 |
] |
| 2141 |
|
| 2142 |
starredidentref: [ |
| 2143 |
| EDIT identref ADD_OPT "*" |
| 2144 |
| EDIT "Type" ADD_OPT "*" |
| 2145 |
| "All" |
| 2146 |
] |
| 2147 |
|
| 2148 |
ssexpr0: [ |
| 2149 |
| DELETE "(" LIST0 starredidentref ")" |
| 2150 |
| DELETE "(" LIST0 starredidentref ")" "*" |
| 2151 |
| DELETE "(" ssexpr35 ")" |
| 2152 |
| DELETE "(" ssexpr35 ")" "*" |
| 2153 |
| "(" section_subset_expr ")" OPT "*" |
| 2154 |
] |
| 2155 |
|
| 2156 |
ssexpr35: [ |
| 2157 |
| EDIT ADD_OPT "-" ssexpr50 |
| 2158 |
] |
| 2159 |
|
| 2160 |
simple_binding: [ |
| 2161 |
| REPLACE "(" identref ":=" lconstr ")" |
| 2162 |
| WITH "(" [ ident | natural ] ":=" lconstr ")" |
| 2163 |
| DELETE "(" natural ":=" lconstr ")" |
| 2164 |
] |
| 2165 |
|
| 2166 |
ltac2_expr: [ |
| 2167 |
| DELETE _ltac2_expr |
| 2168 |
] |
| 2169 |
|
| 2170 |
opt_clause: [ |
| 2171 |
| DELETE "in" in_clause |
| 2172 |
| DELETE "at" occs_nums |
| 2173 |
| DELETE |
| 2174 |
| clause_dft_concl |
| 2175 |
] |
| 2176 |
|
| 2177 |
fixdecl: [ |
| 2178 |
| REPLACE "(" ident LIST0 simple_binder struct_annot ":" lconstr ")" |
| 2179 |
| WITH "(" ident LIST0 simple_binder struct_annot ":" type ")" |
| 2180 |
] |
| 2181 |
|
| 2182 |
cofixdecl: [ |
| 2183 |
| REPLACE "(" ident LIST0 simple_binder ":" lconstr ")" |
| 2184 |
| WITH "(" ident LIST0 simple_binder ":" type ")" |
| 2185 |
] |
| 2186 |
|
| 2187 |
|
| 2188 |
OPTINREF: [ ] |
| 2189 |
|
| 2190 |
destruction_arg: [ |
| 2191 |
| DELETE constr_with_bindings |
| 2192 |
] |
| 2193 |
|
| 2194 |
firstorder_rhs: [ |
| 2195 |
| DELETE OPT firstorder_using |
| 2196 |
| DELETE "with" LIST1 preident |
| 2197 |
| REPLACE OPT firstorder_using "with" LIST1 preident |
| 2198 |
| WITH OPT firstorder_using OPT ( "with" LIST1 preident ) |
| 2199 |
] |
| 2200 |
|
| 2201 |
attribute: [ |
| 2202 |
| DELETE "using" OPT attr_value |
| 2203 |
] |
| 2204 |
|
| 2205 |
ref_or_pattern_occ: [ |
| 2206 |
| DELETE smart_global OPT occs |
| 2207 |
| DELETE constr OPT occs |
| 2208 |
| unfold_occ |
| 2209 |
| pattern_occ |
| 2210 |
] |
| 2211 |
|
| 2212 |
clause_dft_concl: [ |
| 2213 |
(* omit an OPT since clause_dft_concl is always OPT *) |
| 2214 |
| REPLACE OPT occs |
| 2215 |
| WITH occs |
| 2216 |
] |
| 2217 |
|
| 2218 |
simple_occurrences: [ |
| 2219 |
| clause_dft_concl (* semantically restricted: no "at" clause *) |
| 2220 |
] |
| 2221 |
|
| 2222 |
occs_nums: [ |
| 2223 |
| EDIT ADD_OPT "-" LIST1 nat_or_var |
| 2224 |
] |
| 2225 |
|
| 2226 |
variance_identref: [ |
| 2227 |
| EDIT ADD_OPT variance identref |
| 2228 |
] |
| 2229 |
|
| 2230 |
conversion: [ |
| 2231 |
| DELETE constr |
| 2232 |
| DELETE constr "with" constr |
| 2233 |
| REPLACE constr "at" occs_nums "with" constr |
| 2234 |
| WITH OPT ( constr OPT ( "at" occs_nums ) "with" ) constr |
| 2235 |
] |
| 2236 |
|
| 2237 |
induction_principle: [ |
| 2238 |
| eliminator opt_clause |
| 2239 |
] |
| 2240 |
|
| 2241 |
induction_clause: [ |
| 2242 |
| REPLACE destruction_arg OPT as_or_and_ipat OPT eqn_ipat opt_clause |
| 2243 |
| WITH destruction_arg OPT as_or_and_ipat OPT eqn_ipat opt_clause |
| 2244 |
] |
| 2245 |
|
| 2246 |
induction_clause_list: [ |
| 2247 |
| DELETE LIST1 induction_clause SEP "," OPT eliminator opt_clause |
| 2248 |
| LIST1 induction_clause SEP "," OPT induction_principle |
| 2249 |
] |
| 2250 |
|
| 2251 |
(* see https://github.com/rocq-prover/rocq/pull/14179#discussion_r654000296 *) |
| 2252 |
as_or_and_ipat: [ |
| 2253 |
| DELETE "as" or_and_intropattern_loc |
| 2254 |
| DELETE "as" equality_intropattern |
| 2255 |
| "as" or_and_intropattern |
| 2256 |
] |
| 2257 |
|
| 2258 |
ne_rewstrategy1_list_sep_semicolon: [ |
| 2259 |
| DELETE rewstrategy1 |
| 2260 |
| REPLACE ne_rewstrategy1_list_sep_semicolon ";" rewstrategy1 |
| 2261 |
| WITH LIST1 rewstrategy1 SEP ";" |
| 2262 |
] |
| 2263 |
|
| 2264 |
SPLICE: [ |
| 2265 |
| ne_rewstrategy1_list_sep_semicolon |
| 2266 |
| clause |
| 2267 |
| noedit_mode |
| 2268 |
| match_list |
| 2269 |
| match_context_list |
| 2270 |
| IDENT |
| 2271 |
| LEFTQMARK |
| 2272 |
| NUMBER |
| 2273 |
| STRING |
| 2274 |
| hyp |
| 2275 |
| identref |
| 2276 |
| pattern_ident |
| 2277 |
| constr_eval (* splices as multiple prods *) |
| 2278 |
| tactic_then_last (* todo: dependency on c.edit_mlg edit?? really useful? *) |
| 2279 |
| ltac2_tactic_then_last |
| 2280 |
| Prim.name |
| 2281 |
| ltac_selector |
| 2282 |
| Constr.ident |
| 2283 |
| attribute_list |
| 2284 |
| term90 |
| 2285 |
| term9 |
| 2286 |
| term8 |
| 2287 |
| pattern200 |
| 2288 |
| pattern99 |
| 2289 |
| pattern90 |
| 2290 |
| ne_lstring |
| 2291 |
| ne_string |
| 2292 |
| lstring |
| 2293 |
| fullyqualid |
| 2294 |
| global |
| 2295 |
| reference |
| 2296 |
| bar_cbrace |
| 2297 |
| lconstr |
| 2298 |
|
| 2299 |
| preident |
| 2300 |
| lpar_id_coloneq |
| 2301 |
| binders |
| 2302 |
| check_module_types |
| 2303 |
| decl_sep |
| 2304 |
| function_fix_definition (* loses funind annotation *) |
| 2305 |
| glob |
| 2306 |
| glob_constr_with_bindings |
| 2307 |
| id_or_meta |
| 2308 |
| lglob |
| 2309 |
| ltac_tacdef_body |
| 2310 |
| mode |
| 2311 |
| mult_pattern |
| 2312 |
| open_constr |
| 2313 |
| record_declaration |
| 2314 |
| tactic |
| 2315 |
| uconstr |
| 2316 |
| impl_ident_head |
| 2317 |
| branches |
| 2318 |
| check_module_type |
| 2319 |
| decorated_vernac |
| 2320 |
| ext_module_expr |
| 2321 |
| ext_module_type |
| 2322 |
| test |
| 2323 |
| binder_constr |
| 2324 |
| atomic_constr |
| 2325 |
| let_type_cstr |
| 2326 |
| name_colon |
| 2327 |
| closed_binder |
| 2328 |
| binders_fixannot |
| 2329 |
| as_return_type |
| 2330 |
| case_type |
| 2331 |
| universe_increment |
| 2332 |
| type_cstr |
| 2333 |
| record_pattern |
| 2334 |
| evar_instance |
| 2335 |
| fix_decls |
| 2336 |
| cofix_decls |
| 2337 |
| assum_list |
| 2338 |
| assum_coe |
| 2339 |
| inline |
| 2340 |
| occs |
| 2341 |
| ltac_info |
| 2342 |
| field_mods |
| 2343 |
| ltac_production_sep |
| 2344 |
| ltac_tactic_level |
| 2345 |
| printunivs_subgraph |
| 2346 |
| ring_mods |
| 2347 |
| eliminator (* todo: splice or not? *) |
| 2348 |
| quoted_attributes (* todo: splice or not? *) |
| 2349 |
| printable |
| 2350 |
| hint |
| 2351 |
| record_fields |
| 2352 |
| constructor_type |
| 2353 |
| record_binder |
| 2354 |
| at_level_opt |
| 2355 |
| table_value |
| 2356 |
| in_or_out_modules |
| 2357 |
| option_setting |
| 2358 |
| orient |
| 2359 |
| with_bindings |
| 2360 |
| by_arg_tac |
| 2361 |
| by_tactic |
| 2362 |
| quantified_hypothesis |
| 2363 |
| in_hyp_list |
| 2364 |
| rename |
| 2365 |
| export_token |
| 2366 |
| reserv_tuple |
| 2367 |
| inst |
| 2368 |
| default_inhabitant_ident |
| 2369 |
| opt_coercion |
| 2370 |
| opt_constructors_or_fields |
| 2371 |
| is_module_type |
| 2372 |
| is_module_expr |
| 2373 |
| module_expr |
| 2374 |
| mlname |
| 2375 |
| withtac |
| 2376 |
| debug |
| 2377 |
| eauto_search_strategy |
| 2378 |
| reference_or_constr |
| 2379 |
| opt_hintbases |
| 2380 |
| opthints |
| 2381 |
| scheme |
| 2382 |
| fresh_id |
| 2383 |
| ltac_def_kind |
| 2384 |
| intropatterns |
| 2385 |
| instance_name |
| 2386 |
| failkw |
| 2387 |
| ne_in_or_out_modules |
| 2388 |
| search_queries |
| 2389 |
| locatable |
| 2390 |
| scope_delimiter |
| 2391 |
| one_import_filter_name |
| 2392 |
| search_where |
| 2393 |
| message_token |
| 2394 |
| input_fun |
| 2395 |
| ltac_use_default |
| 2396 |
| toplevel_selector_temp |
| 2397 |
| comment |
| 2398 |
| register_token |
| 2399 |
| match_context_rule |
| 2400 |
| match_rule |
| 2401 |
| by_notation |
| 2402 |
| lnatural |
| 2403 |
| nat_or_anti |
| 2404 |
| globref |
| 2405 |
| let_binder |
| 2406 |
| refglobals (* Ltac2 *) |
| 2407 |
| syntax_modifiers |
| 2408 |
| array_elems |
| 2409 |
| G_LTAC2_input_fun |
| 2410 |
| ltac2_with_bindings |
| 2411 |
| int_or_id |
| 2412 |
| fun_ind_using |
| 2413 |
| with_names |
| 2414 |
| eauto_search_strategy_name |
| 2415 |
| simple_binding |
| 2416 |
| ssexpr35 (* strange in mlg, ssexpr50 is after this *) |
| 2417 |
| number_string_mapping |
| 2418 |
| number_options |
| 2419 |
| string_option |
| 2420 |
| tac2type_body |
| 2421 |
| tac2rec_fields |
| 2422 |
| mut_flag |
| 2423 |
| tac2rec_fieldexprs |
| 2424 |
| syn_level |
| 2425 |
| firstorder_rhs |
| 2426 |
| firstorder_using |
| 2427 |
| ref_or_pattern_occ |
| 2428 |
| cumul_ident_decl |
| 2429 |
| variance |
| 2430 |
| variance_identref |
| 2431 |
| rewriter |
| 2432 |
| clause_dft_all |
| 2433 |
| or_and_intropattern_loc |
| 2434 |
| eqn_ipat |
| 2435 |
| conversion |
| 2436 |
| type_cast |
| 2437 |
| opt_clause |
| 2438 |
| struct_annot |
| 2439 |
| fixdecl |
| 2440 |
| cofixdecl |
| 2441 |
| induction_clause_list |
| 2442 |
| as_or_and_ipat |
| 2443 |
| singleton_class_definition |
| 2444 |
| constr_with_bindings_arg |
| 2445 |
| enable_enable_disable |
| 2446 |
| enable_notation_rule |
| 2447 |
| enable_notation_interpretation |
| 2448 |
| enable_notation_flags |
| 2449 |
| opt_scope |
| 2450 |
| located_notation |
| 2451 |
| ltac_expr1l |
| 2452 |
] (* end SPLICE *) |
| 2453 |
|
| 2454 |
RENAME: [ |
| 2455 |
| occurrences rewrite_occs |
| 2456 |
] |
| 2457 |
|
| 2458 |
RENAME: [ |
| 2459 |
| tactic3 ltac_expr3 (* todo: can't figure out how this gets mapped by coqpp *) |
| 2460 |
| tactic1 ltac_expr1 (* todo: can't figure out how this gets mapped by coqpp *) |
| 2461 |
| tactic0 ltac_expr0 (* todo: can't figure out how this gets mapped by coqpp *) |
| 2462 |
| ltac_expr5 ltac_expr |
| 2463 |
|
| 2464 |
(* | nonsimple_intropattern intropattern (* ltac2 *) *) |
| 2465 |
|
| 2466 |
| term200 term |
| 2467 |
| pattern100 pattern |
| 2468 |
(*| impl_ident_tail impl_ident*) |
| 2469 |
| ssexpr50 section_var_expr50 |
| 2470 |
| ssexpr0 section_var_expr0 |
| 2471 |
| section_subset_expr section_var_expr |
| 2472 |
| fun_scheme_arg func_scheme_def |
| 2473 |
|
| 2474 |
| BULLET bullet |
| 2475 |
| constr one_term (* many, many, many *) |
| 2476 |
| smart_global reference (* many, many *) |
| 2477 |
(* |
| 2478 |
| searchabout_query search_item |
| 2479 |
*) |
| 2480 |
| ltac2_type5 ltac2_type |
| 2481 |
| ltac2_expr6 ltac2_expr |
| 2482 |
| starredidentref starred_ident_ref |
| 2483 |
| constr_pattern one_pattern |
| 2484 |
| hints_path_entry hints_regexp |
| 2485 |
| clause_dft_concl occurrences |
| 2486 |
| in_clause goal_occurrences |
| 2487 |
| unfold_occ reference_occs |
| 2488 |
| pattern_occ pattern_occs |
| 2489 |
| hypident_occ hyp_occs |
| 2490 |
| concl_occ concl_occs |
| 2491 |
| constr_with_bindings one_term_with_bindings |
| 2492 |
| red_flag reduction |
| 2493 |
| strategy_flag reductions |
| 2494 |
| delta_flag delta_reductions |
| 2495 |
| q_strategy_flag q_reductions |
| 2496 |
| destruction_arg induction_arg |
| 2497 |
| field_body field_spec |
| 2498 |
| field_def field_val |
| 2499 |
| bindings_with_parameters alias_definition |
| 2500 |
] |
| 2501 |
|
| 2502 |
bullet: [ |
| 2503 |
| [ LIST1 "-" | LIST1 "+" | LIST1 "*" ] |
| 2504 |
] |
| 2505 |
|
| 2506 |
simple_tactic: [ |
| 2507 |
(* due to renaming of tactic_value; Use LIST1 for function application *) |
| 2508 |
| qualid LIST1 tactic_arg |
| 2509 |
] |
| 2510 |
|
| 2511 |
SPLICE: [ |
| 2512 |
| gallina |
| 2513 |
| gallina_ext |
| 2514 |
| syntax |
| 2515 |
| vernac_control |
| 2516 |
| vernac_toplevel |
| 2517 |
| command_entry |
| 2518 |
| ltac_builtins |
| 2519 |
| ltac_constructs |
| 2520 |
| ltac2_constructs |
| 2521 |
| ltac_defined_tactics |
| 2522 |
| tactic_notation_tactics |
| 2523 |
| bullet |
| 2524 |
] |
| 2525 |
|
| 2526 |
REACHABLE: [ |
| 2527 |
| command |
| 2528 |
| simple_tactic |
| 2529 |
] |
| 2530 |
|
| 2531 |
NOTINRSTS: [ |
| 2532 |
| command |
| 2533 |
| control_command |
| 2534 |
| simple_tactic |
| 2535 |
| hints_regexp (* manually inserted *) |
| 2536 |
| REACHABLE |
| 2537 |
| NOTINRSTS |
| 2538 |
| l1_tactic |
| 2539 |
| l2_tactic |
| 2540 |
| l3_tactic |
| 2541 |
| value_tactic |
| 2542 |
| ltac2_entry |
| 2543 |
(* ltac2 syntactic classes *) |
| 2544 |
| q_intropatterns |
| 2545 |
| q_intropattern |
| 2546 |
| q_ident |
| 2547 |
| q_destruction_arg |
| 2548 |
| q_with_bindings |
| 2549 |
| q_bindings |
| 2550 |
| q_reductions |
| 2551 |
| q_reference |
| 2552 |
| q_clause |
| 2553 |
| q_occurrences |
| 2554 |
| q_induction_clause |
| 2555 |
| q_conversion |
| 2556 |
| q_rewriting |
| 2557 |
| q_dispatch |
| 2558 |
| q_hintdb |
| 2559 |
| q_move_location |
| 2560 |
| q_pose |
| 2561 |
| q_assert |
| 2562 |
| q_constr_matching |
| 2563 |
| q_goal_matching |
| 2564 |
] |
| 2565 |
|
| 2566 |
REACHABLE: [ |
| 2567 |
| NOTINRSTS |
| 2568 |
] |