{"id":1080731,"date":"2026-07-10T14:27:20","date_gmt":"2026-07-10T14:27:20","guid":{"rendered":"https:\/\/www.europesays.com\/uk\/1080731\/"},"modified":"2026-07-10T14:27:20","modified_gmt":"2026-07-10T14:27:20","slug":"mathematicians-put-ai-to-work-on-fermats-last-theorem","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/uk\/1080731\/","title":{"rendered":"Mathematicians put AI to work on Fermat&#8217;s last theorem"},"content":{"rendered":"<p><img decoding=\"async\" class=\"Image\" alt=\"\" width=\"1350\" height=\"900\" src=\"https:\/\/www.europesays.com\/uk\/wp-content\/uploads\/2026\/07\/SEI_304535668.jpg\"   loading=\"eager\" fetchpriority=\"high\" data-image-context=\"Article\" data-image-id=\"2533745\" data-caption=\"Pierre de Fermat was a 17th-century mathematician\" data-credit=\"Lebrecht Music&amp; Arts, YAY Media AS\/Alamy\"\/><\/p>\n<p class=\"ArticleImageCaption__Title\">Pierre de Fermat was a 17th-century mathematician<\/p>\n<p class=\"ArticleImageCaption__Credit\">Lebrecht Music&amp; Arts, YAY Media AS\/Alamy<\/p>\n<\/p>\n<p>In the lobby of a central London hotel, tourists are bracing themselves for a day of sightseeing in a heatwave. Meanwhile, staff are resetting the dining room after breakfast. And in a windowless meeting room, assembled academics are contemplating whether humans have a role to play in the future of mathematics, now that AI can prove theorems by itself.<\/p>\n<p>The general mood in the room is one of bewilderment at the recent jump in computer intelligence and excitement about the potential it unlocks \u2013 and perhaps a slight unease about what the future holds for them personally.<\/p>\n<p>Twenty-five researchers from diverse fields and countries are here to spend a week working on formalising Fermat\u2019s last theorem with cutting-edge AI models.<\/p>\n<p>Fermat\u2019s last theorem puzzled mathematicians for centuries until it <a href=\"https:\/\/www.newscientist.com\/article\/2080689-fermats-last-theorem-mathematician-andrew-wiles-wins-abel-prize\/\" rel=\"nofollow noopener\" target=\"_blank\">was proven in 1993 by Andrew Wiles<\/a>. It states that there are no whole numbers a, b, and c that satisfy the equation a\u207f + b\u207f = c\u207f, where n is a whole number greater than 2. It is extremely easy to state, but fiendishly difficult to prove.<\/p>\n<p>Now, <a href=\"https:\/\/profiles.imperial.ac.uk\/k.buzzard\" rel=\"nofollow noopener\" target=\"_blank\">Kevin Buzzard<\/a> at Imperial College London is working on a <a href=\"https:\/\/www.newscientist.com\/article\/2422601-mathematicians-plan-computer-proof-of-fermats-last-theorem\/\" rel=\"nofollow noopener\" target=\"_blank\">five-year project<\/a> to turn Wiles\u2019s 100 pages of mathematics into computer code called Lean, so that it can be formally checked for correctness and used as a foundation for further research.<\/p>\n<p>Formalising mathematical theorems takes them out of the realm of pen and paper, and puts them into a configuration that allows computers to grapple with them, methodically working through the logic and exposing any flaws. Already, there are 2 million lines of formalised mathematics stored in a central repository called <a href=\"https:\/\/www.newscientist.com\/article\/2520546-computer-finds-flaw-in-major-physics-paper-for-first-time\/\" rel=\"nofollow noopener\" target=\"_blank\">Mathlib<\/a>.<\/p>\n<p>This workshop has brought together mathematicians, computer scientists and AI experts in the hope that they can advance Buzzard\u2019s project to add Fermat\u2019s last theorem to this corpus by getting the very latest AI models to do some of the heavy lifting.<\/p>\n<p>Groups are huddled around laptops, each displaying slightly different interfaces for one of the AI industry\u2019s leading models. The atmosphere is buzzing. A second room was booked so that people could work in silence if they preferred, but it is empty.<\/p>\n<p>Problems and sub-problems are split up, distributed and chipped away at by human brains prompting and steering AI. There were a total of 20,000 lines of code in the project before the workshop, says Buzzard. After just the first day, that had doubled.<\/p>\n<p>The <a href=\"https:\/\/gtr.ukri.org\/projects?ref=EP%2FY022904%2F1\" rel=\"nofollow noopener\" target=\"_blank\">Formalising Fermat project<\/a> was funded in 2024 and began slowly as Buzzard laboriously coded by hand. The pace picked up dramatically around December last year, he says, when the power of AI models to work with advanced mathematics seemed to grow rapidly. Then, in May, an 80-year old problem posed by <a href=\"https:\/\/www.newscientist.com\/article\/2514767-jeff-goldblum-should-make-a-film-about-this-legendary-mathematician\/\" rel=\"nofollow noopener\" target=\"_blank\">Paul Erd\u0151s<\/a> was <a href=\"https:\/\/www.newscientist.com\/article\/2527564-mathematicians-stunned-by-ais-biggest-breakthrough-in-mathematics-yet\/\" rel=\"nofollow noopener\" target=\"_blank\">solved by machine<\/a>, taking the field totally by surprise. The whole affair has forced Buzzard to rethink things.<\/p>\n<p>\u201cI was always quietly confident that we were going to succeed.\u2029But now we\u2019re two years in and AI has got so good that now my instinct is, this is ridiculous \u2013 what I said I\u2019d do is ridiculous. Let\u2019s just do something 10 times better,\u201d he says.<\/p>\n<p>Wiles\u2019s proof may have stretched to around 100 pages, but it relied on another 2000 or so pages of mathematics from the 1960s, 70s and 80s. Buzzard\u2019s original project was to formalise only the final paper \u2013 or more recent improvements of it, at least \u2013 but assume that everything it rested on was correct.<\/p>\n<p>If the whole set of theorems were a pyramid, Buzzard had intended to start climbing from only 90 per cent of the way up, where the really interesting problems lived. But now he thinks it is possible to tackle the whole thing from top to bottom for the sake of completeness.<\/p>\n<p>He is extremely confident that, by the end of his five-year project, he will have done what he originally set out to do. How AI progresses in the coming years, how expensive it is to access and how this workshop goes will determine how far he gets on the rest of the pyramid.<\/p>\n<p><a href=\"http:\/\/homeowmorphism.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Hang Lu Su<\/a> at Imperial College London is one of the researchers taking part in the workshop. She used ChatGPT to teach herself Lean just six months ago and is now working here at the cutting edge.<\/p>\n<p>Most mathematicians she knows still use pen and paper, so the use of AI and formalisation on display here is in no way representative of the field today, but she believes it could be a glimpse of its future. \u201cI feel like there\u2019s an industrialisation of the intellectual process [occurring],\u201d says Su. \u201cIf anything, the AI tools are working so well that it\u2019s a bit like: \u2018OK, we just let [the AI model] Claude work, and then what do we do?\u2019\u201d<\/p>\n<p>A variety of tools are in use here, from the free and open source to the latest and most expensive models from US start-ups. Nobody at the event can say precisely how much money is being spent on tokens, the units of AI intelligence by which access is charged, but most agree that it will easily run into thousands of pounds a day. \u201cI\u2019m burning tokens like I\u2019m not paying the bill, definitely,\u201d says Su.<\/p>\n<p>But to solve these knotty mathematical problems, the group will need quality as well as quantity. Su explains that she and a colleague were both trying to formalise the same bit of maths on the first day of the workshop. She arrived at an 800-word solution, while her colleague found a 400-word one. Both could equally be said to have proved the theorem in question. But the shorter version, compiled faster, would be easier for AI to work on going forward and was also more easily comprehended by a human.<\/p>\n<p>The code created by AI can be verbose, clunky and take a long time to run, says Buzzard. It sometimes relies on using obscure features within Lean in unintended ways, which won\u2019t compile properly when updated versions are released.<\/p>\n<p>Many of the curators of the Mathlib library are cautious about adding lots of this AI-generated Lean code, even if it proves theorems, for this very reason, says Buzzard. Currently, the code in that library is expertly and carefully written by human mathematicians, who ensure it is efficient, concise and readable to humans. It is a solid foundation for future work. The code being created at this workshop is rather different.<\/p>\n<p>\u201cWe\u2019re building a layer of slop on top \u2013 let\u2019s just call it slop \u2013 and now the question is, what happens when we try to move the next layer? Can we build the next layer on top or does it just grind to a halt?\u201d asks Buzzard.<\/p>\n<p>These advances are also throwing up philosophical and existential questions for mathematicians. At the very least, the tools available to researchers are changing, and therefore so will their job \u2013 but at the most techno-optimist end of the spectrum, AI may end up taking over and expanding the borders of known mathematics on its own, outpacing and replacing human thought.<\/p>\n<p>\u201cWe\u2019re all doing [maths] because we love it, and we think it\u2019s important. But now AI is coming along, and suddenly the question is, actually, why are we doing this? What\u2019s the point of it?\u201d says Buzzard. \u201cIf a machine proves a theorem but no human can understand it, then what have we achieved?\u201d<\/p>\n<p>Those questions are even more pointed when the maths in question is abstract in the extreme, sitting in the sort of world that includes 38-dimensional spheres or complex problems without obvious immediate application. \u201cThere\u2019s this abstract world, but does that abstract world exist if humans aren\u2019t there to appreciate it?\u201d asks Buzzard.<\/p>\n<p class=\"ArticleTopics__Heading\">Topics:<\/p>\n","protected":false},"excerpt":{"rendered":"Pierre de Fermat was a 17th-century mathematician Lebrecht Music&amp; Arts, YAY Media AS\/Alamy In the lobby of a&hellip;\n","protected":false},"author":2,"featured_media":1080732,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[3163],"tags":[323,1942,128028,53,16,15],"class_list":["post-1080731","post","type-post","status-publish","format-standard","has-post-thumbnail","category-artificial-intelligence","tag-ai","tag-artificial-intelligence","tag-mathematics","tag-technology","tag-uk","tag-united-kingdom"],"share_on_mastodon":{"url":"https:\/\/pubeurope.com\/@uk\/116896154984490687","error":""},"_links":{"self":[{"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/posts\/1080731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/comments?post=1080731"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/posts\/1080731\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/media\/1080732"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/media?parent=1080731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/categories?post=1080731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/uk\/wp-json\/wp\/v2\/tags?post=1080731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}