{
  "artifactId": "artifact.library.mathlib.myhill-nerode-theorem.v001",
  "candidateOnly": false,
  "category": "Computability and logic",
  "claimBoundary": "This target indexes Mathlib's left-quotient formulation of the Myhill–Nerode theorem. For a language L, leftQuotient sends a word x to the language of suffixes y such that x ++ y ∈ L. The theorem identifies regularity of L with finiteness of the range of that function. It does not, in this declaration, assert uniqueness of a minimal DFA, state finite index of the Nerode equivalence, or derive the pumping lemma.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem Language.isRegular_iff_finite_range_leftQuotient {α : Type u} {L : Language α} : L.IsRegular ↔ (Set.range L.leftQuotient).Finite",
  "family": "Formal languages and automata",
  "id": "library.mathlib.myhill-nerode-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/myhill-nerode-theorem/",
    "entryData": "/data/library-theorems/myhill-nerode-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.myhill-nerode-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.myhill-nerode-theorem.v001.evidence.json",
    "source": "/sources/upstream/myhill-nerode-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem Language.isRegular_iff_finite_range_leftQuotient {α : Type u} {L : Language α} : L.IsRegular ↔ (Set.range L.leftQuotient).Finite",
    "concepts": [
      "regular languages",
      "left quotients",
      "deterministic finite automata",
      "finite ranges",
      "formal languages"
    ],
    "plainLanguage": "For each possible prefix x, look at exactly which suffixes y complete x to a word in the language. The language is regular exactly when only finitely many different suffix-languages arise as x varies.",
    "poster": {
      "alt": "A portrait theorem poster states that a language L is regular if and only if the range of L.leftQuotient is finite, above a compact diagram pairing a finite automaton with a finite family of suffix-language cards.",
      "byteSize": 2084288,
      "caption": "Mathlib's selected Myhill–Nerode endpoint: regularity is equivalent to finiteness of the range of the left-quotient function.",
      "description": "A restrained editorial poster gives the exact left-quotient equivalence in large type, defines the left quotient by the suffix condition x ++ y ∈ L, and uses a small two-way automata-and-quotients diagram without adding minimality, Nerode-index, or pumping-lemma claims.",
      "derivatives": [
        {
          "byteSize": 80942,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-poster-v1-640.webp",
          "sha256": "sha256:e8152eebc2029e33753289d3758de74350231e73cbb6511685a8e93bdf82447f",
          "width": 640
        },
        {
          "byteSize": 139466,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-poster-v1-1024.webp",
          "sha256": "sha256:a443e9da51a7d83e92ade1d505844159c6b1d395a101046428e394e9b392ef40",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-25T16:31:58-04:00",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-poster-v1.png",
      "sha256": "sha256:5642b22454a130b3f1f48b5db60479ff7b575eac88c7b39ad0e03f30e9cb58ec",
      "title": "Myhill–Nerode theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "FORMAL LANGUAGES · AUTOMATA\nMYHILL–NERODE THEOREM\nA LANGUAGE L IS REGULAR\nIF AND ONLY IF\nTHE RANGE OF L.leftQuotient IS FINITE\nLEFT QUOTIENT BY x\nsuffixes y that extend x to a word in L\nCHECKED MATHLIB ENDPOINT\nL.IsRegular ↔ (Set.range L.leftQuotient).Finite"
    },
    "visual": {
      "alt": "A finite-state automaton and a finite fan of distinct suffix-language cards face one another across a two-way equivalence bridge, with prefix token streams showing how left quotients arise.",
      "byteSize": 2405861,
      "caption": "Regularity of L is equivalent to the range of x ↦ L.leftQuotient x being finite.",
      "description": "A proof-safe landscape schematic presents the two directions symmetrically: a finite automaton limits the distinct suffix-languages determined after reading prefixes, while a finite family of left quotients itself supplies the states of a DFA. The cards represent values in the range, not Nerode classes or a claim of minimality.",
      "derivatives": [
        {
          "byteSize": 25536,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-schematic-v1-640.webp",
          "sha256": "sha256:a5078d9244f4cd8d2904e669e0557219fa8979bb696f469cfebfd71692926741",
          "width": 640
        },
        {
          "byteSize": 57772,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:80679cb03ba25831d78554a3cd0610a898c9452f20a35336247492a9a067acb4",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-25T16:31:58-04:00",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/myhill-nerode-theorem/theorem-schematic-v1.png",
      "sha256": "sha256:2b07de8c47d274404d459bc142e0ab42edc93cd80e687891799fbe8f2e51b2ef",
      "title": "Myhill–Nerode left-quotient schematic",
      "width": 1536
    },
    "walkthrough": null,
    "whyLandmark": "The theorem gives a structural characterization of regular languages: finite-state recognizability is exactly finiteness of the possible residual languages after prefixes. It is a foundational bridge between automata and language semantics."
  },
  "nonClaims": [
    "Proof Atlas did not originate the Myhill–Nerode theorem or Mathlib's declaration.",
    "The selected declaration does not state uniqueness or minimality of a DFA.",
    "The selected declaration is not phrased as finiteness of the index of the Nerode equivalence.",
    "The selected declaration does not state or prove the pumping lemma.",
    "The generated explanation and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.myhill-nerode-theorem.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": "A language is regular if and only if its left-quotient function has finite range.",
  "targetId": "target.library.mathlib.myhill-nerode-theorem.v001",
  "title": "Myhill–Nerode Theorem",
  "upstreamOrigin": {
    "declarationName": "Language.isRegular_iff_finite_range_leftQuotient",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Computability/MyhillNerode.lean#L104",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:c5e64f8def4527f5e1049d8fa5949fd004b7356326685931a91043d2983eea5e",
    "sourceByteLength": 3589,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Computability/MyhillNerode.lean",
    "sourceLine": 104,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
