fact: Definition point_to_door (cells : seq cell) (p : annotated_point) (c1i c2i : nat) : seq (annotated_point * annotated_point) := let c1 := nth c1i cells dummy_cell in let c2 := nth c2i cells dummy_cell in match common_vert_edge c1 c2 with Some v => if (Qeq_bool (p_x (apt_val p)) (ve_x v)) && negb (on_vert_edge (apt_val p) v) then (p, Apt (cell_center c1) (c1i::nil)) :: (Apt (cell_center c1) (c1i :: nil), Apt (vert_edge_midpoint v) (c1i :: c2i :: nil)) :: nil else (p, Apt (vert_edge_midpoint v) (c1i :: c2i :: nil)) :: nil | None => nil end.
imports: mathcomp(all_ssreflect) ZArith QArith List String OrderedType OrderedTypeEx FMapAVL