(* This code is copyrighted by its authors; it is distributed under  *)
(* the terms of the LGPL license (see LICENSE and description files) *)
(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
(****************************************************************************)
(*                                                                          *)
(*                                                                          *)
(*                   Solange Coupet-Grimal & Line Jakubiec                  *)
(*                                                                          *)
(*                                                                          *)
(*              Laboratoire d'Informatique de Marseille                     *)
(*               CMI-Technopole de Chateau-Gombert                          *)
(*                   39, Rue F. Joliot Curie                                *)
(*                   13453 MARSEILLE Cedex 13                               *)
(*           e-mail:{Solange.Coupet,Line.Jakubiec}@lim.univ-mrs.fr          *)
(*                                                                          *)
(*                                                                          *)
(*                                Coq V5.10                                 *)
(*                              May 30th 1996                               *)
(*                                                                          *)
(****************************************************************************)
(*                                Lib_Exp.v                                 *)
(****************************************************************************)
Require Export Lib_Mult.
Fixpoint exp_2 (n : nat) : nat :=
match n return nat with
| O =>
(*O*)  1 (*S p*)
| S p => 2 * exp_2 p
end.
Fixpoint exp_n (n m : nat) {struct m} : nat :=
match m return nat with
| O =>
(*O*)  1 (*S p*)
| S p => n * exp_n n p
end.
(************************************************************************)
(********************************* Base 2 *******************************)
(************************************************************************)
simple induction n; auto with arith.
intros.
change (exp_2 (S n0) = 2 * exp_n 2 n0) in |- *.
elim H; auto with arith.
Qed.
Hint Resolve eq_exp_2_exp_n.

Lemma exp_2_n_plus_n : forall n : nat, exp_2 n + exp_2 n = exp_2 (S n).