This is an implementation of the Unify approach for the contains function. It is unique in that its generator invariant can recursively generate a new generator invariant once.