Skip to content
Snippets Groups Projects
Commit 1706200d authored by Ralf Jung's avatar Ralf Jung
Browse files

Merge branch 'robbert/bi_notations' into 'master'

Fix discrepancies in bi notations.

See merge request iris/iris!384
parents a0e0e916 62d5e8b5
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,21 @@ Typeclasses Opaque join_handle. ...@@ -32,6 +32,21 @@ Typeclasses Opaque join_handle.
This makes sure that the proof mode does not "look into" your definition when it This makes sure that the proof mode does not "look into" your definition when it
is used by clients. is used by clients.
## Notations
Notations starting with `(` or `{` should be left at their default level (`0`),
and inner subexpressions that are bracketed by delimiters should be left at
their default level (`200`).
Moreover, correct parsing of notations sometimes relies on Coq's automatic
left-factoring, which can require coordinating levels of certain "conflicting"
notations and their subexpressions. For instance, to disambiguate `(⊢@{ PROP })`
and `(⊢@{ PROP } P)`, Coq must factor out a nonterminal for `⊢@{ PROP }`, but it
can only do so if all occurrences of `⊢@{ PROP }` agree on the precedences for
all subexpressions.
For details, consult [the Coq manual](https://coq.inria.fr/refman/user-extensions/syntax-extensions.html#simple-factorization-rules).
## Naming conventions for variables/arguments/hypotheses ## Naming conventions for variables/arguments/hypotheses
### small letters ### small letters
......
...@@ -260,14 +260,14 @@ Instance bi_rewrite_relation (PROP : bi) : RewriteRelation (@bi_entails PROP) := ...@@ -260,14 +260,14 @@ Instance bi_rewrite_relation (PROP : bi) : RewriteRelation (@bi_entails PROP) :=
Instance bi_inhabited {PROP : bi} : Inhabited PROP := populate (bi_pure True). Instance bi_inhabited {PROP : bi} : Inhabited PROP := populate (bi_pure True).
Notation "P ⊢ Q" := (bi_entails P%I Q%I) : stdpp_scope. Notation "P ⊢ Q" := (bi_entails P%I Q%I) : stdpp_scope.
Notation "P ⊢@{ PROP } Q" := (bi_entails (PROP:=PROP) P%I Q%I) (only parsing) : stdpp_scope. Notation "P '⊢@{' PROP } Q" := (bi_entails (PROP:=PROP) P%I Q%I) (only parsing) : stdpp_scope.
Notation "(⊢)" := bi_entails (only parsing) : stdpp_scope. Notation "(⊢)" := bi_entails (only parsing) : stdpp_scope.
Notation "(⊢@{ PROP } )" := (bi_entails (PROP:=PROP)) (only parsing) : stdpp_scope. Notation "('⊢@{' PROP } )" := (bi_entails (PROP:=PROP)) (only parsing) : stdpp_scope.
Notation "P ⊣⊢ Q" := (equiv (A:=bi_car _) P%I Q%I) : stdpp_scope. Notation "P ⊣⊢ Q" := (equiv (A:=bi_car _) P%I Q%I) : stdpp_scope.
Notation "P ⊣⊢@{ PROP } Q" := (equiv (A:=bi_car PROP) P%I Q%I) (only parsing) : stdpp_scope. Notation "P '⊣⊢@{' PROP } Q" := (equiv (A:=bi_car PROP) P%I Q%I) (only parsing) : stdpp_scope.
Notation "(⊣⊢)" := (equiv (A:=bi_car _)) (only parsing) : stdpp_scope. Notation "(⊣⊢)" := (equiv (A:=bi_car _)) (only parsing) : stdpp_scope.
Notation "(⊣⊢@{ PROP } )" := (equiv (A:=bi_car PROP)) (only parsing) : stdpp_scope. Notation "('⊣⊢@{' PROP } )" := (equiv (A:=bi_car PROP)) (only parsing) : stdpp_scope.
Notation "P -∗ Q" := (P Q) : stdpp_scope. Notation "P -∗ Q" := (P Q) : stdpp_scope.
......
...@@ -3,10 +3,13 @@ ...@@ -3,10 +3,13 @@
(** Turnstiles *) (** Turnstiles *)
Reserved Notation "P ⊢ Q" (at level 99, Q at level 200, right associativity). Reserved Notation "P ⊢ Q" (at level 99, Q at level 200, right associativity).
Reserved Notation "P '⊢@{' PROP } Q" (at level 99, Q at level 200, right associativity). Reserved Notation "P '⊢@{' PROP } Q" (at level 99, Q at level 200, right associativity).
Reserved Notation "('⊢@{' PROP } )" (at level 99). Reserved Notation "(⊢)".
Reserved Notation "('⊢@{' PROP } )".
Reserved Notation "P ⊣⊢ Q" (at level 95, no associativity). Reserved Notation "P ⊣⊢ Q" (at level 95, no associativity).
Reserved Notation "P '⊣⊢@{' PROP } Q" (at level 95, no associativity). Reserved Notation "P '⊣⊢@{' PROP } Q" (at level 95, no associativity).
Reserved Notation "('⊣⊢@{' PROP } )" (at level 95). Reserved Notation "(⊣⊢)".
Reserved Notation "('⊣⊢@{' PROP } )".
(** BI connectives *) (** BI connectives *)
Reserved Notation "'emp'". Reserved Notation "'emp'".
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment