STANFORD, CALIF. -- At lunchtime on Thursday, the former Reagan economic adviser Martin Anderson was standing in a Hoover Institution elevator with a Stanford newspaper in his hand and a look of bewildered amusement on his face.

"Look at this," he said, and read again the lead headline in its big bold print: Hoover Aglow Over Gorbachev's Visit. "Alice in Wonderland," Anderson said. "Surrealistic."

Mikhail Bernstam, a Soviet emigre economist sharing Anderson's elevator, gazed over his friend's shoulder at the headline. "You know how many economists will come with Gorbachev?" Bernstam asked in his mesmerizing Russian accent, and grinned. "A lieutenant economist, a captain economist and a general economist! I made that up yesterday."

Then amidst great chuckling the colleagues went to lunch, exiting through the front portals of what for much of this century has served as one of the world's famous bastions of conservative and explicitly anti-communist scholarly work. That the Soviet president should apparently wish to come here, driving the hour south from San Francisco during the single day he plans to spend in California next month -- this is a remarkable turn of events, for the directors and fellows of the Hoover Institution, but not, after all, one that entirely defies explanation.

Leon Trotsky's handwritten notes can be found at the Hoover Institution, and a 1912 letter to New York in the tight slanted scrawl of V.I. Lenin. There are small black-and-white head shots, the faces full-on and in profile as though they had been hauled into precinct headquarters from some ruckus on the Lower East Side, of the serious dark-haired men the czar's secret police kept on file as revolutionaries. There is an original copy of the "Manifest der Kommunistischen Partei," its covers encased in protective Stanford leather, and the Hoover library also owns a March 1917 issue of Pravda -- the first issue ever for what would come to be the modern-day Pravda, and the Hoover archivists microfilmed it some years ago and sent it to Moscow so the Soviets could have a first issue on hand too.

Here in a carpeted room off the library's main research area, a long glass wall separating the bustling activity from the men and women trying with minimal success this week to work in peace, a display easel propped up a massive 1929 Communist International poster of a red-shadowed rifle-brandishing worker. A long table, pushed away from the wall so the camera crews and Soviet advance teams could gather for a close look, held yellowing newsprint and fragile photograph albums and the manuscript on which Trotsky, by then in exile, inked corrections over his history of the Russian revolution. "I think there is a lot of excitement around here," Hoover archivist Anne Van Camp said in a moment of gentle understatement, her eyes fixed warily on the "Today" show crew to make sure nobody was succumbing to the impulse to touch the paper Trotsky's own hand had scribbled up. "I think this is a historical event in itself. If it actually does happen."

Since the Soviet event-planners have been resolutely vague so far about exactly where and when their president intends to make his formal calls, Hoover officials were still uncertain yesterday as to whether Gorbachev definitely planned to visit the institution. He does appear to be coming to Stanford on June 4, part of a whirlwind 16-hour California stay that as of now includes a luncheon at San Francisco's Fairmont Hotel and a visit, possibly on the part of Gorbachev's wife, Raisa, to an Oakland hospital that has sponsored a program to train Soviet doctors in heart surgery.

And when Gorbachev arrives at Stanford, it is believed that one of the places he will most wish to see is the Hoover Institution on War, Revolution and Peace, which was founded in 1919 when Stanford University alumnus Herbert Hoover gave his alma mater $50,000 with instructions that the money be used to collect firsthand materials documenting war and social change. The buildings to house the materials properly were not completed for many years; the story goes that bundles of invaluable revolutionary and World War I documents used to lie stuffed under beds in the student dormitories.

But emigres' papers and the acquisitions of Hoover-dispatched document hunters gradually swelled the Hoover's Russian and East European collection to the point where it now includes material unduplicated even inside the Soviet Union. Last summer Sergei F. Akhromeyev, Gorbachev's arms adviser and retired chief of staff, visited the Hoover Institution and was shown a display much like the the one Van Camp is working to prepare for Gorbachev. "He was thrilled," she said. "I think the Soviets are going through a time right now of looking at their own history, and trying to fill in some of the blank spots."

Although it is not officially known whether Akhromeyev went home and urged his president to put Stanford on his next itinerary, Hoover officials say they are thrilled themselves. "We're delighted that he's coming," said Hoover Associate Director Charles Palm. "It's a chance for us to share a mutual appreciation for the history of Russia and the Soviet Union. One of the things we admire about President Gorbachev is his openness and interest in facing the past of Russian history -- both the heroic side and the other."

If this abundance of appreciation seems odd, coming as it does from a think tank historically looked to for some of the nation's most conservative economic and foreign policy analyses, Hoover research fellows observe that the world's political landscape looks profoundly different than it did only five years ago. Even now, the East European collection is gathering newsletters, leaflets and other original materials documenting the new upheaval in Eastern Europe; among the display items Gorbachev may examine is an April 1990 copy of the defiantly named Estonian Independent. And when Akhromeyev spent his two days at the Hoover Institution last year, he stayed in the home of former secretary of state George Shultz, who is himself a Hoover fellow.

"It would be mighty strange if Gorbachev did not want to come here," Anderson said. "Given what he's doing now, would he want to visit our political science department? Or visit some of our more left-wing professors to get guidance on how the Soviet economy should work? Not likely."

Indeed, part of the hope at the Hoover Institution now is that Gorbachev plans to visit not in spite of the conservative scholars in residence but because of them. It would be infinitely more difficult, the Soviet emigre Bernstam said, to envision an earlier Soviet president planning a visit of this sort. But Bernstam last week began translating into Russian the informal economic policy suggestions of a group of Hoover fellows who would like to offer Gorbachev their views on matters like privatization and the transition to free markets. "Gorbachev is a man of the world," Bernstam said. "His favorite phrase is, and I quote, 'We want to rejoin the world's civilization.' So this implies that he understands that communism was a retreat from the world's civilization."

There are those both inside and outside Hoover for whom this transition has been difficult to make, Bernstam said -- the transition away from Cold War convictions that the West's most important challenge lay in winning the battle against communism. "A loss of the enemy, the global enemy, is the loss of an intellectual preoccupation," Bernstam said. "Let's say you're working against drugs, and suddenly nobody's using drugs anymore. Wonderful. Now nobody will die from drugs. At the same time, your own intellectual achievements, your own ingenious ideas, your own policy suggestions which are useful -- it's all not important anymore."

Bernstam does not see himself as one of those people, he said; part of his ongoing work this spring has involved the organization of a 1991 conference to which he hopes to invite participants as diverse as Milton Friedman, George Shultz, and Soviet and Eastern European government finance and economy advisers.

"For ordinary people at Hoover, myself included, this is not so much a vindication," Bernstam said, considering what some have described as the current repudiation of many principles once basic to the Soviet economic system, "but rather an opportunity to solve some intellectual and social problems, and perhaps to help. Not to impose our suggestions, but to offer some ideas and policies which may be helpful if people freely choose them."

As to the Russian and East European collection, Palm said, the library has considered the possibility of providing microfilm copies if Gorbachev or other Soviet officials should express an interest in bringing some materials back to the Soviet Union. "The microfilm probably will last a lot longer than the originals we have," Palm said. "And in any case these originals were given to us under contractual arrangements with donors, and we have a trust that we're keeping with them as well."

Palm was asked whether that might not cause some consternation within the Soviet Union -- the equivalent of a private institution in Leningrad offering the United States copies of priceless Revolutionary War materials. "Most of these records would not have been saved if the Hoover Institution had not saved them," he said. "We were collecting when no one else was collecting these materials, and if we had not been there, most of these materials would have been destroyed. So we have done a service not only to scholarship broadly, but to the Russian people themselves."