diff options
author | Jason Gross <jgross@mit.edu> | 2016-09-22 14:51:45 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2016-09-22 14:51:45 -0400 |
commit | 9b7d1c90181c96f1d867aec1493fd4f8e89bd530 (patch) | |
tree | 37cdc1baaff8468fe7d12d4928edc9ad1f320799 /src | |
parent | 54a1157a1c684449aaac2d24085fe7b3ebc24706 (diff) |
Add a form of Let_In that carries a proof
Diffstat (limited to 'src')
-rw-r--r-- | src/Util/LetIn.v | 2 | ||||
-rw-r--r-- | src/Util/Notations.v | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/Util/LetIn.v b/src/Util/LetIn.v index 80310b833..1770054fe 100644 --- a/src/Util/LetIn.v +++ b/src/Util/LetIn.v @@ -4,7 +4,9 @@ Require Import Crypto.Util.Tactics. Require Import Crypto.Util.Notations. Definition Let_In {A P} (x : A) (f : forall a : A, P a) : P x := let y := x in f y. +Definition Let_In_pf {A P} (x : A) (f : forall a : A, a = x -> P a) : P x := let y := x in f y eq_refl. Notation "'dlet' x := y 'in' f" := (Let_In y (fun x => f)). +Notation "'pflet' x , pf := y 'in' f" := (Let_In y (fun x pf => f)). Global Instance Proper_Let_In_nd_changebody {A P R} {Reflexive_R:@Reflexive P R} : Proper (eq ==> pointwise_relation _ R ==> R) (@Let_In A (fun _ => P)). diff --git a/src/Util/Notations.v b/src/Util/Notations.v index 99761c63b..3b710975d 100644 --- a/src/Util/Notations.v +++ b/src/Util/Notations.v @@ -68,5 +68,7 @@ Reserved Notation "'llet' x := A 'in' b" (* Note that making [Let] a keyword breaks the vernacular [Let] in Coq 8.4 *) Reserved Notation "'dlet' x := y 'in' f" (at level 200, f at level 200, format "'dlet' x := y 'in' '//' f"). +Reserved Notation "'pflet' x , pf := y 'in' f" + (at level 200, f at level 200, format "'pflet' x , pf := y 'in' '//' f"). Reserved Notation "'λ' x .. y , t" (at level 200, x binder, y binder, right associativity). Reserved Notation "'λn' x .. y , t" (at level 200, right associativity). |