How can Brexit work?

An exploration of the legal issues raised by Brexit