fact: Fixpoint opening_cells_aux (p : pt) (out : seq edge) (low_e high_e : edge) : seq cell * cell := match out with | [::] => let op0 := vertical_intersection_point p low_e in let op1 := vertical_intersection_point p high_e in match (op0,op1) with | (None,_) | (_,None) => ([::], dummy_cell) | (Some p0,Some p1) => ([::] , Bcell (no_dup_seq ([:: p1; p; p0])) [::] low_e high_e) end | c::q => let op0 := vertical_intersection_point p low_e in let (s, nc) := opening_cells_aux p q c high_e in match op0 with | None => ([::], dummy_cell) | Some p0 => (Bcell (no_dup_seq [:: p; p0]) [::] low_e c :: s, nc) end end.
imports: mathcomp(all_ssreflect) ZArith QArith List String OrderedType OrderedTypeEx FMapAVL