Donald Trump didn't promise to kill the family members of ISIS fighters, take Iraq's oil, or bring back torture "much worse" than waterboarding during his foreign policy speech delivered Wednesday at the Mayflower Hotel in Washington, DC. It was a genuine attempt to develop the kind of foreign policy vision that's expected of presidential candidates, one that might be acceptable to think tankers and GOP officials.

But the problem wasn't that what he said was offensive. It was that the speech was vague to the point of being meaningless, totally incoherent, or just plain wrong.

Perhaps most concerning, this speech revealed that even after months of campaigning, Trump still doesn't have any theory of how foreign policy works. His approach is just haphazardly applying his basic impulses, like the idea that we should make "good deals," to various foreign policy problems — with confusing, contradictory, and oft-nonsensical results.

We're a number of months into the campaign now, and this speech — the best evidence he has put forth of his foreign policy credentials — signals Donald Trump is the least prepared presidential candidate on foreign policy in modern history. Yet after Tuesday night's elections, he's within a hair's breath of securing the Republican Party's nomination for the presidency.

Trump's weird, revealing discussion of allies

Perhaps the most telling error in Trump's speech comes in his discussion of America's allies. Trump said that one of the five big problems with American foreign policy was that America's friends don't trust its promises anymore. "Your friends need to know that you will stick by the agreements that you have with them," he said.

And yet, at the same time, Trump said another one of the biggest problems with American foreign policy was that "our allies are not paying their fair share." He argued that "the countries we are defending must pay for the cost of this defense — and, if not, the US must be prepared to let these countries defend themselves."

So America needs to stick by its agreements with its allies — but it maybe should abandon them.

This isn't just a normal incoherence — it speaks to the heart of Trump's command of the issues. One of the basic principle of American foreign policy, since World War II, is its commitment to its allies: Republicans and Democrats alike have seen its web of alliances from Europe to Japan as critical to ensuring global security.

You can make a cogent case that America should scale back from these commitments and make allies pay more for their own defense, as a number of realist foreign policy scholars have. But you cannot make that argument and, at the same time, argue that America needs to reassure its allies that America remains firmly committed to their defense.

Trump isn't being heterodox here. He's just being flatly incoherent, demonstrating that he either doesn't understand or doesn't care about one of the most important issues in American foreign policy. That's a terrifying fact about a potential commander in chief.

The speech was also peppered with obvious factual errors and outright lies. A small selection:

Trump said "ISIS is making millions of dollars a week selling Libyan oil." In fact, ISIS doesn't control a single Libyan oil field.

Trump said "I was totally against the war in Iraq." In fact, he said he supported the invasion during a 2002 Howard Stern appearance.

Trump said there are "scores of recent migrants inside our borders charged with terrorism." It's hard to know who counts as a "recent migrant," or what "charged with terrorism" means, but there's no evidence this is true. Every deadly terrorist attack since 9/11 inside US borders has been committed by American citizens, per New America Foundation research.

Now, every politician makes factual errors occasionally. But Trump's errors are far more frequent than other candidates' errors, and more troubling. Because he genuinely seems to know nothing about foreign policy, it seems like these fabrications — all of which cast Trump's arguments in a better light — are simply replacing any need to learn more about the specifics of the issue.

Trump, in other words, doesn't understand the basic principles of American foreign policy — and doesn't care about learning facts that might help him develop a better perspective.

Trump's speech revealed a campaign devoid of a coherent big idea

Now, Trump did offer some ideas in the speech, though they're ones he's expressed before.

Trump criticized open immigration and trade, as he has throughout the campaign, for hurting ordinary Americans. He criticized US military interventions in the Middle East, specifically the Libya intervention and the Iraq war, for destabilizing the region. And he Trump also proposed reaching out to Russia in an attempt to improve relations between the two countries, fitting with his previous bromantic comments about Vladimir Putin.

These ideas don't add up to anything coherent. They're more expressions of Trump's idiosyncratic obsessions rather than any broader ideology. What they tell us, then, is that Trump doesn't want to have a coherent foreign policy: He simply thinks he can apply his basic impulses to global problems and that things will more or less work out.

Most notably, Trump is obsessed with deals.

When he talks about Russia, for example, he isn't grounding his argument in any analysis of Russian foreign policy or interests. Instead, Trump's argument is centered on his belief that he can "make a good deal for America" if he sits down with them.

"Some say the Russians won’t be reasonable. I intend to find out," Trump said in Wednesday's speech. "If we can't make a good deal for America, then we will quickly walk from the table."

Trump's Iran policy, similarly, is all about the deals. The Iran deal was "disastrous," he said in the speech, but only because the Obama administration doesn't know how to negotiate:

In negotiation, you must be willing to walk. The Iran deal, like so many of our worst agreements, is the result of not being willing to leave the table. When the other side knows you're not going to walk, it becomes absolutely impossible to win.

Note that any facts about Iran itself are actively irrelevant to this analysis — little things like its political system or strategic situation just don't figure in Trump's critique. All that matters is the art of the deal.

The point, then, is that even on issues where Trump has real positions, he doesn't have a foreign policy ideology in the way we conventionally understand it — a theory about why countries do the things they do and what America can do to change that. He just decides the issue is about something that Trump can fix, whether or not that actually fits the facts.

Trump is running on the Trump Brand — and that's scary

Perhaps the most revealing line in Trump's speech came early on, during a discussion about trade policy: "I am the only person running for the presidency who understands this problem and knows how to fix it."

This, and not any foreign policy ideas per se, makes up the beating heart of the speech. Trump thinks that he alone has the experiences and the background to Make America Great Again. His opponents, and their ideologies, have all failed in various ways.

When you look at it from this point of view, the vague ideas and contradictions don't matter. Trump is a proven dealmaker who brings the right set of impulses to the table. Who cares if he doesn't outline solutions that make sense now? What matters is that he's Trump.

The problem, though, is that these so-called details do, in fact, matter. Trump's background in business, where his success has been debatable at best, is not a substitute for actual foreign policy knowledge.

To make a "good deal" with China or Russia, you need to understand (at least a little) what China and Russia want and why they do the things they do. To defeat ISIS, you need to first understand where ISIS is (hint: not Libyan oil fields).

This speech, however, tells us that Trump doesn't understand any of these things. Worse, he seems to actively resist understanding them. Remember, this was a prepared speech. Trump got foreign policy advisers to help him draft it, and it was (reportedly) worked over a number of times. This text represents what Trump sees as a worked out vision of global politics. And yet, this is what he wound up with.

Given how close Trump is getting to the White House, that should really scare you.