theorem Prob.success_bound
MAIN THEOREM (Appendix G(i), finite form). For every B ≥ 1, N ≥ 1 (written N + 1), every readout F, every vector w (the head's linear functional ell(sigma) = <w, sigma>), and every η, the parity-correlation premise implies Pr[legal winning move | sigma ≠ 0] ≤ 2/(q-1) + (q-1) η, q = 2^B.
Statement as elaborated and printed by Lean 4.26.0
∀ {B N : ℕ},
1 ≤ B →
∀ (F : NimAudit.Prob.Readout) (w : ℕ) {η : ℚ},
NimAudit.Prob.CorrHyp B (N + 1) F η →
NimAudit.Prob.succCount B (N + 1) F w / NimAudit.Prob.nonzeroCount B (N + 1) ≤
2 / (↑(2 ^ B) - 1) + (↑(2 ^ B) - 1) * ηExact source text, lines 834–871
834/-- MAIN THEOREM (Appendix G(i), finite form). For every B ≥ 1, N ≥ 1 (written835 N + 1), every readout F, every vector w (the head's linear functional836 ell(sigma) = <w, sigma>), and every η, the parity-correlation premise implies837 Pr[legal winning move | sigma ≠ 0] ≤ 2/(q-1) + (q-1) η, q = 2^B. -/838theorem success_bound {B N : Nat} (hB : 1 ≤ B) (F : Readout) (w : Nat) {η : Rat}839 (hyp : CorrHyp B (N + 1) F η) :840 succCount B (N + 1) F w / nonzeroCount B (N + 1) ≤841 2 / (((2 ^ B : Nat) : Rat) - 1) + (((2 ^ B : Nat) : Rat) - 1) * η := by842 have hqge : 2 ≤ 2 ^ B := by843 have := Nat.pow_le_pow_right (show 0 < 2 by decide) hB; simpa using this844 have hq2 : (2 : Rat) ≤ ((2 ^ B : Nat) : Rat) := by845 have := Rat.natCast_le_natCast.mpr hqge; simpa using this846 have hjoint := succCount_bound F w hyp847 rw [natCast_pred] at hjoint848 have ht : (0 : Rat) < ((2 ^ B : Nat) : Rat) ^ N := by849 rw [← Rat.natCast_pow]; exact Rat.natCast_pos.mpr (Nat.pow_pos (Nat.two_pow_pos B))850 have hT : T B (N + 1) = ((2 ^ B : Nat) : Rat) * ((2 ^ B : Nat) : Rat) ^ N := by851 unfold T; rw [Rat.pow_succ]; grind852 have hZ : nonzeroCount B (N + 1) =853 (((2 ^ B : Nat) : Rat) - 1) * ((2 ^ B : Nat) : Rat) ^ N := by854 rw [nonzeroCount_eq, hT]; grind855 rw [hT] at hjoint856 rw [hZ]857 generalize succCount B (N + 1) F w = S at *858 generalize ((2 ^ B : Nat) : Rat) ^ N = t at *859 generalize ((2 ^ B : Nat) : Rat) = q at *860 have h1 : (0 : Rat) < q - 1 := by grind861 have hZpos : 0 < (q - 1) * t := Rat.mul_pos h1 ht862 apply le_div_of_mul_le hZpos863 have hqpos : (0 : Rat) < q := by grind864 have hS : S ≤ 2 * t + (q - 1) * ((q - 1) * (η * t)) := by865 apply Rat.le_of_mul_le_mul_left _ hqpos866 grind867 have hq1 : q - 1 ≠ 0 := Rat.ne_of_gt h1868 have eR : (2 / (q - 1) + (q - 1) * η) * ((q - 1) * t) =869 2 * t + (q - 1) * ((q - 1) * (η * t)) := by grind870 rw [eR]871 exact hSProject declarations in the statement: Prob.CorrHyp, Prob.Readout, Prob.nonzeroCount, Prob.succCount
Project declarations used by the proof or definition body
Prob.CorrHyp, Prob.Readout, Prob.T, Prob.le_div_of_mul_le, Prob.natCast_pred, Prob.nonzeroCount, Prob.nonzeroCount_eq, Prob.succCount, Prob.succCount_bound