#!/usr/bin/env python3 """docs/fermat-degrees.svg: for each degree d from 3 to 102, whether the Hodge conjecture is known for every Fermat variety x_0^d + ... + x_{n+1}^d = 0 (all n). Its only words are the degrees, so README.md and README.zh.md each caption it. Standard library only: python3 scripts/fermat_degrees.py > docs/fermat-degrees.svg The rule is Aoki's (1983; MMRV 2026, Corollary 4.2): the conjecture holds for degree d once every exceptional tuple xi_q with q dividing d is algebraic. EXCEPTIONAL lists the q up to 102 that have one (MMRV's data file of Aoki's tuples). Known before 2026: xi_12, xi_15, xi_20 (Shioda 1979: d <= 20) and xi_21 (da Silva Jr. 2021). Shortened to length at most 6 by Miranda, Movasati, Rufino and Villaflor (arXiv:2609.27301, 2026-09, a preprint): 28, 33, 35, 39, 55, 57. A degree is drawn filled when it needs only the first kind, in sand when it needs the second, dashed when some xi_q dividing it is still open; 44, 51 and 52, the project's board, are drawn heavier. """ EXCEPTIONAL = (12, 15, 20, 21, 28, 33, 35, 39, 44, 51, 52, 55, 57, 65, 68, 69, 76, 77, 85, 87, 91, 92, 93, 95) BEFORE = {12, 15, 20, 21} MMRV = {28, 33, 35, 39, 55, 57} BOARD = {44, 51, 52} COLS, CELL_W, CELL_H, GAP, PAD = 10, 64, 30, 6, 13 FIRST, LAST = 3, 102 def state(d): need = {q for q in EXCEPTIONAL if d % q == 0} if need - BEFORE - MMRV: return "board" if d in BOARD else "open" return "mmrv" if need & MMRV else "known" rows = (LAST - FIRST) // COLS + 1 W = 2 * PAD + COLS * CELL_W + (COLS - 1) * GAP H = 2 * PAD + rows * CELL_H + (rows - 1) * GAP out = [f'', 'Fermat varieties by degree: where the Hodge conjecture is known', '', f''] for i, d in enumerate(range(FIRST, LAST + 1)): x = PAD + (i % COLS) * (CELL_W + GAP) y = PAD + (i // COLS) * (CELL_H + GAP) s = state(d) out.append(f'') out.append(f'{d}') out.append('') print("\n".join(out))