THE POLITICS of it were devilishly clever, if not angelically attractive - a down-in-the-polls president laying off his own unpopularity on the mental health, or lack thereof, of the people. And much of the president's enunciated program will remain for some time in the realm of the question mark. But Mr. Carter, transformed in manner, may have transformed his own political condition and regained some of his lost authority in the past two days. And this needs to be said: From among all his conflicting good intentions, the president has made an important public commitment. This country is now going to reduce its imports of oil - and the terrible dangers into which its dependency has drawn it.

The gasoline lines in the United States, the president emphasized, are the direct result of the Iranian revolution. A political upheaval in one country and a current loss there of perhaps 4 percent of the world's oil production have nearly doubled international oil prices, inflicted vast anxiety and hardship on consumers, and generated a spreading recession. Mr. Carter is coming to terms with the very real possibilities of a greater collapse of Iranian production, or perhaps chaos spilling into the oil-exporting countries of the Middle East. By promising a steady reduction of U.S. imports over the next decade, he has made a substantial contribution not only to holding down prices, but also to relieving the pressure on the fragile governments of nations that export oil.

The president was not exaggerating when he spoke of protecting American independence. Oil-exporting countries have been hinting sharply of political conditions attached to their future cooperation. No great power with broad responsibilities can tolerate this kind of threat. The only useful response is to require less of their oil.

Mr. Carter's import limit for this year, 8.2 million barrels of oil a day, is just about the present level, a hair's breadth above the point at which long gasoline lines appear. So it presupposes tight supplies - with short hours and much uncertainty at the filling stations - through the rest of the summer. Mr. Carter now faces the difficult feat of maintaining public support for this self-imposed limit over the months ahead. The lesson of his unsuccessful energy program two years ago is that a president cannot give an idea one push and expect it to roll by its own momentum. He should reflect on the fact that the derision of his moral-equivalent-of-war assertion did not really become widespread and general until he himself had seemed to walk away from the battlefield.

But an even harsher test of the president's steadfastness lies beyond this summer. U.S. oil imports would have dropped later this year in any event, because the country is going into a recession. Just as a small cut in world production generates a crisis, so a small drop in demand immediately produces a glut. Mr. Carter will have to keep reminding the country that a glut means the policy is working and power is shifting away from the sellers of oil, not that the emergency is over and life may return to cushy normal.

Mr. Carter is depending, for the next few years, mainly on conservation to keep oil requirements down. Forceful conservation is the only device that pays off fast enough to help immediately. Next, there will be the conversion of oil-fired power plants to coal. Then comes the completion of the nuclear plants already under construction.Congress has recently been seized with a fit of enthusiasm for manufacturing synthetic oil and gas from coal. Building pilot plants as an experiment is certainly worth doing to discover precisely how well it works. But the complexity of the process is enormous, and synthetics cannot contribute much within the next decade. In its fascination with synthetics, Congress might keep it in mind that much surer, and cheaper, alternatives are already at hand.

For the years beyond, as the country presses the development of domestic resources, the new Energy Mobilization Board can contribute greatly to breaking the regulatory and political stalements that have repeatedly entangled large energy projects. It's not merely an administrative matter. If it works effectively, the new board will bring the president directly into conflict with, for example, Gov. Edmund G. Brown Jr. of California, who has been using the state's considerable authority to impede the construction of power plants and pipelines there. In the past Mr. Carter has stepped around these deadlocks, declining to interfere. That has greatly contributed to the sense of paralysis that he now deplores. The creation of the board may be viewed as a promise to break that bad habit.

The president continues to speak of the federal government as an adversary, although he has been the head of it for more than two years. And the federal government is, after all, the instrument for transmitting presidential policy into national practice - the only instrument that he will have. But you don't have to agree with either his diagnosis of the national state of mind or his boomerang rhetoric against the very government he administers to support his policy on oil. This country has drifted into a dangerous place, and it must now work its way back. Mr. Carter has left open a lot of questions about precisely how to do it, but there should be no argument about the rightness of his commitment. The largest question is whether he and the country have the stamina to stick to the rigorous and necessary course he has laid out.