let status (a, b, _) =
match Term.status a, Term.status b with
| Term.Variable, Term.Variable -> Term.Variable
| (Term.Mixed _ as s1) , _ -> s1
| _, (Term.Mixed _ as s2) -> s2
| (Term.Pure(i) as s1), Term.Variable -> s1
| Term.Variable, (Term.Pure(j) as s2) -> s2
| Term.Pure(i), (Term.Pure(j) as s2) ->
if i = j then s2 else Term.Mixed(i, a)