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 (* \ / Matita is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/library_autobatch/nat/factorial".
17 include "auto/nat/le_arith.ma".
22 | (S m) \Rightarrow (S m)*(fact m)].
24 interpretation "factorial" 'fact n = (cic:/matita/library_autobatch/nat/factorial/fact.con n).
26 theorem le_SO_fact : \forall n. (S O) \le n!.
32 | change with ((S O) \le (S n1)*n1!).
34 (*apply (trans_le ? ((S n1)*(S O)))
44 theorem le_SSO_fact : \forall n. (S O) < n \to (S(S O)) \le n!.
50 apply (not_le_Sn_O (S O) H).*)
52 change with ((S (S O)) \le (S m)*m!).
53 apply (trans_le ? ((S(S O))*(S O)));autobatch
63 theorem le_n_fact_n: \forall n. n \le n!.
67 | change with (S n1 \le (S n1)*n1!).
68 apply (trans_le ? ((S n1)*(S O)));autobatch
69 (*[ rewrite < times_n_SO.
78 theorem lt_n_fact_n: \forall n. (S(S O)) < n \to n < n!.
84 apply (not_le_Sn_O (S(S O)) H)*)
86 change with ((S m) < (S m)*m!).
87 apply (lt_to_le_to_lt ? ((S m)*(S (S O))))
88 [ rewrite < sym_times.