President Donald Trump listens before awarding the Presidential Medal of Freedom to economist Arthur Laffer, Wednesday June 19, 2019, in the Oval Office of the White House in Washington. Credit: Jacquelyn Martin | AP

Only a man who is, like, really smart could perform mental gymnastics at the level President Trump has attained over the past few days.

On Saturday, Trump declared that The New York Times committed a “virtual act of Treason” by reporting on a U.S. cyber campaign against Russia.

Mere seconds later, he proclaimed that the supposedly treasonous report was “ALSO, NOT TRUE!”

Thus, in Trump’s telling, did the journalists commit the capital offense of … divulging false state secrets?

During his interview with ABC’s George Stephanopoulos, meanwhile, Trump denied that internal Trump campaign polling showed him trailing: “Those polls don’t exist.”

Trump then fired his campaign pollsters for leaking … the supposedly nonexistent polls. (This was similar to Trump calling Bob Woodward a writer of “fiction” while simultaneously venting at his aides for “leaking” this supposed fiction to Woodward.)

During the ABC interview, Trump also said that if he received dirt on his opponent from a foreign country, he would accept it without calling the FBI — and that his FBI director was “wrong” to say the FBI should know of such offers. Soon thereafter, Trump told “Fox & Friends” a contrary view: “Of course” he would tell the FBI.

This followed by a few days Trump’s claim that “I had nothing to do with Russia helping me get elected.” Minutes later, he delivered a second opinion: “Russia did not help me get elected.”

F. Scott Fitzgerald once wrote that “the test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time, and still retain the ability to function.” Trump’s ability to function is a matter of much dispute, but if the ability to hold opposing thoughts in mind is a measure of intelligence, Trump is a very stable genius indeed. Nobody contradicts himself as forcefully, fluently and frequently.

Last December, Trump declared that “we have defeated ISIS.” The very next day he said that Russia, Iran and others “will have to fight ISIS” without us.

In recent weeks, Trump has said Robert Mueller conducted his probe in an honorable way and his findings offered full vindication and exoneration. During roughly the same period, Trump has also promoted the contrary idea that Mueller’s report is “total bullshit,” not to mention “fabricated” and “pure, political garbage.”

Last month, Trump pronounced China’s Huawei “very dangerous” as a military and security threat; in the next sentence, he said this dangerous threat should be included in a trade deal.

Trump earlier this year declared an emergency on the border because of a migration “crisis”; the same day, he said, “I didn’t need to do this” — and, two months earlier, he had boasted that the “border is tight.”

In January, Trump proclaimed, in all caps, “MEXICO IS PAYING FOR THE WALL.” Exactly 11 minutes later, he complained that the border wall was in jeopardy because Democrats provided “NOTHING” to pay for it.

Trump’s ability to, er, evolve has been well documented. The Washington Post Fact Checker long ago dubbed Trump “the king of flip-flops.” Stephen Colbert hosted a Trump vs. Trump debate.

But while most politicians (and most people) can change their minds over time, what truly distinguishes Trump’s intellect is his ability to believe — or at least express — two entirely contradictory thoughts at roughly the same time:

You have to take the children away when you prosecute their parents for illegal immigration; ergo, anybody with a heart would keep families together.

The world’s biggest problem is nuclear proliferation; therefore, Japan and South Korea should prepare to defend themselves with nuclear weapons.

Trump has one of the “greatest memories of all time”; accordingly, he could not recall the answer to Mueller’s questions at least 37 times.

In January 2018, he told a bipartisan group of lawmakers he would sign any immigration deal they sent him. The next day, he said he would not sign such a bill without funding for his wall.

In February 2018, Trump proposed comprehensive legislation with gun-safety measures, saying “it would be nice if we could add everything onto it.” Twenty minutes later, he said he supported a piecemeal approach.

In June 2018, he tweeted an all-caps call: “HOUSE REPUBLICANS SHOULD PASS THE STRONG BUT FAIR IMMIGRATION BILL.” Three days later, he tweeted: “I never pushed the Republicans in the House to vote for the Immigration Bill.”

How does he do it? My second-rate intelligence can’t figure it out.

Dana Milbank is a columnist for The Washington Post. Follow him on Twitter, @Milbank.