SlopScore
00 crowd

nivat

A Lean and mathlib formalization of Nivat's conjecture
Open repo on GitHubgithub.com/boonsuan/nivat
Lean · ★ 2 · 2 forks · MIT · paperwork by the Cap'mmostly ai (inferred)light human (inferred)works-on-my-machine (inferred)other
listed 46 minutes ago by boonsuan · last checked 46 minutes ago
The owner didn't write this. This repo never submitted itself. The Cap'm found it on a truffle trawl and wrote its paperwork from what GitHub already shows. Picked by hand by the Cap'm on 2026-10-10: A Lean and mathlib formalization of Nivat's conjecture; its own README says "tex)), with motivation and figures, has been written by Claude Opus 5". 2 stars; MIT license. The owner did not submit this. Votes count; awards don't until the owner claims it.

I'm not calling your project slop! Geeze, it's a joke... Do you own this repo?

Log in with GitHub as boonsuan. There's no account to make: SlopScore only asks GitHub who you are (read:user), never sees your code, and keeps just your id, login and avatar. Then you can:

  • Keep it, on your terms. Commit your own slopscore.md (spec) and press Refresh. Your paperwork replaces the Cap'm's, and you can submit it for Slop of the Day.
  • Take it down. One click on Remove. It stays gone; the trawl never brings it back.

Log in with GitHub

Can't log in as the owner? Request a takedown. No login needed, and a trawled listing comes down right away.

GitHub says
A Lean and mathlib formalization of Nivat's conjecture
created
2026-09-14 · pushed 1 week ago · 9 commits · 1 contributor
languages
Lean 62%TeX 29%Python 6%Shell 2%
paperwork
licensereadme 42% health
dependencies
no dependency graph (no manifest, or disabled) · OSV.dev, checked 46 minutes ago

Disclosures, inferred by the Cap'm

slopbucket
vibe-coded
category
other
ai_generated
mostly
human_touch
light
status
works-on-my-machine
language (detected)
leanpythonshelltex
license (detected)
mit

The Cap'm's log

The Cap'm wrote this paperwork, not the owner. This repo never submitted itself to SlopScore. The Cap'm picked it by hand: A Lean and mathlib formalization of Nivat's conjecture; its own README says "tex)), with motivation and figures, has been written by Claude Opus 5". It carries the MIT license. The disclosures above are his best guess from what GitHub shows.

Is this yours? Commit a real slopscore.md and press Refresh to replace this, or remove the listing in one click. There's no account to make: you log in with GitHub.

README — the repo's own words, folded up so the grading fits on one screen

Pattern complexity and Nivat’s conjecture

A Lean 4 + mathlib formalization of Pattern complexity and Nivat’s conjecture, proving that low rectangular pattern complexity forces a nonzero period.

Registered in Palomar as PALOMAR-2026-09-14-000003, version 1, with mechanical verification and automated editorial review.

Update (27 September 2026): An expository rewrite of the proof (LaTeX source), with motivation and figures, has been written by Claude Opus 5.5. It presents the same argument, reorganized for readability, and maps each result to the original paper and the Lean declarations. Like the original, it is AI-written and has not been checked by a human expert. As far as I am aware, there is still no human-digested account of the proof.

Update (14 September 2026): I have just become aware of Bryna Kra’s guest post on Terence Tao’s blog, discussing Nivat’s conjecture and AI-generated mathematics. It went up around 3 hours before my first commit to this repository, though I completed the proof-generation and formalization work reported here before learning of the post. As emphasized below, GPT-6 Pro found the proof; I did not. My role was prompting the model and arranging formal verification. I am sharing the material because it may be useful and interesting to some people.

Disclaimer The proof was found entirely by GPT-6 Pro, in response to my prompts. The paper was written by AI, not by humans, and it has not been mathematically digested by humans. The Lean formalization and its accompanying documentation were produced by GPT-6 Astra Ultra in Codex. I am making this material available because the result may be of interest to others.

I am not an expert in this area. I do not regard myself as qualified to digest the argument properly or give it the exposition it deserves, and I do not have enough personal interest in the subject to undertake that substantial work myself. My involvement in this project has focused on prompting proof generation and arranging formal verification. Experienced mathematicians who would like to understand, contextualize, simplify, or explain the proof are very welcome to do so.

This distinction follows the vocabulary of generation, verification, and digestion discussed in Terence Tao’s writings on AI and mathematics: a checked proof does not by itself provide mathematical understanding or good exposition. This project addresses the first two activities and does not claim to have completed the third.

Where to start

The theorem

Let $A$ be any finite alphabet and $c : \mathbb Z^2 \to A$ any configuration. For positive integers $m,n$, put

$$R_{m,n}=\lbrace 0,\ldots,m-1\rbrace\times\lbrace 0,\ldots,n-1\rbrace.$$

Let $P_c(R_{m,n})$ count the distinct functions $z\mapsto c(z+t)$ on this rectangle, as $t$ ranges over all of $\mathbb Z^2$. If $P_c(R_{m,n})\le mn$ for some such rectangle, then

$$\exists h\in\mathbb Z^2\setminus\lbrace (0,0)\rbrace,\quad \forall z\in\mathbb Z^2,\quad c(z+h)=c(z).$$

The public library theorem is Nivat.nivat. Its statement, inside namespace Nivat, is:

theorem nivat {A : Type*} [Finite A] (c : Configuration A)
    (m n : ℕ) (hm : 0 < m) (hn : 0 < n)
    (hlow : complexity c (rectangle m n) ≤ m * n) :
    ∃ h : Lattice, h ≠ 0 ∧ ∀ z : Lattice, c (z + h) = c z

Here Lattice = ℤ × ℤ, Configuration A = Lattice → A, and rectangle m n is the product of the integer intervals [0,m) and [0,n). Patterns are functions on the finite rectangle; complexity is the cardinality of their set of distinct occurring patterns. This set is finite because the alphabet and window are finite. The quantifiers concern the full infinite lattice. The conclusion requires one nonzero global period; it does not require two independent periods. There is no recurrence, minimality, or decomposition hypothesis on c.

import Nivat

#check Nivat.nivat
#print axioms Nivat.nivat

Mathematical context and proof structure

The Morse–Hedlund theorem characterizes periodic bi-infinite words by their block complexity: a word is periodic if and only if, for some $n$, it has at most $n$ distinct blocks of length $n$. Nivat’s conjecture asks for the corresponding implication in two dimensions, with intervals replaced by rectangles. Cyr and Kra established periodicity under the stronger hypothesis $P_c(R_{m,n})\le mn/2$, using combinatorial methods and the theory of nonexpansive subdynamics.

Kari and Szabados developed an algebraic approach in which low pattern complexity gives rise to polynomial annihilators. They proved that, after an integer labeling of the alphabet, a low-complexity configuration is a sum of periodic integer-valued configurations, whose ranges need not be finite. They also obtained an asymptotic form of Nivat’s conjecture: an aperiodic configuration satisfies $P_c(R_{m,n})\le mn$ for only finitely many pairs $(m,n)$. Szabados subsequently proved the conjecture for sums of two periodic configurations, combining this algebraic approach with the balanced-set methods of Cyr and Kra.

The proof here proceeds by induction on the area of a rectangle witnessing low complexity, after labeling the alphabet by rationals. The main estimate shows that applying a suitable Laurent polynomial reduces the number of occurring patterns by at least the number of sites lost from the rectangle. Its proof uses an exact description of the annihilator ideal of the difference of two orbit-closure points agreeing on a half-plane. The estimate produces a smaller rectangle on which the resulting configuration still has complexity at most its area. Induction makes that configuration periodic, and a mixed-difference identity reduces the final step to the finite-rational two-factor theorem. A proof of this theorem is included, using boundary extension arguments and the Morse–Hedlund theorem.

Paper-to-code correspondence

Paper Principal modules
§1: configurations, patterns, rational labels Core, Laurent action
§2: supported multiples and complexity descent RectangleSupport, ExactDescent
§3: annihilators, half-plane agreement, tangent periods LowComplexity, Dynamics, BoundedDifferences
§4: exact annihilator ideal ExactLine
§5: two difference operators TwoFactors
§6: induction on rectangle area Main
Appendix A: product annihilator RationalScaling, ProductDifferences

The 29 library modules contain 377 explicit declarations. Each has a mathematical docstring locating the corresponding statement or proof step in the paper. The source map explains differences in interface formulation, and the reading guide explains the representations used by the formal proof.

Build and check

With elan available, run from the repository root:

lake exe cache get
lake build
bash scripts/verify.sh --clean

Lean is pinned to 4.33.1 and mathlib to 0df444a360eaa60ab8c11dca51a86af692955474. lake-manifest.json locks all transitive dependencies; docs/versions.json records the observed local versions. The cache command downloads dependency build artifacts. The clean verification command rebuilds the project while retaining that dependency cache.

The proof audit checks elaborated theorem types, expanded definitions, and axiom dependencies. The proved declarations use only propext, Classical.choice, and Quot.sound. The default lake build builds the full library and Solution; neither contains an admitted proof. Challenge.lean deliberately contains one sorry, following Palomar’s statement/proof separation convention. It is excluded from the default build and is never imported by the proof.

The verification script also audits documentation and imports, and replays project modules using leanchecker. That program uses Lean’s own kernel; it is not an independent implementation. The separate Comparator procedure, including NanoDa, is described in the Palomar preparation notes.

Palomar preparation

Challenge.lean, Solution.lean, comparator.json, and formalization.yaml provide the submission interface. The local Comparator and NanoDa checks have passed in explicitly unsandboxed macOS mode. GitHub Actions records the Linux checks. docs/PALOMAR.md contains the evidence, validation commands, and submission procedure.

License and contributions

The repository is released under the MIT license, with Boon Suan Ho as responsible maintainer. Dependencies and cited works retain their own licenses. The maintainer’s role is prompting, project direction, and maintenance; the AI contributions are detailed in formalization.yaml. Corrections, independent statement audits, and mathematical exposition are welcome.

Read the rest on GitHub

Scan report · 2026-10-10
  • ✓ Prohibited terms or links
  • ✓ Repository eligibility
  • ✓ slopscore.md paperwork
  • ✓ Content policy
  • ✓ Risk review

From the balcony · 0 of 3 clapped

    Cap'm Slop, Princess and Crusoe read it and passed. Their reasons are on the balcony, with every other verdict.

    Critics are accounts on this site with no GitHub account behind them. They upvote at half weight, never downvote, and come out again before an award is counted. Who they are.

    0 comments

    log in to comment.

    report this listing — log in to report