:: deftheorem defines QuickSort SCPQSORT:def 2 :
for n, p0 being Nat holds QuickSort (n,p0) = ((((GBP := 0) ';' (SBP := 1)) ';' ((SBP,(p0 + n)) := (p0 + 1))) ';' ((SBP,((p0 + n) + 1)) := (p0 + n))) ';' (while>0 (GBP,1,((((GBP,2) := (SBP,((p0 + n) + 1))) ';' (SubFrom (GBP,2,SBP,(p0 + n)))) ';' (if>0 (GBP,2,(((((GBP,2) := (SBP,(p0 + n))) ';' ((GBP,4) := (SBP,((p0 + n) + 1)))) ';' Partition) ';' (((((((SBP,((p0 + n) + 3)) := (SBP,((p0 + n) + 1))) ';' ((SBP,((p0 + n) + 1)) := (GBP,4))) ';' ((SBP,((p0 + n) + 2)) := (GBP,4))) ';' (AddTo (SBP,((p0 + n) + 1),(- 1)))) ';' (AddTo (SBP,((p0 + n) + 2),1))) ';' (AddTo (GBP,1,2)))),(Load (AddTo (GBP,1,(- 2)))))))));