AFTD Auto-Formalizing Theoretical Domains

op826_envelope_perfect_square

theoremverified

For any positive integer k, when the value ratio is a perfect square R = k^2, the conjectured envelope min (1 / floor(sqrt(k^2))) (ceil(sqrt(k^2)) / k^2) equals 1 / k.

Statement

theorem op826_envelope_perfect_square (k : ℕ) (hk : 1 ≤ k) :
    min (1 / (⌊Real.sqrt ((k : ℝ) ^ 2)⌋ : ℝ)) ((⌈Real.sqrt ((k : ℝ) ^ 2)⌉ : ℝ) / ((k : ℝ) ^ 2)) = 1 / (k : ℝ)
Source
arXiv:2610.34625
Verified
03 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

Read back from the Lean

For every natural number $k$ satisfying $1 \le k$, the minimum of $1 / \lfloor \sqrt{k^2} \rfloor$ and $\lceil \sqrt{k^2} \rceil / k^2$ (with $k$ coerced to the real numbers, and the floor and ceiling values coerced back to the real numbers) is equal to $1 / k$.

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

To evaluate the discrete envelope at a perfect square R = k², the proof first simplifies √(k²) to k using the positivity of k. Since k is an integer, both its floor and ceiling equal k, reducing the expression to min(1 / k, k / k²). Finally, algebraic cancellation shows k / k² = 1 / k, and idempotence of the minimum yields 1 / k.

  1. k is strictly positive as a real number (0 < k).

    From the assumption 1 ≤ k on natural numbers, it follows that 0 < k in ℕ. Coercing this strict inequality to ℝ establishes 0 < k in ℝ.

    lines 4–6

      have hkpos : (0:ℝ) < k := by
        have : (0:ℕ) < k := hk
        exact_mod_cast this
  2. √(k²) = k as real numbers.

    Since 0 < k, we have 0 ≤ k by le_of_lt. Applying Real.sqrt_sq gives √(k²) = k.

    line 7

    uses Real.sqrt_sq, le_of_lt

      have hsqrt : Real.sqrt ((k : ℝ) ^ 2) = (k:ℝ) := Real.sqrt_sq (le_of_lt hkpos)
  3. The expression simplifies to min (1 / k) (k / k²) = 1 / k.

    Substituting √(k²) = k, the floor ⌊k⌋ and ceiling ⌈k⌉ of the integer k simplify to k using Int.floor_natCast and Int.ceil_natCast. Pushing the casts through leaves min (1 / k) (k / k²) = 1 / k.

    lines 8–9

    uses Int.floor_natCast, Int.ceil_natCast

      rw [hsqrt, Int.floor_natCast, Int.ceil_natCast]
      push_cast
  4. k / k² = 1 / k as real numbers.

    Since k > 0 (and thus k ≠ 0), field_simp cancels k from the numerator and denominator to reduce k / k² to 1 / k.

    lines 10–11

      have hdiv : (k:ℝ) / ((k:ℝ) ^ 2) = 1 / (k:ℝ) := by
        field_simp
  5. The envelope evaluates to 1 / k.

    Replacing k / k² with 1 / k yields min (1 / k) (1 / k), which equals 1 / k by min_self.

    line 12

    uses min_self

      rw [hdiv, min_self]
Real.sqrt_sq
The square root of the square of a non-negative real number x is x: √(x²) = x.
le_of_lt
A strict inequality a < b in a preorder implies the non-strict inequality a ≤ b.
Int.floor_natCast
The floor of a natural number coerced to an ordered ring equals the number itself: ⌊n⌋ = n.
Int.ceil_natCast
The ceiling of a natural number coerced to an ordered ring equals the number itself: ⌈n⌉ = n.
min_self
The minimum of any element with itself equals the element: min(a, a) = a.

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

/-- Evaluation of the discrete EFX envelope at perfect squares R = k^2 yields 1 / k. -/theorem op826_envelope_perfect_square (k : ℕ) (hk : 1 ≤ k) :    min (1 / (⌊Real.sqrt ((k : ℝ) ^ 2)⌋ : ℝ)) ((⌈Real.sqrt ((k : ℝ) ^ 2)⌉ : ℝ) / ((k : ℝ) ^ 2)) = 1 / (k : ℝ) := by  have hkpos : (0:ℝ) < k := by    have : (0:ℕ) < k := hk    exact_mod_cast this  have hsqrt : Real.sqrt ((k : ℝ) ^ 2) = (k:ℝ) := Real.sqrt_sq (le_of_lt hkpos)  rw [hsqrt, Int.floor_natCast, Int.ceil_natCast]  push_cast  have hdiv : (k:ℝ) / ((k:ℝ) ^ 2) = 1 / (k:ℝ) := by    field_simp  rw [hdiv, min_self]
See it in the graphDiscuss this resultChallenge it