Skip to content

bullets: focusing operators behind +strict_bullets pragma#1017

Merged
strub merged 1 commit into
mainfrom
forced-bullets
Jun 1, 2026
Merged

bullets: focusing operators behind +strict_bullets pragma#1017
strub merged 1 commit into
mainfrom
forced-bullets

Conversation

@strub
Copy link
Copy Markdown
Member

@strub strub commented May 26, 2026

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.

@strub strub force-pushed the forced-bullets branch 10 times, most recently from 6ec78a6 to fbf2ee8 Compare May 28, 2026 09:53
@strub strub requested a review from Gustavo2622 May 28, 2026 09:55
@strub strub self-assigned this May 28, 2026
@strub strub force-pushed the forced-bullets branch from fbf2ee8 to 5d868ff Compare May 28, 2026 10:05
Comment thread tests/bullets-errors.ec
Comment thread src/ecScope.mli Outdated
@strub strub force-pushed the forced-bullets branch 2 times, most recently from 9d3eb0d to 0a03e02 Compare June 1, 2026 18:14
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.
@strub strub force-pushed the forced-bullets branch from 0a03e02 to 56c6d84 Compare June 1, 2026 18:37
@strub strub enabled auto-merge June 1, 2026 18:38
@strub strub added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit 76bf9e9 Jun 1, 2026
19 checks passed
@strub strub deleted the forced-bullets branch June 1, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants