CSCI P415/515 | Wed Feb 29 13:39:23 EST 2012 [SDJ] |
in the *pvs* buffer.
BubbleSort((: 3, 4, 1, 5, 2 :)) = (: 1, 2, 3, 4, 5 :)
and similarly for Permutation?
[-1] Ordered?(BubbleSort(L)) |------- {1} Ordered?(Bubble(K, BubbleSort(L)))
Hence, the correctness of BubbleSort quickly reduces questions about Bubble, and as always, these questions need to be generalizations of the goal. Appropriate generalizations are given in Lemmas bubble_lemma_1, and bubble_lemma_2, but before you look at them, try to discover them yourself.