Definition nat_to_ring (n : nat) : K :=
  sum_n_m (fun _ => one) 1 n.

(* Specifications: *)
Lemma nat_to_ring_O : nat_to_ring O = zero.
Lemma nat_to_ring_Sn (n : nat) : nat_to_ring (S n) = plus (nat_to_ring n) one.
Lemma is_derive_mult (f g : K -> K) x (df dg : K) : is_derive f x df -> is_derive g x dg -> (forall n m : K, mult n m = mult m n) -> is_derive (fun x : K => mult (f x) (g x)) x (plus (mult df (g x)) (mult (f x) dg)).
Lemma filterdiff_pow_n {K : AbsRing} (x : K) (n : nat) : (forall a b : K, mult a b = mult b a) -> filterdiff (fun y : K => pow_n y n) (locally x) (fun y : K => scal y (mult (nat_to_ring n) (pow_n x (pred n)))).
Lemma is_derive_n_pow_smalli: forall i p x, (i <= p)%nat -> is_derive_n (fun x : R => x ^ p) i x (INR (fact p) / INR (fact (p - i)%nat) * x ^ (p - i)%nat).
Lemma Derive_n_pow_smalli: forall i p x, (i <= p)%nat -> Derive_n (fun x : R => x ^ p) i x = INR (fact p) / INR (fact (p - i)%nat) * x ^ (p - i)%nat.
Lemma is_derive_n_pow_bigi: forall i p x, (p < i) %nat -> is_derive_n (fun x : R => x ^ p) i x 0.
Lemma Derive_n_pow_bigi: forall i p x, (p < i) %nat -> Derive_n (fun x : R => x ^ p) i x = 0.
Lemma Derive_n_pow i p x: Derive_n (fun x : R => x ^ p) i x = match (le_dec i p) with | left _ => INR (fact p) / INR (fact (p -i)%nat) * x ^ (p - i)%nat | right _ => 0 end.
Lemma ex_derive_n_pow i p x: ex_derive_n (fun x : R => x ^ p) i x.
Lemma is_RInt_pow : forall a b n, is_RInt (fun x => pow x n) a b (pow b (S n) / INR (S n) - pow a (S n) / INR (S n)).
Lemma exp_ge_taylor (x : R) (n : nat) : 0 <= x -> sum_f_R0 (fun k => x^k / INR (fact k)) n <= exp x.
Lemma is_exp_Reals (x : R) : is_pseries (fun n => / INR (fact n)) x (exp x).
Lemma exp_Reals (x : R) : exp x = PSeries (fun n => / INR (fact n)) x.
Lemma is_lim_exp_p : is_lim (fun y => exp y) p_infty p_infty.
Lemma is_lim_exp_m : is_lim (fun y => exp y) m_infty 0.
Lemma ex_lim_exp (x : Rbar) : ex_lim (fun y => exp y) x.
Lemma Lim_exp (x : Rbar) : Lim (fun y => exp y) x = match x with | Finite x => exp x | p_infty => p_infty | m_infty => 0 end.
Lemma is_lim_div_exp_p : is_lim (fun y => exp y / y) p_infty p_infty.
Lemma is_lim_mul_exp_m : is_lim (fun y => y * exp y) m_infty 0.
Lemma is_lim_div_expm1_0 : is_lim (fun y => (exp y - 1) / y) 0 1.
Lemma is_RInt_exp : forall a b, is_RInt exp a b (exp b - exp a).
Lemma is_lim_ln_p : is_lim (fun y => ln y) p_infty p_infty.
Lemma is_lim_ln_0 : filterlim ln (at_right 0) (Rbar_locally m_infty).
Lemma is_lim_div_ln_p : is_lim (fun y => ln y / y) p_infty 0.
Lemma is_lim_div_ln1p_0 : is_lim (fun y => ln (1+y) / y) 0 1.
Lemma is_lim_sinc_0 : is_lim (fun x => sin x / x) 0 1.
Lemma CV_radius_atan : CV_radius (fun n => (-1)^n / (INR (S (n + n)))) = 1.
Lemma atan_Reals (x : R) : Rabs x < 1 -> atan x = x * PSeries (fun n => (-1)^n / (INR (S (n + n)))) (x ^ 2).