You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grammar
G {{ tex \Gamma }} :: G_ ::=
{{ coq gmap nat nat }}
{{ coq-universe Type }}
Could generate Notation G := (gmap nat nat) instead of Definition G := (gmap nat nat).
The motivating example is std++'s finite maps, where Notation is much more convenient than Definition.
From stdpp RequireImport gmap.
(* with Notation, automation works out of the box *)Notation context := (gmap nat nat).
Fact insert_lookup_ne_context: forall (C:context) i j x y,
i <> j -> C !! i = Some x -> <[j:=y]> C !! i = Some x.
by intros; simplify_map_eq.
Qed.
(* with Definition things are much harder *)Definition context' := gmap nat nat.
Fact insert_lookup_ne_context': forall (C:context') i j x y,
i <> j -> C !! i = Some x -> <[j:=y]> C !! i = Some x.
Proof.
intros.
Fail now simplify_map_eq.
(* Tactic failure: Cannot solve this goal. *)
Fail rewrite lookup_insert_ne.
(* Found no subterm matching "<[?M5058:=?M5060]> ?M5057 !! ?M5059" in the current goal. *)
now setoid_rewrite lookup_insert_ne.
Qed.
The text was updated successfully, but these errors were encountered:
It would be nice if an Ott grammer like
Could generate
Notation G := (gmap nat nat)
instead ofDefinition G := (gmap nat nat)
.The motivating example is std++'s finite maps, where
Notation
is much more convenient thanDefinition
.The text was updated successfully, but these errors were encountered: