From 06e3a50d3b78bef55bc4e15075743d1ab67d0750 Mon Sep 17 00:00:00 2001 From: Andres Erbsen Date: Mon, 10 Oct 2016 17:49:15 -0400 Subject: specialize_by: only specialize arguments of type [Prop] --- src/Util/Tactics.v | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Util/Tactics.v') diff --git a/src/Util/Tactics.v b/src/Util/Tactics.v index 69e74a3fe..d0c785fed 100644 --- a/src/Util/Tactics.v +++ b/src/Util/Tactics.v @@ -262,10 +262,13 @@ Ltac specialize_by' tac := idtac; match goal with | [ H : ?A -> ?B |- _ ] => - let H' := fresh in - assert (H' : A) by tac; - transparent_specialize_one H H'; - try clear H' (* if [H] was transparent, [H'] will remain *) + match type of A with + Prop => + let H' := fresh in + assert (H' : A) by tac; + transparent_specialize_one H H'; + try clear H' (* if [H] was transparent, [H'] will remain *) + end end. Ltac specialize_by tac := repeat specialize_by' tac. -- cgit v1.2.3