AFTD Auto-Formalizing Theoretical Domains

interval_r_doubling

theoremverifiedformalization

For every positive natural number ℓ ≥ 1, the rational sequence interval_r satisfies interval_r (2 * ℓ) = interval_r ℓ + 1 - (1 : ℚ) / (2 ^ (2 * ℓ - 1) : ℚ).

Statement

theorem interval_r_doubling (ℓ : ℕ) (hℓ : 1 ≤ ℓ) :
    interval_r (2 * ℓ) = interval_r ℓ + 1 - (1 : ℚ) / (2 ^ (2 * ℓ - 1) : ℚ)
Formalizes
arXiv:2611.28727 Section 9, after Conjecture 31
Verified
25 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • interval_rThe sequence R : ℕ → ℚ of rational numbers, defined by R 0 = 0, R 1 = 0, and for l = n + 2, R l = 1 - 1 / (2^(l - 1) : ℚ) + (R (l / 2) + R…

Read back from the Lean

For every natural number $\ell$ such that $1 \le \ell$, $\operatorname{interval\_r}(2\ell) = \operatorname{interval\_r}(\ell) + 1 - \frac{1}{2^{2\ell - 1}}$ (evaluated in the rational numbers $\mathbb{Q}$).

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 evaluates the sequence interval_r at 2 * ℓ by unfolding its defining recurrence, which applies because ℓ ≥ 1 implies 2 * ℓ ≥ 2. Under integer division, both (2 * ℓ) / 2 and (2 * ℓ + 1) / 2 equal ℓ, so the two recursive terms average to interval_r ℓ. Basic ring arithmetic over ℚ then confirms the resulting expression matches interval_r ℓ + 1 - 1 / 2^(2 * ℓ - 1).

  1. The recurrence definition of interval_r unfolds at 2 * ℓ into 1 - 1 / 2^(2 * ℓ - 1) + (interval_r ((2 * ℓ) / 2) + interval_r ((2 * ℓ + 1) / 2)) / 2.

    Since ℓ ≥ 1, 2 * ℓ is at least 2 and can be expressed in the form 2 * (ℓ - 1) + 2. Rewriting 2 * ℓ this way allows Lean to apply the defining recurrence of interval_r for arguments of the form n + 2. The expression 2 * (ℓ - 1) + 2 is then simplified back to 2 * ℓ using linear arithmetic (via omega).

    lines 4–7

    uses interval_r

      have h2 : 2 * ℓ = (2 * (ℓ - 1)) + 2 := by omega
      rw [h2, interval_r]
      have h3 : 2 * (ℓ - 1) + 2 = 2 * ℓ := by omega
      rw [h3]
  2. Both integer division expressions (2 * ℓ) / 2 and (2 * ℓ + 1) / 2 simplify to ℓ.

    In natural number arithmetic, both 2 * ℓ and 2 * ℓ + 1 yield quotient ℓ when divided by 2. Substituting these simplifications reduces both recursive calls in the numerator to interval_r ℓ.

    lines 8–10

      have h4 : (2 * ℓ) / 2 = ℓ := by omega
      have h5 : (2 * ℓ + 1) / 2 = ℓ := by omega
      rw [h4, h5]
  3. The simplified recurrence matches the desired right-hand side.

    The left-hand side is 1 - 1 / 2^(2 * ℓ - 1) + (interval_r ℓ + interval_r ℓ) / 2. Since (interval_r ℓ + interval_r ℓ) / 2 = interval_r ℓ, the terms rearrange to interval_r ℓ + 1 - 1 / 2^(2 * ℓ - 1) by ring operations in ℚ.

    line 11

      ring
interval_r
The recursive definition of interval_r: for any natural number of the form n + 2, interval_r (n + 2) = 1 - 1 / 2^(n + 1) + (interval_r ((n + 2) / 2) + interval_r ((n + 3) / 2)) / 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

/-- Doubling recurrence for the sequence R: R(2ℓ) = R(ℓ) + 1 - 2^(1 - 2ℓ) for ℓ ≥ 1. -/theorem interval_r_doubling (ℓ : ℕ) (hℓ : 1 ≤ ℓ) :    interval_r (2 * ℓ) = interval_r ℓ + 1 - (1 : ℚ) / (2 ^ (2 * ℓ - 1) : ℚ) := by  have h2 : 2 * ℓ = (2 * (ℓ - 1)) + 2 := by omega  rw [h2, interval_r]  have h3 : 2 * (ℓ - 1) + 2 = 2 * ℓ := by omega  rw [h3]  have h4 : (2 * ℓ) / 2 = ℓ := by omega  have h5 : (2 * ℓ + 1) / 2 = ℓ := by omega  rw [h4, h5]  ring
See it in the graphDiscuss this resultChallenge it