President Trump is ready to give up on Congress — or maybe he already has. And we can totally see why he wants to just shut it down and start all over again. Democrats are united against him, Republicans seem hopelessly divided, and Trump’s top priorities are no closer to being law than when he was running for president.

But in this remarkable pair of tweets the president shot off Tuesday morning, Trump may be directing his ire at the wrong party. In two major showdowns so far — the budget and health care — Trump has been taking hits for an ideologically divided Republican Party that can’t quite figure out how to legislate.

To wit: There’s no question Democrats won this week’s budget showdown, and it was mostly Trump’s priorities that got left on the cutting floor when congressional leaders were making a deal.

House Speaker Paul Ryan (R-Wis.) said he shared President Trump's "frustration," with the compromises in the spending deal, but that there are "still a lot of conservative wins" in the bill during a news conference on May 2. (Reuters)

Republicans were too divided to provide enough votes for a strictly conservative budget, so the president had a choice: Push for a political reality that doesn’t exist to try to make good on his campaign promises, or back off on what he wants and help his divided party in Congress avoid a shutdown.

Then, on health care: The first go-round in March to revise Obamacare, Democrats folded their arms, sat back and watched Republicans struggle to make a deal amid themselves. (Had they reached a deal, it would not have even been subject to a 60-vote filibuster by Democrats in the Senate.)

Trump didn’t put all his political capital on the line to sell it, but when the bill had so little support leaders didn’t even bring it up for a vote, Trump clearly felt it was Congress’s fault. The next day on Twitter, he called for his supporters to watch a Fox News show in which the host called on House Speaker Paul D. Ryan (R-Wis.) to step down. And then the day after that, he specifically targeted the group of conservative Republicans in the House Freedom Caucus that mostly opposed the bill.

On spending, on health care, on the border wall, Trump keeps on taking bullets for a divided Republican Party, and he hasn’t won a thing. And while he may be taking aim at Senate Democrats’ ability to stop big legislation through the filibuster, it is really Republicans’ ideological divide that’s dragging him down.

“What is Trump getting out of cooperation with the Republican Congress?” said Steve Bell, a former GOP Senate budget aide now with the Bipartisan Policy institute. “He’s got to be asking himself in private — I don’t know if he is. But goodness, I would be.”

In the meantime, a unified Democratic Party is getting much of what it wanted: Funding for Planned Parenthood; more money, not less, for domestic programs; and not a dime spent on building Trump’s wall. Oh, and Obamacare remains in place, and Trump will have to agree to pay subsidies to keep it alive.

The Senate passed a bipartisan spending agreement on May 4 to fund the government through September, sending the measure to President Trump to sign ahead of the May 5 deadline. Here are the Republican and Democratic wins in the $1 trillion funding package. (Jenny Starrs/The Washington Post)

Trump’s finger-pointing at Congress — no matter which party he’s blaming at the moment — isn’t entirely fair to Congress.

Trump came into this job knowing pretty much zilch about the way Washington works. Why else would he have promised during the campaign to get Obamacare repealed, a “phenomenal” tax deal and a full budget that puts the national priorities of the Obama years on their head in just 100 days? Legislating those kinds of massive overhauls take years, if not decades.

Trump has yet to show any desire to try to learn. Most of his team has no firsthand experience on Capitol Hill (Vice President Pence being the notable exception). Over the past several days, Trump has made clear he’d rather just blow up how Congress works than try to work within its “archaic” rules.

The exact same intransigent GOP dynamics that Trump is struggling with have brought down much more experienced politicians. In 2015, faced with the potential for a government shutdown, House Speaker John A. Boehner (R-Ohio) suddenly retired rather than try to bring his party together.

“Trump is having trouble with the curve — the learning curve,” said Jim Kessler, a former top Senate Democratic aide now with the center-left Third Way think tank. “It’s a difficult job being president, and Trump hasn’t shown an overwhelming desire to figure out how Washington works.”

Nor has Washington been able to work for him. And that brings us to this moment in time: a broken Republican-controlled Congress, and a Republican president who has no idea what to do with it.