What is the lesson of the failed American attempt to rescue the hostages in Iran? To judge from much of the published comment, it is that the president should have subjected himself to a series of consultations before going ahead.

Thus some have said that the president would have been wise to share the burden of responsibility with Congress. Others have strongly suggested that, wise or not, such consultations were required by the War Powers Act and that the president probably exceeded his authority and may have broken the law in acting without congressional coopertion.

Yet another line of argument has been that the president should have consulted not only with Congress but with our allies as well. After all, the only reason they finally agreed to economic sanctions against Iran was to head off military action by the United States; according to this argument, therefore, the president was breaking a promise to the allies by ordering the commando raid and should at least have given them an opportunity to talk him out of it in advance.

The odd thing is that all these criticisms have invariably been accompanied by an acknowledgment that if the rescue effort had succeeded, there would have been universal rejoicing and applause. And indeed, can anyone imagine Sen. Frank Church complaining about violations of the War Powers Act or Cyrus Vance resigning in response to the sight of the American hostages returning to the United States in the company of their heroic leberators? If that is so, however, it means the real issue is not a failure to consult but a failure to plan and execute the operation properly.

At this stage it is impossible to say what exactly went wrong with the operation and why. Yet we do know that a high proportion of the helicopters used -- three out of eight -- broke down and that no backup was available. Whatever the cause of the breakdowns may have been -- whether faulty maintenance procedures or the scarcity of properly trained mechanics or even bad luck -- the fact remains that the operation revealed a surprisingly low level of technical efficiency.

As for the lack of backup, Gen. Yitzhak Rabin (who as prime minister of Israel in 1976 had a hand in staging the spectacular rescue of the hostages held in Entebbe) has expressed astonishment at a plan that did not take account of how sensitive helicopters are "and how vulnerable to technical failure." Perhaps, as Edward Luttwak has suggested, the reason so small a number of helicopters was sent on the mission is that the president was being overly cautious. But even so, the technical judgment involved was grossly unreliable.

In other words, whatever else may have come into play, the collapse of this operation must be ascribed in large measure to inadequacies in the very area that Americans have always been assumed to excel -- the mechanical and the technological.

The lesson, then, of the aborted rescue attempt in Iran is that the military capability in this country has deteriorated to a greater degree than had previously seemed evident even to some of us who have been worrying about the decline of American power for the past five years and more.

That the United States had lost its edge over the Soviet Union in strategic nuclear weapons was already clear long before Iran; that we lacked the conventional forces to defend the oil fields of the Middle East against a direct Soviet assault seemed probable; that we had destroyed the CIA's ability to counter an indirect Soviet assault was equally likely; that we had all but lost the will to use force under any conceivable circumstances was blatantly obvious from our supine response to the act of war committed against us by Iran nearly six months ago (and also became manifest in the timid handling of the rescue operation itself.)

Now to this dismal and ominous catalog of diminished military capabilities, we can add a decline in mechanical and technological competence.

There has been a great reluctance in our political culture to face up to these facts. At every stage they have been denied, and when denial has become rationally impossible, they have been dismissed as insignificant.

Military power, we have been told over and over again, is obsolete in an interdependent world. Yet the Soviet Union, and many other nations too (Vietnam and Cuba, to name only two), are finding uses enough for this "obsolete" instrument of international conflict, while we for our part are humiliated in spirit and menaced by a threat to the most vital of all our economic interests.

To face these facts -- to absorb them, to think about their implications -- leads inexorably to the conclusion that the United States is doomed unless we undertake a massive program to restore our military capabilities all across the board. Those who oppose such an effort naturally prefer to dwell on other things. And as they argue about the War Powers Act and deplore the president's refusal to seek the permission of the Germans and the French before trying to rescue our hostages, the time we still have left to profit from the true lesson of Iran -- of Afghanistan before it -- slips relentlessly by.