| permut#(; ar, listofar) {listofar := []; sort#(; ar); let hasNext = true in while hasNext do {/* invariant ¬ dups(listofar) ∧ perm(ar, ar`) ∧ ordered≤(listofar) ∧ (hasNext ⊃ listofar.toSet = smallerPerms(ar);listofar.toSet = smallerPerms(ar) ++ ar) ∧ (¬ hasNext → max(ar)) wfbound # greaterPerms(ar) + (hasNext ⊃ 1;0) */; listofar := listofar + ar; next#(; ar; hasNext)} } |