(* Definition of log R+* -> R *)
(* Extension on R *)
Definition ln (x:R) : R :=
match Rlt_dec 0 x with
| left a => Rln (mkposreal x a)
| right a => 0
end.
Definition Rlog x y := (ln y)/(ln x).

(* Specifications: *)
Lemma exp_ln : forall x:R, 0 < x -> exp (ln x) = x.
Theorem exp_inv : forall x y:R, exp x = exp y -> x = y.
Theorem exp_Ropp : forall x:R, exp (- x) = / exp x.
(******************************************************************)
(** *                     Properties of  Ln                       *)
(******************************************************************)
Theorem ln_increasing : forall x y:R, 0 < x -> x < y -> ln x < ln y.
Theorem ln_exp : forall x:R, ln (exp x) = x.
Theorem ln_1 : ln 1 = 0.
Theorem ln_lt_inv : forall x y:R, 0 < x -> 0 < y -> ln x < ln y -> x < y.
Theorem ln_inv : forall x y:R, 0 < x -> 0 < y -> ln x = ln y -> x = y.
Lemma ln_neq_0 : forall x:R, x <> 1 -> 0 < x -> ln x <> 0.
Theorem ln_mult : forall x y:R, 0 < x -> 0 < y -> ln (x * y) = ln x + ln y.
Lemma ln_pow : forall (x : R), 0 < x -> forall (n : nat), ln (x^n) = (INR n)*(ln x).
Theorem ln_Rinv : forall x:R, 0 < x -> ln (/ x) = - ln x.
Theorem ln_continue :
forall y:R, 0 < y -> continue_in ln (fun x:R => 0 < x) y.