X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Ftests%2Finversion.ma;h=f717cd1df7f17969a0ca6169cc21833e711f4754;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=4f8c4c6d42b6560bd04872e007892776bab10ab0;hpb=650e3b3c9ff0b9cafb76a0edf8139a53446937ba;p=helm.git diff --git a/helm/matita/tests/inversion.ma b/helm/matita/tests/inversion.ma index 4f8c4c6d4..f717cd1df 100644 --- a/helm/matita/tests/inversion.ma +++ b/helm/matita/tests/inversion.ma @@ -28,21 +28,15 @@ alias symbol "eq" (instance 0) = "Coq's leibnitz's equality". theorem test_inversion: \forall n. le n O \to n=O. intros. (* inversion begins *) - cut O=O. - (* goal 2: 0 = 0 *) - goal 7. reflexivity. - (* goal 1 *) - generalize in match Hcut. - apply (le_ind ? (\lambda x. O=x \to n=x) ? ? ? H). - (* first goal (left open) *) - intro. rewrite < H1. - clear Hcut. - (* second goal (closed) *) - goal 14. - simplify. intros. - discriminate H3. - (* inversion ends *) + cut (O=O); + [ 2: reflexivity; + | generalize in match Hcut. + apply (le_ind ? (\lambda x. O=x \to n=x) ? ? ? H); + [ intro. rewrite < H1. clear Hcut. + | simplify. intros. discriminate H3. + ] reflexivity. + ] qed. (* Piu' semplice e non lascia l'ipotesi inutile Hcut *) @@ -51,13 +45,9 @@ theorem test_inversion2: \forall n. le n O \to n=O. intros. (* inversion begins *) generalize in match (refl_equal nat O). - apply (le_ind ? (\lambda x. O=x \to n=x) ? ? ? H). - (* first goal (left open) *) - intro. rewrite < H1. - (* second goal (closed) *) - goal 13. - simplify. intros. - discriminate H3. - (* inversion ends *) + apply (le_ind ? (\lambda x. O=x \to n=x) ? ? ? H); + [ intro. rewrite < H1. + | simplify. intros. discriminate H3. + ] reflexivity. qed.