Definition pos_div_2 (eps : posreal) := mkposreal _ (is_pos_div_2 eps).(** * The sign function *)

Definition sign (x : R) :=
  match total_order_T 0 x with
  | inleft (left _) => 1
  | inleft (right _) => 0
  | inright _ => -1
  end.

Lemma head_map {T1 T2 : Type} (f : T1 -> T2) (s : seq T1) (x : T1) : head (f x) (map f s) = f (head x s).