Exp eq cexp add cexp
Prob.exp_eq_cexp_add_cexp
Plain-language statement
exp can be decomposed as positive and negative cexps, even if there are zeros
Exact Lean statement
lemma exp_eq_cexp_add_cexp (q : α → Prop) :
f.exp u = f.cexp u q * f.pr q + f.cexp u (λ x ↦ ¬q x) * (1 - f.pr q)Formal artifact
Lean source
lemma exp_eq_cexp_add_cexp (q : α → Prop) : f.exp u = f.cexp u q * f.pr q + f.cexp u (λ x ↦ ¬q x) * (1 - f.pr q) := by by_cases q0 : f.pr q = 0 · simp only [cexp, q0, div_zero, sub_zero, mul_zero, zero_add, pr_neg, div_one, mul_one] simp only [pr_eq_zero] at q0; apply exp_congr; intro x m simp only [q0 x m, not_false_eq_true, ↓reduceIte] by_cases q1 : f.pr q = 1 · simp only [cexp, q1, div_one, mul_one, sub_self, mul_zero, add_zero] simp only [pr_eq_one] at q1; apply exp_congr; intro x m; simp only [q1 x m, if_true, and_true] replace q1 : 1 - f.pr q ≠ 0 := by rw [sub_ne_zero]; exact Ne.symm q1 simp only [cexp, pr_neg, div_mul_cancel₀ _ q0, div_mul_cancel₀ _ q1] simp only [pr, ←exp_add]; apply exp_congr; intro x _ by_cases qx : q x; repeat { simp only [qx, if_true, if_false]; norm_num }- Project
- debate
- License
- Apache-2.0
- Commit
- de3a6e500ae1
- Source
- Prob/Cond.lean:100-112
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.