President Trump’s prolific comments on social media and elsewhere, along with his improvisatory approach, mean that while it’s easy to find his words, discerning his actual views and perspective can be challenging.

On Sunday and Monday, the president offered a series of heated tweets about immigration policy, NAFTA, and U.S. relations with Mexico. Reading the tweets in order brings some clarity, but the limitations of the form, as well as Trump’s repetitions and tendency toward invective leave much unclear. Instead, here’s an attempt to distill, in two paragraphs, Trump’s current view:

Twenty-five years ago, the United States gave Mexico an enormous gift: the North American Free Trade Agreement. The deal enriched Mexico, but impoverished the United States. Even worse, Mexico is repaying that generosity by sending massive flows of both drugs and people—and not their best people, mind you—over the border into the United States. Mexico could control the border with the U.S., but it refuses to do so. Now is the time for the U.S. to use the leverage it gained with NAFTA and stop that, by forcing Mexico to pay for a wall along the border.

Inextricably tied into this is Deferred Action for Childhood Arrivals. That policy is good, in that it allows good people brought to the U.S. as children to stay, but also bad, because it encourages large flows of people to the United States seeking to take advantage of it. On the one hand, Democrats are to blame for blocking the law, and the Senate needs to invoke the nuclear option and lower the threshold for all bills to 50 votes, but on the other hand, it’s too late now and DACA is over.

This is a useful exercise not only because it clarifies the president’s views, but because it shows the extent to which White House policy is built on misunderstandings, half-truths, untruths, and contradictions.

Start with the idea that NAFTA has been a boon to Mexico and a nightmare for the U.S. That’s connected with Trump’s view that trade is a zero-sum proposition, one that isn’t shared by most serious economists. “Mexico is making a fortune on NAFTA,” Trump complains. It is true that NAFTA has been beneficial to Mexico, but as the Congressional Research Service summed it up last year, “Most post-NAFTA studies on economic effects have found that the net overall effects on the Mexican economy tended to be positive but modest.” The deal brought some new money and wealth to Mexico, but some sectors benefited, while others were harmed.

Despite Trump’s repeated insistence that the U.S. was taken for a ride by NAFTA, much the same is true domestically, too. CRS and other analysts have found that the deal had a positive impact on the U.S. GDP, though not an enormous one, and that the benefits and costs are not evenly distributed. During the campaign, Trump complained—echoing the arguments of some liberal economists—that NAFTA had accounted for major job losses, especially in manufacturing. Just as in Mexico, some people benefited greatly and others lost, part of a broader trend of increasing inequality in the U.S. and worldwide. This isn’t to minimize the suffering of those hurt, nor to lobby against steps to assist them. It’s simply to point out that the idea that NAFTA helped Mexico at the expense of the United States, in the broadest terms, doesn’t hold up.

Now, what about the connection between NAFTA and immigration? Long before NAFTA, there was a trend of increasing illegal immigration from Mexico, and that continued after the deal took effect. But illegal immigration peaked and then reversed after 2007. By 2015, in fact, there was a net outflow of Mexicans from the United States, as immigrants (both authorized and unauthorized) returned home. In fiscal year 2017, more non-Mexicans were apprehended entering the U.S. illegally than Mexicans—the third time in the last four years that has happened. Moreover, all indications are that the flow of people into the country has dropped since Trump took office, even without his border wall.

Trump contends that “Mexico is doing very little, if not NOTHING, at stopping people from flowing into Mexico through their Southern Border.” He added that “Mexico has the absolute power not to let these large ‘Caravans’ of people enter their country.” The “caravans” is a reference to a BuzzFeed article last week (which Trump likely saw covered on Fox News) about a column of 1,000 Central American immigrants marching en masse northward. The story offers no indication that this is part of a broader trend; the participants intend to turn themselves over to American authorities and claim asylum in the United States, not slip illegally across the border.

Trump argues that the Mexican government could stop the flow of drugs if it wanted to, but the caravan story helps show the flaws in that claim. The group wants to avoid “not only authorities who would seek to deport them, but gangs and cartels who are known to assault vulnerable migrants.” There’s extensive corruption in Mexico, including ties between police and drug traffickers, but successive Mexican governments have tried and failed to squash the drug trade.

Something similar is happening on Mexico’s southern border. The Mexican government has sought to crack down on crossings there, especially since Central Americans, post-Trump, have often decided that they won’t go to the U.S., but also won’t go home, and try to stay in Mexico instead.

There are many valid critiques to be made of Mexico’s policies on drugs and immigration, but there’s no indication that the only impediment to a solution is a lack of will by the Mexican government. Of course, it is a staple of Trump’s political worldview that simple force of will overcomes policy problems, but the American experience proves otherwise. For decades, the United States has fought a “War on Drugs” and tried various approaches to stop illegal immigration, but none of that—including “get tough” policies—has solved the problem.

Now, what about DACA? The president’s line on DACA has become ever more convoluted and contradictory. During the campaign, Trump promised to end DACA. Once in office, he did so, but he cited a procedural reason: He said he believed that the president did not have the authority to protect the so-called Dreamers, but he also called on Congress to enact a law protecting them. This was Trump’s attempt to split the political baby. He knew that policy was broadly popular, but also that his base hated it. He hoped he could please the base by canceling it, but dampen the political blow by transferring blame to Congress. Given how divisive the issue is, and how gridlocked Congress has been, he must have, or should have, known that DACA was dead on arrival there.

Over the last few weeks, the president has repeatedly tried to argue that the demise of DACA is Democrats’ fault, not his own or that of Republicans. Insofar as Democrats could have tried harder to pass the Dream Act when they controlled the House and Senate, this might be right, but Republicans worked to block the bill then. Obama then implemented the policy as an executive order, which stood until Trump revoked it in 2017.

Since then, the GOP-led Congress has shown little interest in passing a DACA replacement. During a public meeting in January, Trump briefly supported a “clean” DACA replacement, before being yanked back in line by horrified Republicans. Later that month, Trump rejected a deal from Senate Democratic leader Chuck Schumer that would have increased funding for border security and maybe even funded the wall, in exchange for a DACA fix. Now Trump contends that Democrats are to blame for there being no DACA fix.

Once again, he wants to have his cake and eat it too. Trump says that Democrats are to blame for there being no DACA fix (“DACA is dead because the Democrats didn’t care or act”) yet also that DACA is bad (“NO MORE DACA DEAL! These big flows of people are all trying to take advantage of DACA”). This is incoherent on a couple levels. Not only is he seeking to have it both ways, but DACA only applies to people who have been in the United States since 2007. Moves like DACA—amnesties, in the parlance of their critics—may create some inducement for unauthorized immigrants, by creating the expectation of similar future steps, but no new immigrants can take advantage of DACA.

Trump also remains fixated on the idea that the 60-vote threshold is choking his agenda in the Senate. His push to change that is likely doomed, since Majority Leader Mitch McConnell has repeatedly said he will not invoke the “nuclear option” to lower that bar to 50 votes. But it doesn’t matter in this case. In February, the Senate voted on three immigration plans. Trump’s preferred plan could only garner 39 votes, far short of 50, to say nothing of 60. Another plan would have provided a DACA fix, some border funding, and no money for the wall; that gained 52 votes, but not 60, and in any case, Trump had threatened to veto it. Finally, a plan with a DACA fix and $25 billion for border security got only 54 votes. If the nuclear option were eliminated, the president’s preferred solution would still have failed, and the ones he disliked would have moved forward—although either one would have had a tough battle in the House.

It is easy to see why Trump is so irritated. The central promise of his campaign was that he would build a wall on the Southern border and make Mexico pay for it. He repeated this night after night, in city after city around the United States. Yet he has now been in office for 14 months and finds himself unable to make any real progress. Stymied in his efforts to actually effect progress, he’s claiming it anyway. On Wednesday, he tweeted this:

As the Los Angeles Times pointed out, however, that wasn’t true: The project in question is a preexisting contract to replace an existing border fence, and the Border Patrol has said explicitly it is not Trump’s wall.

This is part of a larger trend. I wrote after Trump begrudgingly signed the omnibus spending bill that he was showing the signs of a man who keeps failing to get what he wants in Washington. One reason for that is that he subscribes to a flawed theory of the presidency, which is that the president can make policy happen by sheer force of will and marketing prowess. (This also explains why he believes Mexico could shut off the flow of drugs and immigrants if only it set its mind to it.)

That’s not the only reason he can’t get much done, though. Writing about the president’s latest outburst Monday, James Hohmann pithily summed up the situation: “Donald Trump is either woefully uninformed or intentionally misleading the American people about one of his most consequential decisions as president. Which is the more charitable explanation?” This is not necessarily a binary choice, though. Trump has indeed lied to the public repeatedly, and his narrative of what happened to DACA is misleading. Yet the view that he has laid out in his tweets also shows many misunderstandings, of both fact and process, including on such basic matters as how Congress works. It’s very hard to make policy effectively when one’s vision of the situation is so far removed from reality.