The English are about to seize Canada from the French; in the midst of Wolfe's bloody siege of Quebec, a colonel walks into a bookshop, in ruins but still trading defiantly. It is run by an enigmatic, combative, proud young woman who, charmed, proceeds to tell him all about the ideal book, and about the castle where it was made and the man who made it - a fantastical tale . . .
And so we cut back a hundred years or so to 1717 and another siege - this time the Ottomans are attacking Belgrade. Among the Christian army of resistance is one Count Ostrov, who is about to see his only son, just 17, die on the battlefield, at no assailant's hand and entirely without ostensible cause.
Stung by the mystery of it, the Count chucks in army life and retreats to his remote mountain fastness, a spectacular Gothic castle in the borderlands between the kingdoms of Transmoravia and Hungary. There, in mourning, he indulges his love of puzzles, turning the castle itself into a giant, Escheresque mechanical conundrum of revolving doors, moving floors and unstable staircases.
To the castle he brings the legendary English Huguenot printer Nicholas Flood and the Jesuit casuist St Foix. Flood is charged with producing a book of infinity, an infinite book.