Yes, admittedly, there was rioting and vandalism last week during the celebration. A few bookstores had windows smashed and shelves stripped, and vacant lots glowed with burning piles of old dissertations. But overall we can feel relief that it was nothing -- nothing -- compared to the outbreak of exuberant thuggery that occurred in 1984 after Louis DeBranges finally proved the Bieberbach Conjecture.

"Math hooligans are the worst," said a Chicago Police Department spokesman. "But the city learned from the Bieberbach riots. We were ready for them this time."

When word hit Wednesday that Fermat's Last Theorem had fallen, a massive show of force from law enforcement at universities all around the country headed off a repeat of the festive looting sprees that have become the traditional accompaniment to triumphant breakthroughs in higher mathematics.

Mounted police throughout Hyde Park kept crowds of delirious wizards at the University of Chicago from tipping over cars on the midway as they first did in 1976 when Wolfgang Haken and Kenneth Appel cracked the long-vexing Four-Color Problem. Incidents of textbook-throwing and citizens being pulled from their cars and humiliated with difficult story problems last week were described by the university's math department chairman Bob Zimmer as "isolated."

Zimmer said, "Most of the celebrations were orderly and peaceful. But there will always be a few -- usually graduate students -- who use any excuse to cause trouble and steal. These are not true fans of Andrew Wiles."

Wiles himself pleaded for calm even as he offered up the proof that there is no solution to the equation x^n + y^n = z^n when n is a whole number greater than two, as Pierre de Fermat first proposed in the 17th Century. "Party hard but party safe," he said, echoing the phrase he had repeated often in interviews with scholarly journals as he came closer and closer to completing his proof.

Some authorities tried to blame the disorder on the provocative taunting of Japanese mathematician Yoichi Miyaoka. Miyaoka thought he had proved Fermat's Last Theorem in 1988, but his claims did not bear up under the scrutiny of professional referees, leading some to suspect that the fix was in. And ever since, as Wiles chipped away steadily at the Fermat problem, Miyaoka scoffed that there would be no reason to board up windows near universities any time soon; that God wanted Miyaoka to prove it.

In a peculiar sidelight, Miyaoka recently took the trouble to secure a U.S. trademark on the equation "x^n + y^n = z^n " as well as the now-ubiquitous expression "Take that, Fermat!" Ironically, in defeat, he stands to make a good deal of money on cap and T-shirt sales.

This was no walk-in-the-park proof for Wiles. He was dogged, in the early going, by sniping publicity that claimed he was seen puttering late one night doing set theory in a New Jersey library when he either should have been sleeping, critics said, or focusing on arithmetic algebraic geometry for the proving work ahead.

"Set theory is my hobby, it helps me relax," was his angry explanation. The next night, he channeled his fury and came up with five critical steps in his proof. Not a record, but close.

There was talk that he thought he could do it all by himself, especially when he candidly referred to University of California mathematician Kenneth Ribet as part of his "supporting cast," when most people in the field knew that without Ribet's 1986 proof definitively linking the Taniyama Conjecture to Fermat's Last Theorem, Wiles would be just another frustrated guy in a tweed jacket teaching calculus to freshmen.

His travails made the ultimate victory that much more explosive for math buffs. When the news arrived, many were already wired from caffeine consumed at daily colloquial teas, and the took to the streets en masse shouting, "Obvious! Yessss! It was obvious!"

The law cannot hope to stop such enthusiasm, only to control it. Still, one has to wonder what the connection is between wanton pillaging and a mathematical proof, no matter how long-awaited and subtle.

The Victory Over Fermat rally, held on a cloudless day in front of a crowd of 30,000 (police estimate: 150,000) was pleasantly peaceful. Signs unfurled in the audience proclaimed Wiles the greatest mathematician of all time, though partisans of Euclid, Descartes, Newton, and C.F. Gauss and others argued the point vehemently.

A warmup act, The Supertheorists, delighted the crowd with a ragged song, "It Was Never Less Than Probable, My Friend," which included such gloating, barbed verses as --- "I had a proof all ready / But then I did a choke-a / Made liberal assumptions / Hi! I'm Yoichi Miyaoka."

In the speeches from the stage, there was talk of a dynasty, specifically that next year Wiles will crack the great unproven Riemann Hypothesis ("Rie-peat! Rie-peat!" the crowd cried), and that after the Prime-Pair Problem, the Goldbach Conjecture ("Minimum Goldbach," said one T-shirt) and so on.

They couldn't just let him enjoy his proof. Not even for one day. Math people. Go figure 'em.