aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorherbelin2010-06-11 10:16:44 +0000
committerherbelin2010-06-11 10:16:44 +0000
commiteb067dc862c5a7acea2b92cabe867bfc9dcdaf92 (patch)
treefd2f4fb683561d027b803e03aa30820760c5f22f /test-suite
parent9add74ea610a5b18d8ab7acc166dcefe73756981 (diff)
Mainly made that evarconv is able to solve "?n = (fun x => x) ?n" (sic).
Use two ways to solve it: - added a whd_betaiota in solve_simple_eqn (since evarconv itself refuses beta to preserve the opportunities of first-order-matching expressions of the form "(fun x => P) t"; an advantage of this whd_betaiota is also that it may simplify K-redexes. - also added a last-chance test in case of failing occur-check by trying to fully head-normalize (with delta) the right-hand-side (allows to solve for instance "?n = id ?n" where id is a constant (a bridled form of solve_refl that use fconv instead of evar_conv_x). Incidentally improved a bit the rendering of the type of generalized terms in pattern-matching by using whd_betaiota. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13113 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/Hints.v15
1 files changed, 15 insertions, 0 deletions
diff --git a/test-suite/success/Hints.v b/test-suite/success/Hints.v
index a8cc7f745a..4aa00e689f 100644
--- a/test-suite/success/Hints.v
+++ b/test-suite/success/Hints.v
@@ -52,3 +52,18 @@ Hint Resolve -> a.
Goal forall n, n=0 -> n<=0.
auto.
Qed.
+
+
+(* This example comes from Chlipala's ltamer *)
+(* It used to fail from r12902 to r13112 since type_of started to call *)
+(* e_cumul (instead of conv_leq) which was not able to unify "?id" and *)
+(* "(fun x => x) ?id" *)
+
+Notation "e :? pf" := (eq_rect _ (fun X : Set => X) e _ pf)
+ (no associativity, at level 90).
+
+Axiom cast_coalesce :
+ forall (T1 T2 T3 : Set) (e : T1) (pf1 : T1 = T2) (pf2 : T2 = T3),
+ ((e :? pf1) :? pf2) = (e :? trans_eq pf1 pf2).
+
+Hint Rewrite cast_coalesce : ltamer.