NEW YORK (AP) — Donald Trump has spent his time in office trying to bend the conventions of the American presidency to his will. Now he appears to be trying to override a core principle of democracy: that no one is above the law.

Faced with an impeachment inquiry, Trump has openly defied the core constructs of the Constitution. He chafes at the idea of co-equal branches of government and rejects the House’s right to investigate him.

He has deployed a convoluted logic in which he has declared that the courts can’t investigate him because as president he cannot be charged with a crime but also that Congress cannot impeach him because its inquiry is politically illegitimate.

It’s a “heads he wins, tails you lose” formulation.

“It’s anathema to his character and his life story to be checked and balanced by anything,” said presidential historian Jon Meacham, a professor at Vanderbilt University. “The Constitution was formed to contain appetite. And we now have the president who is driven entirely by appetite.”

In a scathing eight-page letter this week, the Republican president’s lawyers served notice there will be no cooperation with the impeachment inquiry.

Trump’s White House has ignored document requests and subpoenas. It readily invokes executive privilege — going so far as to argue that the privilege extends to informal presidential advisers who never held White House jobs. And his team all but dares Democrats to hold them in contempt.

The impeachment standoff follows a pattern Trump has established throughout his presidency as he has jettisoned experienced advisers and flouted conventions.

The fact that he survived the special counsel’s Russia investigation without paying much of a political penalty left him all the more emboldened.

One day after Robert Mueller’s faltering testimony brought an end to that threat, Trump unleashed a new one by asking Ukraine’s president to investigate his political foe Joe Biden. That prompted the fast-moving impeachment inquiry that Trump now resists.

After two weeks of a listless and unfocused response to the impeachment probe, the White House letter to Democratic House Speaker Nancy Pelosi this week was a declaration of war.

While it was filled with dubious legal arguments, its intent was clear: Trump would not play ball, claiming that the game was rigged against him.

As for all the subpoenas flying from House Democrats, an exasperated Trump said Thursday, “You’re running a country, I just don’t think that you can have all of these people testifying about every conversation you’ve had.”

And as for the Democrats, Trump claimed Wednesday they’re the ones playing dirty “because they have a tiny margin in the House.”

“They have eviscerated the rules,” he said. “They don’t give us any — any fair play. It’s the most unfair situation people have seen.”

The Constitution gives the House “the sole power of impeachment.” But it confers that authority without providing any guidelines, which the White House has seized upon in demanding that Pelosi call for a vote to authorize the inquiry as happened in the last two impeachment inquiries.

No vote is required, and Trump’s strategy risks further provoking Democrats in the impeachment probe, setting up court challenges and the potential for lawmakers to draw up an article of impeachment for obstructing their investigations.

“The president does not have all-consuming power,” said Nick Ackerman, a member of the Watergate prosecution team that investigated President Richard Nixon. “We play by certain rules, and we expect the rule of law to apply. We don’t have checks and balances if he ignores them. That itself is an impeachable defense, which is what Nixon faced.”

It is unclear whether Democrats would wade into a lengthy legal fight with the administration over documents and testimony or if they would just move straight to considering articles of impeachment.

Trump, for his part, has never been one to rely on legality or logic in making his arguments.

In the last week alone, he called for the impeachment of Sen. Mitt Romney and Rep. Adam Schiff — events that can’t occur — and in part justified his decision to withdraw U.S. troops from Syria, leaving the Kurds vulnerable to Turkish attacks, by saying the Kurds did not assist at Normandy during World War II.

Since taking office, he has taken repeatedly taken unilateral action to defy Congress and push the limits of his own power, declaring a national emergency so he could divert funds for a border wall and taking executive action to try to halt immigration from several Muslim-majority nations.

Trump on Thursday punctuated a tweet about unfair media coverage with four words that seemed to sum up his entire viewpoint of the American system: “Oh well, I’m President!”

The Constitution was built to withstand tests like this.

“Both the strength of the American system and one of its most frustrating aspects is that it’s incredibly difficult to do anything quickly, particularly bad things, which the founders believed would happen more often than good things,” Meacham said. “Checks and balances were created so one bad actor could not dominate the proceedings. We now have that bad actor.”

___

EDITOR’S NOTE — Jonathan Lemire has covered politics and the White House for The Associated Press since 2013.

___

Follow Lemire on Twitter at http://twitter.com/@JonLemire