AFTD Auto-Formalizing Theoretical Domains

magic_square_secant_slope_monotone

theoremverified

For any real numbers $\delta_1, \delta_2$ satisfying $0 < \delta_1 \le \delta_2 \le 1 - \beta_0$, where $\beta_0 = \mathrm{magic\_square\_threshold\_beta0}$ and $g = \mathrm{magic\_square\_guess\_fn}$, the secant slope of the predictability loss $(1 - g(\beta_0 + \delta)) / \delta$ is non-decreasing in $\delta$: $(1 - g(\beta_0 + \delta_1)) / \delta_1 \le (1 - g(\beta_0 + \delta_2)) / \delta_2$.

Statement

theorem magic_square_secant_slope_monotone (δ₁ δ₂ : ℝ)
    (h1 : 0 < δ₁) (h12 : δ₁ ≤ δ₂) (h2 : δ₂ ≤ 1 - magic_square_threshold_beta0) :
    (1 - magic_square_guess_fn (magic_square_threshold_beta0 + δ₁)) / δ₁ ≤
      (1 - magic_square_guess_fn (magic_square_threshold_beta0 + δ₂)) / δ₂
Source
arXiv:2610.12001 Sec. 6
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
Used by 1

Read back from the Lean

For all real numbers $\delta_1$ and $\delta_2$, if $0 < \delta_1$, $\delta_1 \le \delta_2$, and $\delta_2 \le 1 - \beta_0$ (where $\beta_0 = \frac{2 + \sqrt{2/3}}{3}$), then the secant slope of the key-guessing deficiency function from $\beta_0$ is monotonically non-decreasing: $$\frac{1 - \operatorname{magic\_square\_guess\_fn}(\beta_0 + \delta_1)}{\delta_1} \le \frac{1 - \operatorname{magic\_square\_guess\_fn}(\beta_0 + \delta_2)}{\delta_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

The guess function $g$ is concave on $(-\infty, 1]$, which implies that its negation $-g$ is convex on $(-\infty, 1]$. By the monotonicity of secant slopes for convex functions (`secant_mono`), the difference quotient of $-g$ from the base point $\beta_0$ is non-decreasing. Evaluating $g(\beta_0) = 1$ turns this secant slope of $-g$ directly into $(1 - g(\beta_0 + \delta)) / \delta$, proving the claim.

  1. The secant slope of $-g$ based at $\beta_0$ evaluated at $\beta_0 + \delta_1$ is at most that evaluated at $\beta_0 + \delta_2$.

    Since the guess function $g$ is concave on $(-\infty, 1]$ (by `magic_square_guess_fn_concaveOn`), its negation $-g$ is convex on $(-\infty, 1]$. By the monotonicity of secant slopes for convex functions (`secant_mono`), taking the base point $a = \beta_0$ and points $x = \beta_0 + \delta_1$ and $y = \beta_0 + \delta_2$, the difference quotient of $-g$ from $a$ to $x$ is bounded by that from $a$ to $y$. The premises are checked directly: $\beta_0 \le 1$ follows from `magic_square_threshold_beta0_lt_one`; both $\beta_0 + \delta_1$ and $\beta_0 + \delta_2$ lie in $(-\infty, 1]$ since $\delta_1 \le \delta_2 \le 1 - \beta_0$; the points differ from $\beta_0$ because $\delta_1 > 0$ and $\delta_2 > 0$; and $\beta_0 + \delta_1 \le \beta_0 + \delta_2$ since $\delta_1 \le \delta_2$.

    lines 6–13

    uses magic_square_guess_fn_concaveOn, secant_mono, magic_square_threshold_beta0_lt_one

      have h := (magic_square_guess_fn_concaveOn.neg).secant_mono
        (a := magic_square_threshold_beta0)
        (x := magic_square_threshold_beta0 + δ₁)
        (y := magic_square_threshold_beta0 + δ₂)
        (by simp; exact magic_square_threshold_beta0_lt_one.le)
        (by simp; linarith)
        (by simp; linarith)
        (by linarith) (by linarith) (by linarith)
  2. $(1 - g(\beta_0 + \delta_1)) / \delta_1 \le (1 - g(\beta_0 + \delta_2)) / \delta_2$

    Using $g(\beta_0) = 1$ (by `magic_square_guess_fn_at_threshold`), the numerator $(-g)(\beta_0 + \delta) - (-g)(\beta_0) = -g(\beta_0 + \delta) - (-1)$ simplifies to $1 - g(\beta_0 + \delta)$, and the denominator $(\beta_0 + \delta) - \beta_0$ simplifies to $\delta$. Simplifying the inequality from the previous step with these rewrites produces the target inequality.

    line 14

    uses magic_square_guess_fn_at_threshold, sub_eq_add_neg, add_comm

      simpa [magic_square_guess_fn_at_threshold, sub_eq_add_neg, add_comm] using h
add_comm
Addition is commutative: $a + b = b + a$.
magic_square_guess_fn_at_threshold
The guess function evaluated at the threshold $\beta_0$ equals 1: $g(\beta_0) = 1$.
magic_square_guess_fn_concaveOn
The guess function $g$ is concave on the interval $(-\infty, 1]$.
magic_square_threshold_beta0_lt_one
The threshold $\beta_0$ is strictly less than 1.
secant_mono
For a convex function $f$ on a set $s$, if $a, x, y \in s$ with $x \neq a$, $y \neq a$, and $x \le y$, then $(f(x) - f(a)) / (x - a) \le (f(y) - f(a)) / (y - a)$.
sub_eq_add_neg
Subtraction is addition of the negation: $a - b = a + (-b)$.

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

/-- The difference quotient (1 - g(beta_0 + delta)) / delta of predictability loss is non-decreasing in delta on (0, 1 - beta_0]. -/theorem magic_square_secant_slope_monotone (δ₁ δ₂ : ℝ)    (h1 : 0 < δ₁) (h12 : δ₁ ≤ δ₂) (h2 : δ₂ ≤ 1 - magic_square_threshold_beta0) :    (1 - magic_square_guess_fn (magic_square_threshold_beta0 + δ₁)) / δ₁ ≤      (1 - magic_square_guess_fn (magic_square_threshold_beta0 + δ₂)) / δ₂ := by  have h := (magic_square_guess_fn_concaveOn.neg).secant_mono    (a := magic_square_threshold_beta0)    (x := magic_square_threshold_beta0 + δ₁)    (y := magic_square_threshold_beta0 + δ₂)    (by simp; exact magic_square_threshold_beta0_lt_one.le)    (by simp; linarith)    (by simp; linarith)    (by linarith) (by linarith) (by linarith)  simpa [magic_square_guess_fn_at_threshold, sub_eq_add_neg, add_comm] using h
See it in the graphDiscuss this resultChallenge it