X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Ftests%2Finjection.ma;h=b8ddeaa17f22dd077719e691e760c7fff34931a3;hb=070e79b6e7ec986dd5fcdee24857956f6a4a9221;hp=7d9586fd1badd4482f9dc88667cb01e755f42b89;hpb=d723cac1efffbc8ef3ffcbaa96a2c390e2b8780e;p=helm.git diff --git a/matita/tests/injection.ma b/matita/tests/injection.ma index 7d9586fd1..b8ddeaa17 100644 --- a/matita/tests/injection.ma +++ b/matita/tests/injection.ma @@ -26,7 +26,7 @@ inductive t0 : Type := theorem injection_test0: ∀n,n',m,m'. k0 n m = k0 n' m' → m = m'. intros; - injection H; + destruct H; assumption. qed. @@ -36,7 +36,7 @@ inductive t : Type → Type := theorem injection_test1: ∀n,n'. k n = k n' → n = n'. intros; - injection H; + destruct H; assumption. qed. @@ -46,7 +46,7 @@ inductive tt (A:Type) : Type -> Type := theorem injection_test2: ∀n,n',m,m'. k1 bool n n' = k1 bool m m' → n' = m'. intros; - injection H; + destruct H; assumption. qed. @@ -54,31 +54,9 @@ inductive ttree : Type → Type := tempty: ttree nat | tnode : ∀A. ttree A → ttree A → ttree A. -(* CSC: there is an undecidable unification problem here: - consider a constructor k : \forall x. f x -> i (g x) - The head of the outtype of the injection MutCase should be (f ?1) - such that (f ?1) unifies with (g d) [ where d is the Rel that binds - the corresponding right parameter in the outtype ] - Coq dodges the problem by generating an equality between sigma-types - (that state the existence of a ?1 such that ...) -theorem injection_test3: - ∀t,t'. tnode nat t tempty = tnode nat t' tempty → t = t'. - intros; - injection H; - assumption. -qed. - -theorem injection_test3: - ∀t,t'. - tnode nat (tnode nat t t') tempty = tnode nat (tnode nat t' tempty) tempty → - t = t'. - intros; - injection H; -*) - theorem injection_test4: ∀n,n',m,m'. k1 bool (S n) (S (S m)) = k1 bool (S n') (S (S (S m'))) → m = S m'. intros; - injection H; + destruct H; assumption. -qed. \ No newline at end of file +qed.