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/exp".
17 include "nat/times.ma".
19 let rec exp n m on m\def
22 | (S p) \Rightarrow (times n (exp n p)) ].
24 theorem exp_plus_times : \forall n,p,q:nat.
25 eq nat (exp n (plus p q)) (times (exp n p) (exp n q)).
27 simplify.rewrite < plus_n_O.reflexivity.
28 simplify.rewrite > H.symmetry.
32 theorem exp_n_O : \forall n:nat. eq nat (S O) (exp n O).
33 intro.simplify.reflexivity.
36 theorem exp_n_SO : \forall n:nat. eq nat n (exp n (S O)).
37 intro.simplify.rewrite < times_n_SO.reflexivity.
40 theorem exp_exp_times : \forall n,p,q:nat.
41 eq nat (exp (exp n p) q) (exp n (times p q)).
43 elim q.simplify.rewrite < times_n_O.simplify.reflexivity.
44 simplify.rewrite > H.rewrite < exp_plus_times.
45 rewrite < times_n_Sm.reflexivity.