Secret talks have taken place in Poland between the Communist authorities and representatives of the national leadership of the suspended independent trade union Solidarity, a senior Solidarity adviser said today.

The adviser, who asked not to be identified, said the informal talks followed a meeting in Warsaw at the end of last month of nine Solidarity leaders still at liberty. The leaders, members of the union's 100-member national commission who escaped arrest when martial law was imposed in December, appointed two intermediaries for preliminary contacts with the government.

The main aim of the talks appears to be to clear the ground for direct negotiations between the martial-law government and Solidarity leaders, including Lech Walesa, on the union's future. The adviser cautioned, however, that several major procedural obstacles remain before such negotiations can get under way.

The adviser said Walesa is due to meet again soon with Deputy Prime Minister Mieczyslaw Rakowski, the government's chief strategist for trade union affairs. After two unsuccessful encounters, the two men met two weeks ago at Walesa's place of detention outside Warsaw and drew up a list of topics for future discussion.

Poland's Roman Catholic primate, Archbishop Jozef Glemp, speaking Sunday before the largest public assembly since the military crackdown, urged authorities to free Walesa. "Let's pray for Lech Walesa to be released, so he can stand again. His presence doesn't threaten anybody," Glemp told more than 20,000 people gathered outside a church in the Warsaw suburb of Ursus, The Associated Press reported.

Glemp, calling his audience the largest "in our homeland since imposition of martial law," said Poles "need agreement and national accord. This gathering today is a step toward that." Walesa's release, he said, "will be the way to agreement and national accord." He also renewed his call for the release of all dissidents interned by the martial-law government.

Meanwhile, details have circulated here of a confidential Communist Party document outlining three possible strategies for dealing with Solidarity: reinstating the union under a new leadership, forming two separate Solidarity unions, or disbanding the movement altogether. The document, leaked to underground Solidarity activists, made clear that the government's choice of tactics will depend largely on the amount of resistance to martial law during the coming months.

The latest disclosures appear to indicate that the Polish authorities are seriously looking for some way to restore Solidarity, provided they can obtain guarantees that the union ultimately will be subject to Communist Party controls. The Solidarity adviser said he had noticed a certain "liberalization" in the government's approach to the question in the three months since the union's suspension.

There is, however, no way of telling to what degree the government's willingness to talk with Solidarity signifies flexibility on substantive issues. Union advisers who have taken part in such talks say the official line fluctuates, perhaps reflecting internal differences among party leaders.

The government's proposals for the future of trade unions were contained in a draft document released last month. The two key points to which those Solidarity leaders still at large objected were the proposed restructuring of the union on a craft--rather than regional--basis and restrictions on its activities to social questions only.

According to the Solidarity informant, however, the government indicated in private discussions with union representatives that both these points could be negotiable. A more serious, and still unresolved, issue is who should be allowed to represent Solidarity in the direct negotiations.

The informant said that Solidarity leaders insisted that any formal negotiations be held in the presence of Walesa and a seven-member quorum of the union's 12-member Presidium. They also insisted on the presence of three advisers including Jan Olszewski, a well-known lawyer, and Romuald Kukulowicz, a Catholic economist.

The government, however, was reported sticking to its demand for the right to veto any of the Solidarity participants the government considered "enemies of socialism."

The Solidarity adviser said, "This is a point of principle for us. Either Solidarity is a self-governing and independent union, in which case it can decide who can speak on its behalf, or it is not."

Solidarity's "minimum conditions" for negotiations with the government are contained in an underground bulletin circulating here that quotes the union's "Interfactory Coordinating Commission," which it says met in Warsaw Feb. 26. The conditions are that Solidarity must be represented by its "democratically elected leaders" and that the statutes and regional structure of the union cannot be changed.

Within this framework, however, Solidarity's leaders appear to have gone some way to meeting the government's concerns. Their proposed team of advisers does not include any of the dissident intellectuals accused by the authorities of turning Solidarity into a political opposition.

Also, the formula of including only a quorum of the Presidium in the negotiations means that Solidarity does not insist on the presence of the chairmen of the union's most powerful regions, some of whom face legal charges for organizing strikes after martial law's imposition. These are the men to whom the authorities have most objected.

One of the government's advisers, Jerzy Wiatr, said in a recent interview that attempts to start negotiations with Walesa failed because he insisted on the presence of his entire Presidium. The authorities took the view that it was pointless to talk to this body since "it had openly declared its hostility to the system" at meetings prior to martial law.

Martial-law authorities seem confident that time is on their side and do not appear in any hurry to make a final decision on Solidarity's future. The confidential document leaked to Solidarity suggested that the matter should be left open at least until enactment of a new law on trade unions later this year.

This approach reflects the political style of the martial-law chief, Gen. Wojciech Jaruzelski, who does not want to be rushed into decisions he may later regret.

The main factor encouraging the authorities to come to terms with Solidarity is the fear of widespread unrest unless the union is restored. This point was emphasized in the leaked party document, which states that "delegalization of Solidarity could meet with the disapproval of a significant part of society and resistance, as well as with the negative reaction of Western states including further economic sanctions."

The document, drawn up by a Central Committee department in February, predicted that a total ban on Solidarity also might lead to an increase in underground activity. But it said a ban might become necessary "in the event of the prolongation of martial law as a result of illegal activities by Solidarity members including sabotage, strikes, terrorism and organized passive resistance."

A preferable course, said the document, would be the reinstatement of Solidarity with a new leadership pledged to abstain from political activities. Dissidents would have to be excluded from belonging to the union's leadership or advising it.

"This method can be used if an initiative group from Solidarity emerges giving full guarantees of fulfilling these conditions," the document said.