aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Inversion.v
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-09-11 12:47:43 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-09-11 15:11:58 +0200
commit5ab7efb4d32b05b3ab967d46bc59a0bc853bbae2 (patch)
treee220329c21f4106808c846b3c94dfc81f0bf4ba6 /test-suite/success/Inversion.v
parentedb9ac51f38f2c4dddf652db918e5d5b6ba3b108 (diff)
Other bugs with "inversion as" (collision between user-provided names and generated equation names).
Diffstat (limited to 'test-suite/success/Inversion.v')
-rw-r--r--test-suite/success/Inversion.v33
1 files changed, 33 insertions, 0 deletions
diff --git a/test-suite/success/Inversion.v b/test-suite/success/Inversion.v
index 892dd6d48..850f09434 100644
--- a/test-suite/success/Inversion.v
+++ b/test-suite/success/Inversion.v
@@ -156,3 +156,36 @@ intros * Hyp.
inversion Hyp as (a,b,H,c,(H1_1,H1_2),(H2_1,H2_2,H2_3)).
reflexivity.
Qed.
+
+(* Up to September 2014, Mapp below was called MApp0 because of a bug
+ in intro_replacing (short version of bug 2164.v)
+ (example taken from CoLoR) *)
+
+Parameter Term : Type.
+Parameter isApp : Term -> Prop.
+Parameter appBodyL : forall M, isApp M -> Prop.
+Parameter lower : forall M Mapp, appBodyL M Mapp -> Term.
+
+Inductive BetaStep : Term -> Term -> Prop :=
+ Beta M Mapp Mabs : BetaStep M (lower M Mapp Mabs).
+
+Goal forall M N, BetaStep M N -> True.
+intros M N H.
+inversion H as (P,Mapp,Mabs,H0,H1).
+clear Mapp Mabs H0 H1.
+exact Logic.I.
+Qed.
+
+(* Up to September 2014, H0 below was renamed called H1 because of a collision
+ with the automaticallly generated names for equations.
+ (example taken from CoLoR) *)
+
+Inductive term := Var | Fun : term -> term -> term.
+Inductive lt : term -> term -> Prop :=
+ mpo f g ss ts : lt Var (Fun f ts) -> lt (Fun f ss) (Fun g ts).
+
+Goal forall f g ss ts, lt (Fun f ss) (Fun g ts) -> lt Var (Fun f ts).
+intros.
+inversion H as (f',g',ss',ts',H0).
+exact H0.
+Qed.