President Trump is criticized, often justly, for misstatements of facts and failure to understand the details of public policy. But in two of his most recent controversial actions, he has taken stands upholding the rule of law and undoing the lawless behavior of his most recent predecessor.

The question now is whether the author of "The Art of the Deal" — and congressional Republicans and Democrats — can maneuver and compromise on these issues in ways that produce sensible public policy.

The first action in question was Trump's Sept. 5 announcement that he would withdraw Barack Obama's June 2012 DACA executive order, which effectively legalized immigrants brought to the U.S. illegally when they were children.

Obama acted despite his initial explanation that the president doesn't have authority to make laws but only faithfully execute them. So, the executive order was dressed up with a fig leaf argument that he was only exercising the kind of discretion prosecutors employ when they choose to bring one case and not another.

A basically identical argument was rejected by federal trial and appeal courts considering the 2014 DAPA executive order extending legalization to illegal immigrant parents, decisions left in place by an equally divided Supreme Court last year. So, both DAPA and DACA legally looked like dead ducks anyway.

The second of Trump's actions was his Oct. 12 statement that he would suspend cost-sharing reduction payments to health insurance companies. The Obama administration had been making CSR payments since 2014, although Obamacare's Section 1402 which authorizes them does not, unlike the preceding Section 1401, appropriate money for them.

This was blatantly unconstitutional. "No money shall be drawn from the Treasury, but in consequence of Appropriations made by Law," states Article I, Section 9, Clause 7 of the Constitution. The House of Representatives sued, and in May 2016, federal judge Rosemary Collyer ruled that the billions paid in subsidies are illegal.

Administration lawyers made complex, sophisticated arguments that Obama's clearly illegal actions were actually legal. I'm a graduate of Yale Law School; I know how this is done. Many Americans suspect that condescending elite law school graduates are contemptuous of them and their naive belief that words mean what they say. My experience is that those suspicions are well-founded.

So, what to do now about DACA recipients ("Dreamers") and insurance companies denied their CSRs?

Trump has made it clear he would sign a statutory DACA together with some 70 other immigration law changes, including mandatory e-Verify for job applicants, the "southern border wall," more immigration judges, and replacing extended-family "chain migration" with a skills-based point system.

Democrats are bridling at these demands, and the mainstream media quickly declared any deal impossible. But polls show most (except the wall) highly popular, and Democrats can't pass laws by themselves.

Trump's list is obviously an opening move in a negotiation, and so the question is whether Democrats are willing to negotiate. They did nothing for the Dreamers in 2009-10, when they had the votes but gave other issues priority. Will they do something now? Or have they gone too far toward an open borders philosophy to do so?

Trump's decision to follow the Constitution on CSRs raises the possibility of short-term hurt for some insurers and possibly higher premiums for non-subsidized insureds. Other proposals he has told his appointees to explore, like expanding the Obama-imposed three-month limit for short-term insurance policies with less coverage than Obamacare requires, might help.

On Monday, Trump encouraged compromise efforts by Republican Lamar Alexander and Democrat Patty Murray. But when the senators agreed on a plan to appropriate CSR payments, he said nice things about it and then he rejected it Tuesday. So did House Speaker Paul Ryan.

Democrats have naturally complained that Republicans, having failed to repeal or replace Obamacare, are trying to wreck it. There's some basis for that, but also for saying it's Democrats' own fault, since they passed Obamacare in a form even they knew was flawed.

After which, as Bloomberg News' Megan McArdle writes, Obama resorted to "dubious executive measures that temporarily shored up the program, but weakened even further the slim foundations of political legitimacy that held it up. And here we are seven years later, watching as one by one those supports sway or snap."

One lesson: It's hard to make complex one-size-fits-all laws work. Another: If you don't obey the law, even the cleverest lawyers may not be able to keep you out of trouble.