(* To define exponential over relative number, we simply do 
   a case analysis on the sign of the number *)
 
Definition powerRZ (e : R) (n : BinInt.Z) :=
  match n with
  | BinInt.Z0 => 1%R
  | BinInt.Zpos p => (e ^ BinPos.nat_of_P p)%R
  | BinInt.Zneg p => (/ e ^ BinPos.nat_of_P p)%R
  end.

(* Specifications: *)
Theorem powerRZ_O : forall e : R, powerRZ e 0 = 1%R.
Theorem powerRZ_1 : forall e : R, powerRZ e (Zsucc 0) = e.
Theorem powerRZ_NOR : forall (e : R) (z : BinInt.Z), e <> 0%R -> powerRZ e z <> 0%R.
Theorem powerRZ_add : forall (e : R) (n m : BinInt.Z), e <> 0%R -> powerRZ e (n + m) = (powerRZ e n * powerRZ e m)%R.
Theorem powerRZ_Zopp : forall (e : R) (z : BinInt.Z), e <> 0%R -> powerRZ e (- z) = (/ powerRZ e z)%R.
Theorem powerRZ_Zs : forall (e : R) (n : BinInt.Z), e <> 0%R -> powerRZ e (Zsucc n) = (e * powerRZ e n)%R.
Theorem Zpower_nat_powerRZ : forall (n : BinInt.Z) (m : nat), IZR (Zpower_nat n m) = powerRZ (IZR n) (Z_of_nat m).
Theorem powerRZ_lt : forall (e : R) (z : BinInt.Z), (0 < e)%R -> (0 < powerRZ e z)%R.
Theorem powerRZ_le : forall (e : R) (z : BinInt.Z), (0 < e)%R -> (0 <= powerRZ e z)%R.
Theorem Rlt_powerRZ : forall (e : R) (n m : BinInt.Z), (1 < e)%R -> (n < m)%Z -> (powerRZ e n < powerRZ e m)%R.
Theorem Rpow_R1 : forall (r : R) (z : BinInt.Z), r <> 0%R -> powerRZ r z = 1%R -> Rabs r = 1%R \/ z = 0%Z.
Theorem Rpow_eq_inv : forall (r : R) (p q : BinInt.Z), r <> 0%R -> Rabs r <> 1%R -> powerRZ r p = powerRZ r q -> p = q.
Theorem Zpower_nat_powerRZ_absolu : forall n m : BinInt.Z, (0 <= m)%Z -> IZR (Zpower_nat n (Zabs_nat m)) = powerRZ (IZR n) m.
Theorem powerRZ_R1 : forall n : BinInt.Z, powerRZ 1 n = 1%R.
Theorem Rle_powerRZ : forall (e : R) (n m : BinInt.Z), (1 <= e)%R -> (n <= m)%Z -> (powerRZ e n <= powerRZ e m)%R.
Theorem Zlt_powerRZ : forall (e : R) (n m : BinInt.Z), (1 <= e)%R -> (powerRZ e n < powerRZ e m)%R -> (n < m)%Z.