From 9b7d1c90181c96f1d867aec1493fd4f8e89bd530 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Thu, 22 Sep 2016 14:51:45 -0400 Subject: Add a form of Let_In that carries a proof --- src/Util/LetIn.v | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Util/LetIn.v') 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)). -- cgit v1.2.3