AFTD Auto-Formalizing Theoretical Domains

three_mul_two_pow_add_one_gt_sq

theoremverified

For every integer r ≥ 3, 3 * (2^r + 1) is strictly greater than (r + 2)^2.

Statement

theorem three_mul_two_pow_add_one_gt_sq (r : ℕ) (hr : 3 ≤ r) :
    (r + 2)^2 < 3 * (2^r + 1)
Source
arXiv:2611.19312, Section 4, equation (1864)
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.

Read back from the Lean

For every natural number $r$, if $3 \le r$, then $(r + 2)^2 < 3 \cdot (2^r + 1)$.

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

The proof proceeds by induction on r ≥ 3 using `Nat.le_induction`. The base case r = 3 holds by direct computation: 25 < 27. For the induction step, the quadratic term (k + 3)^2 is bounded by doubling (k + 2)^2 (specifically, (k + 3)^2 + 3 ≤ 2(k + 2)^2 for k ≥ 3), while the exponential term doubles with each step, allowing the induction hypothesis to propagate.

  1. The theorem reduces to verifying the base case r = 3 and the induction step for k ≥ 3.

    We perform induction on r starting from the lower bound 3 ≤ r using `Nat.le_induction`. This produces two subgoals: the base case r = 3, and the induction step showing the claim for k + 1 given 3 ≤ k and the induction hypothesis for k.

    line 4

    uses Nat.le_induction

      induction' r, hr using Nat.le_induction with k hk ih
  2. The base case holds: (3 + 2)^2 < 3 * (2^3 + 1).

    For r = 3, the left-hand side is (3 + 2)^2 = 25 and the right-hand side is 3 * (2^3 + 1) = 3 * 9 = 27. The inequality 25 < 27 is verified by direct computational evaluation (`decide`).

    line 5

      · decide
  3. For any k ≥ 3, the quadratic expression satisfies (k + 1 + 2)^2 + 3 ≤ 2 * (k + 2)^2.

    Expanding both sides yields k^2 + 6k + 12 on the left and 2k^2 + 8k + 8 on the right, so the inequality is equivalent to k^2 + 2k - 4 ≥ 0. Since k ≥ 3, this holds with margin (3^2 + 2(3) - 4 = 11 ≥ 0); the `nlinarith` tactic verifies this nonlinear inequality using k ≥ 3.

    line 6

      · have h1 : (k + 1 + 2)^2 + 3 ≤ 2 * (k + 2)^2 := by nlinarith
  4. Doubling the right-hand side of the induction hypothesis gives 2 * (3 * (2^k + 1)) = 3 * (2^(k + 1) + 1) + 3.

    We first record that 2 * 2^k = 2^(k + 1) (line 7). Rewriting 2^(k + 1) in terms of 2 * 2^k reduces the identity to 6 * 2^k + 6 = 6 * 2^k + 6, which is verified by polynomial expansion (`ring`).

    lines 7–10

        have h2 : 2 * 2^k = 2^(k + 1) := by ring
        have h3 : 2 * (3 * (2^k + 1)) = 3 * (2^(k + 1) + 1) + 3 := by
          rw [← h2]
          ring
  5. The inductive step holds: ((k + 1) + 2)^2 < 3 * (2^(k + 1) + 1).

    Doubling the induction hypothesis (k + 2)^2 < 3 * (2^k + 1) gives 2 * (k + 2)^2 ≤ 2 * (3 * (2^k + 1)) - 2. Combining this with the quadratic bound (k + 3)^2 + 3 ≤ 2 * (k + 2)^2 and the doubling identity 2 * (3 * (2^k + 1)) = 3 * (2^(k + 1) + 1) + 3 shows (k + 3)^2 + 3 ≤ 3 * (2^(k + 1) + 1) + 1, so (k + 3)^2 < 3 * (2^(k + 1) + 1). Lean's integer arithmetic tactic `omega` finishes the deduction.

    line 11

        omega
Nat.le_induction
Induction principle for natural numbers starting from a base bound m: if P(m) holds, and P(n) implies P(n + 1) for all n ≥ m, then P(n) holds for all n ≥ m.

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

/-- Exponential dominates quadratic bound for triangle Ramsey numbers: 3 * (2^r + 1) > (r + 2)^2. -/theorem three_mul_two_pow_add_one_gt_sq (r : ℕ) (hr : 3 ≤ r) :    (r + 2)^2 < 3 * (2^r + 1) := by  induction' r, hr using Nat.le_induction with k hk ih  · decide  · have h1 : (k + 1 + 2)^2 + 3 ≤ 2 * (k + 2)^2 := by nlinarith    have h2 : 2 * 2^k = 2^(k + 1) := by ring    have h3 : 2 * (3 * (2^k + 1)) = 3 * (2^(k + 1) + 1) + 3 := by      rw [← h2]      ring    omega
See it in the graphDiscuss this resultChallenge it