1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/nat/compare".
17 include "nat/orders.ma".
18 include "datatypes/bool.ma".
26 | (S q) \Rightarrow leb p q]].
28 theorem leb_to_Prop: \forall n,m:nat.
30 [ true \Rightarrow (le n m)
31 | false \Rightarrow (Not (le n m))].
34 (\lambda n,m:nat.match (leb n m) with
35 [ true \Rightarrow (le n m)
36 | false \Rightarrow (Not (le n m))]).
37 simplify.exact le_O_n.
38 simplify.exact not_le_Sn_O.
39 intros 2.simplify.elim (leb n1 m1).
40 simplify.apply le_S_S.apply H.
41 simplify.intros.apply H.apply le_S_S_to_le.assumption.
44 theorem le_elim: \forall n,m:nat. \forall P:bool \to Prop.
45 ((le n m) \to (P true)) \to ((Not (le n m)) \to (P false)) \to
50 [ true \Rightarrow (le n m)
51 | false \Rightarrow (Not (le n m))] \to (P (leb n m)).
52 apply Hcut.apply leb_to_Prop.