Which great mathematicians had great political commitments? Some mathematicians claim that their field has nothing to do with political concerns; others are deeply involved in political life.
Are there many great mathematicians with great political commitments?
I am particularly interested in the possible interplay between their research work and their political involvement.
For instance, did their political views influence their research topics or collaborations? Did some issues met in their mathematical life (like funding opportunities, e.g.) have an impact on their political commitment? ... This would mean more than just doing maths and politics independently.
 A: Some great French mathematicians were involved during the French Revolution:

*

*Joseph Fourier was part of a local Revolutionary Committee.

*Gaspard Monge was Minister during the 1st Republic.

*Politics was a central part of Condorcet's work as a philosopher. He used mathematics to study voting systems. He was very active during the French Revolution and participated in the Constitution Committee.

Others participated in Napoleon's empire:

*

*As said in another answer, Fourier and Monge participated in the campaign in Egypt. They also held political positions: Fourier was prefect of the department of Isere, while Monge was part of the Conservative Senate.

*Augustin-Louis Cauchy was known to be a staunch royalist. This had a huge impact on his career (and the careers of other mathematicians). More generally, the history of the Academy of Sciences is full of political meddling.

The Eiffel Tower is engraved with the names of 72 scientists, engineers and mathematicians. Most of them have been involved in the political turmoils of the 18th and 19th centuries.
A: Daniel Biss received his PhD in mathematics at MIT in 2002, then was an Assistant Professor at the University of Chicago until 2008. He won the 1999 Morgan Prize for outstanding research as an undergraduate. However, in 2007, a serious flaw was discovered that destroyed the main results of papers he had published in the Annals of Mathematics and in Advances. He is now a State Senator in Illinois. I have no idea how much his mathematical background influences his decisions, but in this position, he has worked on legislation touching on mathematical topics, such as legislation to "allow for automatic voter registration," to "elect a number of statewide offices by ranked-choice ballot," and on healthcare, among other things.
A: How about a very recent political appointment? Eric Lander co-chaired Obama's "Council of Advisors on Science and Technology", and was very recently appointed to President Biden's director of the Office of Science and Technology Policy, as well as adviser on science; this is now a cabinet post, so ought to count as a political commitment.
Lander did his DPhil at Oxford, supervised by Peter Cameron, on algebraic coding theory. He is also a major figure in bioinformatics -- he is the first named author on the Nature paper which announced the completion of the Human Genome Project, a paper cited nearly 15000 times.
A: Tadatoshi Akiba, a former student of John Milnor, served as the mayor of Hiroshima from 1999 to 2001. He obtained his PhD from MIT in 1970 and has written papers in algebraic topology.
A: It seems to me that Alexander Grothendieck, 1966 Fields Medalist and founder of the Survivre group in 1970, is one of the best examples; he had and still has both a tremendous contribution to mathematics and an important political influence. He is considered by some as the greatest mathematician of the 20th century (see Wikipedia page, that cites this obituary), and by others as a precursor of ecology in politics.
Grothendieck gave conferences and participated debates regarding the role of research, notably at CERN in 1972 (in French). I heard he considered the idea of working in life sciences for political reasons, but estimated this was a dead-end. He finally discontinued his participation to the global research effort (although he may have continued his own work outside the system). I do not know if his political views had any further influence on his research topics or results themselves, though.
More material is available from the Grothendieck Circle.
A: Sir Isaac Newton is perhaps an example.
Aside from his work as Warden and Master of the Royal Mint, he also served as a Member of Parliament for Cambridge University and was involved in opposing Royal encroachment on the religious rights of the university; this was linked to Catholic - Anglican conflict in England at the time and Newton supported the Protestant William III and Mary II in his invasion of England and ouster of his uncle James II, a Catholic.
A good and detailed article by Robert Iliffe is published as part of the Newton Project, at oxford University; Newton: The Making of a Politician
A: I would like to say a few words about Marianne Ruth Freundlich Smith, who was one of the pioneers of the theory of stereotype spaces (Smith spaces are named after her). During WWII her family left Germany as they were Jewish, they moved to USA, and Marianne found a job in UC Berkeley. From what her children told me about her, it follows that she was interested in politics as an anti-war activist, and, in particular, because of that she had to quit working at Berkeley when they started imposing the Loyalty Oath. It is not clear how deeply this event influenced her life, but after that she left science and became a teacher at a colledge. Here is a quote from her son's letter to me:

I recall my mother and I attended a march in protest to the Viet Nam war in 1965, maybe 20,000 people, where she wore a nice black dress, a short fur coat and high heel shoes.  This was in contrast to the appearance of most of the marchers.  She said it was important to show that people who could dress well were part of the protestors.  I remember she remarked to me that day that her last public demonstration had been to encourage the US Government to take action against Franco and the Russians' attempts to overthrow the republican government in Spain and that she was now protesting the US government taking action to interfere in Viet Nam's internal struggles.

For my generation, people like Marianne are role models in current events in my country.
A: Chandler Davis.  He was Professor of Mathematics at University of Michigan.  He was a member of the Communist Party USA.  He refused to cooperate with the House Unamerican Activities Committee.  He was fired from the University of Michigan and sentenced to 6 months in jail.
A paper from this era has the following acknowledgement:

Research supported in part by the Federal Prison System. Opinions expressed in this paper are the author's and are not necessarily those of the Bureau of Prisons.

source
A: Joseph Fourier accompanied Napoleon Bonaparte on his Egyptian expedition in 1798, as scientific adviser, and was appointed secretary of the Institut d'Égypte.
source
A: I think Bertrand Russell should be mentioned here.
No doubt he was a great mathematician, but he was also very involved in politics (https://en.wikipedia.org/wiki/Bertrand_Russell#Political_causes).
A: Evariste Galois divided his time between his mathematical work and his political affiliations as a member of a Republican artillery unit. He was arrested twice for protesting against the king.
A: Laurent Schwartz was a passionate communist, later a social democrat, suspended from teaching for two years for signing the Manifesto of the 121 (French leftwing petition against the Algerian war).
A: The number theorist DH Lehmer (along with 30 other faculty) was fired from a tenured position at UC Berkeley for refusing to sign the loyalty oath during the McCarthy era.  When the State Supreme Court ruled the oath unconstitutional, he got his job back.
A: The OP might be interested in the paper

Dauben, Joseph W (1998), "Marx, Mao and mathematics: the politics of infinitesimals", Proceedings of the International Congress of Mathematicians, Vol. III (Berlin, 1998), Documenta Mathematica, III, pp. 799–809, ISSN 1431-0635, MR 1648209, archived from the original on 2019-01-30, retrieved 2011-09-25

You can also read the Mathematical manuscripts of Karl Marx, which, according to Wikipedia, justify "Engels' claim that Marx made 'independent discoveries' [in mathematics]." Certainly Marx had "great political commitments" and his writings in economics were clearly influenced by his study of mathematics, as discussed in the sources above.
A: Dov Tamari, born Bernhard Teitler, was a German Jewish mathematician who emigrated to British Mandate Palestine in 1933 at the age of 22 and became involved in Irgun, an underground paramilitary organization.  On July 14, 1939 Teitler was sentenced to imprisonment by the Jerusalem Military Court, after explosives were found in the room where he was staying.  In their biographical article from the Tamari Memorial Festschrift, Folkert Müller-Hoissen and Hans-Otto Walther quote the following excerpt from the Palestine Post (July 16, 1939) about the trial:

Professor A. Fraenkel, Rector of Hebrew University, gave evidence as to the good character of the accused, whom he described as an excellent student of mathematics. For the Defence, Mr. E.D. Goitein argued that the Prosecution had failed to prove its case against the accused, who was ‘a scatterbrain, like all mathematicians,’ and therefore might have done something foolish.

Apparently this argument did not succeed and Teitler was still sentenced to seven years in prison, although he was released early in summer 1942.  Later that year he officially changed his name to Tamari.
The very interesting article by Müller-Hoissen and Walther discusses many other aspects of Tamari's life and mathematics, including how his political views evolved after his early involvement in Irgun.
A: In the early/mid twentieth century, there were a number of "great mathematicians" working on theoretical physics directly and indirectly related to atomic weapons research. I think this area will have a number of examples with "great political commitments."
I want to briefly mention The ManhattanProject, but first I want to point out the (sort of) null hypothesis: the people involved in that work had "great political commitments," that what they were working on was for the national interest.
For this question, I wanted to add a mention for Oppenheimer. It is true he was an accomplished physicist, and even made important contributions to the field, but in a period of many important discoveries I'm not sure he would ever rise to qualifying as a truly "great mathematician." One area he did excel in was task management and coordinating people, which is how he landed as the head of Los Alamos Laboratory.
This is just a bit of background to mention Oppenheimer's "great political commitments." After the war,

Oppenheimer recommended putting control over atomic energy into the hands of an international agency. Appointed a key advisor to the newly created Atomic Energy Commission, a position that offered him an important voice in Washington and a top-secret security clearance, he spoke out for moderation as tensions between the Soviet Union and the United States began to escalate. He advised against the development of the hydrogen bomb, a device with unlimited destructive power, and took a stand against building nuclear powered aircraft and submarines. [emphasis mine]

(Without going into details, he was stripped of his authority and removed from this position)

“The Oppenheimer hearings had a tremendous impact on the nuclear arms race,” says Mark Samels, executive producer of AMERICAN EXPERIENCE. “Once Robert Oppenheimer’s voice of moderation was silenced, the U.S. began building an arsenal of tens of thousands of nuclear weapons, and the Soviet Union followed suit. The result was a standoff between the world’s two largest superpowers that lasted for nearly fifty years.”

(quoted from "The Trials of J. Robert Oppenheimer", released on PBS. reference: https://www.pbs.org/wgbh/americanexperience/films/oppenheimer/#part01 )

The above quote seems to imply that Oppenheimer was the sole thing standing between the USA and nuclear weapons development, which seems a bit exaggerated. Surely there were other forces and institutional inertia at play. But I like to think there is an alternative universe where his non-proliferation stance prevailed.
A: Ludwig Bieberbach was a devoted member of the Nazi party and adherent of its ideology.  Fittingly for this question he helped found (along with fellow German Mathematician Theodore Vahlen) the journal "Deutsche Mathematik".  This was an ideological project aimed at promoting various racial theories of "German mathematics".  Hardy wrote a letter to Nature summarizing his understanding of some of Bieberbach's racialized views of mathematics and mathematicians.
A: A group of mathematicians and lawyers filed an amicus brief for the Supreme Court of the United States, on the issue of gerrymandering. This work uses deep mathematics to answer questions inspired by politics. The related research group, at Tufts University, includes both mathematicians and people whose work could be characterized as "politics" (e.g., outreach to elected representatives to teach them about the group's work on gerrymandering). I suspect this is an area where you can find a lot of people crossing over between math and politics. I hope readers who know more will feel free to edit this answer.
A: Your question is about persons, while my response is about incidents, but:
The Antwerp school/conference on modular forms in 1972, sponsored by NATO, led to a number of statements in the various conference proceedings, about the funding source being incompatible with the "peaceful mission" of the mathematician, etc.
For instance,

This is a slightly edited version of a letter to Cassels.
Tate's absence from the conference was in protest against the large
scale support of basic scientific research by military organizations
rather than by agencies whose aims and spirit he thinks are more
compatible with those of scientific inquiry.

https://dx.doi.org/10.1007/BFb0097582
For that matter, various top-level European mathematicians in the last few decades have stated political reasons for not travelling to the United States (such as support for capital punishment, involvement in foreign wars, identity of leaders, etc). Undoubtedly this affects their research directions, though probably less so than it would a mid-range researcher, and moreover less so due to the Internet nowadays too.
A: Leibniz worked as a diplomat for the Elector of Mainz. He tried to persuade Louis XIV to desist from expanding into Germany and redirect his efforts towards conquering Egypt from the Turks. The plan did not go anywhere, at least not until Napoleon decided he wanted both Germany and Egypt.
A: Ted Kaczynski, aka “The Unabomber”, was also deeply committed to a political cause. He was a staunch supporter of an anarcho-primitivist ideology and society. He was considered a mathematics prodigy and an expert in geometric function theory. In 1967, he became the youngest assistant professor of mathematics in the history of UC Berkeley at the age of 25.
From 1975 onwards, he dedicated his life to achieve his political goals by reading works on sociology and political philosophy (written by Jacques Ellul, among others), and by executing terrorist attacks on numerous people.
Whether the methods he employed to realise his political aims were justifiable is of course up to debate.
A: Sergio Fajardo is a mathematician who was also Mayor of Medellin after the death of Pablo Escobar, was Governor of Antioquia (the state that Medellin is in) from 2012–2016, ran for President of Colombia in 2018, and has announced plans to run again for President. In mathematics, he earned his PhD from UW-Madison and was a professor at the Universidad de los Andes and the Universidad Nacional of Colombia.
In politics, he completely revitalized the city of Medellin, building new parks and libraries, and rebranding the city. The Park of Lights is a great example. That park used to be (figuratively) the darkest place in the city. Escobar had complete control of it and any (non-corrupt) police officer who came nearby would be killed. The park contains two of the oldest buildings in the city, and they were full of squatters. Now, the park is full of life, with Colombian bamboo (Guada kindiana), tons of people, and these giant lightsaber-looking lights that run all night. It's never dark there. It's the safest place in the city. The buildings that used to house squatters now house the department of education. Fajardo also built beautiful libraries to serve the poorest neighborhoods of the city, to give children a chance at a life based around something other than drugs.  He was named "best Mayor of Medellin" in 2007. Regarding his time as governor, according to Wikipedia

During his administration, Antioquia experienced the best national performance in open government, transparency and investment of oil royalties (according to the National Planning Department and the Anti corruption Office of Colombia). He was named the best governor of the country in 2015 by the organization Colombia Líder.

There are interviews with him in the book Magdalena by Wade Davis. I think his mathematical way of thinking did influence how he governed.
A: Jean van Heijenoort (1912-1986) was a historian of mathematical logic and personal secretary to Leon Trotsky.
A: *

*Alex Lubotzky was a parliament member in the late 1990s in Israel.


*Menachem Magidor was, while being the president of the Hebrew university (a political position in itself), the head of the "presidential committee for examining an alternative governmental structure" (informally known as the Magidor committee) which considered the possibility of changing the Israeli executive branch to a presidential system. While not exactly a political career per se, I feel that it's only a stone's throw away from having a lot of political influence. The committee made several suggestions to switch to semi-local representation, rather than a presidential system, but none of the recommendations were implemented as of 2021.
A: Cédric Villani is a 2010 Field Medalist. In 2017 he was elected as a deputy in the French National Assembly, in LREM, Emmanuel Macron’s party (which he left since then). In 2020 he ran for Mayor of Paris.
As far as I know, there is no link between the precise subject of his research and his political involvement.
However he has done some (a lot of?) interventions as a scientific expert for different commissions. In 2017 he has been President of the French Parliamentary Office for the Evaluation of Scientific and Technological Choices.
A: Faustin Touadera, the current president of the Central African Republic, is a mathematician. (I am sure that he is great in your sense).
https://en.wikipedia.org/wiki/Faustin-Archange_Touad%C3%A9ra
papers found in ZBL
Touadera, Faustin, Condition suffisante de résolubilité du problème de Cauchy matriciel $C^\infty$ non caractéristique à caractéristiques de multiplicité variable., Ann. Sci. Math. Qué. 20, No. 1, 67-91 (1996). ZBL0876.35071.
Dossa, Marcel; Touadera, Faustin, Solutions globales de systèmes hyperboliques non linéaires sur un cône caractéristique., C. R., Math., Acad. Sci. Paris 341, No. 7, 409-414 (2005). ZBL1077.35098.
A: I would like to add von Neumann. He was involved in the Manhatten Project and a part of the Atomic Energy Commission. In addition, he was heavily involved in politics as a consultant for various departments within the US government.
A: The polymath Francis Galton is considered as a pioneer of eugenics, a topic he studied using statistical tools. The so-called Galton-Watson process was introduced to study the extinction of aristocratics surnames.
A: *

*Stanisław Mazur was involved in the the Communist Party of Poland and Polish United Workers' Party. He was a member of the Polish parliament in 1946-1954.


*The work of Stanisław Ulam (n.b. a collaborator of Mazur) had some significant political implications. (I've just noted that this is also mentioned in another answer.)
