A proven deterrent? Do you have any facts to back-up your posit? The crime and recidivism rates would seem to indicate the contrary; especially, in the states.
Essentially, we should - in theory - have no crime by now (given it's been over a millennium) as all rates should've diminished to zero, yeah?
At best, punishment as a deterrent is keeping the for-profit prison-industrial complex in business and that's about the extent of any benefit[s] (if it can even be called that) it might be providing to society.