Commit 5f8952e
committed
bullets: focusing operators behind +strict_bullets pragma
When `pragma +strict_bullets` is set, the bullet tokens `-`, `+`, `*`
(and their repeated forms `--`, `++`, `**`, ...) become Coq-style
focusing operators: each phrase's bullet is checked against a per-proof
stack so that a subgoal must be discharged before its sibling is
addressed, and so that bullet characters identify nesting levels. The
default behavior is unchanged: without the pragma, bullets remain pure
decoration, preserving every existing proof script.
Repeated bullet characters are emitted by the lexer as single
PLUSn/MINUSn/STARn tokens (carrying their literal), which makes them
usable both as deeper bullet levels and as user-defined binary
operators (`op (--) ...`).
The final sibling of a split point can be continued at the parent
level without a bullet: when the previous sibling is closed and
exactly one sibling remains, the inner frame pops automatically (and
cascades through nested last-sibling frames). This keeps the standard
phl idiom of long `seq N : <post>' chains flat instead of forcing
ever-deeper indentation under a `+' for each continuation. Multi-way
splits keep their enumeration discipline for all but the last
subgoal.1 parent 3665b5e commit 5f8952e
14 files changed
Lines changed: 540 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| 73 | + | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
505 | 512 | | |
506 | 513 | | |
507 | 514 | | |
508 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
509 | 518 | | |
510 | 519 | | |
511 | 520 | | |
| |||
635 | 644 | | |
636 | 645 | | |
637 | 646 | | |
638 | | - | |
639 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
640 | 650 | | |
641 | 651 | | |
642 | 652 | | |
| |||
653 | 663 | | |
654 | 664 | | |
655 | 665 | | |
656 | | - | |
657 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
658 | 669 | | |
659 | 670 | | |
660 | 671 | | |
| |||
689 | 700 | | |
690 | 701 | | |
691 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
692 | 706 | | |
693 | 707 | | |
694 | 708 | | |
| |||
716 | 730 | | |
717 | 731 | | |
718 | 732 | | |
719 | | - | |
| 733 | + | |
720 | 734 | | |
721 | 735 | | |
722 | 736 | | |
723 | 737 | | |
724 | 738 | | |
725 | 739 | | |
726 | | - | |
| 740 | + | |
727 | 741 | | |
728 | 742 | | |
729 | 743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
304 | 324 | | |
305 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
306 | 329 | | |
307 | 330 | | |
308 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
| |||
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
626 | | - | |
| 627 | + | |
627 | 628 | | |
628 | 629 | | |
629 | | - | |
| 630 | + | |
630 | 631 | | |
631 | 632 | | |
632 | 633 | | |
| |||
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
| |||
842 | 845 | | |
843 | 846 | | |
844 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
845 | 851 | | |
846 | 852 | | |
847 | 853 | | |
| |||
3577 | 3583 | | |
3578 | 3584 | | |
3579 | 3585 | | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
3580 | 3594 | | |
3581 | | - | |
3582 | | - | |
3583 | | - | |
3584 | | - | |
| 3595 | + | |
| 3596 | + | |
3585 | 3597 | | |
3586 | 3598 | | |
3587 | 3599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | | - | |
1368 | | - | |
| 1367 | + | |
| 1368 | + | |
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
| |||
0 commit comments