Undated (AP) _ Soybean futures prices surged Tuesday on the Chicago Board of Trade, erasing the previous session's losses after a Brazilian agency slashed its forecast for that country's 1991 soybean harvest.

Grain futures also rose, boosted in part by a Chinese purchase of 640,000 metric tons of U.S. wheat at subsidized prices.

On other commodity markets, pork bellies led most livestock futures higher; oil futures fell; and precious metals were mixed.

Soybean futures settled 4 cents to 9 3/4 cents higher with the contract for delivery in May at $5.93 1/4 a bushel; wheat futures were 3 cents to 4 cents higher with May at $2.81 1/4 a bushel; corn was 1 1/2 cents to 2 cents higher with May at $2.56 1/2 a bushel; oats were 1 cent to 2 cents higher with May at $1.24 3/4 a bushel.

The Brazilian Geographics and Statistical Institute reduced its soybean crop estimate by 13 percent to 15.5 million metric tons from last month's projection of 17.8 million. Brazil, the world's second-largest producer after the United States, harvested 19.9 million metric tons of soybeans last year.

The revision reflects extreme dryness in southern areas early in the growing season and recent heavy rains that have delayed harvesting.

Other supportive factors included slack farmer sales of soybeans on the cash market and heavy buying of futures contract by speculative funds, whose moves frequently are imitated by smaller speculators.

Soybean futures tumbled as much as 7 cents Monday, so a rebound was likely, said Victor Lespinasse, an assistant vice president in the grain trading division of Dean Witter Reynolds Inc.

Dan Cekander, grains analyst with Rodman & Renshaw Inc., said soybeans also were supported by talk of Soviet interest in buying U.S. soybean meal and oil.

Livestock and meat futures ended mostly higher on the Chicago Mercantile Exchange, led by gains of 2 cents a pound, the permitted daily limit, in the pork belly pit.

The rally stemmed mainly from talk that South Korea bought 3 million to 4 million pounds of frozen U.S. pork bellies, adding a new demand factor to the market at a time when bellies normally are being stockpiled for use during the summertime peak demand period.

The size of the rumored deal would represent only a small share of the 68.1 million pounds of bellies in cold storage as of April 1 and an even smaller fraction of total U.S. production. Nevertheless, ''it's a new player in the market,'' said Charles K. Levitt, senior livestock analyst at Shearson Lehman Brothers Inc. in Chicago.

April live cattle and live hog contracts expired quietly at noon with live cattle up .02 cent at 79.95 cents a pound and live hogs up .55 cent at 53.37 cents a pound.

Frozen pork belly futures settled 1.12 cents to 2 cents higher with May at 63.40 cents a pound; live cattle were .13 cent to .42 cent higher with June at 76.12 cents a pound; feeder cattle were .03 cent lower to .35 cent higher with April at 90.37 cents a pound; live hogs were .22 cent lower to .07 cent higher with June at 57.92 cents a pound.

A steep drop in gasoline futures that analysts attributed to profit-taking led oil futures lower on the New York Mercantile Exchange ahead of an industry report that showed an unexpected decline in U.S. crude stocks.

The American Petroleum Institute said crude stocks fell by 3.8 million barrels in the week ending Friday compared with expectations for a rise of about 1 million barrels.

Gasoline stocks rose by 715,000 barrels, which was within expectations; heating oil stocks unexpectedly rose by about 380,000 barrels.

Light sweet crude oil futures finished 27 cents to 44 cents lower with June at $20.88 a barrel; heating oil was .26 cent to .61 cent lower with May at 56.97 cents a gallon; unleaded gasoline was 1.3 cents to 2.54 cents lower with May at 71.81 cents a gallon; natural gas was 0.2 cent lower to 0.9 cent higher with June at $1.39 per 1,000 cubic feet.

Precious metals were narrowly mixed on New York's Commodity Exchange. Gold futures settled 80 cents to 90 cents lower with April at $357.10 a troy ounce; silver was 0.2 cent to 0.5 cent higher with May at $3.94 a troy ounce.