Definition ps_atan_exists_1 (x : R) (Hx : -1 <= x <= 1) :
{l : R | Un_cv (fun N : nat => sum_f_R0 (tg_alt (Ratan_seq x)) N) l}.
Definition in_int (x : R) : {-1 <= x <= 1}+{~ -1 <= x <= 1}.
Definition ps_atan (x : R) : R :=
match in_int x with
left h => let (v, _) := ps_atan_exists_1 x h in v
| right h => atan x
end.
(** ** Proof of the equivalence of the two definitions between -1 and 1 *)

(* Specifications: *)
Lemma ps_atan0_0 : ps_atan 0 = 0.
Lemma ps_atan_exists_1_opp : forall x h h',
proj1_sig (ps_atan_exists_1 (-x) h) = -(proj1_sig (ps_atan_exists_1 x h')).
Lemma ps_atan_opp : forall x,
ps_atan (-x) = -ps_atan x.