It was a difficult period for Hungary, with the country unsure whether to side with Hitler or with the allies, but in many ways Hungary had few options. Hitler decided that he could not leave his vital communications at the mercy of an uncommitted Hungarian regime. In March 1944 Hitler offered Hungary the choice of either cooperating with Germany or the German armies would occupy the country. Hungary chose cooperation and appointed a government to collaborate with Hitler. The Germans did as they pleased, suppressing opponents and arresting anyone who spoke out against them. Jews were compelled to wear a yellow star and their property was taken away.
Imre had spent the war years at the University of Debrecen and he graduated in 1944 with a degree in mathematics, physics and philosophy. To avoid the Nazi persecution of Jews he changed his name to Imre Molnár, and he survived while others of Jewish descent were deported to the gas chambers of German concentration camps. More than 550,000 of Hungary's 750,000 Jews were killed by the Nazis during the war, including Imre's mother and grandmother who both died in Auschwitz.
After the war ended Imre, who by this time was an active communist, realised that he would have difficulty wearing his old shirts with "I. L." on them when his name was now Imre Molnár. Hungary was in grave financial trouble and getting a new collection of shirts was harder than changing one's name so he changed his name, not back to the Jewish Lipschitz but rather, in keeping with his political views, to the Hungarian working class name of Lakatos. He may have borrowed the name from the Hungarian general Géza Lakatos who headed a peace seeking Hungarian government for a short while before the Germans put their own man in charge. At least Imre Lakatos could now wear his "I. L." shirts again!
In 1947 Imre Lakatos obtained a post in the Hungarian Ministry of Education. However he was not good at taking orders from Russian authorities without questioning them and Lakatos soon found that his views had put him in political trouble. In 1950 he was arrested and served three year in a Stalinist prison :-
He used to say afterwards that two factors helped him to survive: his unwavering communist faith and his resolve not to fabricate evidence. (He also said, and one believes it, that the strain of interrogation proved too much - for one of his interrogators!)On his release in 1953, the year of Stalin's death, Rényi helped Lakatos find work. Lakatos earned his living translating mathematics books into Hungarian. Among the books that he translated at this time was Pólya's book How to Solve it.
In 1956 there was revolution in Hungary against the Russian regime which controlled the country. On 1 November 1956 Hungary withdrew from the Warsaw Pact and asked the United Nations to recognise it as a neutral state, under the protection of the United Nations. Two days later Russian tanks were in position and a puppet government was set up. Many people were sent to the Soviet Union and many of those never returned. Around 200,000 refugees escaped to the West, a substantial proportion being Hungary's educated classes. Lakatos realised that he was about to be arrested and fled to Vienna.
Eventually Lakatos found his way to England and he began to study at the University of Cambridge for a doctorate in philosophy. His work was influenced by Popper and by Pólya and he went on to write his doctoral thesis Essays in the Logic of Mathematical Discovery submitted to Cambridge in 1961. At Pólya's suggestion his thesis took as its theme the history of the Euler-Descartes formula V - E + F = 2. In 1960 Lakatos was appointed to the London School of Economics and he taught there for 14 years until his death. His lecturing is described in :-
When he lectured, the room would be crowded, the atmosphere electric, and from time to time there would be a gale of laughter.Again in  Ernest Gellner writes:-
He lectured on a difficult, abstract subject riddled with technicalities, the philosophy and history of mathematics and science; but he did so in a way which made it intelligible, fascinating, dramatic and above all conspicuously amusing even for non-specialists.Lakatos published Proofs and Refutations in 1963-64 in four parts in the British Journal for Philosophy of Science. This work was based on his doctoral thesis and is written in the form of a discussion between a teacher and a group of students. Worrall  describes the paper:-
... as well as having great philosophical and historical value, was circulated in offprint form in enormous numbers.During his lifetime Lakatos refused to publish the work as a book since he intended to improve it. However, in 1976, two years after his death, the work did appear as a book: J Worrall and E G Zahar (eds.), I Lakatos : Proofs and Refutations : The Logic of Mathematical Discovery .
Worrall  describes the work:-
The thesis of 'Proofs and Refutations' is that the development of mathematics does not consist (as conventional philosophy of mathematics tells us it does) in the steady accumulation of eternal truths. Mathematics develops, according to Lakatos, in a much more dramatic and exciting way - by a process of conjecture, followed by attempts to 'prove' the conjecture (i.e. to reduce it to other conjectures) followed by criticism via attempts to produce counter-examples both to the conjectured theorem and to the various steps in the proof.Hersh  says that Proofs and Refutations is:-
... an overwhelming work. The effect of its polemical brilliance, its complexity of argument and self-conscious sophistication, its sheer weight of historical learning, is to dazzle the reader.Lakatos wrote a number of papers on the philosophy of mathematics before moving on to write more generally on the philosophy of science. However, like his doctoral thesis, he often used historical case studies to illustrate his arguments. I [EFR] would strongly recommend the article in The Mathematical Intelligencer (3) (1978), 151-161 by Lakatos. This article, Cauchy and the Continuum : The Significance of Non-Standard Analysis for the History and Philosophy of Mathematics is one of the most enjoyable that I have read. Hersh  explains the point of the approach to history that Lakatos uses in this article:-
The point is not merely to rethink the reasoning of Cauchy, not merely to use the mathematical insight available from Robinson's non-standard analysis to re-evaluate our attitude towards the whole history of the calculus and the notion of the infinitesimal. The point is to lay bare the inner workings of mathematical growth and change as a historical process, as a process with its own laws and its own 'logic', one which is best understood in its rational reconstruction, of which the actual history is perhaps only a parody.As a research supervisor, Lakatos was extremely effective :-
He inspired a group of young scholars to do original research: he would often spend days with them on their manuscripts before publication.Lakatos died at a time when he was highly productive with many plans to publish new work, make replies to his critics and apply his ideas to new areas. Worrall  however points out that the achievement of which Lakatos would have been most proud was leaving:-
... a thriving research programme manned, at the London School of Economics and elsewhere, by young scholars engaged in developing and criticising his stimulating ideas and applying them to new areas.His character is described in :-
With his sharp tongue and strong opinions he sometimes seemed authoritarian; but he was "Imre" to everyone; and he invited searching criticism of his ideas, and his writings over which he took endless trouble before they were finally allowed to appear in print.
Article by: J J O'Connor and E F Robertson