Wait, that seems too high to me. If you can't sell, then you are left unchanged or neutral. But an infinitely large punishment for selling and gaining a finite good means that you are infinitely badly off.
The only tax that leaves one unchanged or neutral is one exactly equal to the value of your gain. You sell for 10 rupees, the punishment is 10 rupees, and you are equally well-off whether you sell or don't sell.
(Assuming the item has no intrinsic utility or disutility, I guess. Adjust the tax from parity downwards or upwards respectively.)
But an infinitely large punishment for selling and gaining a finite good means that you are infinitely badly off.
Only if you take the option of selling it? Keep in mind the original conclusion we're going for- "a punishment that completely prevents me from selling my trumpet hijacks my revealed preference for keeping my trumpet, setting it at infinity."
(For the story's example, the punishments are finite- the prisoners could sneak in unhealthy foods or avoid exercise- and so we're just interested in the weaker statement that the punishment dramatically increases the prisoner's revealed preferences for eating healthily and exercising.)
Available in PDF here, the short story in question may appeal to LW readers for its approach of viewing more things than are customary in handy economic terms, and is a fine piece of fiction to boot. The moneychanger protagonist gets out of several sticky situations by making desperate efforts, deploying the concepts of markets, revealed preferences, and wealth generation as he goes.