]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/library/decidable_kit/list_aux.ma
new implementation of the destruct tactic,
[helm.git] / matita / library / decidable_kit / list_aux.ma
index d641d9018aaec1560ea81b387ceb80b078ba5730..c1a03060b27ea43871a5c837776876d598771fb2 100644 (file)
@@ -96,13 +96,9 @@ cases c; intros (H); [ apply reflect_true | apply reflect_false ]
      | simplify;  intros;
        cases (b2pT ? ? (andbPF ? ?) (p2bT ? ? (negbP ?) H)); clear H;
        [ intros; lapply (b2pF ? ? (eqP d ? ?) H1) as H'; clear H1;
-         (* XXX destruct H; *)
-         change in H' with (Not ((match (x1::tl1) with [nil⇒x1|(cons x1 _) ⇒ x1]) = s));
-         rewrite > H in H'; simplify in H'; apply H'; reflexivity;
-       | intros; lapply (IH ? H1) as H';
-         (* XXX destruct H1 *)
-         change in H' with (Not ((match (x1::tl1) with [nil⇒tl1|(cons _ l) ⇒ l]) = l)); 
-         rewrite > H in H'; simplify in H'; apply H'; reflexivity;]]]]
+         destruct H; rewrite > Hcut in H'; apply H'; reflexivity;
+       | intros; lapply (IH ? H1) as H'; destruct H;
+         apply H'; reflexivity;]]]]
 qed.
     
 definition list_eqType : eqType → eqType ≝ λd:eqType.mk_eqType ? ? (lcmpP d).