Now all that he needed to identify undecidable problems was a method for predicting in advance which programs would get stuck in infinite loops. But that would require examining them with another program, and how would you know that it wouldn't get stuck without vetting it with a third program, ad infinitum? Like a novel about a novelist writing a novel, the dream of mathematical infallibility went spinning down the rabbit hole.

In "The Man Who Knew Too Much," Leavitt is faced with the task of giving a new shine to a life that has been scrutinized several times before. Turing's mother, Sara, wrote her own account shortly after his death, and in 1983 Andrew Hodges provided the definitive biography, with "Alan Turing: The Enigma." Inspired by Hodges, Hugh Whitemore turned the story into a play, "Breaking the Code," with Derek Jacobi in the starring role.

What made Turing's story compelling enough for Broadway happened after his groundbreaking work at Cambridge. Hooked on the idea of mechanical problem-solvers, he helped design the machinery that deciphered the Germans' battle-front communications, an important factor in the Allied victory. After the war he helped develop the first modern digital computers and made his mark as a leading advocate of the notion that the brain is a computer and machines can think. A solitary, introspective man, he was quietly working at the University of Manchester when he was arrested for being a homosexual and forced to undergo a hormonal "cure." Two years later he was found dead with that apple, an apparent suicide committed by a man who had had a thing for Snow White.

Bringing the talents of a celebrated gay novelist like Leavitt to Turing's sad tale would strike any editor as a promising combination -- a way to introduce this important thinker to a wider world. I was never able to get all the way through Hodges's formidable account, but "The Man Who Knew Too Much" can be read in a few afternoons. While the book is a skillful, literate compression, as I made my way toward the end I never felt that Leavitt succeeded in inhabiting the story, making the fantastic world of Turing as captivating as that of the fictional Jonah Boyd.

The author certainly can't be accused of shirking the mathematics. Turing's proof and his work on cryptanalysis are described at an impressively fine grain -- so fine that I sometimes wished Leavitt would step back and switch to a wide-angle lens. It's so easy to get lost in the thicket.