diff options
| author | herbelin | 2008-06-10 19:36:10 +0000 |
|---|---|---|
| committer | herbelin | 2008-06-10 19:36:10 +0000 |
| commit | cc46417aad0bb80e3617baaf37fee93f1ea3034e (patch) | |
| tree | 6c890934d88f19c42467a0b8aa8114969064f399 | |
| parent | 5d8d8e858e56c0d12cb262d5ff8e733ae7afc102 (diff) | |
- Amélioration nommage dans EqdepFacts suivant remarque de Arthur C.
- Test match dépendant.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11095 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | test-suite/success/Cases-bug1834.v | 13 | ||||
| -rw-r--r-- | theories/Logic/EqdepFacts.v | 19 |
2 files changed, 19 insertions, 13 deletions
diff --git a/test-suite/success/Cases-bug1834.v b/test-suite/success/Cases-bug1834.v new file mode 100644 index 0000000000..543ca0c924 --- /dev/null +++ b/test-suite/success/Cases-bug1834.v @@ -0,0 +1,13 @@ +(* Bug in the computation of generalization *) + +(* The following bug, elaborated by Bruno Barras, is solved from r11083 *) + +Parameter P : unit -> Prop. +Definition T := sig P. +Parameter Q : T -> Prop. +Definition U := sig Q. +Parameter a : U. +Check (match a with exist (exist tt e2) e3 => e3=e3 end). + +(* There is still a form submitted by Pierre Corbineau (#1834) which fails *) + diff --git a/theories/Logic/EqdepFacts.v b/theories/Logic/EqdepFacts.v index 7e02d06f33..b457a55b99 100644 --- a/theories/Logic/EqdepFacts.v +++ b/theories/Logic/EqdepFacts.v @@ -104,7 +104,7 @@ Implicit Arguments eq_dep1 [U P]. (** Dependent equality is equivalent to equality on dependent pairs *) -Lemma eq_sigS_eq_dep : +Lemma eq_sigT_eq_dep : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), existT P p x = existT P q y -> eq_dep p x q y. Proof. @@ -113,26 +113,19 @@ Proof. apply eq_dep_intro. Qed. +Notation eq_sigS_eq_dep := eq_sigT_eq_dep (only parsing). (* Compatibility *) + Lemma equiv_eqex_eqdep : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), - existS P p x = existS P q y <-> eq_dep p x q y. + existT P p x = existT P q y <-> eq_dep p x q y. Proof. split. (* -> *) - apply eq_sigS_eq_dep. + apply eq_sigT_eq_dep. (* <- *) destruct 1; reflexivity. Qed. -Lemma eq_sigT_eq_dep : - forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), - existT P p x = existT P q y -> eq_dep p x q y. -Proof. - intros. - dependent rewrite H. - apply eq_dep_intro. -Qed. - Lemma eq_dep_eq_sigT : forall (U:Type) (P:U -> Type) (p q:U) (x:P p) (y:P q), eq_dep p x q y -> existT P p x = existT P q y. @@ -258,7 +251,7 @@ Section Corollaries. Proof. intro eq_dep_eq; red; intros. apply eq_dep_eq. - apply eq_sigS_eq_dep. + apply eq_sigT_eq_dep. assumption. Qed. |
