aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-12-11 12:30:19 +0100
committerPierre-Marie Pédrot2019-12-11 12:30:19 +0100
commite5f8bdd1a29937cbf4957e1538cf7eb5c2fb8c85 (patch)
tree159da8cbe1bf36b0b49d10ddf934c8f25c776b87 /test-suite
parent79f9e907fa4cc0e8862c4b678d60d8409a6cc88e (diff)
parent23ad67d5e219f557a32ed6b77a2d961a52b10c92 (diff)
Merge PR #11271: Fixing #9893. "Specialize with" would not support hyps type containing letins.
Reviewed-by: ppedrot
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/specialize.v22
1 files changed, 22 insertions, 0 deletions
diff --git a/test-suite/success/specialize.v b/test-suite/success/specialize.v
index f12db8b081..1b04594290 100644
--- a/test-suite/success/specialize.v
+++ b/test-suite/success/specialize.v
@@ -109,6 +109,28 @@ match goal with H:_ |- _ => clear H end.
match goal with H:_ |- _ => exact H end.
Qed.
+(* let ins should be supported in the type of the specialized hypothesis *)
+Axiom foo: forall (m1 m2: nat), let n := 2 * m1 in m1 = m2 -> False.
+Goal False.
+ pose proof foo as P.
+ assert (2 = 2) as A by reflexivity.
+ specialize P with (1 := A).
+ assumption.
+Qed.
+
+(* Another more subtle test on letins: they should not interfere with foralls. *)
+Goal forall (P: forall y:nat,
+ forall A (zz:A),
+ let a := zz in
+ let x := 1 in
+ forall n : y = x,
+ n = n),
+ True.
+ intros P.
+ specialize P with (zz := @eq_refl _ 2).
+ constructor.
+Qed.
+
(* Test specialize as *)
Goal (forall x, x=0) -> 1=0.