(** * Exponential function with exponent in nat. *)

Fixpoint Exp (a : Z) (n : nat) {struct n} : Z :=
  match n with
  | O => 1%Z
  | S m => (a * Exp a m)%Z
  end.

(* Specifications: *)
Lemma exp_0 : forall n : nat, Exp 0 (S n) = 0%Z.
Lemma exp_1 : forall n : nat, Exp 1 n = 1%Z.
Lemma exp_S : forall (a : Z) (n : nat), Exp a (S n) = (a * Exp a n)%Z.
Lemma exp_plus : forall (a : Z) (n m : nat), Exp a (n + m) = (Exp a n * Exp a m)%Z.
Lemma exp_abn : forall (a b : Z) (n : nat), Exp (a * b) n = (Exp a n * Exp b n)%Z.
Lemma exp_mult : forall (a : Z) (n m : nat), Exp a (n * m) = Exp (Exp a n) m.
Lemma exp_not0 : forall a : Z, a <> 0%Z -> forall m : nat, Exp a m <> 0%Z.
Lemma exp_eq : forall (n m : nat) (a : Z), n = m -> Exp a n = Exp a m.
Lemma exp_pred_succ : forall (a : Z) (n : nat), Exp a (pred (S n)) = Exp a n.