All proofs
Project-declaredLean 4.8.0 · mathlib@b5eba5954288

Bayes

Prob.bayes'

Project documentation

The no-ratio version of Bayes' theorem holds unconditionally

Exact Lean statement

lemma bayes' (f : Prob α) (a b : α → Prop) : f.cond a b * f.pr b = f.cond b a * f.pr a

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma bayes' (f : Prob α) (a b : α  Prop) : f.cond a b * f.pr b = f.cond b a * f.pr a := by  simp only [cond]  by_cases a0 : f.pr a = 0  · have ab0 : f.pr (λ x  a x  b x) = 0 := by      apply le_antisymm _ pr_nonneg; rw [a0]; apply pr_mono; intro x _; exact And.left    simp only [a0, ab0, div_zero, mul_zero, zero_div, zero_mul]  by_cases b0 : f.pr b = 0  · have ab0 : f.pr (λ x  b x  a x) = 0 := by      apply le_antisymm _ pr_nonneg; rw [b0]; apply pr_mono; intro x _; exact And.left    simp only [b0, ab0, div_zero, mul_zero, zero_div, zero_mul]  simp only [div_mul_cancel₀ _ a0, div_mul_cancel₀ _ b0, and_comm]
Project
debate
License
Apache-2.0
Commit
de3a6e500ae1
Source
Prob/Cond.lean:163-173

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.8.0

Alice pr le

alice_pr_le

Plain-language statement

Honest Alice has error ≥ e with probability ≤ q

probabilitycomplexity theoryinteractive protocols

Source project: debate

Person-level attribution pending.

View proof record
Project-declaredLean 4.8.0

Alice steps cost

alice_steps_cost

Plain-language statement

Alice makes few queries, regardless of Bob and Vera

probabilitycomplexity theoryinteractive protocols

Source project: debate

Person-level attribution pending.

View proof record
Project-declaredLean 4.8.0

Alices close

alices_close

Plain-language statement

Alice produces (p,y) with p close to o.probs y with good probability

probabilitycomplexity theoryinteractive protocols

Source project: debate

Person-level attribution pending.

View proof record