I haven't tried writing a formal proof of that algorithm, and it is not entirely clear to me where you are stuck. The (type) invariant contains the conjunct IsFiniteSet(S) and you need to prove that this predicate is preserved by action Lbl_1. You'll need to use the standard module FiniteSetTheorems contained in the TLAPS distribution. (If you haven't done so yet, you should add the corresponding directory to the Toolbox search path.) In particular, the lemmas FS_AddElement and FS_RemoveElement will be useful. Hope this helps, Stephan
