fact: Fixpoint union (l1: list A) := match l1 with | nil => fun l2 => l2 | h1::t1 => let fix union' l2 := match l2 with | nil => l1 | h2::t2 => match cmp h1 h2 with | Eq => h1::union t1 t2 | Lt => h1::union t1 l2 | Gt => h2::union' t2 end end in union' end.
imports: lattice comparisons List