Existing in Mathlib · Probability
Bayes' Theorem
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.
- conditional probability
- finite measures
- measurable events
- measure restriction
- intersection symmetry
- Bayes' theorem
Exact theorem
Exact Mathlib statement
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] * μ tThe theorem at a glance
Bayes' theorem at a glance
A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.
Bayes' theorem at a glance

Detailed visual 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.
Statement structure
Statement and scope
Read the exact Mathlib declaration
This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.
One shared event kernel viewed from two directions

Detailed visual description
A warm-ivory diagram contains asymmetric overlapping blue and terracotta chambers filled with differently hatched measure tokens. Their gold overlap has its own token family, two curved paths point into it from opposite sides, and a three-pan balance below compares blue, gold, and terracotta token collections.
Why it matters
A mathematical landmark
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.
ProofAtlas record
What has been checked
Mathlib is the source of the theorem; the local Lean replay and page review are separate.
Claim boundary
No new theorem is claimed
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.
- 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.
Source and local evidence
Where the theorem comes from
- Existing declaration
ProbabilityTheory.cond_eq_inv_mul_cond_mulin mathlib- Relationship
- The checked artifact is the upstream declaration itself
- Local Lean evidence
artifact.library.mathlib.bayes-theorem.v001