This page collects examples of AI applications in mathematical research, teaching, and academic workflow. Examples were contributed by Johannes Schmitt, unless noted otherwise.
LaTeX draft from e-mail thread and handwritten notes
Goal: I was part of a longer informal e-mail conversation on some mathematical question, where different participants contributed ideas, sketches of proof and one sent a pdf with a handwritten argument. To start writing down the ideas more carefully, I wanted to create a shared overleaf containing a slightly expanded and cleaned-up transcription of the above material.
System: Claude 3.7 Sonnet
Context:
- LaTeX file of related survey paper (for background and style sample)
- Text of e-mail conversation
- PDF with handwritten notes
Prompts:
Hey, I would like your help in starting an overleaf project for writing down some arguments concerning boundary strata of compactified moduli spaces of abelian varieties. In the project knowledge I uploaded some unfinished notes to give you general background. Below, I paste an email chat (newest emails on top). The project would focus on trying to write down the two questions I raised in the chat and possible approaches to answering them. I also give you the handwritten notes of [...] where he writes down his approach to question 2 more carefully. To start, can you create LaTeX of an article called Boundary strata of compactified moduli of abelian varieties with all participants of the email thread as authors (alphabetically orderd by last name), and with the LaTeX setup (packages, makros etc) copied from main.tex ? Bibtex, no manual bibliography (you will have access to references.bib in the overleaf project). Put it in an artifact for better viewing and editing.
Some notes: * Try to stay very close to the arguments presented by [...] - mostly this is supposed to be a LaTeX transcription for further editing by them. It's ok if it is a bit rough around the edges - it is just meant as a useful starting point for editing. * Take your time digesting all of the input (I know it's a lot!), then write carefully. Style-wise you can orient yourself on main.tex - I think the writing is already not bad there.
[follow-up with bullet-point list of complaints on notation and minor issues]
Outcome:
Excellent starting point for further edits, with concise introduction, clear statement of main questions, and the content of the conversation transcribed faithfully.
Caveats:
The first draft of Claude had a bunch of issues (too much reformulation by the AI, manual bibliography, bad author ordering) - instead of complaining individually I started a fresh chat and pre-empted these with a more detailed prompt.
Research on academic career opportunities
Goal: Summarize career opportunities in Zurich for fellow junior researcher
System: ChatGPT DeepResearch
Prompts:
Hey, can you compile a list of all avenues to get an academic position in Zurich, for a mathematician who just finished his first postdoc, in the area of symplectic and enumerative geometry? Do an in-depth search of all grants, regular open positions and calls, funded by local universities and research institutions, the SNSF, the federal government, etc.
[ChatGPT asked for clarifications about location scope, position types, etc.]
Both ETH and UZH could be fine, aim is for an advanced postdoc or tenure-track job, fellowships and research grants are in. Short term positions <6months should be excluded. Teaching heavy is fine a priori, one can still decide if it's worth it later. Thanks a lot!
Outcome:
Extensive and (to my knowledge) very complete list, easily sharable via link above
Drafting reference letters
Goal: Obtain a first draft of a reference letter for a student, based on background documents and bullet point list.
System: Claude 3.7 Sonnet
Context:
- CV and Transcript of Records of student*
- (optional) Previous reference letters as a style guide
* These documents represent potentially sensitive private information of the student and should not be shared with an LLM service without the student's consent. For further information on the privacy policies of the largest AI assistant providers see here. Overall, Anthropic's Claude seems to be best-in-class, with strong commitments not to apply user inputs for training of future models.
Prompts:
Below is a sample prompt, based on a fictional student. The
CV and
Transcript of records of the student were
also created by AI.
Hey, I would like your help in drafting a reference letter for one of my students, Martha Mustermeier. I am appending her CV and transcript of records. The writing in the letter should not fall into the attractor of blabla business bullshit language - I am aiming for informative, high-signal language. One does have to include some of the expected adjectives, but I want it to be non-generic and specific to Martha's strengths.
About my interactions with her so far:
- took my Algebraic Geometry class, was very motivated and aced the oral exam
- took a reading course on Hartshorne to learn the foundations of algebraic geometry, where she worked very consistently, preparing good questions for our regular meetings, getting all the way to the theory of curves
- is currently undertaking a Master thesis with me on certain excess intersection calculations in the moduli space of curves, involving admissible cover cycles; only started a few weeks ago but already made some significant progress, classifying the components of one of these intersections in genus 3 and obtaining the correct intersection number.
- academic record: excellent grades, broad academic interests
- some teaching experience - you can mention that the student evaluations were good, but not stellar (formulate this politely)
- some extracurricular activities (add examples from CV)
- overall impression: very self-motivated, hard working, pleasant to interact with
Based on this, can you create a LaTeX file of the reference letter?
Outcome:
First draft of the LaTeX code of the reference letter, which can (and should) be further customized and edited. In particular for inexperienced letter writers, or those who are not native English speakers, this first draft can be a significant help to ensure that the letter broadly follows existing conventions.
Caveats:
Without aggressive steering away from bland business-speech, or if too little concrete information is provided, the letter draft will remain
quite generic, and often show recognizable signs of being AI generated (tell-tale signs are words like "intricate", "meticulous", etc). See e.g.
here for such a case. As evidenced there, this can often be remedied by additional info and complaints.
Quick prototyping of missing functionality in SageMath
Goal: Writing a wrapper class around the ClassFunction datastructure in SageMath, allowing such functions to be elements of a CommutativeAlgebra (needed for further calculations using polynomials with characters as coefficients)
System: Claude 3.7 Sonnet - Extended Thinking
Context:
- Python code of original ClassFunction code
- Rich text file of an official tutorial, explaining how to program algebraic data structures in the Parent-Element framework of SageMath
Prompts:
Hey, I would like your help with some SageMath programming. The issue I have: I would like to use class functions (see appendix) of groups to do calculations with representations of finite groups. However, while all the main functions are there (adding, multiplying, etc), the class functions don't form a nice SageMath CommutativeAlgebra, so I cannot write things like R = ClassFunctions(G) P = PolynomialRing(R, 'x', 2)
I would like your help in writing a wrapper class around the existing code that allows to work with this Parent-Element framework in SageMath. I have also posted a tutorial in how to do that.
The goal would be to write a parent class called FGClassFunctions which takes a finite group G and an element class called FGClassFunction which inherits from ClassFunction. The primary purpose is just to make this behave nicely with the SageMath framework.
Can you make a first proposal for this, with some example code to test it?
[First version by Claude]
Thanks, this looks great. Running the code I got the following error (see appendix). I think that one needs to provide certain methods, here is how it was solved in my own package admcycles for tautological classes:
[more example code]
[Second version by Claude, followed by a few more requests and error messages that it resolves with suggestions by me]
Outcome:
Well-documented and tested code that serves as basis for further calculations
Caveats:
I was somewhat familiar with the Parent-Child framework in SageMath and could identify the errors in the original implementation quickly. Furthermore, when trying to fix some of the tests it inserted, Claude's original proposal would have destroyed compatibility of the ClassFunction conventions with the rest of SageMath in a subtle way! This shows that using AI to work with completely unfamiliar programming frameworks has its pitfalls.
Perform literature review and draft LaTeX overview with BibTeX references
Goal: To test the ability to write TeX code with correct journal references, I asked the AI to write a generic introduction to the tautological ring of the moduli space of curves
System: ChatGPT DeepResearch
Prompts:
Hey, can you give me LaTeX code of a few paragraphs of an introduction to the tautological ring of the moduli of stable curves and its history. It should \cite relevant papers using BibTex. In particular, I would like you to also give the code of the accompanying BibTeX file. Please look up the entries either on jounal pages or zbmath or whatever, try fo find a reliable source here. Thanks a lot!
[ChatGPT asked for clarification about specific papers to cite, preferred formatting style, introduction length, and assumed background knowledge]
Article class and amsmath, amssymb etc. About 3 paragraphs, at least 7 papers. Can include bit of background.
Outcome:
Reasonable (though slightly generic) draft of introduction, all cited references were accurate. One subtle mathematical point about the stable cohomology of the moduli space of curves was presented in a misleading way, however (see comment in file below).
Creating lecture scripts from recordings and notes
Goal: Create comprehensive German lecture scripts for "Algorithmen und Datenstrukturen" course by efficiently converting lecture recordings and handwritten notes into polished LaTeX documents
System: Whisper (OpenAI) for transcription + Gemini (Google DeepMind) for content generation
Context:
- Video recordings of previous lectures (transcribed via Whisper)
- PDF of handwritten blackboard notes
- Existing LaTeX code from a related lecture as style guide
Prompts:
Hello, I'd like your help creating a script for the "Algorithms and Data Structures" course at ETH Zurich. As a data basis, you receive:
- The setup.tex file containing the LaTeX framework into which your code will be inserted
- Examples of LaTeX code from an older script to clarify the desired writing style
- A transcript of the lecture (which may contain transcription errors in some places)
- The handwritten notes with the blackboard content from the respective lecture
Now for the desired approach:
- Output LaTeX code in a box that is easy to copy. The code should compile in the LaTeX environment defined in setup.tex. You don't need to reproduce setup.tex - your code will be included there using \input.
- Stay close to the style of suchen.tex, but follow the content of the given lecture (transcript and notes).
- Use LaTeX comments (using %) to briefly comment on your approach or make plans for the next section
- Since your output length is limited, work through the lecture material in blocks that aren't too large. You will be prompted to generate the next block until you have worked through the given material.
Thank you for your help! Please begin creating the LaTeX code now.
Outcome:
Highly efficient workflow that reduced script creation time to approximately 30 minutes of work per 90 minutes of lecture content. Each lecture yielded about 7 pages of high-quality notes. Text, pseudocode, and simple equations were generated successfully, though complex diagrams (TikZ) required manual creation.
Challenges:
- Gemini's output limit of 8,000 tokens required a section-by-section approach
- AI occasionally lost track of proper section ordering
- AI defaulted to Markdown formatting within LaTeX code
- Direct video input led to transcription with filler words; pre-processing transcriptions was more effective
Creating whimsical illustrations for math talk
System: DALL-E 3 (via ChatGPT)
Prompts:
Please create a picture for me: Photograph of an elephant, standing in the savannah
That looks great, how about a picture of a leopard, again standing in the savannah?
Perfect! Can you now do a male lion, with large mane, again standing in the savannah?
Beautiful! Can you now create a picture just of the empty savannah, no animals at all?
Can you do a cheetah standing in the savannah now?
Perfect! Can you now do one more, where a male lion and a cheetah stand next to each other, peacefully, in the savannah?
Wonderful! Can you now do a picture of the savannah at night time, very dark with almost no illumination, just some black shapes with pairs of glowing predatory eyes in the shadows?
[Request to remove spots of light from the image]
Just for fun, on the last slide, can you create a picture of an elephant, a lion and a leopard, standing in the snow-covered savannah, all wearing Santa Claus hats?
Outcome:
Cute animal pictures for adding some humor to my presentation
Podcast version of paper or lecture
Goal: Condense a research paper or longer lecture recording into a short (about 15 min) podcast, where two hosts discuss the topics from the source material. Apart from being fun to listen to, this can be used e.g. to get a first broad overview of a topic before going into the details, or to get some ideas for good analogies and broad narratives when planning a talk on your own research.
System: Google's NotebookLM
Context:
- PDF of paper or talk notes
- YouTube link of lecture recording
Prompts: none (NotebookLM creates the podcast automatically)
Outcome: Slightly shallow but often entertaining audio of podcast episode, can include some misunderstandings and hallucinations, but also some insightful analogies and approaches for explanations. Works best if the source material is not too inaccessible and complicated.
Drafting an agenda and LaTeX beamer slides for an administrative meeting
Goal: As part of my work as a group organizer at the math department, I was asked to facilitate a meeting of the professors in our group to discuss organizational matters (like budget, personnel, etc).
System: ChatGPT o1-pro (for in-depth general reasoning) and Claude Sonnet 3.7 (for quality of writing and second opinion)
Prompts:
Hey,
I am the group organizer of Group 1 at D-MATH of ETH Zurich. We are planning to have a meeting of the professors and permanent faculty tomorrow, to discuss organizational matters of the group. We have never done this before, and I think it's a bit fuzzy what the precise purpose of the meeting should be. I would like to discuss with you what possible agenda we could try to set.
The main focus should be on getting the most value per minute of meeting. I don't want any unnecessary bloat, no self-styled long speeches etc. The goal is to make this the most productive possible, and use the opportunity provided by having all stakeholders of the group there.
There will be about 5 professors and 3 senior lecturers present, as well as the pool secretary who knows about things like the budget. Traditionally, the topics of discussion include the incoming and outgoing personnel, as well as the budget (making sure that neither too little nor too much money is used). This semester we are also planning to have a group outing (pasting you some email conversation for context).
[e-mails with preliminary discussions]
I am wondering if there are other possible opportunities to quickly coordinate on important group matters, or to give the profs information that they might be interested in. What are your thoughts on this?
[I asked this question to both AI systems, then copied the answer from o1-pro to Claude 3.7, as a second opinion, and continued using Claude]
Thanks a lot, I am also pasting in some thoughts from another AI, that might help us with further ideas (I think your plans roughly agree).
Maybe you can start drafting a LaTeX beamer presentation with the most important points?
[bullet-point summary of key information]
Can you create an artifact, then we can iterate on it and populate it slowly (feel free to fill in info and proposals about the group outing from the emails above)
[some further back and forth with additional information and corrections from my side - I also searched and added some pictures for illustrating group excursion targets]
Outcome:
Streamlined agenda and professional-looking beamer slides for the meeting
Custom Python script for extracting working hours from Excel file
Goal: For the exam session of our group, I needed to extract the total amount of work-hours for each PhD student from a big, idiosyncratic spreadsheet document, following a convoluted formula. Instead of working with the clumsy in-built Excel functions, I asked an AI to write a Python script that reads the file and prints a list of PhD students and their work contribution.
System: ChatGPT o1
Prompts:
Hey, I would like to write a Python function that helps me extract working hours from a particular type of ods document. In the document, there is a table called "Winter-24-25" which contains columns labelled as:
Lecture number | Lecture | Main examiner | Mode | Candidates | Date | Time | Exam duration | digital | Organizer | Room(s) | Proctoring assistants | Proctoring TAs | Grading/Student | Grading assistants | Grading TAs | Remarks
The columns Organizer, Proctoring assistants and Grading assistants contain comma-separated surnames of people whose work hours I would like to extract (some of the names have two components but count as one person, e.g. "Iribar Lopez").
The function should have the form
work_hours(document="Exam overview.ods", table="Winter-24-25")
and return a dictionary of the form Name : Work hours.
The work hours should be calculated via sums of contributions as follows:
Organisation: 15 + 5 × (Exam duration); doubled for digital exams (digital exams have a 1 in the digital-column).
Proctoring: (Exam duration) + 1 hour each.
Grading: Estimate per exam (Grading/Student) × students. If TAs assist, they do 2/3 of grading; the rest is shared equally among the assistants in the "Grading assistants"-colunn.
Beisitz: 1 hour prep + (students × [Exam duration + 0.02]).
[ChatGPT provides detailed Python code using ezodf to parse ODS files, with careful handling of spreadsheet data and formulas for calculating hours]
The Beisitz should go to the person in the Organizer column
Proctoring TAs are ignored (they go to a separate system)
Can you adapt the code for these changes?
[ChatGPT updates code to direct Beisitz hours to organizers and completely ignore Proctoring TAs]
This is an excellent second pass! Some things I noted/want to amend: The Mode column contains two possible entries ("mündlich" or "schriftlich", without scare quotes). The Beisitz is only added to the work hours of the organizer for mündlich, whereas the Organisation hours are only added to their budget for schriftlich.
Furthermore, the Grading TAs should not be included in the result dictionary, only as a flag to check whether they do 2/3 of the allotted grading hours.
Finally, in the case of mündlich exams, the Organizer cell is sometimes a \n separated list of names. In that case, the hours should be equidistributed to these names; e.g. if it is "Meier\nMarx\nMarx" for 60 hours, then Meier should get 20 and Marx should get 40.
Can you adapt the code?
[ChatGPT provides final version with mode-specific logic, equidistribution of hours across organizers, and proper handling of different name formats]
Outcome:
Reliable code that fits to my precise needs; given changes in the spreadsheet format, it could easily be adapted in a future chat session.
Technical how-to guide for university platform
Goal: Understand how to grant someone access rights on the ETH Zurich eDoz platform
System: ChatGPT with Internet Search
Prompts:
Hey, on the edoz-platform of ETHZ, how do you give someone access rights to e.g. see your courses, registered students, etc?
Can you give a step-by-step guide once logged in?
Outcome:
Detailed instructions with step-by-step guidance for assigning substitutes and configuring access rights
Linux terminal helper
Goal: Quickly getting customized commands for using a Linux console, including suggestions of new tools and small scripts. Help with troubleshooting if something does not work on the first try.
System: ChatGPT 4o or Claude 3.5/3.7 Sonnet
Prompts:
With an Ubuntu terminal window, how can I convert the pages of the file AD23-06.pdf into a sequence of jpgs called AD23-06-1.pdf ...
Hey, in an Ubuntu terminal with ffmpeg etc installed, what is the command to splice together the first x:yz minutes of Vid1.mp4 and the first w:uv minutes of Vid2.mp4?
Hey, I have the following Terminal open:
(sage) [schmittj@ada-27:schmittj] 137 $ ls CACHE FZ_2_7_5.dat FZ_3_5_6_ct.bak FZ_3_5_6_ct.dir FZ_MC_2_7_4_ct_4001_gens.txt FZ_2_7_5.bak FZ_2_7_5.dir FZ_3_5_6_ct.dat FZ_MC_2_7_4_ct_4001_cogens.txt FZ_MC_2_7_4_ct_4001_matrix.txt
I want to create a backup copy of all files of the form FZ_MC* . How do I do this?
In an Ubuntu console, how can I delete all files in the current folder which have the shape stratum*euler**[2,3,4,5,6,7,8,9].pkl.bz2 where the brackets means: one of these digits?
Hey, I have an Ubuntu console in a folder containing pdfs and I want to concatenate them (in usual ordering of filenames) into a single pdf called output.pdf. How do I do this?
Outcome:
Pretty reliable commands doing exactly what I want, ready to copy-paste, without having to read any man pages / forum entries etc.
Troubleshooting the installation of a C++ library
Goal: For some calculations with large matrices, I wanted to install the LinBox library on my user account at the D-MATH compute servers. I was not familiar with C++ at all, and there were numerous unexpected hickups and obstacles.
System: Claude 3.5
Context:
- README file of LinBox
- Shell file of LinBox installation script
Prompts:
Hey, I would like some help with installing LinBox on a Linux system (shared system at my university). Here is the readme and the suggested auto-install file. First, can you tell me which linux command downloads that auti-install file, which is at the URL https://raw.githubusercontent.com/linbox-team/linbox/master/linbox-auto-install.sh ?
[Claude explains wget command and chmod to make executable]
can you modify that command to install the extra package with IML ?
[Claude explains how to modify the command with --with-iml flag]
Ok, it finished with the output [...] Now I am in the folder /u/schmittj/linbox/examples and have a file called rank.C which I want to compile. Which precise commands do I need to input to compile it?
[Claude provides g++ compilation command with appropriate flags]
I got the following error: [error about missing linbox/linbox-config.h]
[Claude troubleshoots include paths, suggests finding the header location]
Here is the content of the linbox folder: [directory listing] do you see what I should do?
[Multiple iterations of troubleshooting header files and include paths]
Ok, thanks, here is the next complaint: [error message about config.h]
[More troubleshooting until compilation succeeds]
Ok, this actually went through, and produced an executable called rank! Thanks so much! There is an example sparse matrix here [...] I want to download it, unpack it and then run the rank program on it. Can you tell me what to do next?
[Claude explains wget, gunzip, and how to run the program]
Outcome:
After extensive back and forth where I essentially just copy-pasted error messages for Claude to review and asked for the next step, the package was installed successfully and I was able to compile a program and calculate a matrix rank.
This section will include general strategies for effective AI use in mathematical research.
This section will document common failure modes and limitations of AI tools in mathematical contexts.
Subtle mistakes in mathematical arguments leading to proofs of incorrect statements
Goal: As part of my research I was thinking about concrete examples of finite sets $E$ with an action of a finite group $G$. For the calculations that I was interested in, I was looking for a way to efficiently distinguish isomorphism classes of such sets (up to $G$-equivariant bijections). One invariant associated to $E$ is the permutation representation $\text{Perm}(E)$, which is a vector space whose basis is indexed by the elements of $E$ and on which $G$ acts by permuting these basis elements. Representations are well-understood (and implemented in various computer algebra systems), so I was wondering if knowing $\text{Perm}(E)$ uniquely determines $E$ up to isomorphism.
System: ChatGPT o3-mini-high
Prompts:
Assume we have a finite group $G$ and two finite $G$-sets $E_1, E_2$. We obtain $G$-representations $V_j = \mathbb{R}^{E_j}$ for $j=1,2$ by the permutation representation of $G$ on functions $E_j \to \mathbb{R}$. Question: is it true that $E_1, E_2$ are bijective as $G$-sets (i.e. admit a $G$-equivariant bijection) if and only if $V_1$ and $V_2$ are isomorphic as $G$-representations? Provide a proof or counter-example.
Outcome:
After thinking for 30 seconds, o3-mini-high replied that yes indeed, you can reconstruct $E$ from $\text{Perm}(E)$. Its argument goes as follows:
- The value of the character of $\text{Perm}(E)$ at $g$ in $G$ equals the size of the fixed point set $E^g$ of $g$ on $E$.
- The $G$-set $E$ is uniquely determined by knowing the size of the fixed point set of each subgroup $H$ of $G$, operating on $E$ by the induced action. The vector of these fixed point cardinalities is called the mark of $E$.
- The size of the fixed point set of $H$ is given by $|E^H| = \frac{1}{|H|} \cdot \sum_{h \in H} |E^h|$.
- Since all summands above are known by part a), we can calculate the mark of $E$ which by part b) uniquely determines $E$ as a $G$-set.
Problem:
Parts a), b) and d) of the argument are completely correct, but the formula in part c) is just a pure
hallucination and in fact wrong (note: by
Burnside's Lemma this formula in fact calculates the number of elements $|E/H|$ in the quotient of $E$ by $H$ - a related but different quantity). This is a symptom of the fact that the entire claimed theorem above ($\text{Perm}(E)$ determines $E$) is incorrect: for a counter-example see
here.
After reviewing the original argument, I complained about the formula from c) by writing:
But the equation $|E^H| = \frac{1}{|H|} \sum_{h \in H} |E^h|$ is not correct, even for very simple examples of $H$ (e.g. $H=\mathbb{Z}/2\mathbb{Z}$ acting on $E=H$ itself by translation has $E^H = \emptyset$ but the right-hand side is $\frac{1}{2} \cdot 2 = 1$).
Confronted like this, the model conceded that the original formula was incorrect, but insisted that the overall argument could be modified. Indeed, it recalled all the original parts of the argument that held up, but now said:
Although the numbers $|E^H|$ are not immediately given by the values $|E^g|$, one may recover them by an inclusion‐exclusion or Möbius inversion argument on the subgroup lattice (this is a standard result in the theory of Burnside rings).
This is a beautifully phrased argument, in keeping with standard styles of summarizing a slightly tedious detailed calculation for a research paper. However, it is also completely incorrect: trying to write the inclusion-exclusion argument, one immediately faces the issue that there is not enough information to determine the cardinalities $|E^{g_1} \cap E^{g_2}|$ of pairwise (and higher-order) intersections of fixed sets.
Silver lining:
Reviewing the correct parts of the argument, I realized that calculating the mark of $E$ is quite easy algorithmically: one just needs to enumerate a set of representatives $H$ of subgroups of $G$ up to conjugation and calculate the size $|E^H|$ of the fixed set. This gave the characterization I was looking for orginally, just not via the permutation representation as I had originally planned. In a new conversation, I asked o3-mini-high to
implement this comparison for me in SageMath, which allowed me to check my original conjecture concerning these $G$-sets in many cases.