let
recursive f =
List
.exists (
LogicId
.equal f) !stack