let
is_canonical p x =
let
(x', _) = find p x
in
Term
.eq x' x