{
  "artifactId": "artifact.library.mathlib.szemeredi-regularity-lemma.v001",
  "candidateOnly": false,
  "category": "Combinatorics",
  "claimBoundary": "This page indexes Mathlib’s effective equipartition form of the finite graph regularity lemma. It assumes ε > 0 and l no larger than the finite vertex count, and it produces a partition of the full vertex set with part sizes differing by at most one, l ≤ #P.parts ≤ SzemerediRegularity.bound ε l, and at most an ε-proportion of ordered distinct part-pairs non-ε-uniform. It does not require every pair to be uniform. This is not Szemerédi’s theorem on arithmetic progressions, a diagonal or degree form of regularity, a counting or removal lemma, or a claim that the bound is optimal, small, or attained.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem szemeredi_regularity {α : Type*} [DecidableEq α] [Fintype α] (G : SimpleGraph α) [DecidableRel G.Adj] {ε : ℝ} {l : ℕ} (hε : 0 < ε) (hl : l ≤ Fintype.card α) : ∃ P : Finpartition Finset.univ, P.IsEquipartition ∧ l ≤ #P.parts ∧ #P.parts ≤ SzemerediRegularity.bound ε l ∧ P.IsUniform G ε",
  "family": "Graph regularity",
  "id": "library.mathlib.szemeredi-regularity-lemma.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/szemeredi-regularity-lemma/",
    "entryData": "/data/library-theorems/szemeredi-regularity-lemma.json",
    "evidence": "/proofs/artifact.library.mathlib.szemeredi-regularity-lemma.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.szemeredi-regularity-lemma.v001.evidence.json",
    "source": "/sources/upstream/szemeredi-regularity-lemma/"
  },
  "landmark": {
    "completeFormalType": "theorem szemeredi_regularity {α : Type*} [DecidableEq α] [Fintype α] (G : SimpleGraph α) [DecidableRel G.Adj] {ε : ℝ} {l : ℕ} (hε : 0 < ε) (hl : l ≤ Fintype.card α) : ∃ P : Finpartition Finset.univ, P.IsEquipartition ∧ l ≤ #P.parts ∧ #P.parts ≤ SzemerediRegularity.bound ε l ∧ P.IsUniform G ε",
    "concepts": [
      "finite simple graphs",
      "equipartitions",
      "ε-uniform pairs",
      "edge density",
      "energy increment",
      "bounded refinement"
    ],
    "plainLanguage": "Given a finite simple graph, a positive tolerance ε, and a requested minimum l no larger than the vertex count, the vertices can be split into nearly equal-sized parts. The number of parts is at least l and no more than Mathlib’s source-defined bound, and all but an ε-proportion of ordered distinct part-pairs have stable edge density on sufficiently large subparts.",
    "poster": {
      "alt": "An ivory and forest-green theorem poster states the effective ε-uniform equipartition result, shows mostly coherent graph part-pairs, follows refinement through a bounded energy stair, and separates the theorem from arithmetic-progression, diagonal, and degree variants.",
      "byteSize": 2559196,
      "caption": "A bounded energy-increment process yields an ε-uniform equipartition with l ≤ #parts(P) ≤ bound ε l.",
      "description": "The poster leads with a finite simple graph divided into nearly equal cells, preserving a small minority of visibly irregular relations. Its central statement records ε > 0, l ≤ |V|, equipartition, the exact part-count inequalities, and ε-uniformity. Three source-bound movements refine non-uniformity witnesses, raise energy in controlled steps, and use energy ≤ 1 to force termination. The scope box explicitly excludes Szemerédi’s arithmetic-progression theorem and the unproved diagonal and degree versions.",
      "derivatives": [
        {
          "byteSize": 158292,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-poster-v1-640.webp",
          "sha256": "sha256:a31f4edb81a18cd54b68b6c443ec3c32d1597cef6f75a6f54139793d590414c6",
          "width": 640
        },
        {
          "byteSize": 322802,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-poster-v1-1024.webp",
          "sha256": "sha256:c7469780c52d2a465ea48fc6442281ca4616530d4a8f9a49e3ee253d182193f4",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-25T20:40:43Z",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-poster-v1.png",
      "sha256": "sha256:aa635eaf2d2af37c969a37e1d77e9a3c254d0d9bc7a814eb879e5977a35b5862",
      "title": "Szemerédi’s Regularity Lemma at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "GRAPH REGULARITY · FINITE SIMPLE GRAPHS\nSZEMERÉDI’S REGULARITY LEMMA\nε > 0  ·  l ≤ |V|\nTHERE EXISTS A PARTITION P OF V\nP IS AN EQUIPARTITION\nl ≤ #parts(P) ≤ bound ε l\nP IS ε-UNIFORM\nMOST DISTINCT PART-PAIRS HAVE STABLE EDGE DENSITY\nREFINE NON-UNIFORMITY WITNESSES\nENERGY RISES IN CONTROLLED STEPS\nENERGY ≤ 1\nFORCES\nTERMINATION\nEXACT SCOPE\nEquipartition version only.\nNot Szemerédi’s theorem on arithmetic progressions.\nNot the diagonal or degree versions."
    },
    "visual": {
      "alt": "One finite 36-vertex graph is reorganized into four equal coarse cells and then into three equal child cells inside each coarse parent; selected final cell-pairs carry stable blue edge-density strands.",
      "byteSize": 2349076,
      "caption": "Controlled refinement raises partition energy until an ε-uniform equipartition is forced.",
      "description": "The same finite 36-vertex example moves from an unpartitioned graph into four coarse parent cells of nine vertices, then refines each parent into three child cells of three vertices. The nested boundaries make refinement literal rather than replacing one unrelated grid by another; restrained cobalt strands indicate stable pair densities without claiming that every pair is uniform.",
      "derivatives": [
        {
          "byteSize": 46940,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-schematic-v2-640.webp",
          "sha256": "sha256:c547a5ff9c4852da4137f3ebdb8d4e6d335abff66a65e297c93123da41f5e353",
          "width": 640
        },
        {
          "byteSize": 130600,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-schematic-v2-1200.webp",
          "sha256": "sha256:9e139dc5437838e4c6849f1458d84842e89fdd2d669f4851e656a2527a766bf0",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-25T20:40:43Z",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/szemeredi-regularity-lemma/theorem-schematic-v2.png",
      "sha256": "sha256:6b48a1bbff9c88b1e9aee9f6223e297f9b475dde2033de3ef43e82a0e8883122",
      "title": "Refinement stabilizes most part-pair densities",
      "width": 1536
    },
    "walkthrough": null,
    "whyLandmark": "Szemerédi’s regularity lemma is a foundational structural result in extremal graph theory: every finite graph can be decomposed into a bounded number of nearly equal classes whose pairwise edge distributions are mostly random-like. Mathlib retains the effective equipartition endpoint together with the characteristic energy-increment proof architecture."
  },
  "nonClaims": [
    "ProofAtlas did not originate Szemerédi’s regularity lemma or Mathlib’s declaration.",
    "The selected declaration is the equipartition graph-regularity lemma, not Szemerédi’s theorem on arithmetic progressions.",
    "The selected declaration permits an ε-proportion of ordered distinct part-pairs to be non-uniform; it does not say every pair is uniform.",
    "The selected declaration does not prove the diagonal or degree versions, a counting lemma, a removal lemma, or optimality of the source-defined bound.",
    "The generated explanation and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.szemeredi-regularity-lemma.v001",
  "statusAxes": {
    "acceptedAtlasResult": "Not recorded for the preferred artifact",
    "locallyReproduced": "Exact upstream declaration replayed",
    "reviewedPage": "Current public presentation reviewed",
    "upstreamIndexed": "Pinned source bytes verified locally"
  },
  "summary": "Every finite simple graph admits an ε-uniform equipartition whose number of parts lies between l and an explicit bound depending only on ε and l.",
  "targetId": "target.library.mathlib.szemeredi-regularity-lemma.v001",
  "title": "Szemerédi’s Regularity Lemma",
  "upstreamOrigin": {
    "declarationName": "szemeredi_regularity",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean#L76",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:eee7f2c505130c4a09fa8e62dca7bc1bbfaff90c18e86e9ad43f44f7f0ea8fd6",
    "sourceByteLength": 8180,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Combinatorics/SimpleGraph/Regularity/Lemma.lean",
    "sourceLine": 76,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
