From 3eec3be7243166d6a157a8e4e914cd4076c813e3 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 27 Jun 2006 09:39:56 +0000 Subject: [PATCH] patched --- .../RELATIONAL-ARITHMETICS/add_gen.ma | 26 ++++++++++++++++++- .../RELATIONAL-ARITHMETICS/add_props.ma | 20 -------------- .../{nat_gen.ma => nat_fwd.ma} | 0 3 files changed, 25 insertions(+), 21 deletions(-) rename helm/software/matita/contribs/RELATIONAL-ARITHMETICS/{nat_gen.ma => nat_fwd.ma} (100%) diff --git a/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_gen.ma b/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_gen.ma index 225580da5..8037f8ba7 100644 --- a/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_gen.ma +++ b/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_gen.ma @@ -74,7 +74,7 @@ theorem add_gen_S_3: \forall p,q,r. add p q (S r) \to rewrite > H0. clear H0. clear r. ]; apply ex_intro; [| auto || auto ] (**) qed. - +(* (* alternative proofs invoking add_gen_2 *) variant add_gen_O_3_alt: \forall p,q. add p q O \to p = O \land q = O. @@ -102,3 +102,27 @@ variant add_gen_S_3_alt: \forall p,q,r. add p q (S r) \to rewrite > H0. clear H0. clear r. ]; apply ex_intro; [| auto || auto ]. (**) qed. +*) +(* other simplification lemmas *) + +theorem add_gen_eq_2_3: \forall p,q. add p q q \to p = O. + intros 2. elim q; clear q; intros; + [ lapply add_gen_O_2 to H as H0. clear H. + rewrite > H0. clear H0. clear p + | lapply add_gen_S_2 to H1 as H0. clear H1. + decompose H0. + lapply eq_gen_S_S to H2 as H0. clear H2. + rewrite < H0 in H3. clear H0. clear a + ]; auto. +qed. + +theorem add_gen_eq_1_3: \forall p,q. add p q p \to q = O. + intros 1. elim p; clear p; intros; + [ lapply add_gen_O_1 to H as H0. clear H. + rewrite > H0. clear H0. clear q + | lapply add_gen_S_1 to H1 as H0. clear H1. + decompose H0. + lapply eq_gen_S_S to H2 as H0. clear H2. + rewrite < H0 in H3. clear H0. clear a + ]; auto. +qed. diff --git a/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_props.ma b/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_props.ma index e04d8f616..6d2bef823 100644 --- a/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_props.ma +++ b/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/add_props.ma @@ -48,7 +48,6 @@ theorem add_shift_S_sx: \forall p,q,r. add p (S q) r \to add (S p) q r. auto. qed. - theorem add_shift_S_dx: \forall p,q,r. add (S p) q r \to add p (S q) r. intros. lapply add_gen_S_1 to H as H0. clear H. @@ -104,22 +103,3 @@ theorem add_conf: \forall p,q,r1. add p q r1 \to rewrite > H2. clear H2. clear r2. ]; auto. qed. - - - -theorem add_gen_eq_2_3: \forall p,q. add p q q \to p = O. - intros 2. elim q; clear q; intros; - [ lapply add_gen_O_2 to H as H0. clear H. - rewrite > H0. clear H0. clear p - | lapply add_gen_S_2 to H1 as H0. clear H1. - decompose H0. - lapply eq_gen_S_S to H2 as H0. clear H2. - rewrite < H0 in H3. clear H0. clear a - ]; auto. -qed. - -theorem add_gen_eq_1_3: \forall p,q. add p q p \to q = O. - intros. - lapply add_sym to H. clear H. - auto. -qed. diff --git a/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/nat_gen.ma b/helm/software/matita/contribs/RELATIONAL-ARITHMETICS/nat_fwd.ma similarity index 100% rename from helm/software/matita/contribs/RELATIONAL-ARITHMETICS/nat_gen.ma rename to helm/software/matita/contribs/RELATIONAL-ARITHMETICS/nat_fwd.ma -- 2.39.2