A rare notebook of Alan Turing’s which dates back to his work breaking the Enigma code is expected to sell at auction for at least £1m.

The 56-page manuscript sees the codebreaker working on the “foundations of mathematical notation and computer science”, said Bonhams, which will auction the notebook in New York on 13 April. It dates from Turing’s days in Bletchley Park in 1942, and according to Bonhams’ specialist Cassandra Hatton, “its mathematical content gives an extraordinary insight into the working mind of one of the greatest luminaries of the 20th century”.

“The Leibniz notation I find extremely difficult to understand in spite of it having been the one I understood the best once!” writes Turing, at one point, in a notebook bought in a Cambridge stationer’s. “It certainly implies that some relation between x and y has been laid down eg, y=x2+3x …”

Turing’s note on the Leibniz notation Photograph: PR

The document was part of the collection of papers left by the father of modern computer science to his friend and fellow mathematician Robin Gandy. Turing killed himself in 1954 after he underwent chemical castration “treatment” after being convicted of gross indecency for homosexual activity. He was officially given a royal pardon in 2013.

Gandy gave most of Turing’s papers to King’s College, Cambridge, but kept the notebook, using its central pages to record his own, deeply personal dream journal. “It seems a suitable disguise to write in between these notes of Alan’s on notation, but possibly a little sinister; a dead father figure, some of whose thoughts I most completely inherited,” wrote Gandy in the notebook, which was part of his personal effects until his death, said Bonhams.

Turing scholar Andrew Hodges said that the mathematician, the subject of the recent film The Imitation Game, starring Benedict Cumberbatch, was “parsimonious with his words and everything from his pen has special value”.

“This notebook shines extra light on how, even when he was enmeshed in great world events, he remained committed to free-thinking work in pure mathematics,” said Hodges.