Skip to content

Commit

Permalink
Fix 2020 permutations insertion.pvl
Browse files Browse the repository at this point in the history
  • Loading branch information
bobismijnnaam committed Jun 29, 2023
1 parent 7e21aac commit c34bc0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/publications/2020/permutations/insertion.pvl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BubbleSort {
int k = 0;

loop_invariant 0 <= k && k <= |xs|;
loop_invariant (\forall int l; l>=0 && l<k; counter(xs + ys, xs[l]) == counter(xs, xs[l]) + counter(ys, xs[l]));
loop_invariant (\forall int l; l>=0 && l<k; {: counter(xs + ys, xs[l]) :} == counter(xs, xs[l]) + counter(ys, xs[l]));
while(k < |xs|)
{
lemma_count_app(xs, ys, xs[k]);
Expand Down Expand Up @@ -157,7 +157,7 @@ class BubbleSort {
int k = 0;

loop_invariant 0 <= k && k <= |xs|;
loop_invariant (\forall int l; l>=0 && l<k; counter(xs, xs[l]) == counter(ys, xs[l]));
loop_invariant (\forall int l; l>=0 && l<k; {: counter(xs, xs[l]) :} == counter(ys, xs[l]));
while(k < |xs|)
{
lemma_swap_permutation(xs, ys, i, j, xs[k]);
Expand Down

0 comments on commit c34bc0d

Please sign in to comment.