All proofs
Project-declaredLean 4.8.0 · mathlib@b5eba5954288

Cond bind le first

Prob.cond_bind_le_first

Plain-language statement

Bound an enriched cond by bounding the first half if first half props relate to second half props

Exact Lean statement

lemma cond_bind_le_first {f : Prob α} {g : α → Prob β} (p q : β → Prop) (i j : α → Prop)
    (pi : ∀ x y, f.prob x ≠ 0 → (g x).prob y ≠ 0 → j x → p y → q y → i x)
    (jq : ∀ x y, f.prob x ≠ 0 → (g x).prob y ≠ 0 → j x → q y) :
    (f >>= λ x ↦ Prod.mk x <$> g x).cond (λ y ↦ p y.snd) (λ y ↦ q y.snd ∧ j y.fst) ≤
      f.cond i j

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma cond_bind_le_first {f : Prob α} {g : α  Prob β} (p q : β  Prop) (i j : α  Prop)    (pi :  x y, f.prob x  0  (g x).prob y  0  j x  p y  q y  i x)    (jq :  x y, f.prob x  0  (g x).prob y  0  j x  q y) :    (f >>= λ x  Prod.mk x <$> g x).cond (λ y  p y.snd) (λ y  q y.snd  j y.fst)       f.cond i j := by  simp only [cond]; by_cases fj : f.pr j = 0  · have qj : (f >>= λ x  Prod.mk x <$> g x).pr (λ y  q y.2  j y.1) = 0 := by      refine le_antisymm ?_ pr_nonneg; rw [fj]      apply pr_enrich_le_pr; intro x y _ _ _,jx; exact jx    simp only [fj, qj, div_zero, le_refl]  refine div_le_div pr_nonneg ?_ ((Ne.symm fj).lt_of_le pr_nonneg) ?_  · apply pr_enrich_le_pr; intro x y fx gy py,qy,jx; exact pi x y fx gy jx py qy, jx  · apply pr_le_pr_enrich; intro x y fx gy jx; exact jq x y fx gy jx,jx
Project
debate
License
Apache-2.0
Commit
de3a6e500ae1
Source
Prob/Cond.lean:288-300

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