Sod’s Law dictates that whatever can go wrong will go wrong, often when you least expect it. As an axiom, it isn’t perfect. Almost everything in human affairs can go wrong – think of the first two years of World War II, or the Suez crisis – yet, overall, the failure rate is not ruinous. If anything, success has outweighed failure in humanity’s story, otherwise we would still be stuck in the primeval swamp, desperate for someone to invent the wheel.

But Dr Sod did not get his PhD (from the University of Life) for nothing. He knew that if you made easy assumptions and didn’t pay attention to detail, preferring to rely on blind faith and optimism, things were pretty well destined to go belly-up.

This is what has happened with Britain’s Brexit negotiations. Tory Leavers, egged on by the know-nothings of UKIP, assumed in the wake of the referendum that talks between us and Europe would be little more than a victory roll. Chastened by the UK’s rejection of its central tenets, and weakened by the unrest that would undoubtedly ensue as other member states threatened to follow our example, the 27 would give us everything we asked for – and be grateful that we didn’t demand even more.

Berlin, in particular, would quickly come to heel. Relentless pressure from German carmakers, desperate to hold on to their UK market share, would convince Angela Merkel to follow her instincts and concede generous terms to the errant, yet admirable, British. The Italians would be the same. Maintaining sales of prosecco to the UK would, according to Boris Johnson, trump all other considerations. Even the French, bowing to the anti-European sentiment represented by the swelling ranks of the extreme Left and Far Right, would accept that a fair deal for Britain would, in the end, be a fair deal for everyone.

Any diehards in the European Commission and Parliament would be thrust aside by national leaders fearing for their own futures and keen to keep on the right side of a resurgent global power.

So how did that work out?

Let me count the ways. First, populism remains in check. The contagion of Brexit has refused to spread. Instead, Britain’s departure is likely to lead to reform and renewal. Second, German car-makers have backed Angela Merkel. They have decided that a stable EU, built around the Single Market and the Customs Union, is far more important to them in the long term than a possibly impoverished Britain. And while the prosecco lobby in Italy will clearly regret the likelihood of falling sales in the UK, the fact remains that the poor man’s champagne is not exactly a deal-breaker, representing less than one-tenth of 1 per cent of the nation’s exports.

As for France, Emmanuel Macron – to whom Theresa May made a forlorn phone call yesterday – may pretend that he bears no ill-will towards his cross-channel neighbours; the truth is, the French President regards us as yesterday’s news, too temperamentally obstructive and too set in our ways to be worthy of a place at Europe’s top table. In addition, like a number of his fellow leaders, he is only too pleased to have the opportunity to break London’s near-monopoly of Eurozone “clearing”, and has given his full backing to efforts aimed at persuading global banks based in the UK to relocate to Paris.

Within the Brussels Establishment, the prevailing view, however unfair, is that Britain let the side down by voting, however narrowly, to abandon the European project. The head of the Commission, Jean-Claude Juncker, already knows that he will go down in EU history as the President who lost Britain. He sees no reason why he should make it easy for Mrs May. Nor – not unreasonably – is he impressed by the shambles that has marked her government’s efforts to come up with a constructive approach.

The view among MEPs is similar, though, if anything, more hard-line. European democracy has taken a pasting from Nigel Farage and UKIP in recent years as they sought to turn the Strasbourg Parliament into a one-ring circus, with themselves in the spotlight. Even this would have been acceptable if the Tories had been a force for sense and moderation. But the majority of members watched with dismay as Conservatives walked out of the centre-right European People’s Party in 2009 to lead a new Eurosceptic alliance that includes the Polish Law and Justice Party and the Czech anti-immigrant, anti-Muslim party, the ODS.

A majority of parliamentarians, from right, left and centre, supports a hard line on Brexit. Not even the Tories’ nominal allies from the Law and Justice delegation have hastened to our aid. Poles want as big a divorce settlement as possible to safeguard their country’s current high-levels of financial support, as well as cast-iron guarantees for the rights of Polish citizens in the UK. So we needn’t look to Strasbourg for a sympathetic ear.

Did Theresa May know any of this?

Last night, over dinner in Brussels with Juncker, the Prime Minister played all her cards – Britain’s intelligence expertise in the fight against terrorism, its (not so) formidable military capacity and its support in the UN for the Brussels-backed Iran nuclear deal. Juncker listened politely before, inevitably, repeating what we already knew, that not until Britain satisfies each of the pre-conditions it has laid down (the divorce, citizens’ rights and Ireland) can talks on trade begin. The PM cannot have been surprised. Just days earlier, the little Luxemburger had dismissed Britain’s role in World War II and the Cold War as valiant, but rooted in the past, not the future, in which all that matters is money.

In the end, it is likely – though far from certain – that a settlement of sorts will be cobbled together. The price of No Deal is surely too high to be borne, the risks too great. The talking, though, will go down to the wire. Government ministers, short of an absolute shocker of a deal (in which case failure will be laid at Europe’s door), will insist that this was their plan all along. Softly, softly catchee monkey. But that is nonsense, nothing short of a lie. They are bluffers without a poker face who threw away their best hand on the opening day. There is a very real chance that we will come away with substantially less than we could have, and should have, because our leaders had no idea what they were up against and misjudged the situation every step of the way.

David Cameron will go down as the man who accidentally took his country out of the European Union. His fate is to be the Lord North of the twenty-first century. But Theresa May will join him on the podium (with Jeremy Corbyn in third place) as the leader who, when tasked with picking up the pieces, got everything wrong that could possibly go wrong and made the worst of a bad job.