1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "logic/connectives.ma".
18 theorem eq_S_S: \forall m,n. m = n \to (S m) = (S n).
19 intros; destruct; autobatch.
22 inductive le: nat \to nat \to Prop \def
23 le_zero: \forall n. (le O n)
24 | le_succ: \forall m, n. (le m n) \to (le (S m) (S n)).
26 theorem le_refl: \forall x. (le x x).
27 intros; elim x; clear x; autobatch.
30 theorem le_gen_x_O_aux: \forall x, y. (le x y) \to (y =O) \to (x = O).
31 intros 3; elim H; clear H x y;
37 theorem le_gen_x_O: \forall x. (le x O) \to (x = O).
38 intros; lapply linear le_gen_x_O_aux to H;
44 theorem le_x_O: \forall x. (x = O) \to (le x O).
45 intros; destruct; autobatch.
48 theorem le_gen_S_x_aux: \forall m,x,y. (le y x) \to (y = S m) \to
49 (\exists n. x = (S n) \land (le m n)).
50 intros 4; elim H; clear H x y;
56 theorem le_gen_S_x: \forall m,x. (le (S m) x) \to
57 (\exists n. x = (S n) \land (le m n)).
58 intros; lapply le_gen_S_x_aux to H; autobatch.
61 theorem le_S_x: \forall m,x. (\exists n. x = (S n) \land (le m n)) \to
63 intros; decompose; destruct; autobatch.
66 theorem le_gen_S_S: \forall m,n. (le (S m) (S n)) \to (le m n).
68 lapply linear le_gen_S_x to H as H0; decompose; destruct; autobatch.
71 theorem le_S_S: \forall m,n. (le m n) \to (le (S m) (S n)).
75 theorem le_trans: \forall x,y. (le x y) \to \forall z. (le y z) \to (le x z).
76 intros 3. elim H; clear H x y;
78 | lapply linear le_gen_S_x to H3; decompose; destruct; autobatch.