A handwritten notebook by Alan Turing, the British mathematician credited with breaking German codes during World War II, sold for more than $1 million at auction Monday in New York. It is the first time a manuscript by Turing, a pioneer in computer science, has come to public market, according to Bonhams.

Bonhams says it is currently unable to reveal the identity of the buyer.

The 56-page manuscript, with the original cloth-backed covers, details complex mathematical and computer science notations Turing made while at Bletchley Park, the British government's code-breaking site. It dates to 1942, when Turing and other cryptologists worked to break the Enigma code used by Nazi Germany's military.

Deciphering secret messages about German military movements is believed to have shortened the war by at least two years.

In the notebook, Turing also analyzes the work of other mathematicians and finds ways to build on that, as seen in this paragraph: "The Leibniz notation I find extremely difficult to understand in spite of it having been the one I understood the best once! It certainly implies that some relation between x and y has been laid down eg, y=x2+3x ..."

Turing left his mathematical books to Robin Gandy, a student and close friend who served as his literary executor. In 1977, Gandy donated all the documents he inherited to King's College, Cambridge, with one exception: this notebook. Bonhams auction house says the notebook may have been withheld because Gandy had written about some personal dreams on some of its blank pages.

The book changed hands at a private sale last year at Christie's auction house in London, according to The Telegraph. The British newspaper says the notebook contains Turing's early attempts to chart a universal language, which would ultimately lead to the creation of a computer code, and that the British government should have done more to prevent the manuscript from leaving the country.

This is not the first time that Turing's work has turned up. Earlier this year, workers completing a renovation at Bletchley Park discovered that papers written by members of Turing's group were used as insulation in the walls and ceilings. They included the only known examples of "Banbury sheets," used to speed up the decryption of Nazi messages, according to the BBC.

The sale of the notebook could have been helped along by the 2014 movie The Imitation Game, starring Benedict Cumberbatch. The Academy Award-winning movie details Turing's work and life, including his having to undergo hormone treatment to "treat" homosexuality.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.