magic_square_upper_slope_constant_eq
The upper bound slope constant $3 / (4(1 - \beta_0))$ for the magic square predictability loss equals $27(1 + \sqrt{2/3}) / 4$, where $\beta_0 = \mathrm{magic\_square\_threshold\_beta0}$.
Statement
theorem magic_square_upper_slope_constant_eq :
3 / (4 * (1 - magic_square_threshold_beta0)) = 27 * (1 + Real.sqrt (2 / 3)) / 4- Formalizes
- arXiv:2610.12001 Cor. 6.2
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- magic_square_threshold_beta0The magic square threshold score beta_0 is (2 + Real.sqrt(2/3))/3.
- magic_square_threshold_beta0_lt_oneThe magic-square threshold is strictly below one.
Read back from the Lean
The equality of real numbers $3 / (4 \cdot (1 - \beta_0)) = 27 \cdot (1 + \sqrt{2/3}) / 4$ holds, where $\beta_0 = \text{magic\_square\_threshold\_beta0} = (2 + \sqrt{2/3}) / 3$.
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 reduces the equality of fractions to cross-multiplication after showing that the denominator $4(1 - \beta_0)$ is non-zero because $\beta_0 < 1$. Substituting the definition $\beta_0 = (2 + \sqrt{2/3}) / 3$, the equation reduces to a polynomial identity in $s = \sqrt{2/3}$. Expanding the right-hand side gives $36(1 - s^2)$, which simplifies to $12 = 3 \times 4$ using $s^2 = 2/3$.
The denominator $4(1 - \beta_0)$ is non-zero.
Using the fact that $\beta_0 < 1$ from `magic_square_threshold_beta0_lt_one`, we have $1 - \beta_0 > 0$, so $4(1 - \beta_0) \neq 0$ by linear arithmetic.
uses
magic_square_threshold_beta0_lt_onehave h_lt : magic_square_threshold_beta0 < 1 := magic_square_threshold_beta0_lt_one have h_denom : 4 * (1 - magic_square_threshold_beta0) ≠ 0 := by linarith
The equality of fractions reduces to cross-multiplication: $3 \cdot 4 = 27(1 + \sqrt{2/3}) \cdot 4(1 - \beta_0)$.
Since both denominators $4(1 - \beta_0)$ and $4$ are non-zero, `div_eq_div_iff` transforms the equality of fractions into the equivalent cross-multiplied equality.
uses
div_eq_div_iffrw [div_eq_div_iff h_denom (by norm_num)]
$(\sqrt{2/3})^2 = 2/3$.
By `Real.sq_sqrt`, squaring the square root of the non-negative real number $2/3$ yields $2/3$.
uses
Real.sq_sqrthave hs : (Real.sqrt (2 / 3)) ^ 2 = 2 / 3 := Real.sq_sqrt (by norm_num)
The goal is expressed purely in terms of $\sqrt{2/3}$.
Substitute the definition $\beta_0 = (2 + \sqrt{2/3})/3$ into the equation, yielding $3 \cdot 4 = 27(1 + \sqrt{2/3}) \cdot (4(1 - (2 + \sqrt{2/3})/3))$.
have hβ : magic_square_threshold_beta0 = (2 + Real.sqrt (2 / 3)) / 3 := rfl rw [hβ]
The cross-multiplied equality holds.
Replace $\sqrt{2/3}$ by an indeterminate $s$ satisfying $s^2 = 2/3$. The right-hand side expands to $108(1 + s)(1 - s)/3 = 36(1 - s^2)$, which equals $36(1 - 2/3) = 12 = 3 \cdot 4$. The tactic `linear_combination 36 * hs` verifies this algebraic identity.
generalize Real.sqrt (2 / 3) = s at hs ⊢ linear_combination 36 * hs
magic_square_threshold_beta0_lt_one- The threshold constant $\beta_0$ is strictly less than 1.
div_eq_div_iff- For elements of a field or division ring, $a / b = c / d$ if and only if $a d = c b$, provided $b \neq 0$ and $d \neq 0$.
Real.sq_sqrt- For any non-negative real number $x \ge 0$, the square of $\sqrt{x}$ equals $x$.
- The polynomial simplification in the final step is verified automatically by the `linear_combination` tactic using the relation $s^2 = 2/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.
/-- The upper slope bound constant 3 / (4 * (1 - beta_0)) in Corollary 6.2 of arXiv:2610.12001 equals 27 * (1 + sqrt(2/3)) / 4. -/theorem magic_square_upper_slope_constant_eq : 3 / (4 * (1 - magic_square_threshold_beta0)) = 27 * (1 + Real.sqrt (2 / 3)) / 4 := by have h_lt : magic_square_threshold_beta0 < 1 := magic_square_threshold_beta0_lt_one have h_denom : 4 * (1 - magic_square_threshold_beta0) ≠ 0 := by linarith rw [div_eq_div_iff h_denom (by norm_num)] have hs : (Real.sqrt (2 / 3)) ^ 2 = 2 / 3 := Real.sq_sqrt (by norm_num) have hβ : magic_square_threshold_beta0 = (2 + Real.sqrt (2 / 3)) / 3 := rfl rw [hβ] generalize Real.sqrt (2 / 3) = s at hs ⊢ linear_combination 36 * hs