Cexp eq cexp add cexp
Prob.cexp_eq_cexp_add_cexp
Plain-language statement
cexp can be decomposed as positive and negative cexps, even if there are zeros
Exact Lean statement
lemma cexp_eq_cexp_add_cexp (r : α → Prop) :
f.cexp u q = f.cexp u (λ x ↦ q x ∧ r x) * f.cond r q +
f.cexp u (λ x ↦ q x ∧ ¬r x) * (1 - f.cond r q)Formal artifact
Lean source
lemma cexp_eq_cexp_add_cexp (r : α → Prop) : f.cexp u q = f.cexp u (λ x ↦ q x ∧ r x) * f.cond r q + f.cexp u (λ x ↦ q x ∧ ¬r x) * (1 - f.cond r q) := by by_cases q0 : f.pr q = 0 · simp only [cexp_on_zero q0, cond_on_zero q0, mul_zero, zero_add, sub_zero, mul_one] simp only [pr_eq_zero] at q0; rw [cexp, pr_eq_zero.mpr _, div_zero] intro x m; simp only [q0 x m, false_and, not_false_eq_true] rw [cexp, exp_eq_cexp_add_cexp r, add_div, mul_div_right_comm, mul_div_right_comm] apply congr_arg₂ · simp only [cexp_if, mul_div_right_comm, mul_assoc, bayes' f q r] rw [mul_comm _ (f.pr q), ←mul_assoc, div_mul_cancel₀ _ q0] · simp only [cexp_if, mul_div_right_comm, mul_assoc, ←pr_neg, bayes' f q (λ x ↦ ¬r x)] rw [mul_comm _ (f.pr q), ←mul_assoc, ←cond_neg q0, div_mul_cancel₀ _ q0]- Project
- debate
- License
- Apache-2.0
- Commit
- de3a6e500ae1
- Source
- Prob/Cond.lean:225-237
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
Alice pr le
alice_pr_le
Plain-language statement
Honest Alice has error ≥ e with probability ≤ q
Source project: debate
Person-level attribution pending.
Alice steps cost
alice_steps_cost
Plain-language statement
Alice makes few queries, regardless of Bob and Vera
Source project: debate
Person-level attribution pending.
Alices close
alices_close
Plain-language statement
Alice produces (p,y) with p close to o.probs y with good probability
Source project: debate
Person-level attribution pending.