Keeping score of the daily ups and downs of the Trump revolution is tricky business. Some days, it looks as if the president is making good on his promise to liberate America from the stranglehold of the political elite and corrupt government insiders.

Then there are days like Tuesday, when the deep state asserts its power and proves it’s not dead yet.

True, it was only one day, but it was an important one. And the results were lopsided.

The brazen quote of the dismal day comes from New York Attorney General Barbara Underwood after she got the president’s family foundation to agree to dissolve itself under court supervision.

“This is an important victory for the rule of law, making clear that there is one set of rules for everyone,” Underwood crowed.

If there really were “one set of rules for everyone,” Underwood would have been arrested on the spot and charged with perjury.

Her claim of equality before the law is about as bald-faced as a lie can get.

Recall that she presides over an office that turned a blind eye to years of suspect conduct by the Clinton Foundation, in apparent solidarity with the Clintons’ politics, then singled out the Trump Foundation for fine-tooth scrutiny as Democrats built their resistance to his presidency.

That’s not to say the Trump Foundation always acted honorably. Charges of “self-dealing” are serious and there were abuses of its privileges. But with just $1.7 million left to spend, after it distributed a reported $19 million over a decade, the foundation was relatively insignificant in Trump World.

On the other hand, the Clinton Foundation was a financial juggernaut, raising and spending tens of millions of dollars each year. In 2016, as Hillary sought the presidency, it took in nearly $63 million, but the year after her defeat, the haul fell to $26 million.

That’s still a lot of dough, but the difference underscores the persistent belief that the foundation was a giant pay-to-play scheme, with donors from around the world buying government access and contracts. Hillary’s defeat made it less attractive to “donors,” so the gusher of cash instantly slowed.

Also, the foundation had to restate four years of tax filings after Reuters discovered major discrepancies.

Yet not once — not once! — did New York state officials display any curiosity about potential wrongdoing. Whatever the Clintons did was good enough for them.

Ditto for Manhattan federal prosecutors. They led the case against Trump’s former lawyer Michael Cohen, but the Clintons’ conduct never troubled them.

Nor did they treat obvious pay-to-play scams by Mayor Bill de Blasio with equal seriousness.

The mayor set up a slush fund to evade campaign-finance laws, and it collected and spent millions of dollars more than what Trump paid in hush money to two women, but de Blasio got off scot-free.

Did I mention that de Blasio is also a Democrat? And that former US Attorney Preet Bharara became a nasty anti-Trump partisan after Trump fired him?

The man Trump named to replace Bharara, Geoffrey Berman, was ordered recused from the Cohen case by Deputy Attorney General Rod Rosenstein. That means Bharara holdovers are running the case.

I hope revenge isn’t playing a role in their very aggressive moves against Cohen and their decision to effectively name Trump an unindicted co-conspirator in campaign-finance violations, but the pattern is troubling. And leaked reports that the Southern District is spreading its probe into Trump’s businesses suggests his entire life is being put through the wringer now that he is president. Is that revenge?

Different strokes for different folks is nice, but not when it comes to application of the law.

Which brings us to the double standard involving retired Gen. Michael Flynn and his former FBI tormentors, including James Comey, Andrew McCabe and Peter Strzok.

Flynn is no angel, having admitted he lied to the FBI about his contacts with a Russian ambassador, and failed to register as a foreign agent while working for Turkey, even as he served as national security adviser to the Trump campaign and, briefly, in the same role in the White House.

His sentencing was delayed Tuesday, and it is possible he will get prison time at his next appearance in March.

Yet Comey, now leading the charge against Flynn from the sidelines, admits with bravado that he broke the rules in setting a legal trap for Flynn. Far worse, Comey gave Hillary Clinton all the breaks in the world and only a scolding for her scandalous handling of classified emails while simultaneously setting up secret surveillance on the Trump campaign, for reasons still unclear.

Comey’s answers about what he knew regarding the discredited dossier Clinton’s campaign funded smell to high heaven, and some in Congress believe he committed perjury in his testimony.

Moveover, he presided over the most corrupt FBI leadership team in history. His top deputy, ­McCabe, was charged with lying by the inspector general about a media leak, and his case was referred for possible prosecution.

That was in April. Where is that prosecution?

Sadly, it’s likely that nothing will come of it and McCabe, like Comey, will be able to skate out of trouble and use his anti-Trump bias as a ticket to public redemption — and book sales.

Strzok, a key player in the FBI’s notorious “insurance plan” in case Trump won, has also escaped legal accountability. True, he was fired, but his documented bias in both the Clinton and Trump investigations was more damaging to America than anything Flynn did, yet he faces no charges.

Thus, despite all the misconduct by Clinton and her team and Comey and his team, as well as others in the Obama White House, it remains a fact that only Trump is the subject of relentless investigations. One of them, the probe headed by special counsel Robert Mueller, is midway through its third year, and was launched because Trump fired the corrupt Comey.

Double standards. Some days, they are the only standards America has.

Andy takes a doobie-ous left turn

It was Gov. Andrew Cuomo speaking, but it sure sounded like Cynthia Nixon. Cuomo had rejected legalizing recreational marijuana, but flip-flopped to adopt Nixon’s support for the measure, despite crushing her in the primary and rolling to easy re-election. He even adopted Nixon’s class-and-race logic.

“We have two criminal justice systems, one for the wealthy and the well-off and one for everyone else,” he declared, saying pot enforcement “had for too long targeted the African-American and minority communities.”

Elections have consequences — some of them weird.

Remarkable US ‘crude’ awakening

Amazing facts about America’s oil industry, from a Wall Street Journal editorial:

“U.S. crude production has surged 20% in a year and nearly tripled in a decade thanks to advances in hydraulic fracturing and horizontal drilling. American output is rising at the fastest rate in a century. Earlier this year the U.S. eclipsed Saudi Arabia and Russia as the world’s largest oil producer.”