Proving my leftover PhD conjectures with AI and Lean
The Riemann Hypothesis is a 167-year-old math problem wherein mathematicians are 99% sure that the solutions to a certain function are always 1/2. Mathematics is an exact science, however, so mathematicians are only satisfied when something is 100% assured. Furthermore, thousands of mathematical results are conditioned on the Riemann Hypothesis being true, making it one of the most important conjectures in history. On November 20, 2026, Levent Alpöge announced a Lean-verified AI-assisted proof of the Riemann Hypothesis.
Having a couple of leftover conjectures from my PhD, I was inspired to try to prove them the same way. I simply pointed Claude Opus 5.5 and Lean, an automated theorem verifier, at the mysterious polynomial from my thesis. The AI wrote the proofs and Lean checked them. Some of my conjectures are now proved, and one turned out to be false as stated.
Lean is a programming language for mathematics. You write definitions, statements and proofs, and a small program at its core checks that every step follows from the rules of logic and from facts already proved, most of them from Mathlib, the community's library of formalized mathematics. Nothing gets waved through as "clearly" or "similarly". So the AI writes a proof, Lean checks it, and a human only has to make sure the statements say what was meant.
The mysterious polynomial
My PhD was about tatami coverings: tilings of a grid by dominoes and monominoes (1×1 squares) in which no four tiles meet at a point, the old rule for laying tatami mats. Take an n×n grid, use as many monominoes as you can (that's n of them), put two of them in the top corners, and sort the coverings by how many vertical dominoes they have. Here they all are for small n; click one to see it bigger.
Coverings appear here when JavaScript runs.
- monomino
- vertical domino (counted)
- horizontal domino
Each column is one coefficient of a polynomial, VHn(z). In December 2010 Don Knuth found, by computer, that for small n these polynomials break into a pile of small cyclotomic factors, made of pieces like 1 + z and 1 + z2, and one big leftover factor. Frank Ruskey and I proved where the cyclotomic part comes from. The leftover is Pn(z), which my thesis calls the mysterious polynomial (I wrote about it once before, in Connecting tatami tilings with other areas of math).
In 2013 I wrote that perhaps the most striking thing about Pn is the picture of its zeros. Here it is, live. Press Play or drag the slider: for odd n exactly one zero lands on the real line, in the shaded stretch between −1 and −1/2, and it creeps left as n grows. Switch to even n and none ever does.
- 131zeros in all
- 1real zeros
- −0.836real zero at
What Lean checked
| Part | The conjecture, roughly | Now |
|---|---|---|
| (a) | Certain pairs Pn, Pn+j start with the same coefficients | Proved, once correctedfalse as stated |
| (b) | For odd n, exactly one real zero, between −1 and −1/2, moving left as n grows | Half proved"exactly one" and "moving left" are open |
| (c) | For even n, no real zeros | Proved |
| (d) | Pn is irreducible over the integers | Opentrue for every n up to 245 |
| (e) | A formula for Pn(−1) | Proved |
| (f) | For even n ≥ 20, the absolute values of the coefficients add up to Pn(−1) | Opentrue for every even n up to 460 |
Part (a), as stated, says that P4 and P6 start the same way, up to their z2 terms. They don't: P4 = 1 + z + 2z2, and P6 = 1 + z2 + 2z3 + 2z4 − 2z5 + 2z6 has no z term. The AI spotted it, and here is the refutation in Lean:
theorem P_four : P 4 = 1 + X + 2 * X ^ 2 := by
apply P_eq_of_VH_eq
simp [VH, D, Finset.prod_Icc_succ_top, S_one]
ring
theorem conjA_as_printed_false : ¬ ConjA_as_printed := by
intro h
have := h 1 4 1 2 le_rfl (by norm_num) (by norm_num) (by norm_num)
rw [P_four, show 4 + 2 = 6 from rfl, P_six] at this
simp [coeff_one, coeff_X] at thisThe first theorem has Lean work out P4 exactly from the definitions. In the second, ¬ means "not": the proof feeds n = 4 to my conjecture, swaps in the exact values of P4 and P6, and simp is left claiming that 1 = 0. Changing one ≤ in the statement to a < fixes it (for n ≥ 3), and Lean proved the corrected version.
Lean also checked the theorem from my thesis that everything rests on: that the cyclotomic part really does divide VHn.
Parts (b) and (c) are what the explorer above shows. Lean proved that for even n no zero is ever real, and that for odd n there is always one in the shaded stretch and never one outside it. That there is only one, and that it keeps moving left, is still open, though it holds for every odd n up to 399.
The proofs and all of the Lean code are in the full write-up.
Two problems are still wide open. Is Pn irreducible over the integers for every n ≥ 3? And for even n ≥ 20, do the absolute values of its coefficients always add up to Pn(−1)?
Forecasting time series with Mistral's Timestral
I came across Timestral, a family of time series models that Mistral released this month, and wanted to see it run on my Mac. It does zero-shot forecasting: you hand it the history of a series it has never seen, and it forecasts what comes next, with a range around each value, without any training on that series. It comes in four sizes, from 5 million to 209 million parameters, and Mistral says it doesn't need a GPU.
Running it on my Mac
My Mac has an M1 Pro with 32 GB of memory, which holds even the largest size easily: its weights are 837 MB. Mistral's timestral Python package downloads the weights from Hugging Face and runs them with PyTorch. It all happens on the CPU, because the package does some of its arithmetic in 64-bit floats, which PyTorch can't do on Apple's GPU. The CPU turned out to be plenty: the largest size forecasts those two years of airline passengers in about 125 ms.
Then I made a small browser app to look at the forecasts. It shows a series, forecasts it from a point partway through, and lays the real values that came after over the forecast, so you can see how close it got. I loaded four real series and five made-up ones. The app, and the scripts that made the forecasts below, are in my timestral repository.
Try it
Pick a dataset, then move Forecast from along the series. Pick a size to shade its range, or expand the panel to fill the window. Every forecast here was made ahead of time on my Mac, so the page only shows them.
The made-up series are there to poke at it. The random walk has nothing to predict, and the shading fans out to say so. The level shift jumps at hour 1,200, so a forecast from before the jump can't see it coming.
A cut-paper collage theme for Home Assistant
Most Home Assistant dashboards I see are rounded rectangles everywhere, some glassmorphism if you’re lucky, and a very analytical heads-up display look. I wanted a cut-paper look, so I made one with Impeccable: Collage, a theme and a set of cards. Each room is a sheet of poster colour pinned to a dim wall, anything that’s on gets an organic paper shape, and scraps of patterned paper stick out from under the cards.
The sky over the house
The sun card takes aerial imagery of about 180 metres around Home Assistant’s home location, stands the buildings from OpenStreetMap up on it as paper, and puts a glass dome over it with today’s paths of the sun and the moon. The shadows fall where they really do. Here it is running on a pretend Home Assistant: drag it around, pinch to zoom, and slide through the day.
The other cards
There are sixteen cards. If you have a GE range on the SmartHQ integration, the range card draws the cooktop from above with each burner’s time over the last 30 days, and the stove card charts your time at the stove from a week to a year.
Most of the others take any entity: rooms, a status sentence, the thermostat’s day, any sensor as a cut-paper chart, the weather (a paper sky with rain hanging under the temperature), a media player as a record sleeve, a lock as a keyhole and a bolt, who is home as paper figures inside a house, and batteries drawn as paper batteries.
Installing it
Everything is in homeassistant-collage-theme. The cards install through HACS as a custom repository (type Dashboard), and the theme is one YAML file you copy into your themes folder. The README has every card’s options and a whole example dashboard. To try it first, clone the repository and run node tools/serve.mjs: every card runs in your browser on a pretend Home Assistant.
The repository is also written for AI agents, so you can ask one to install it or to change it for your house. DESIGN.md and PRODUCT.md are in Impeccable’s format, AGENTS.md tells an agent how to install it without touching anything else, and there are skills for installing it and for making new cards in the same style. If you extend it with an agent, install Impeccable first.
Home Assistant traces in Honeycomb
A friend of mine works at Honeycomb, which makes observability tools, and I wanted to see what their tool can do. So I tried it on one of my favourite hobbies: configuring Home Assistant. I’ve been connecting Home Assistant to other software lately (the last one was Detective Jev, which keeps watch over our house), and this is the next one.
I created a custom integration, honeycomb-hacs, that sends what happens in Home Assistant to Honeycomb as traces. To have something to send before trying it on my own house, I also built a simulated home: 27 lights, motion and door sensors, blinds, plugs that report their power, a thermostat, a robot vacuum, and two made-up people who walk around setting things off. Its devices answer at different speeds, like real ones on different networks, and it hides a few problems on purpose for me to find in Honeycomb.
Spans and traces
A span is one thing that took time: it has a start, an end, and fields that describe it. A trace is a tree of spans that share one cause. Here is one run of an automation that closes the blinds at 11:30, to shade the house from the midday sun.
The run took 30 seconds, but the blinds started closing after 3.7 and 5.4 seconds. The rest is the script waiting to check that they closed, so it can try again if they didn’t.
Asking Canvas for correlations
One problem the simulation hides is the microwave. While it runs, the Zigbee lights on the ground floor slow down. At lunch, one command turned on four lights: the chandelier, on a different network, came on in 0.22 seconds, and the three Zigbee lamps took 5.7 to 6.2 seconds. Nothing in the lamps’ spans mentions the microwave, so you only find it by putting another device’s data beside theirs.
Honeycomb’s Canvas lets you ask for correlations like this one in plain words, and it’s pretty good at finding them already. I asked it whether it saw any correlations in my Home Assistant data from the last 24 hours that might point to a problem. It found three, and the first was the microwave:
Turning on the microwave slows the Zigbee lights. Zigbee light commands normally take ~600ms. They took 3–7s only during the four microwave runs (19:40, 19:58, 00:01 and 00:47 UTC). Your Clear Connect bulbs stayed under 260ms at those same moments, so it isn’t Home Assistant itself being slow.
Canvas builds the page as you ask, adding widgets and content as it goes. It’s very similar to a dynamic UI I’m building for a product at work, so it was fun to see another company already doing it. I think dynamic content built by agents is the way of the future.
Heatmaps and BubbleUp
A heatmap of response times shows most of them under a second, and a scatter of slow ones above. Draw a box around some of them and BubbleUp compares every field of the spans in the box (yellow) with the rest (blue): first a short written summary, then one card per field, biggest differences first.
ha.area, the slow ones are mostly in the kitchen.The interesting part is going through the cards and seeing how the outliers differ from the baseline in each one. With so many fields in Home Assistant that’s a bit of work, because you have to pick out which ones matter and which are noise. There’s a fair bit of noise: three of those cards (entity id, friendly name and device) say the same thing.
Version 0.1.0 of the integration is released on GitHub, and you can add it to your own Home Assistant through HACS as a custom repository. It sends everything except where people are, readings from bodies, phones’ sensors and cameras, and its options let you leave out more, or send some of those anyway.
Detective Jev keeps watch over the house
Every so often, whatever my family is doing stops because Detective Jev's light has gone yellow or red, and we go and check what it's worried about. It turns out to be one of the sliding doors open on a cold day, or the front door open for too long, or something like that.
Detective Jev is our version of TypeSafe's Jev, the model for fast, typed decisions that I used in Jev Atlas. It is a small app I built with AI help that runs beside Home Assistant, keeps checking our house through the day, and tries to tell us when something is out of the ordinary.
It doesn't have enough data on our house yet to be very smart. For now it is about as smart as our dog, who barks at the mail delivery person.
On its page, Detective Jev is a little cut-paper Sherlock Holmes. Its mood also shows on three LEDs on a breadboard, driven by an ESP32 running ESPHome.
How Detective Jev decides
Through the day, Detective Jev lists what's going on in the house, and next to each thing it puts whatever might explain it: what Home Assistant's logbook says caused it, the automations that act on it, how often it usually happens, and our notes. TypeSafe's Jev decides which of those explains each thing, if any, and how urgent it is. Detective Jev only speaks up about what nothing explains, so the backyard lights coming on at sunset are never news. What it finds sets its mood.
All as usualGreen light
Worth a lookYellow light
A reading doesn't add upYellow light, blinking
Needs youRed light
The first version didn't know what caused anything, and it was worried most of the time. It flagged the backyard lights 27 minutes after sunset because they "usually last 12 hours".
Talking to Detective Jev
The page has a chat, answered by OpenAI's GPT-5.6 Luna, and that's how we change what Detective Jev does. What we tell it becomes a note that it reads the next time it looks. The chat can't switch anything in the house, only change what Detective Jev knows: add or forget a note, add a check that should always hold, or stop watching a device we don't use any more.
On Thanksgiving Monday, with several doors open and several burners on, I told it that this should be reported. It asked whether that held every day or only on weekday late mornings, and saved the note when I said all the time.
I wanted TypeSafe's Jev to do most of the judging, because it is cheap, so GPT-5.6 Luna only runs when we talk to Detective Jev, and once a night.
Detective Jev dreams
Each night, Detective Jev "dreams": GPT-5.6 Luna consolidates its notes. It merges duplicates, keeps the newer of two notes that disagree, drops expired ones and keeps each note short. Any night's changes can be undone from the page.
The other night, before he went to sleep, my young son asked me if Jev was green. I told him yes, he's green, and everything is fine.