fact: Fixpoint subtract ts1 ts2 xs := match ts1 with Pts n v :: tsx1 => if has (key n) ts2 then subtract tsx1 (kfree n ts2) xs else subtract tsx1 ts2 (Pts n v :: xs) | Var n :: tsx1 => if has (var n) ts2 then subtract tsx1 (vfree n ts2) xs else subtract tsx1 ts2 (Var T n :: xs) | [::] => (xs, ts2) end.
imports: Coq(ssreflect ssrbool ssrfun) mathcomp(ssrnat eqtype seq) pcm(options pred prelude) pcm(pcm unionmap natmap)