proposition: Lemma filter_eq_app_cons (f : A -> bool) l l1 a l2 : filter f l = l1 ++ a :: l2 -> exists l1' l2', l = l1' ++ a :: l2' /\ filter f l1' = l1 /\ filter f l2' = l2.
proof: Proof. revert l1 l2; induction l; ins. destruct l1, l2; ins; exists nil, nil; ins. desf. destruct l1; ins; desf. by eexists nil, l; splits; try done; ins; desf. by apply IHl in H; desf; exists (a1 :: l1'), l2'; ins; desf. apply IHl in H; desf; exists (a0 :: l1'), l2'; ins; desf. Qed.
imports: Arith HahnBase HahnList HahnRelationsBasic