The negotiations aimed at producing a budget for the federal government for fiscal 1983 have been a drama of many dimensions. This is high-stakes economic and political poker, with the future of an ailing economy and the advantage in the 1982 and perhaps even the 1984 elections at risk. But no one should lose sight of the fact that it is also a human struggle, with two oddly matched but appropriate antagonists, Ronald Reagan and Tip O'Neill.

Oddly matched, because, at first glance, the president of the United States and the speaker of the House of Representatives seem polar opposites. After 45 years in public office, O'Neill is easily caricatured as a bumbling relic of the political past, a ward heeler who threatens harm to the Queen's English every time he puts down his cigar and opens his mouth. Reagan, the movie actor and television host who took up a second career in politics as he was approaching retirement age, is just as easily caricatured as a lightweight charmer with a gift of gab but no talent for sustained leadership.

Each man has come to know the other's caricature is a lie. O'Neill learned last year that Reagan is as tough as he is charming; and Reagan is learning this year that O'Neill can be as stubborn about his convictions as the president is himself. What is not so obvious is this: Reagan and O'Neill--the two men whose agreement is essential if there is to be a compromise on the budget--have more in common with each other than either of them does with most of the others involved in the lengthy negotiations.

They are of an age: Reagan just past his 71st birthday, O'Neill approaching his 70th. Although they draw different lessons from it, both of them know, in a bone-deep personal way that younger politicians do not, what the struggle for survival meant in the hard times of their youth, 50 years ago. The young men who have been negotiating on their behalf--House Budget Committee Chairman Jim Jones (D-Okla.), White House chief of staff James A. Baker III, budget director David A. Stockman--are products of the prosperous postwar world, with its overflowing economic and educational benefits. They are, like most of their generation, practical, pragmatic men of affairs, uncomfortable with ideology. They have trouble understanding the inflexibility of their elders.

But Reagan and O'Neill are not just stubborn Irishmen; they have convictions, and those convictions were forged a long time ago. Reagan is certain he did not become president of the United States in order to raise taxes. And O'Neill is equally convinced he did not become speaker of the House in order to reduce anyone's Social Security. They understand-- both of them--that this is a critical moment for them personally and for the parties and branches of government they lead. For O'Neill, a rollback in promised Social Security payments is the first retreat from the promise of decent, dignified retirement that the sainted FDR made the cornerstone of the New Deal. Fulfilling that promise has kept the Democrats in almost unbroken control of Congress for 50 years. For Reagan, an increase in tax rates contradicts the first principle of the philosophy he has preached since he left the Democratic fold, the belief that the only way to curb big government is to slow the torrent of taxes on which it feeds. Only by sustaining that principle, he thinks, can the Republicans hold power on a long- term basis.

These two men lived through the same historical experience of the Great Depression and came to diametrically opposite conclusions. Reagan sees government as the source, not the solution, of the nation's economic ills, and O'Neill is just as convinced that, when all else fails, government must be ready to step in and lend a hand. To ask these two men, at this point in their lives, to rethink the lessons of their youth and the principles of a lifetime is asking a lot. And a lot depends on their doing it.