]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/contribs/RELATIONAL/NPlus/inv.ma
- bug fix in destruct
[helm.git] / matita / contribs / RELATIONAL / NPlus / inv.ma
index 99bf3a9eeaa07b3a99d4048b73fdfc15b35065c3..b6ac60873ae2788f95fa9569a754f9949319b913 100644 (file)
@@ -19,47 +19,37 @@ include "NPlus/defs.ma".
 (* Inversion lemmas *********************************************************)
 
 theorem nplus_inv_zero_1: \forall q,r. (zero + q == r) \to q = r.
- intros. elim H; clear H q r; auto.
+ intros. elim H; clear H q r; autobatch.
 qed.
 
 theorem nplus_inv_succ_1: \forall p,q,r. ((succ p) + q == r) \to 
                           \exists s. r = (succ s) \land p + q == s.
  intros. elim H; clear H q r; intros;
- [ auto depth = 4
- | clear H1. decompose. subst. auto depth = 4
+ [ autobatch depth = 4
+ | clear H1. decompose. destruct. autobatch depth = 4
  ]
 qed.
 
 theorem nplus_inv_zero_2: \forall p,r. (p + zero == r) \to p = r.
- intros. inversion H; clear H; intros;
- [ auto.
- | clear H H1. destruct H2.
- ].
+ intros. inversion H; clear H; intros; destruct. autobatch.
 qed.
 
 theorem nplus_inv_succ_2: \forall p,q,r. (p + (succ q) == r) \to 
                           \exists s. r = (succ s) \land p + q == s.
- intros. inversion H; clear H; intros;
- [ destruct H.
- | clear H1 H3 r. destruct H2; clear H2. subst. auto depth = 4.
- ].
+ intros. inversion H; clear H; intros; destruct.
+ autobatch depth = 4.
 qed.
 
 theorem nplus_inv_zero_3: \forall p,q. (p + q == zero) \to 
                           p = zero \land q = zero.
- intros. inversion H; clear H; intros;
- [ subst. auto
- | clear H H1. destruct H3.
- ].
+ intros. inversion H; clear H; intros; destruct. autobatch.
 qed.
 
 theorem nplus_inv_succ_3: \forall p,q,r. (p + q == (succ r)) \to
                           \exists s. p = succ s \land (s + q == r) \lor
                                      q = succ s \land p + s == r.
- intros. inversion H; clear H; intros;
- [ subst
- | clear H1. destruct H3. clear H3. subst.
- ]; auto depth = 4.
+ intros. inversion H; clear H; intros; destruct;
+ autobatch depth = 4.
 qed.
 
 (* Corollaries to inversion lemmas ******************************************)
@@ -67,27 +57,25 @@ qed.
 theorem nplus_inv_succ_2_3: \forall p,q,r.
                             (p + (succ q) == (succ r)) \to p + q == r.
  intros. 
- lapply linear nplus_inv_succ_2 to H. decompose. subst.
- destruct H1. clear H1. subst. auto.
+ lapply linear nplus_inv_succ_2 to H. decompose. destruct. autobatch.
 qed.
 
 theorem nplus_inv_succ_1_3: \forall p,q,r.
                             ((succ p) + q == (succ r)) \to p + q == r.
  intros. 
- lapply linear nplus_inv_succ_1 to H. decompose. subst.
- destruct H1. clear H1. subst. auto.
+ lapply linear nplus_inv_succ_1 to H. decompose. destruct. autobatch.
 qed.
 
 theorem nplus_inv_eq_2_3: \forall p,q. (p + q == q) \to p = zero.
  intros 2. elim q; clear q;
  [ lapply linear nplus_inv_zero_2 to H
  | lapply linear nplus_inv_succ_2_3 to H1
- ]; auto.
+ ]; autobatch.
 qed.
 
 theorem nplus_inv_eq_1_3: \forall p,q. (p + q == p) \to q = zero.
  intros 1. elim p; clear p;
  [ lapply linear nplus_inv_zero_1 to H
  | lapply linear nplus_inv_succ_1_3 to H1.
- ]; auto.
+ ]; autobatch.
 qed.