From ac7222c70266ee2b729b81e743adc7076191e6c0 Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Mon, 12 Feb 2018 13:24:37 -0500 Subject: Add notation {x & P} for sigT Analogous to existing `{x | P}` notation for `sig`, where the type of `x` is inferred instead of specified. --- theories/Init/Notations.v | 1 + theories/Init/Specif.v | 1 + 2 files changed, 2 insertions(+) (limited to 'theories') diff --git a/theories/Init/Notations.v b/theories/Init/Notations.v index 5e8d2faa5..70a6c61e7 100644 --- a/theories/Init/Notations.v +++ b/theories/Init/Notations.v @@ -75,6 +75,7 @@ Reserved Notation "{ x | P & Q }" (at level 0, x at level 99). Reserved Notation "{ x : A | P }" (at level 0, x at level 99). Reserved Notation "{ x : A | P & Q }" (at level 0, x at level 99). +Reserved Notation "{ x & P }" (at level 0, x at level 99). Reserved Notation "{ x : A & P }" (at level 0, x at level 99). Reserved Notation "{ x : A & P & Q }" (at level 0, x at level 99). diff --git a/theories/Init/Specif.v b/theories/Init/Specif.v index 3b4f833a3..c42cc00b8 100644 --- a/theories/Init/Specif.v +++ b/theories/Init/Specif.v @@ -49,6 +49,7 @@ Notation "{ x | P & Q }" := (sig2 (fun x => P) (fun x => Q)) : type_scope. Notation "{ x : A | P }" := (sig (A:=A) (fun x => P)) : type_scope. Notation "{ x : A | P & Q }" := (sig2 (A:=A) (fun x => P) (fun x => Q)) : type_scope. +Notation "{ x & P }" := (sigT (fun x => P)) : type_scope. Notation "{ x : A & P }" := (sigT (A:=A) (fun x => P)) : type_scope. Notation "{ x : A & P & Q }" := (sigT2 (A:=A) (fun x => P) (fun x => Q)) : type_scope. -- cgit v1.2.3