aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotin2007-08-16 14:52:49 +0000
committernotin2007-08-16 14:52:49 +0000
commit1eac679a065d9b161004fa4da881fdd734531693 (patch)
treea0ec3c1558531f190dbe65fdef0be78103778cc7
parent4e06ff81b384ab51009abfeede8bce5f95f2bf39 (diff)
Correction du bug #1322
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10077 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--tactics/setoid_replace.ml9
-rw-r--r--test-suite/bugs/closed/1322.v24
2 files changed, 29 insertions, 4 deletions
diff --git a/tactics/setoid_replace.ml b/tactics/setoid_replace.ml
index c66a55d38c..9452d4f3cd 100644
--- a/tactics/setoid_replace.ml
+++ b/tactics/setoid_replace.ml
@@ -802,15 +802,16 @@ let new_morphism m signature id hook =
try find_relation_class output'
with Not_found -> errorlabstrm "Add Morphism"
(str "Not a valid signature: " ++ pr_lconstr output' ++
- str " is neither a registered relation nor the Leibniz " ++
- str " equality.") in
+ str " is neither a registered relation nor the Leibniz " ++
+ str " equality.") in
let rel_a,rel_quantifiers_no =
match rel with
Relation rel -> rel.rel_a, rel.rel_quantifiers_no
| Leibniz (Some t) -> t, 0
- | Leibniz None -> assert false in
+ | Leibniz None -> let _,t = decompose_prod typ in t, 0 in
let rel_a_n =
- clos_norm_flags Closure.betaiotazeta empty_env Evd.empty rel_a in
+ clos_norm_flags Closure.betaiotazeta empty_env Evd.empty rel_a
+ in
try
let _,output_rel_a_n = decompose_lam_n rel_quantifiers_no rel_a_n in
let argsrev,_ = decompose_prod output_rel_a_n in
diff --git a/test-suite/bugs/closed/1322.v b/test-suite/bugs/closed/1322.v
new file mode 100644
index 0000000000..01c06f2c40
--- /dev/null
+++ b/test-suite/bugs/closed/1322.v
@@ -0,0 +1,24 @@
+Require Import Setoid.
+
+Section transition_gen.
+
+Variable I : Type.
+Variable I_eq :I -> I -> Prop.
+Variable I_eq_equiv : Setoid_Theory I I_eq.
+
+(* Add Relation I I_eq
+ reflexivity proved by I_eq_equiv.(Seq_refl I I_eq)
+ symmetry proved by I_eq_equiv.(Seq_sym I I_eq)
+ transitivity proved by I_eq_equiv.(Seq_trans I I_eq)
+as I_eq_relation. *)
+
+Add Setoid I I_eq I_eq_equiv as I_with_eq.
+
+Variable F : I -> Type.
+Variable F_morphism : forall i j, I_eq i j -> F i = F j.
+
+
+Add Morphism F with signature I_eq ==> eq as F_morphism2.
+Admitted.
+
+End transition_gen.