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

Lemma behead_rcons {T : Type} (s : seq T) (t : T) :
(0 < size s)%nat ->  behead (rcons s t) = rcons (behead s) t.