{
  "artifactId": "artifact.library.mathlib.rice-theorem.v001",
  "candidateOnly": false,
  "category": "Computability and logic",
  "claimBoundary": "This target indexes Mathlib's implication form of Rice's theorem. For a semantic property C of partial functions, assume program-code membership through eval is computable. If one partial-recursive f belongs to C, then every partial-recursive g belongs to C. It is specific to Mathlib's partial-function and program-code model and does not classify arbitrary syntactic code properties or all noncomputable semantic properties.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem ComputablePred.rice (C : Set (ℕ →. ℕ)) (h : ComputablePred fun c => Nat.Partrec.Code.eval c ∈ C) {f g} (hf : Nat.Partrec f) (hg : Nat.Partrec g) (fC : f ∈ C) : g ∈ C",
  "family": "Semantic properties of programs",
  "id": "library.mathlib.rice-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/rice-theorem/",
    "entryData": "/data/library-theorems/rice-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.rice-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.rice-theorem.v001.evidence.json",
    "source": "/sources/upstream/rice-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem ComputablePred.rice (C : Set (ℕ →. ℕ)) (h : ComputablePred fun c => Nat.Partrec.Code.eval c ∈ C) {f g} (hf : Nat.Partrec f) (hg : Nat.Partrec g) (fC : f ∈ C) : g ∈ C",
    "concepts": [
      "program code",
      "partial recursive function",
      "semantic property",
      "computable predicate",
      "semantic undecidability"
    ],
    "plainLanguage": "Suppose a semantic property of partial functions can be decided computably from program codes. If one partial-recursive function has that property, then every partial-recursive function has it.",
    "poster": {
      "alt": "An ivory, forest-green, and gold Rice theorem poster sends program codes through evaluation, shows partial-recursive f inside a semantic property, and uses a self-reference loop to force arbitrary partial-recursive g into the same property.",
      "byteSize": 2295845,
      "caption": "Computable semantic membership and one admitted partial-recursive witness force every partial-recursive function into the property.",
      "description": "Program-code plaques feed into behavioral traces. The exact implication is dominant: computable code membership, Nat.Partrec f, Nat.Partrec g, and f ∈ C lead through a self-referential code to g ∈ C. The poster explicitly excludes syntactic program properties.",
      "derivatives": [
        {
          "byteSize": 113786,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/rice-theorem/theorem-poster-v2-640.webp",
          "sha256": "sha256:0474c19e2ec984c1d611143c0ce4a3d7e5cffc62d103f0112d001f6f963d3827",
          "width": 640
        },
        {
          "byteSize": 218610,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/rice-theorem/theorem-poster-v2-1024.webp",
          "sha256": "sha256:d1319bbda4b10e193f74d96ee5d54bfea181c141795f1cf40f58b17092b4a182",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-25T17:18:00-04:00",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/rice-theorem/theorem-poster-v2.png",
      "sha256": "sha256:5d42f144f886ebe25517e0eb3a3c1d2bd4e1d22714ce882ae7e7b7c2f378452c",
      "title": "Rice's theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "RICE'S THEOREM\nDECIDABLE SEMANTIC PROPERTY\nC — A SEMANTIC PROPERTY OF PARTIAL FUNCTIONS\nPROGRAM-CODE MEMBERSHIP IN C IS COMPUTABLE\nNat.Partrec f\nNat.Partrec g\nf ∈ C → g ∈ C\nTHE CHECKED ROUTE\n1 · CHOOSE CODES FOR f AND g\n2 · BUILD A SELF-REFERENTIAL CODE\n3 · DECIDE WHETHER ITS BEHAVIOR LIES IN C\n4 · EITHER BRANCH FORCES g ∈ C\nEXACT SCOPE\nMATHLIB PARTIAL-RECURSIVE FUNCTIONS AND PROGRAM CODES\nNOT A CLAIM ABOUT SYNTACTIC PROGRAM PROPERTIES"
    },
    "visual": {
      "alt": "Distinct geometric program-code plaques pass through an evaluation lens into partial-function traces, then a self-reference loop sends all displayed partial-recursive behaviors into one semantic-property region.",
      "byteSize": 2702564,
      "caption": "Once computable semantic membership admits one partial-recursive behavior, the fixed-point route forces every partial-recursive behavior into the same property.",
      "description": "Different program-code plaques feed one evaluation lens and emerge as behavioral traces. A central one-way self-reference loop leads to a single semantic-property region containing the admitted witness and receiving every other displayed partial-recursive behavior.",
      "derivatives": [
        {
          "byteSize": 39940,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/rice-theorem/theorem-schematic-v2-640.webp",
          "sha256": "sha256:f4d37ced37929320492ae993dd8755cf1674b9d6cb514daaf7dbef519d2ae587",
          "width": 640
        },
        {
          "byteSize": 109632,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/rice-theorem/theorem-schematic-v2-1200.webp",
          "sha256": "sha256:fbb795bf21039ec1eaee7b81bd884cc5ee19a7d1df6c5a9875a9fec248e256c4",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-25T17:22:00-04:00",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/rice-theorem/theorem-schematic-v2.png",
      "sha256": "sha256:3b7fa55ee8de3b299ee4b0b3a3e5aa609a0cc82c19de00b1bb3e166a19a9c5b8",
      "title": "Rice's theorem implication schematic",
      "width": 1536
    },
    "walkthrough": null,
    "whyLandmark": "Rice's theorem draws a foundational boundary around algorithmic reasoning about programs: a computable decision procedure cannot separate partial-recursive functions by a nontrivial semantic property. Mathlib's selected endpoint proves this through a self-referential code in its partial-evaluation model."
  },
  "nonClaims": [
    "Proof Atlas did not originate Rice's theorem or Mathlib's declaration.",
    "The formal statement is tied to Mathlib's `Nat.Partrec` and `Nat.Partrec.Code` representation, not every machine model simultaneously.",
    "The hypothesis decides a property of evaluated partial functions from their program codes; the theorem does not classify arbitrary syntactic properties of codes.",
    "The conclusion ranges over partial-recursive f and g, not all arbitrary partial functions.",
    "This endpoint is a one-way implication, not the separate rice₂ empty-or-universal equivalence.",
    "The generated explanation and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.rice-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 computably decidable semantic property containing one partial-recursive function contains every partial-recursive function.",
  "targetId": "target.library.mathlib.rice-theorem.v001",
  "title": "Rice's Theorem",
  "upstreamOrigin": {
    "declarationName": "ComputablePred.rice",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Computability/Halting.lean#L209",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:c2a073a05c631e7fc957577a66025e9ac36dac741f9aa865e0f053b17f0c85de",
    "sourceByteLength": 17535,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Computability/Halting.lean",
    "sourceLine": 209,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
