(* Getting the canceling factor for fortho *)
Fixpoint fget n : (vect n) -> (vect n) -> K :=
match n return vect n -> vect n -> K with
| O => fun x1 x2 => 0%f
| S n1 =>
fun x1 x2 =>
let (x11, x12) := x1 in
let (x21, x22) := x2 in
if x12 ?= 0 then (('C[x11])^-1 * 'C[x21])%f else fget n1 x12 x22
end.

Lemma fortho_fget n x1 x2 : x1 <> 0 -> hom n 1 x1 -> hom n 1 x2 ->
fortho n x1 (x2 + (-(1) * fget n x1 x2)%f .* x1).