fact: Definition to_next_door (op1 op2 : option pt) (cells : seq cell) (c1i c2i c3i : nat) : seq (annotated_point * annotated_point) := let c2 := nth c2i cells dummy_cell in let p1 := match op1 with | Some p1 => p1 | None => match common_vert_edge (nth c1i cells dummy_cell) c2 with | Some v => vert_edge_midpoint v | None => dummy_pt end end in let p2 := match op2 with | Some p2 => p2 | None => match common_vert_edge c2 (nth c3i cells dummy_cell) with | Some v => vert_edge_midpoint v | None => dummy_pt end end in if Qeq_bool (p_x p1) (p_x p2) then let intermediate_point := Apt (cell_center c2) (c2i :: nil) in (Apt p1 (c1i :: c2i :: nil), intermediate_point) :: (intermediate_point, Apt p2 (c2i :: c3i :: nil)) :: nil else (Apt p1 (c1i :: c2i :: nil), Apt p2 (c2i :: c3i :: nil)) :: nil.
imports: mathcomp(all_ssreflect) ZArith QArith List String OrderedType OrderedTypeEx FMapAVL