diff options
author | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
---|---|---|
committer | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
commit | 6b649aba925b6f7462da07599fe67ebb12a3460e (patch) | |
tree | 43656bcaa51164548f3fa14e5b10de5ef1088574 /test-suite/success/Injection.v |
Imported Upstream version 8.0pl1upstream/8.0pl1
Diffstat (limited to 'test-suite/success/Injection.v')
-rw-r--r-- | test-suite/success/Injection.v | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test-suite/success/Injection.v b/test-suite/success/Injection.v new file mode 100644 index 00000000..fd80cec6 --- /dev/null +++ b/test-suite/success/Injection.v @@ -0,0 +1,34 @@ +(* Check the behaviour of Injection *) + +(* Check that Injection tries Intro until *) + +Lemma l1 : (x:nat)(S x)=(S (S x))->False. +Injection 1. +Apply n_Sn. +Qed. + +Lemma l2 : (x:nat)(H:(S x)=(S (S x)))H==H->False. +Injection H. +Intros. +Apply (n_Sn x H0). +Qed. + +(* Check that no tuple needs to be built *) +Lemma l3 : (x,y:nat) + (existS ? [n:nat]({n=n}+{n=n}) x (left ? ? (refl_equal nat x)))= + (existS ? [n:nat]({n=n}+{n=n}) y (left ? ? (refl_equal nat y))) + -> x=y. +Intros x y H. +Injection H. +Exact [H]H. +Qed. + +(* Check that a tuple is built (actually the same as the initial one) *) +Lemma l4 : (p1,p2:{O=O}+{O=O}) + (existS ? [n:nat]({n=n}+{n=n}) O p1)=(existS ? [n:nat]({n=n}+{n=n}) O p2) + ->(existS ? [n:nat]({n=n}+{n=n}) O p1)=(existS ? [n:nat]({n=n}+{n=n}) O p2). +Intros. +Injection H. +Exact [H]H. +Qed. + |