]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/RELATIONAL/NLE/order.ma
matita 0.5.1 tagged
[helm.git] / 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: \forall x. x <= x.
20  intros; elim x; clear x; autobatch.
21 qed.
22
23 theorem nle_trans: \forall x,y. x <= y \to
24                    \forall z. y <= z \to x <= z.
25  intros 3. elim H; clear H x y;
26  [ autobatch
27  | lapply linear nle_inv_succ_1 to H3. decompose. destruct. 
28    autobatch
29  ].
30 qed.
31
32 theorem nle_false: \forall x,y. x <= y \to y < x \to False.
33  intros 3; elim H; clear H x y; autobatch.
34 qed.
35
36 theorem nle_irrefl: \forall x. x < x \to False.
37  intros. autobatch.
38 qed.
39
40 theorem nle_irrefl_ei: \forall x, z. z <= x \to z = succ x \to False.
41  intros 3. elim H; clear H x z; destruct. autobatch.
42 qed.
43
44 theorem nle_irrefl_smart: \forall x. x < x \to False.
45  intros 1. elim x; clear x; autobatch.
46 qed.
47
48 theorem nle_lt_or_eq: \forall y, x. x <= y \to x < y \lor x = y.
49  intros. elim H; clear H x y;
50  [ elim n; clear n
51  | decompose
52  ]; autobatch.
53 qed.