fact: Fixpoint mergeL (l1:klist elt) : klist elt' -> klist elt'' -> klist elt'' := match l1 with | nil => mapoL (fun k v' => f k None (Some v')) | (x,vx)::l1' => fix mergeL_l1 l2 acc := match l2 with | nil => mapoL (fun k v => f k (Some v) None) l1 acc | (y,vy)::l2' => match K.compare x y with | Eq => mergeL l1' l2' (ocons x (f x (Some vx) (Some vy)) acc) | Lt => mergeL_l1 l2' (ocons y (f y None (Some vy)) acc) | Gt => mergeL l1' l2 (ocons x (f x (Some vx) None) acc) end end end.
imports: Coq(Bool BinPos Pnat Setoid SetoidList PeanoNat) Coq(Orders OrdersFacts OrdersLists) MMaps(Utils Interface OrdList GenTree)