> \/ /\ stage = "invariant" /\ Invariant(a) /\ stage' = "sealed" /\ sealed' = TRUE /\ worm' = Append(worm, [op |-> "seal", input |-> a, output |-> a]) /\ UNCHANGED <> \/ /\ stage = "invariant" /\ ~Invariant(a) /\ stage' = "failed" /\ worm' = Append(worm, [op |-> "fail", input |-> a, output |-> a]) /\ UNCHANGED <> \* Absorbing self-loop once terminal, so the machine is total: a \* terminal `stage` is a resting state, not a genuine TLC deadlock. \* Kept out of `RealNext` (and so out of the `WF_vars(RealNext)` \* fairness obligation below): a fairness requirement on an action \* whose own effect is `UNCHANGED vars` can never be honestly \* satisfied once it is the only action left enabled. Next == \/ RealNext \/ /\ Terminal /\ UNCHANGED vars ArrayType == [1..N -> Nat] TypeOK == /\ a \in ArrayType /\ p \in [left: [1..(N \div 2) -> Nat], right: [(N \div 2 + 1)..N -> Nat]] /\ c \in ArrayType /\ d \in ArrayType /\ t \in ArrayType /\ comp \in ArrayType /\ r \in ArrayType /\ stage \in {"start", "partition", "product", "difference", "transform", "composition", "closure", "invariant", "sealed", "failed"} /\ sealed \in BOOLEAN /\ worm \in Seq([op: STRING, input: ArrayType, output: ArrayType]) EventuallyTerminal == <>Terminal Spec == Init /\ [][Next]_vars /\ WF_vars(RealNext) =============================================================================