The great philosopher-novelist Umberto Eco once declared that we will always come up against “the hard core of Being” and the “lines of resistance” that tell us when we are talking rubbish, or acting nonsensically.

There was a time when I wondered bleakly if Donald Trump may be exempt from this philosophical precept. During the campaign he piled lie upon lie, bigotry upon bigotry, slander upon slander – and still won. We were told, absurdly, to take him “seriously but not literally”, as if all the talk of a Muslim ban, Mexican rapists, and locking up his opponent was mere knockabout. During the transition, the former CIA director James Woolsey said it was all just part of Trump’s “shtick” (Woolsey left the transition team in January).

I say this with the utmost caution, but I do think that after two months in office the president is starting, at last, to encounter Eco’s “lines of resistance”. Unencumbered by a sense of constitutional duty or a responsibility to tell the truth, he is nonetheless discovering that reality cannot be shaped by mere caprice.

Take for example Trump’s new executive order on immigration, reframed after the original version was struck down by the courts. The White House had high hopes for the fresh draft. But in a Hawaiian case last week a US district judge, Derrick Watson, froze the proposed ban on new visas for citizens of six Muslim-majority countries and the accompanying suspension of the admission of refugees.

Most striking about Watson’s decision is his insistence that the ban be seen in the context of stated intention rather than in isolation. The judge cited the campaign statement that “Donald J Trump is calling for a total and complete shutdown of Muslims entering the United States”, and Rudy Giuliani’s subsequent declaration in a television interview that “when [Trump] first announced it, he said ‘Muslim ban’. He called me up. He said, ‘Put a commission together. Show me the right way to do it legally.’ ” This, Watson concluded, was clear evidence of “religious animus” still lurking beneath the wording of the redrafted order.

What Trump now faces is a judiciary that refuses to play along with the convenient fiction that some of what he and his advisers say is “shtick”. The courts have taken him both seriously – as president – and literally – as a politician who trades in venom and falsehood. The consequence is that, thus far, the travel ban has been thwarted.

In his floundering healthcare strategy, the president is also bashing his head against Eco’s “hard core of Being”. On the campaign trail, Trump promised that nobody would lose medical cover. According to the Congressional Budget Office, however, an estimated 24 million Americans will do just that by 2026 as a consequence of the Republican plan to “repeal and replace” Obamacare.

Days after his election, Trump bragged on CBS’s 60 Minutes that “it’ll be better healthcare, much better, for less money”. Again, this is simply not the case. If the congressional proposals endorsed by Trump are implemented, huge numbers of Americans – especially the elderly – will pay more for medical treatment.

Nowhere have the “lines of resistance” been more apparent than on the geopolitical stage. As the former British ambassador to the US Peter Westmacott argues, the Trump administration has risked “gratuitously damaging” the indispensable relationship between the British and American intelligence agencies by repeating the ludicrous claim that GCHQ was somehow tasked by the Obama administration to wiretap Trump’s communications.

The conspicuous refusal of the president and his officials to apologise for this transatlantic mudslinging shows only how callow is their understanding of diplomatic and supranational reality. Look, likewise, at Trump’s tweet on Saturday that Germany owed “vast sums of money to Nato” and that “the United States must be paid more for the powerful, and very expensive defense it provides”.

Institutions such as Nato cannot be transformed on Twitter – even by the US president

This betrays a fundamental misunderstanding of the Atlantic alliance. As Ivo Daalder, former US representative to Nato, was quick to point out: “Sorry, Mr President, that’s not how [it] works. The US decides for itself how much it contributes to defending Nato. This is not a financial transaction, where Nato countries pay the US to defend them.”

President Trump’s querulous demands for compensation are the stuff of fantasy. Stamp his foot as he may, the “lines of resistance” that define geopolitical reality cannot be changed at whim. Yes, they shift and shudder under the sustained pressure of global forces. But institutions such as Nato cannot be transformed on Twitter – not even by the US president.

I do not want to overstate the extent of Trump’s recent encounters with the irreducible facts. He still resides mostly in the Mar-a-Lago of his mind, a lurid cognitive space where he perceives the world as he wants it to be, rather than as it is. On Friday a German journalist asked him why he’s so scared of diversity in the media that he speaks so often about fake news, and things such as wiretapping, which “in the end, cannot be proven”. Trump’s response was to scorn her as “a nice, friendly reporter” and evade the question entirely by boasting of the US’s growing strength.

My claim is only that a few – just a few – chinks of light are breaking through the carapace of populist delusion. To change the metaphor: the waves of Trump’s sociopathic belief that he can say and do what he likes with impunity are starting to hit the rocks of reality. There is nothing to celebrate yet, no cause to relax, no outcome assured. Let us just say that this may, conceivably, be the end of the beginning.