]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/RELATIONAL/NLE/props.ma
some improvements
[helm.git] / helm / software / matita / contribs / RELATIONAL / NLE / props.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/props".
16
17 include "NLE/fwd.ma".
18
19 theorem nle_zero_1: \forall q. zero <= q.
20  intros. auto.
21 qed.
22
23 theorem nle_succ_succ: \forall p,q. p <= q \to succ p <= succ q.
24  intros. elim H. clear H. auto.
25 qed.
26
27 theorem nle_ind: \forall P:(Nat \to Nat \to Prop).
28                  (\forall n:Nat.P zero n) \to 
29                  (\forall n,n1:Nat.
30                   n <= n1 \to P n n1 \to P (succ n) (succ n1)
31                  ) \to
32                 \forall n,n1:Nat. n <= n1 \to P n n1.
33  intros 4. elim n; clear n;
34  [ auto
35  | lapply linear nle_inv_succ_1 to H3. decompose; subst.
36    auto
37  ].
38 qed.
39
40 theorem nle_refl: \forall x. x <= x.
41  intros 1; elim x; clear x; intros; auto.
42 qed.
43
44 theorem nle_trans_succ: \forall x,y. x <= y \to x <= succ y.
45  intros. elim H using nle_ind; clear H x y; auto.
46 qed.
47
48 theorem nle_false: \forall x,y. x <= y \to y < x \to False.
49  intros 3; elim H using nle_ind; clear H x y; auto.
50 qed.
51
52 theorem nle_trans: \forall x,y. x <= y \to
53                    \forall z. y <= z \to x <= z.
54  intros 3. elim H using nle_ind; clear H x y;
55  [ auto
56  | lapply linear nle_inv_succ_1 to H3. decompose. subst. 
57    auto
58  ].
59 qed.
60
61 theorem nle_lt_or_eq: \forall y,x. x <= y \to x < y \lor x = y.
62  intros. elim H using nle_ind; clear H x y;
63  [ elim n; clear n; auto
64  | decompose; subst; auto
65  ].
66 qed.