AFTD Auto-Formalizing Theoretical Domains

arrival_discount_error_bound_lt_one_eighth

theoremverified

For any natural number M with 1 ≤ M, the quantity M * (M - 1) / (8 * M^2) is strictly less than 1 / 8.

Statement

theorem arrival_discount_error_bound_lt_one_eighth (M : ℕ) (hM : 1 ≤ M) :
    ((M : ℝ) * ((M : ℝ) - 1)) / (8 * (M : ℝ) ^ 2) < 1 / 8
Source
arXiv:2611.33785, Lemma 2.2 proof
Verified
29 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

Read back from the Lean

For any natural number $M$ satisfying $1 \le M$, the real number $\frac{M(M - 1)}{8M^2}$ is strictly less than $\frac{1}{8}$ (with $M$ coerced to $\mathbb{R}$).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

Since M ≥ 1, M is strictly positive, so the denominator 8 * M^2 is positive and clearing it reduces the claim to M * (M - 1) < M^2. This holds immediately because M - 1 < M and multiplying both sides by the positive quantity M preserves the strict inequality.

  1. The inequality reduces to clearing the denominator: M * (M - 1) < (1 / 8) * (8 * M^2).

    From 1 ≤ M, casting to the real numbers yields M > 0. Consequently, the denominator 8 * M^2 is strictly positive (verified by the positivity tactic). Using div_lt_iff₀, we clear this positive denominator from the division, transforming the goal into M * (M - 1) < (1 / 8) * (8 * M^2).

    lines 4–5

    uses div_lt_iff₀

      have hMpos : (0:ℝ) < (M:ℝ) := by exact_mod_cast hM
      rw [div_lt_iff₀ (by positivity : (0:ℝ) < 8 * (M:ℝ)^2)]
  2. M * (M - 1) < (1 / 8) * (8 * M^2), which finishes the proof.

    Linear arithmetic establishes that M - 1 < M. Since M > 0, multiplying both sides by M yields M * (M - 1) < M^2 = (1 / 8) * (8 * M^2). The nonlinear arithmetic tactic nlinarith closes the goal using M - 1 < M, M > 0, and the fact sq_nonneg that squares are non-negative.

    lines 6–7

    uses sq_nonneg

      have h : (M:ℝ) - 1 < (M:ℝ) := by linarith
      nlinarith [h, hMpos, sq_nonneg ((M:ℝ) - 1)]
div_lt_iff₀
For a positive element c > 0 in a linearly ordered field (or group with zero), b / c < a if and only if b < a * c.
sq_nonneg
In an ordered semiring, the square of any element is non-negative: 0 ≤ a^2.

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

/-- M * (M - 1) / (8 * M^2) < 1/8 for any positive integer M. -/theorem arrival_discount_error_bound_lt_one_eighth (M : ℕ) (hM : 1 ≤ M) :    ((M : ℝ) * ((M : ℝ) - 1)) / (8 * (M : ℝ) ^ 2) < 1 / 8 := by  have hMpos : (0:ℝ) < (M:ℝ) := by exact_mod_cast hM  rw [div_lt_iff₀ (by positivity : (0:ℝ) < 8 * (M:ℝ)^2)]  have h : (M:ℝ) - 1 < (M:ℝ) := by linarith  nlinarith [h, hMpos, sq_nonneg ((M:ℝ) - 1)]
See it in the graphDiscuss this resultChallenge it