Implementation and partial proof of Bucketsort.