]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/RELATIONAL/NLE/fwd.ma
;auto fixed
[helm.git] / helm / software / matita / contribs / RELATIONAL / NLE / fwd.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/RELATIONAL/NLE/fwd".
16
17 include "logic/connectives.ma".
18
19 include "NPlus/fwd.ma". 
20 include "NLE/defs.ma".
21
22 theorem nle_gen_succ_1: \forall x,y. x < y \to 
23                         \exists z. y = succ z \land x <= z.
24  unfold NLE. 
25  intros. decompose.
26  lapply linear nplus_gen_succ_2 to H1 as H.
27  decompose. subst.
28  apply ex_intro;[| auto] (**)
29 qed.
30
31
32 theorem nle_gen_succ_succ: \forall x,y. x < succ y \to x <= y.
33  intros.
34  lapply linear nle_gen_succ_1 to H as H0. decompose H0.
35  lapply linear eq_gen_succ_succ to H1 as H. subst.
36  auto.
37 qed.
38
39 theorem nle_gen_succ_zero: \forall x. x < zero \to False.
40  intros.
41  lapply linear nle_gen_succ_1 to H. decompose.
42  lapply linear eq_gen_zero_succ to H1. decompose.
43 qed.
44
45 theorem nle_gen_zero_2: \forall x. x <= zero \to x = zero.
46  intros 1. elim x; clear x; intros;
47  [ auto new timeout=30
48  | lapply linear nle_gen_succ_zero to H1. decompose.
49  ].
50 qed.
51
52 theorem nle_gen_succ_2: \forall y,x. x <= succ y \to
53                         x = zero \lor \exists z. x = succ z \land z <= y.
54  intros 2; elim x; clear x; intros;
55  [ auto new timeout=30
56  | lapply linear nle_gen_succ_succ to H1.
57    right. apply ex_intro; [|auto new timeout=30] (**)
58  ].
59 qed.