]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/RELATIONAL/NLE/inv.ma
refactoring
[helm.git] / helm / software / matita / contribs / RELATIONAL / NLE / inv.ma
diff --git a/helm/software/matita/contribs/RELATIONAL/NLE/inv.ma b/helm/software/matita/contribs/RELATIONAL/NLE/inv.ma
new file mode 100644 (file)
index 0000000..e42eecd
--- /dev/null
@@ -0,0 +1,54 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+set "baseuri" "cic:/matita/RELATIONAL/NLE/inv".
+
+include "NPlus/inv.ma".
+include "NLE/defs.ma".
+
+theorem nle_inv_succ_1: \forall x,y. x < y \to 
+                         \exists z. y = succ z \land x <= z.
+ intros. elim H.
+ lapply linear nplus_gen_succ_2 to H1.
+ decompose. subst. auto depth = 4.
+qed.
+
+theorem nle_inv_succ_succ: \forall x,y. x < succ y \to x <= y.
+ intros.
+ lapply linear nle_inv_succ_1 to H. decompose.
+ destruct H1. clear H1. subst.
+ auto.
+qed.
+
+theorem nle_inv_succ_zero: \forall x. x < zero \to False.
+ intros.
+ lapply linear nle_inv_succ_1 to H. decompose.
+ destruct H1.
+qed.
+
+theorem nle_inv_zero_2: \forall x. x <= zero \to x = zero.
+ intros 1. elim x; clear x; intros;
+ [ auto
+ | lapply linear nle_inv_succ_zero to H1. decompose.
+ ].
+qed.
+
+theorem nle_inv_succ_2: \forall y,x. x <= succ y \to
+                        x = zero \lor \exists z. x = succ z \land z <= y.
+ intros 2; elim x; clear x; intros;
+ [ auto
+ | lapply linear nle_inv_succ_succ to H1.
+   auto depth = 4.
+ ].
+qed.