diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-07-22 14:42:54 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-07-22 14:42:54 +0000 |
commit | fef54f7bae3342686e8005879ed89253ea19c3aa (patch) | |
tree | 1a10a584265de7f16fdfaa78d5d91107cc510fec /theories/Classes/Init.v | |
parent | d619a834de7548649f53d59ec4fc9e892b33d24c (diff) |
New tactics [conv] to test convertibility (actually, unification) of two
terms and [head_of_constr id] to put the head of a constr in some new
hypothesis. Both are used in a new tactic to deal with partial
applications in setoid_rewrite. Also fix bug #1905 by using
[subrelation] to take care of [Morphism (R ==> R') id] constraints.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11244 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes/Init.v')
-rw-r--r-- | theories/Classes/Init.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/theories/Classes/Init.v b/theories/Classes/Init.v index 43320dceb..54c97ae7b 100644 --- a/theories/Classes/Init.v +++ b/theories/Classes/Init.v @@ -19,3 +19,16 @@ Tactic Notation "clapply" ident(c) := eapply @c ; eauto with typeclass_instances. + +(** The unconvertible typeclass, to test that two objects of the same type are + actually different. *) + +Class Unconvertible (A : Type) (a b : A). + +Ltac unconvertible := + match goal with + | |- @Unconvertible _ ?x ?y => conv x y ; fail 1 "Convertible" + | |- _ => apply Build_Unconvertible + end. + +Hint Extern 0 (@Unconvertible _ _ _) => unconvertible : typeclass_instances.
\ No newline at end of file |