#### Mathematician who was recruited to work at the codebreaking centre at Bletchley Park during the second world war

David Rees, who has died aged 95, after a distinguished academic career as a mathematician, was one of many who had their education delayed by the onset of the second world war. His undergraduate studies at Sidney Sussex College, Cambridge, were supervised by Gordon Welchman and resulted in a very good first-class degree. By September 1939, when David was beginning postgraduate work, Welchman had been seconded to Bletchley Park, the British codebreaking centre in Buckinghamshire; soon, Welchman had recruited David, along with several other young mathematicians he also knew from Cambridge, to a team of codebreakers in Hut 6 at Bletchley Park, working on the German Enigma ciphers.

The German operators of the Enigma machines were told which three rotors and which settings to use each day, but they had to choose the starting positions of the rotors and indicate their choices via the first three letters of their first messages. John Herivel, another of Welchman's recruits from Sidney Sussex College, predicted in February 1940 that some German operators might use short cuts that could be exploited by the Bletchley Park codebreakers.

For three months, this insight produced no result; but in May 1940 some of the German operators began to make the predicted mistakes, and David and his fellow codebreakers were able to use the technique known as the "Herivel tip" to break Enigma ciphers for some critical months from May 1940. The initial breakthrough generated roars of excitement in Hut 6, but it had to be kept secret for at least 40 years. David remarked in 2000 that "the Herivel tip was one of the seminal discoveries of the second world war". He thought that Herivel should have received more credit.

The fourth of five children of Gertrude (nee Powell) and David Rees, David was born in Abergavenny, Monmouthsire. His father's line had a history of both longevity and mathematical ability. David attended King Henry VIII grammar school in Abergavenny, although he was absent from school through illness for some months during his early teenage years; at those times he studied at home independently, and his mother, armed with lists from David, was one of the best customers of the Abergavenny public library.

His few months of postgraduate work in 1939, before Welchman's knock on his door, were remarkably successful. He worked, without a supervisor but with inspiration from "wonderful lectures" by Philip Hall, on the algebraic structures known as semigroups. His first paper, published in 1940, contains a result that is now known as "the Rees theorem".

David worked at Bletchley Park for the war's duration. Afterwards, he became an assistant lecturer in mathematics at Manchester University, under MH (Max) Newman. For the second half of the war, Newman had been in charge of the department ("the Newmanry") at Bletchley Park for which the first Colossus computer was constructed, to help with codebreaking. In the subsequent years, David was to collaborate with two other Bletchley Park codebreakers, JA (Sandy) Green and Peter Hilton. At Manchester, he continued to work on semigroups.

In 1948, David was appointed to a university lectureship at Cambridge and a fellowship at Downing College. Soon afterwards, his life changed dramatically following a working seminar, on André Weil's book

*The Foundations of Algebraic Geometry*, organised by Douglas Northcott. First, David was so inspired by the seminar that he decided to become a commutative algebraist. Second, another participant in the seminar was Joan Cushen: David and Joan were married in 1952.

Commutative algebra can be loosely described as the algebra underlying the equations used to define curves, surfaces and higher-dimensional geometric objects. David's first paper in commutative algebra was written, about 60 years ago, jointly with Northcott. In it, they introduced the concept of reduction of an ideal. This concept has turned out to be fundamental: even in this 21st century, hardly a conference on commutative algebra passes without there being several mentions of reductions of ideals.

David left Cambridge in 1958 to take up a chair at Exeter University, where he remained until his retirement in 1983. He carried out his duties as head of department with care and consideration. In the 1970s, the associated administrative tasks reduced the time he had available for research, but he had a burst of research activity after his retirement.

David and Northcott, both separately and jointly, published a string of significant papers in commutative algebra in the 1950s and 60s, and in so doing established that period as a golden era for commutative algebra in the UK. David was elected FRS in 1968 (Northcott had been in 1961). He was awarded the Pólya prize of the London Mathematical Society in 1993. Several mathematical concepts have been named after him, and there is no doubt that his legacy to commutative algebra will be lasting.

Joan survived him by less than two weeks. They are survived by their daughters, Mary, Rebecca, Sarah and Deborah.

*David Rees, mathematician, born*29

*May*1918;

*died*16

*August*2013

**Rodney Sharp**

29 August 2013 © Guardian News and Media Limited