Vietnam said today that it will not attack withdrawing Chinese troops unless they continue "acts of war" as they pull out of Vietnam.

The Vietnamese statement seemed to assure that China will be able to carry out the sometimes difficult military operation of thinning out its units and disengaging without a new flare-up in the Sino-Vietnames fighting that began when Chinese troops crossed the border Feb. 17.

Chinese troops now are moving back toward the border in large numbers, according to analysts here, and there are no indications of that significant fighting is going on.

Each side, however, is doing all it can to portray itself as the victor.

Hanoi said that China learned a "lesson at a high price" and that its invasion had "come a cropper."

China's Communist Party newspaper People's Daily claimed the invaders "reached their set goals with complete success" and are "victoriously returning."

Peking's official New China News Agency said tonight that "some contingents of the Chinese frontier forces" had "returned to Chinese territory" and "received a warm welcome from people of all nationalities there."

Accompanying the rival claims of victory were indications from both countries that they do not expect their mutual bitterness to fade quickly.

While hailing its "victory," Vietnam, said "the reactionary Chinese rulers may not draw the necessary lessons from their defeat and their nature has not changed."

China said that friendship between the Chinese and Vietnamese people eventually will be restored, but indicated it expects the restoration to take a long time.

One of the first question if the proposed negotiations take place after the Chinese withdrawal is completed will be exchanges of prisoners of war. Then, presumably, the negotiators will begin to discuss defining their border.

Althought the border was agreed to in 1955 after Vietnam became independent, each side has accused the other during the war of having alterd the frontier to its own advantage in small ways.

China and the Soviet Union have been talking fruitlessly about similar small areas of dispute in their border since skirmishes were fought along it in 1969. The Chinese-Vietnamese talks could be similarly prolonged, observers believe.

The negotiations could also be complicated should there be a new series of the cross border attacks, infiltration and shelling that preceded the Chinese invasion.

Hanoi said that while it will allow Chinese troops to depart it is wary of a trick. "Everyone knows that the Chinese authorities are famous for saying one thing and doing another," a Radio Hanoi commentary said.

"The present situation in the border areas is still serious. So far, three days after China announced immediate withdrawal there has only been movement from some areas," it said. Radio Hanoi also accused the Chinese of committing crimes as they pull back.

Hanoi also continued to call for a unified military spirit in Vietnam and published the full text of its general mobilization order which was issued March 5, the same day China announced that it was beginning a withdrawal.

The mobilization, which calls for everyone to work 10 hours daily instead of the normal eight and to do two hours of military training a day, seems to be a part of Hanoi's effort to involve its people in the victory it is claiming and to prepare them for the problems of reconstructing the damaged border areas.

But Hanoi's authoritative daily Nhan Dan paid tribute not only to the Vietnamese people's efforts to repel China, but also to the Soviet Union and world opinion.

"The Soviet Union, right from the start, expressed through strong statements and practical deeds and a widespread mass movement, its firm support for Vietnam, providing us with the strongest prop in our struggles," the paper said of Vietnam's close ally.

Although the Soviet Union did not take military action and sent only a moderate airlift of supplies to Hanoi during the fighting, there has been no hint of Vietnamese dissatisfaction with the level of Soviet support.

"Severe condemnation by the world" also contributed to China's decision to call off its invasion, Nhan Dan said.