Skip to content

Conversation

@rswarbrick
Copy link
Contributor

@rswarbrick rswarbrick commented Dec 20, 2025

This was prompted by issue #853, which had the following example that didn't work properly:

Axiom Ninterval: nat -> nat -> Prop.
Notation "[ n  '....'  m ]" := (Ninterval n m).
Notation "x 'BETWEEN' n 'AND' m " := ([n .... m] x) (at level 1).
Axiom something_else : Prop.

The problem was that the regex in coq-period-end-command would match "....", even though it's neither one nor three periods.

Because I found the regexes quite hard to read, this commit also splits up the concats a bit, which I think makes them a bit easier.

Fixes #853.

This was prompted by issue ProofGeneral#853, which had the following example that
didn't work properly:

    Axiom Ninterval: nat -> nat -> Prop.
    Notation "[ n  '....'  m ]" := (Ninterval n m).
    Notation "x 'BETWEEN' n 'AND' m " := ([n .... m] x) (at level 1).
    Axiom something_else : Prop.

The problem was that the regex in coq-period-end-command would match
"....", even though it's neither one nor three periods.

Because I found the regexes quite hard to read, this commit also
splits up the concats a bit, which I *think* makes them a bit easier.
@Matafou
Copy link
Contributor

Matafou commented Jan 6, 2026

Thanks @rswarbrick . Sorry to be so slow to react. I will merge this quickly.

@Matafou Matafou merged commit 8ccf1b3 into ProofGeneral:master Jan 6, 2026
140 checks passed
@rswarbrick rswarbrick deleted the four-periods branch January 6, 2026 11:16
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.

Problem with some notation

2 participants