let rec eq a b =
match a, b with
| Var(x), Var(y) ->
Var.eq x y
| App(f,l), App(g,m) ->
Sym.eq f g && eql l m
| _ ->
false
and eql al bl =
try List.for_all2 eq al bl with Invalid_argument _ -> false