establish and use a loop invariant that the multiset of the array equals the disjoint multiset-sum of the prefix up to i and the suffix from i, and prove it by induction on i using Dafny's sequence-splitting lemmas