aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar corbinea <corbinea@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-14 09:30:33 +0000
committerGravatar corbinea <corbinea@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-09-14 09:30:33 +0000
commit4f39e160d05b0e5501a909b3041589303651670b (patch)
tree44c907c92fb8345361ad3c4bf87496c004ddee7e /test-suite
parent46667827cc7884d28fc048ff74b19a6517f19d59 (diff)
Correction du bug #1679 (congruence) et ajout test-suite
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10120 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/cc.v19
1 files changed, 19 insertions, 0 deletions
diff --git a/test-suite/success/cc.v b/test-suite/success/cc.v
index 42df990fd..fecc89772 100644
--- a/test-suite/success/cc.v
+++ b/test-suite/success/cc.v
@@ -77,3 +77,22 @@ Theorem discr2 : Some true = Some false -> False.
intros.
congruence.
Qed.
+
+Set Implicit Arguments.
+
+Parameter elt: Set.
+Parameter elt_eq: forall (x y: elt), {x = y} + {x <> y}.
+Definition t (A: Set) := elt -> A.
+Definition get (A: Set) (x: elt) (m: t A) := m x.
+Definition set (A: Set) (x: elt) (v: A) (m: t A) :=
+ fun (y: elt) => if elt_eq y x then v else m y.
+Lemma gsident:
+ forall (A: Set) (i j: elt) (m: t A), get j (set i (get i m) m) = get j m.
+Proof.
+ intros. unfold get, set. case (elt_eq j i); intro.
+ congruence.
+ auto.
+Qed.
+
+
+ \ No newline at end of file