Godfrey Hardy taught pure math at Cambridge, and sometimes Oxford, from 1901 through the Second World War. The physicist Freeman Dyson was one of his later students; he has written that Hardy's lectures were like "Bach on the harpsichord: precise and totally lucid, but displaying his passionate pleasure to all who could see beneath the surface. ... He saw himself as an artist, creating works of abstract beauty." Hardy had a horror of applied mathematics, and hated it "with a special intensity," writes Dyson, "when it had anything to do with war." Hardy was known for his sterile manner and his fear of mirrors; some of his Cambridge colleagues suspected him of being a vampire. He believed in mathematics as a rigorous, rational, and totally useless discipline. "No discovery of mine," he boasts in Partition, "has made the least difference to the well-being of the world."
During the First World War Hardy struck up a friendship with an Indian clerk named Ramanujan, who in many ways was his mirror image. Largely untrained, positionless, intuitive, religious, and as poor as a poet, the man Hardy described as "the most romantic figure in the recent history of mathematics" could solve complex problems without explaining or even understanding how he came by his results. A box of theorems he sent Hardy from India in 1913 impressed the Cambridge mathematician as formally ragged but shot through with genius. Hardy wrote proofs for some of them, but the others "fairly blew me away. ... They had to be true, for if they were not, no one would have the imagination to invent them."
Hardy invited Ramanujan to Cambridge in 1914, and Partition tells about the six years the Indian clerk spent there, solving mysteries with Hardy, including a formula for "partitions" in a given number n (which had eluded mathematicians since Leonhard Euler in the 18th century). You don't have to understand the math to follow the play, because Hauptman concentrates on the clash of cultures embodied by the two men: Hardy's a cold, methodical atheist; Ramanujan shivers in his Cambridge apartment and fails to feed himself on meager English war rations while a minor Hindu goddess visits him in dreams with inspiration.
The goddess part of the play is rather weak. In real life Ramanujan did tell Hardy that his theorems came to him in visions of a village goddess named Namagiri, and it's fun to watch a flesh-and-blood Namagiri come onstage in orange silk robes, jewelry, and an orange-painted face, especially because without her there would be no women in the play at all. But the role is stiffly written, and Rachel Rajput's performance doesn't improve it. She tries to be mysterious as well as funny, but ends up seeming flip.
The other supernatural part of the play involves the French mathematician Pierre de Fermat, laughing in the afterlife over the difficulty of his Last Theorem, which he had scribbled in a margin without a proof. Fermat's Last Theorem baffled mathematicians for centuries -- Fermat died in 1665 -- and one of Ramanujan's last projects is a feverish attempt to prove it. Julian López-Morillas does an excellent job with Fermat's grouchy, cackling mockery, and I suppose these scenes form an exception to the rule that Partition's strength is its guilelessness.
But the two lead roles, with Rahul Gupta as Ramanujan and David Arrow as Hardy, are played with a moving innocence. Instead of making fun of Hardy's British reserve -- which would be easy -- Arrow makes him brisk, mincing, arrogant, sensitive, insinuating, and excruciatingly polite. Gentle satire is implicit, but so is affection, and Hardy's speeches to the London Mathematical Society are hilarious. "Pure math is the only real math, because it must be beautiful, like a poem," he says, and licks his lips with a mischievous grin at the sensation he causes in the room.
Gupta does just as well with his portrayal of Ramanujan as a superstitious Hindu. At the very start we see him rescued from a suicide attempt in London after drinking Ovaltine and noticing it contained animal products (he's a vegetarian). He seems to have blamed his own lack of piety for a subsequent German air raid. Gupta bends into the quirky, self-tortured role with good humor and a happy absence of irony.
Chris Ayles is also masterful as Billington, the crusty professor of classics who mitigates Hardy's cold theorizing. "Aeschylus will beat the dust, while the prime numbers will last forever?" he asks Hardy, incredulous. "My dear boy, it's dangerous for me to be seen with you at Cambridge."
Partition is not perfect; it tries to do more with the divide between East and West, and logic versus the supernatural, than it achieves by the end of its 2 1/2 hours, but it wears its heavy learning with the lightness of a bird, and the actors' balance of eccentric, finally fragile personalities leads to a surprisingly Chekhovian moment of grief.