drf_two_resources_projection_inequality
For all real numbers x, y in [0, 1] with x + y >= 1, max(x, y) <= ((1 + Real.sqrt 3) / 4) * (x^2 + (1 - x)^2 + (1 - y)^2 + y^2).
Statement
theorem drf_two_resources_projection_inequality (x y : ℝ) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) (hy0 : 0 ≤ y) (hy1 : y ≤ 1) (hsum : 1 ≤ x + y) : max x y ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2)- Formalizes
- arXiv:2611.07905 Lemma 14
- Verified
- 08 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
Read back from the Lean
For any real numbers $x$ and $y$, if $0 \le x$, $x \le 1$, $0 \le y$, $y \le 1$, and $1 \le x + y$, then $\max(x, y) \le \frac{1 + \sqrt{3}}{4} (x^2 + (1 - x)^2 + (1 - y)^2 + y^2)$.
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 bound max(x, y), the proof bounds x and y individually by the same quadratic expression. Each bound is proved by completing the square: subtracting x (respectively y) from the expression yields ((1 + √3) / 2) times a sum of two squares, specifically (x - √3 / 2)² + (y - 1 / 2)² (respectively (x - 1 / 2)² + (y - √3 / 2)²). Since a positive multiple of a sum of squares is non-negative, both x and y are bounded by the expression, and taking their maximum completes the proof.
(√3)² = 3
By definition of the real square root, (√3)² = 3 since 0 ≤ 3.
uses
Real.sq_sqrthave hs : (Real.sqrt 3) ^ 2 = 3 := Real.sq_sqrt (by norm_num)
x ≤ ((1 + √3) / 4) * (x² + (1 - x)² + (1 - y)² + y²)
The difference between the right-hand side and x can be rewritten by completing the square as ((1 + √3) / 2) * ((x - √3 / 2)² + (y - 1 / 2)²), verified by expanding the polynomials and using (√3)² = 3. Since squares are non-negative and (1 + √3) / 2 > 0, this difference is non-negative, which implies the upper bound for x.
have hx : x ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) := by have h_id : (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) - x = (1 + Real.sqrt 3) / 2 * ((x - Real.sqrt 3 / 2) ^ 2 + (y - 1 / 2) ^ 2) := by linear_combination (x / 2 - (1 + Real.sqrt 3) / 8) * hs have h_pos : 0 ≤ (1 + Real.sqrt 3) / 2 * ((x - Real.sqrt 3 / 2) ^ 2 + (y - 1 / 2) ^ 2) := by positivity linarith
y ≤ ((1 + √3) / 4) * (x² + (1 - x)² + (1 - y)² + y²)
Symmetrically, the difference between the right-hand side and y rewrites as ((1 + √3) / 2) * ((x - 1 / 2)² + (y - √3 / 2)²). Being a positive multiple of a sum of squares, this difference is non-negative, which yields the upper bound for y.
have hy : y ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) := by have h_id : (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) - y = (1 + Real.sqrt 3) / 2 * ((x - 1 / 2) ^ 2 + (y - Real.sqrt 3 / 2) ^ 2) := by linear_combination (y / 2 - (1 + Real.sqrt 3) / 8) * hs have h_pos : 0 ≤ (1 + Real.sqrt 3) / 2 * ((x - 1 / 2) ^ 2 + (y - Real.sqrt 3 / 2) ^ 2) := by positivity linarith
max(x, y) ≤ ((1 + √3) / 4) * (x² + (1 - x)² + (1 - y)² + y²)
Since both x and y are bounded above by the quadratic expression, their maximum is also bounded above by it.
uses
max_leexact max_le hx hy
Real.sq_sqrt- For any non-negative real number x, the square of its square root is x.
max_le- If a ≤ c and b ≤ c, then max(a, b) ≤ c.
- Although the theorem assumes 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, and 1 ≤ x + y, these hypotheses are never used in the proof; the inequality holds unconditionally for all real numbers x and y.
- The algebraic identities on lines 5–7 and 12–14 are verified automatically by `linear_combination` via polynomial expansion modulo the relation (√3)² = 3.
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.
/-- Geometric inequality bounding congestion by projected resource loads for two resources (Lemma 14). -/theorem drf_two_resources_projection_inequality (x y : ℝ) (hx0 : 0 ≤ x) (hx1 : x ≤ 1) (hy0 : 0 ≤ y) (hy1 : y ≤ 1) (hsum : 1 ≤ x + y) : max x y ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) := by have hs : (Real.sqrt 3) ^ 2 = 3 := Real.sq_sqrt (by norm_num) have hx : x ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) := by have h_id : (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) - x = (1 + Real.sqrt 3) / 2 * ((x - Real.sqrt 3 / 2) ^ 2 + (y - 1 / 2) ^ 2) := by linear_combination (x / 2 - (1 + Real.sqrt 3) / 8) * hs have h_pos : 0 ≤ (1 + Real.sqrt 3) / 2 * ((x - Real.sqrt 3 / 2) ^ 2 + (y - 1 / 2) ^ 2) := by positivity linarith have hy : y ≤ (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) := by have h_id : (1 + Real.sqrt 3) / 4 * (x ^ 2 + (1 - x) ^ 2 + (1 - y) ^ 2 + y ^ 2) - y = (1 + Real.sqrt 3) / 2 * ((x - 1 / 2) ^ 2 + (y - Real.sqrt 3 / 2) ^ 2) := by linear_combination (y / 2 - (1 + Real.sqrt 3) / 8) * hs have h_pos : 0 ≤ (1 + Real.sqrt 3) / 2 * ((x - 1 / 2) ^ 2 + (y - Real.sqrt 3 / 2) ^ 2) := by positivity linarith exact max_le hx hy