op_2130_independent_failures_at_most_half
For 0 ≤ p ≤ 1 and a natural number N with Np ≥ 1, (1 − p)^N is at most one half.
Statement
theorem op_2130_independent_failures_at_most_half (p : ℝ) (N : ℕ)
(hp0 : 0 ≤ p) (hp1 : p ≤ 1) (hN : 1 ≤ (N : ℝ) * p) :
(1 - p)^N ≤ (1 / 2 : ℝ)- Source
- Independent-block counterexample to op_2130_path_greedy_fixed_time_tail
- Verified
- 22 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The proof upper bounds (1 - p)^N by exp(-N * p) using the inequality 1 - p ≤ exp(-p). Since N * p ≥ 1, the exponent satisfies -N * p ≤ -1, which bounds exp(-N * p) by exp(-1). Finally, since exp(1) ≥ 1 + 1 = 2, taking reciprocals gives exp(-1) ≤ 1/2, establishing the bound by transitivity.
1 - p ≤ exp(-p)
The inequality 1 + x ≤ exp(x) evaluated at x = -p gives 1 - p ≤ exp(-p).
uses
Real.add_one_le_exphave hround : 1 - p ≤ Real.exp (-p) := by have h := Real.add_one_le_exp (-p) linarith
(1 - p)^N ≤ exp(-N * p)
Since p ≤ 1, the base 1 - p is non-negative. Raising both sides of 1 - p ≤ exp(-p) to the N-th power preserves the inequality, giving (1 - p)^N ≤ (exp(-p))^N, which simplifies to exp(-N * p).
uses
pow_le_pow_left₀,sub_nonneg.mpr,Real.exp_nat_mulhave hpow : (1 - p)^N ≤ (Real.exp (-p))^N := pow_le_pow_left₀ (sub_nonneg.mpr hp1) hround N rw [← Real.exp_nat_mul] at hpow
exp(-N * p) ≤ exp(-1)
From the assumption 1 ≤ N * p, multiplying by -1 gives -N * p ≤ -1. Because the real exponential function is non-decreasing, this implies exp(-N * p) ≤ exp(-1).
uses
Real.exp_le_exp.mprhave hexp : Real.exp ((N : ℝ) * (-p)) ≤ Real.exp (-1) := by apply Real.exp_le_exp.mpr nlinarith
2 ≤ exp(1)
Evaluating x + 1 ≤ exp(x) at x = 1 gives 1 + 1 ≤ exp(1), that is, 2 ≤ exp(1).
uses
Real.add_one_le_exphave hone : (2 : ℝ) ≤ Real.exp 1 := by have h := Real.add_one_le_exp (1 : ℝ) linarith
exp(-1) ≤ 1 / 2
Since exp(-1) = 1 / exp(1) and 0 < 2 ≤ exp(1), taking reciprocals reverses the inequality, yielding exp(-1) ≤ 1 / 2.
uses
Real.exp_neg,one_div,one_div_le_one_div_of_lehave hhalf : Real.exp (-1) ≤ (1 / 2 : ℝ) := by rw [Real.exp_neg] simpa only [one_div] using (one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 2) hone)
(1 - p)^N ≤ 1 / 2
Chaining the inequalities (1 - p)^N ≤ exp(-N * p) ≤ exp(-1) ≤ 1 / 2 by transitivity yields the theorem.
uses
le_transexact le_trans hpow (le_trans hexp hhalf)
Real.add_one_le_exp- For any real number x, x + 1 ≤ exp(x).
Real.exp_le_exp.mpr- The exponential function preserves non-strict inequality: if x ≤ y, then exp(x) ≤ exp(y).
Real.exp_nat_mul- For any real number x and natural number n, exp(n * x) = (exp x)^n.
Real.exp_neg- For any real number x, exp(-x) = (exp x)⁻¹.
le_trans- Inequality is transitive: if a ≤ b and b ≤ c, then a ≤ c.
one_div- For any element a in a division monoid, 1 / a = a⁻¹.
one_div_le_one_div_of_le- Taking reciprocals reverses order: if 0 < a ≤ b, then 1 / b ≤ 1 / a.
pow_le_pow_left₀- For non-negative elements in a preordered semiring, if 0 ≤ a ≤ b, then a^n ≤ b^n for all natural numbers n.
sub_nonneg.mpr- If b ≤ a, then 0 ≤ a - b.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem op_2130_independent_failures_at_most_half (p : ℝ) (N : ℕ) (hp0 : 0 ≤ p) (hp1 : p ≤ 1) (hN : 1 ≤ (N : ℝ) * p) : (1 - p)^N ≤ (1 / 2 : ℝ) := by have hround : 1 - p ≤ Real.exp (-p) := by have h := Real.add_one_le_exp (-p) linarith have hpow : (1 - p)^N ≤ (Real.exp (-p))^N := pow_le_pow_left₀ (sub_nonneg.mpr hp1) hround N rw [← Real.exp_nat_mul] at hpow have hexp : Real.exp ((N : ℝ) * (-p)) ≤ Real.exp (-1) := by apply Real.exp_le_exp.mpr nlinarith have hone : (2 : ℝ) ≤ Real.exp 1 := by have h := Real.add_one_le_exp (1 : ℝ) linarith have hhalf : Real.exp (-1) ≤ (1 / 2 : ℝ) := by rw [Real.exp_neg] simpa only [one_div] using (one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 2) hone) exact le_trans hpow (le_trans hexp hhalf)