A detective analyzed a curious thought in a library of ancient books.