In a dramatic reversal, the Trump administration has asked a federal appellate court to uphold a lower‐​court ruling striking down all of ObamaCare as unconstitutional.

You might expect me to be happy. The New Republic calls me “ObamaCare’s single most relentless antagonist.” The Week says I’m “ObamaCare’s fiercest critic.” Give me five minutes, and I’ll explain how the so‐​called “Patient Protection and Affordable Care Act” ironically makes health insurance less ­affordable and reduces protections for the sickest patients. I seethed when the US Supreme Court unilaterally rewrote ObamaCare first in 2012 and again in 2015.

But rather than experience elation at this latest ruling, I’m seething again, and for the same reason. In Texas v. Azar, federal judge Reed O’Connor did ­exactly what Chief Justice John Roberts did at the high court: jettison the rule of law to achieve a politically desired outcome.

O’Connor followed the John Roberts playbook all the way down to the tortured reasoning. He pretended the ObamaCare law still mandates the purchase of health ­insurance, when it no longer does. He pretended this phantom mandate injures the plaintiffs, when it clearly does not. And he pretended Congress considered the mandate inseverable from the rest of ObamaCare, even though Congress itself had already severed the two.

To set the table, ObamaCare originally said taxpayers “shall” obtain health insurance or else pay a “penalty” of potentially thousands of dollars per year. A command plus a penalty equals a mandate. Right there in the statute, Congress claimed its authority to impose those provisions come from its constitutional power “to regulate Commerce.” The Supreme Court nearly struck down the whole law in 2012, when a five‐​justice majority concluded the Constitution’s Commerce Clause grants Congress no such power.

The statute survived because one of those five justices — Roberts — argued that one can interpret this penalty “as a tax . . . on those without health ­insurance” and therefore a constitutional use of Congress’ taxing power. Roberts thus voted with four other justices to ­uphold ObamaCare.

He was so busy rewriting the statute to achieve his desired outcome that Roberts failed to notice the Constitution forbade such a tax.

Back in 2009, ObamaCare’s authors initially sought to impose a “tax” on those who failed to purchase health insurance. But when they realized such a tax would have prevented the bill from passing, they ­replaced it, invoking the Commerce Clause to issue a command backed up by a “penalty.” A tax that can’t satisfy the Constitution’s bicameralism requirement is no more constitutional than, and cannot confer any legitimacy upon, the exercise of an unenumerated power.

When a Republican Congress reduced the mandate penalty to zero in 2017, Republican state ­attorneys general saw an opportunity in Roberts’ tortured reasoning. They and a few individual plaintiffs filed Texas v. Azar, in which they claim that since ObamaCare no longer imposes a penalty on those who fail to purchase health insurance, the mandate can no longer be seen as an exercise of the taxing power. Under Roberts’ 2012 ­decision, they reason, the mandate must fall as an unconstitutional use of Congress’ power to regulate commerce.

Texas v. Azar has so many problems, O’Connor should have immediately tossed the case out of court. To challenge a federal law, plaintiffs must demonstrate it causes them a concrete injury. Since Congress zeroed out the mandate penalty, the mandate no longer injures anyone. Indeed, there is no longer a use of governmental power for plaintiffs to challenge.

O’Connor nevertheless granted standing to the ­individual plaintiffs on the grounds that they “feel compelled to comply” with this powerless command, which he then struck down as an unconstitutional use of Congress’ power to regulate commerce.

As if to outdo himself, O’Connor then struck down the rest of the law, too, on the grounds that Congress wanted the mandate to be inseverable from the rest of the statute. Someone should have told Congress, which severed the mandate from the rest of ObamaCare when it zeroed out the mandate penalty in 2017.

If opponents want to strike down ObamaCare, they need better legal arguments than what Judge O’Connor offered in Texas v. Azar, which is no different from what Chief Justice Roberts did in his own rulings. Two wrongs don’t make a right.