Plain-language statement
query' costs one query, plus the rest
Exact Lean statement
@[simp] lemma cost_query' {i : I} (m : i ∈ s) {n : ℕ} (y : Vector Bool n) (f0 f1 : Comp s α)
(o : I → Oracle) (j : I) :
(Comp.query' i m n y f0 f1).cost o j =
(if j = i then 1 else 0) +
(o i _ y).exp (fun x ↦ if x then f0.cost o j else f1.cost o j)Formal artifact
Lean source
@[simp] lemma cost_query' {i : I} (m : i ∈ s) {n : ℕ} (y : Vector Bool n) (f0 f1 : Comp s α) (o : I → Oracle) (j : I) : (Comp.query' i m n y f0 f1).cost o j = (if j = i then 1 else 0) + (o i _ y).exp (fun x ↦ if x then f0.cost o j else f1.cost o j) := by simp only [cost, run, exp_bind, Nat.cast_zero] rw [←exp_const_add]; apply exp_congr; intro x _; induction x; repeat simp only [ite_false, ite_true, exp_bind, exp_pure, Pi.add_apply, Nat.cast_add, Nat.cast_ite, Nat.cast_one, Nat.cast_zero, exp_add, exp_const, add_comm]- Project
- debate
- License
- Apache-2.0
- Commit
- de3a6e500ae1
- Source
- Comp/Basic.lean:85-93
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.