The paper uses the formalism of indexed categories to recover the proof of a standard final coalgebra theorem, thus showing existence of final coalgebras for a special class of functors on categories with finite limits and colimits. This is then put to use in the context of a Heyting pretopos with a class of small maps, in order to build the final coalgebra for the Ps functor. This is then proved to provide a model for various set theories with the Anti-Foundation Axiom, depending on the chosen axiomatisation for the class of small maps.