What follows any referendum vote next week for the United Kingdom to leave the EU? From a legal perspective, the immediate consequence is simple: nothing will happen.
The relevant legislation did not provide for the referendum result to have any formal trigger effect. The referendum is advisory rather than mandatory. The 2011 referendum on electoral reform did have an obligation on the government to legislate in the event of a “yes” vote (the vote was “no” so this did not matter). But no such provision was included in the EU referendum legislation.
What happens next in the event of a vote to leave is therefore a matter of politics not law. It will come down to what is politically expedient and practicable. The UK government could seek to ignore such a vote; to explain it away and characterise it in terms that it has no credibility or binding effect (low turnout may be such an excuse). Or they could say it is now a matter for parliament, and then endeavour to win the parliamentary vote. Or ministers could try to re-negotiate another deal and put that to another referendum. There is, after all, a tradition of EU member states repeating referendums on EU-related matters until voters eventually vote the “right” way.
What matters in law is when and whether the government invokes Article 50 of the Lisbon Treaty. This is the significant “red button”. Once the Article 50 process is commenced then Brexit does become a matter of law, and quite an urgent one. It would appear this process is (and is intended to be) irreversible and irrevocable once it starts. But invoking Article 50 is a legally distinct step from the referendum result — it is not an obligation.