]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/RELATIONAL/NLE/order.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / RELATIONAL / NLE / order.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
16
17 include "NLE/inv.ma".
18
19 theorem nle_refl: ∀x. x ≤ x.
20  intros; elim x; clear x; autobatch.
21 qed.
22
23 theorem nle_trans: ∀x,y. x ≤ y → ∀z. y ≤ z → x ≤ z.
24  intros 3; elim H; clear H x y;
25  [ autobatch
26  | lapply linear nle_inv_succ_1 to H3. decompose. destruct. 
27    autobatch
28  ].
29 qed.
30
31 theorem nle_false: ∀x,y. x ≤ y → y < x → False.
32  intros 3; elim H; clear H x y; autobatch.
33 qed.
34
35 theorem nle_irrefl: ∀x. x < x → False.
36  intros. autobatch.
37 qed.
38
39 theorem nle_irrefl_ei: ∀x, z. z ≤ x → z = succ x → False.
40  intros 3; elim H; clear H x z; destruct; autobatch.
41 qed.
42
43 theorem nle_irrefl_smart: ∀x. x < x → False.
44  intros 1. elim x; clear x; autobatch.
45 qed.
46
47 theorem nle_lt_or_eq: ∀y, x. x ≤ y → x < y ∨ x = y.
48  intros; elim H; clear H x y;
49  [ elim n; clear n
50  | decompose
51  ]; autobatch.
52 qed.