{
  "artifactId": "artifact.library.mathlib.bayes-theorem.v001",
  "candidateOnly": false,
  "category": "Probability",
  "claimBoundary": "This page indexes Mathlib's finite-measure, measurable-set form of Bayes' theorem. For measurable s and t, μ[t | s] equals (μ s)⁻¹ times μ[s | t] times μ t. The selected declaration does not add a nonzero condition on μ s or μ t, require μ to be a probability measure, assert independence or causation, or specialize to a finite or discrete sample space.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem ProbabilityTheory.cond_eq_inv_mul_cond_mul {Ω : Type*} {m : MeasurableSpace Ω} {s t : Set Ω} (hms : MeasurableSet s) (hmt : MeasurableSet t) (μ : Measure Ω) [IsFiniteMeasure μ] : μ[t | s] = (μ s)⁻¹ * μ[s | t] * μ t",
  "family": "Conditional probability",
  "id": "library.mathlib.bayes-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/bayes-theorem/",
    "entryData": "/data/library-theorems/bayes-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.bayes-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.bayes-theorem.v001.evidence.json",
    "source": "/sources/upstream/bayes-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem ProbabilityTheory.cond_eq_inv_mul_cond_mul {Ω : Type*} {m : MeasurableSpace Ω} {s t : Set Ω} (hms : MeasurableSet s) (hmt : MeasurableSet t) (μ : Measure Ω) [IsFiniteMeasure μ] : μ[t | s] = (μ s)⁻¹ * μ[s | t] * μ t",
    "concepts": [
      "conditional probability",
      "finite measures",
      "measurable events",
      "measure restriction",
      "intersection symmetry",
      "Bayes' theorem"
    ],
    "plainLanguage": "For two measurable events under a finite measure, the probability of t conditioned on s can be recovered from the reverse conditional probability, weighted by the measure of t and scaled by the inverse measure of s.",
    "poster": {
      "alt": "An ivory Bayes theorem poster places the exact conditional-measure equation above two overlapping event contours, a shared gold intersection-mass core, reciprocal conditioning views, three checked source movements, and an exact-scope footer.",
      "byteSize": 3010777,
      "caption": "Both conditioning directions pass through the same intersection mass, yielding Mathlib's finite-measure form of Bayes' theorem.",
      "description": "The poster foregrounds μ[t | s] = (μ s)⁻¹ · μ[s | t] · μ t for measurable s and t under a finite measure. Cobalt s and terracotta t contours overlap around one gold measure-mass core; paired measure-weight chambers emphasize the two conditioning directions without identifying measure with geometric area. The lower route converts reverse conditional mass to μ(t ∩ s), commutes the intersection, and unfolds conditioning on s.",
      "derivatives": [
        {
          "byteSize": 139776,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/bayes-theorem/theorem-poster-v1-640.webp",
          "sha256": "sha256:0b4dc99e772fd00c1089614ce0442675e3085a317d79ee3b55d1acb43dfb237d",
          "width": 640
        },
        {
          "byteSize": 333036,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/bayes-theorem/theorem-poster-v1-1024.webp",
          "sha256": "sha256:e559706014cf8d74d0d8f6196034c1bc503c097f30046210763333c6cd14dabc",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-27T10:26:36-04:00",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/bayes-theorem/theorem-poster-v1.png",
      "sha256": "sha256:2755865c9ecf9079764d46609e118bdaca4847ca78d17b7778908bf2d29828a1",
      "title": "Bayes' theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "PROBABILITY · CONDITIONAL MEASURE\nBAYES' THEOREM\ns, t measurable · μ finite\nμ[t | s] = (μ s)⁻¹ · μ[s | t] · μ t\nONE INTERSECTION, TWO CONDITIONING DIRECTIONS\nHOW THE CHECKED ROUTE MOVES\n1 · Convert μ[s | t] · μ t to μ(t ∩ s)\n2 · Commute the intersection to s ∩ t\n3 · Unfold conditioning on s\nEXACT SCOPE\nFinite measure. No independence or causation claim. No nonzero hypothesis on μ s."
    },
    "visual": {
      "alt": "Two large engraved event fields narrow toward one shared gold intersection-mass kernel, while opposing conditioning arcs and cobalt, terracotta, and central measure weights meet in a balanced lower mechanism.",
      "byteSize": 3183067,
      "caption": "Conditioning in either direction isolates the same intersection mass; rescaling by the conditioning event relates the two views.",
      "description": "A dark forest-green engraved field uses asymmetric cobalt and terracotta event chambers with varied measure tokens, a single shared gold intersection kernel, opposing curved viewing arcs, and a lower three-weight balance. Shape, hatch, and token size distinguish the two event masses and their shared core without treating geometric area as the measure.",
      "derivatives": [
        {
          "byteSize": 52920,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/bayes-theorem/theorem-schematic-v1-640.webp",
          "sha256": "sha256:5d912b71ed033f24ac338ecf2f87c131637c4beb30758a2f2e798e59602d246a",
          "width": 640
        },
        {
          "byteSize": 215360,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/bayes-theorem/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:2cc1d75224e48aa06c55155629a8bcc03d67764345795691d97b461bf623f93c",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-27T10:26:36-04:00",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/bayes-theorem/theorem-schematic-v1.png",
      "sha256": "sha256:9133d5f400909f28332314819c5d108d0257883182e120c9f89f22546805b9d7",
      "title": "One intersection, two conditioning directions",
      "width": 1536
    },
    "walkthrough": null,
    "whyLandmark": "Bayes' theorem is one of the central identities of probability. Mathlib's selected declaration is especially instructive because it presents the identity at the level of measurable sets and finite measures: both conditioning directions reduce to the measure of the same intersection."
  },
  "nonClaims": [
    "The selected declaration does not say that s and t are independent or that either event causes the other.",
    "It assumes only IsFiniteMeasure μ; it does not require μ to have total mass one or the sample space to be finite or discrete.",
    "There is no explicit hypothesis μ s ≠ 0 or μ t ≠ 0 in this declaration; the statement uses Mathlib's ENNReal inverse convention.",
    "ProofAtlas is indexing an existing Mathlib theorem, and generated explanations and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.bayes-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": "The two conditional directions are related through the same measurable intersection mass.",
  "targetId": "target.library.mathlib.bayes-theorem.v001",
  "title": "Bayes' Theorem",
  "upstreamOrigin": {
    "declarationName": "ProbabilityTheory.cond_eq_inv_mul_cond_mul",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Probability/ConditionalProbability.lean#L273",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:c3e6b20df733dd6e50267cd5c6b84ad0d0df362e2ea19de6e8efa9b2e18c90f3",
    "sourceByteLength": 13118,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Probability/ConditionalProbability.lean",
    "sourceLine": 273,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
