fact: Definition find_origin_cells (cells : seq cell) (p : pt) : seq nat := match find (fun i => strict_inside_closed p (nth i cells dummy_cell)) (seq.iota 0 (List.length cells)) with | Some n => n :: nil | None => head nil (List.map (fun av => snd av :: match door_right_cell cells (fst av) with | Some rc => rc :: nil | None => nil end) (filter (fun av => on_vert_edge p (fst av)) (all_doors cells))) end.
imports: mathcomp(all_ssreflect) ZArith QArith List String OrderedType OrderedTypeEx FMapAVL