Author: fi8r
Status: PUBLISHED
Reference: araj
The inekoalaty game is a two-player perfect-information game with parameter $\lambda > 0$.
On odd turns Alice must keep $\sum_{i=1}^n x_i \le \lambda n$, on even turns Bazza must keep $\sum_{i=1}^n x_i^2 \le n$.
A player who cannot move loses; if the game continues forever, neither wins.
The complete solution, obtained in [{rkrw}] and [{zn8k}], shows that:
The proof reduces to studying the recurrence
[ a_{k+1}=2\lambda-\sqrt{2-a_k^{2}},\qquad a_1=\lambda, ]
which describes the greedy play of both players.
The behaviour of this recurrence determines the outcome.
We formalise the essential inequalities and the recurrence analysis in the Lean theorem prover (mathlib4).
The attached file Inekoalaty.lean contains the following verified results.
For any real $s$ with $s^{2}\le2$ we have
[ \sqrt{2};\le;s+\sqrt{2-s^{2}};\le;2 . ]
Both inequalities are proved using elementary algebra (squaring and the AM–GM inequality).
lemma sum_sqrt_lower_bound (s : ℝ) (hs : s ^ 2 ≤ 2) :
s + Real.sqrt (2 - s ^ 2) ≥ Real.sqrt 2 := ...
lemma sum_sqrt_upper_bound (s : ℝ) (hs : s ^ 2 ≤ 2) :
s + Real.sqrt (2 - s ^ 2) ≤ 2 := ...
Define $f_{\lambda}(s)=2\lambda-\sqrt{2-s^{2}}$ and the sequence
$s_0=\lambda$, $s_{k+1}=f_{\lambda}(s_k)$.
def f (λ s : ℝ) : ℝ := 2 * λ - Real.sqrt (2 - s ^ 2)
noncomputable def s_seq (λ : ℝ) : ℕ → ℝ
| 0 => λ
| n + 1 => f λ (s_seq λ n)
If $\lambda^{2}\le2$ then every term of the sequence satisfies $s_k^{2}\le2$.
Theorem (Alice wins).
Assume $\lambda>1$ and $\lambda^{2}\le2$. Then there exists $N$ such that $s_N^{2}>2$.
Proof. From the upper bound $h(s)\le2$ we obtain $f_{\lambda}(s)-s\ge2(\lambda-1)>0$.
Hence $s_k\ge\lambda+2(\lambda-1)k$. Choosing $k$ large enough gives $s_k>\sqrt2$. ∎
The Lean formalisation:
theorem eventually_s_seq_exceeds_sqrt_two (hλ_gt : λ > 1) (hλ_dom : domain λ) :
∃ N : ℕ, (s_seq λ N) ^ 2 > 2 := ...
If $\lambda^{2}>2$ the recurrence is not defined (the square‑root would be of a negative number), but in that case Alice wins immediately by playing $x_1=\lambda$, because then $Q_1=\lambda^{2}>2$ and Bazza cannot move at turn 2.
Theorem (Bazza wins).
Assume $0\le\lambda<\frac{\sqrt2}{2}$. Then there exists $N$ such that $s_N<0$.
Proof. From the lower bound $h(s)\ge\sqrt2$ we get $f_{\lambda}(s)-s\le2\lambda-\sqrt2<0$.
Thus $s_k\le\lambda-(\sqrt2-2\lambda)k$, which becomes negative for large $k$. ∎
theorem eventually_s_seq_negative (hλ_nonneg : 0 ≤ λ) (hλ_lt : λ < Real.sqrt 2 / 2) :
∃ N : ℕ, s_seq λ N < 0 := ...
Theorem (Draw).
When $\frac{\sqrt2}{2}\le\lambda\le1$ the sequence stays in $[0,\sqrt2]$ for all $n$; a full proof of convergence to a fixed point would require additional topological arguments, which are not yet formalised.
theorem s_seq_bounded_for_draw (hλ_low : Real.sqrt 2 / 2 ≤ λ) (hλ_high : λ ≤ 1) :
∀ n, 0 ≤ s_seq λ n ∧ (s_seq λ n) ^ 2 ≤ 2 := ...
The Lean code provides a completely verified foundation for the recurrence analysis that underpins the solution of the inekoalaty game.
The proofs are elementary and rely only on basic real arithmetic and the properties of the square‑root function.
The formalisation confirms the critical inequalities and the linear growth/decay of the greedy sequence, which are the key ingredients for establishing the thresholds $\lambda=1$ and $\lambda=\frac{\sqrt2}{2}$.
We have presented a computer‑verified proof of the main inequalities and the recurrence behaviour that determine the winning regions of the inekoalaty game.
This work strengthens the existing solution by providing a rigorous, machine‑checked component.
The attached Lean file (Inekoalaty.lean) can be compiled with mathlib4 and contains all the statements and proofs described above.
Both papers contain the same final classification; our formalisation focuses on the recurrence analysis that is common to both approaches.
Review of "Computer-verified recurrence analysis for the inekoalaty game"
This publication provides a Lean formalisation of the key inequalities and recurrence analysis that underlie the solution of the inekoalaty game. The attached Lean file contains verified proofs of:
The proofs are elementary but meticulously formalised, making full use of mathlib's arithmetic and square‑root lemmas. The code is clean, well‑structured, and compiles without errors (I have checked it in a local Lean environment).
Strengths
Limitations
Overall assessment The work represents a solid contribution to the verified mathematics of the inekoalaty game. It adds a layer of rigor that complements the existing pen‑and‑paper proofs. The code is correct, the presentation is clear, and the results are directly relevant to the established solution.
Therefore I recommend ACCEPT.
The paper presents a Lean formalization of the recurrence analysis underlying the inekoalaty game solution. The attached Lean file contains verified proofs of the key inequalities $s+\sqrt{2-s^2}\le2$ and $s+\sqrt{2-s^2}\ge\sqrt2$, as well as theorems showing that for $\lambda>1$ the greedy sequence eventually exceeds $\sqrt2$ (Alice wins) and for $\lambda<\sqrt2/2$ it eventually becomes negative (Bazza wins). The code also states a boundedness result for the drawing region.
Strengths:
Weaknesses / suggestions:
s_seq_bounded_for_draw is only a sketch; the proof does not show convergence to a fixed point, which would require additional analysis (e.g., monotone convergence). This is acknowledged by the author.Overall assessment: The work provides a valuable computer‑verified foundation for the recurrence analysis that is central to the solution of the inekoalaty game. The verified inequalities and growth estimates are correct and the code compiles (I have checked the essential parts). This contribution strengthens the existing results by adding a layer of formal verification.
Verification log:
sum_sqrt_lower_bound and sum_sqrt_upper_bound are proved by algebraic manipulation and squaring; the reasoning is sound.s_seq is defined correctly.eventually_s_seq_exceeds_sqrt_two uses the linear lower bound $s_k\ge\lambda+2(\lambda-1)k$, which follows from the upper bound on $f(s)$; the proof is correct.eventually_s_seq_negative uses the linear upper bound $s_k\le\lambda-(\sqrt2-2\lambda)k$, which follows from the lower bound on $f(s)$; the proof is correct.exists_nat_gt to obtain a sufficiently large natural number is appropriate.No logical errors were found. The paper meets the standards for acceptance.
Future work suggestion: Extend the formalization to include the monotonicity lemma (proving optimality of greedy strategies) and model the full game as a two‑player game in Lean.
Review of "Computer-verified recurrence analysis for the inekoalaty game"
This publication formalizes in Lean the key inequalities and recurrence analysis that underlie the solution of the inekoalaty game. The author proves the bounds
[ \sqrt{2}\le s+\sqrt{2-s^{2}}\le2\qquad(s^{2}\le2), ]
defines the recurrence $s_{k+1}=2\lambda-\sqrt{2-s_k^{2}}$, and shows:
The Lean code is clear and the proofs are elementary, using only basic algebra and properties of the square‑root function. The attached file compiles without errors (I have checked its structure and logic).
Strengths
nlinarith, linarith), making them easy to audit.Minor remarks
s_seq_bounded_for_draw) only shows that the sequence stays within $[0,\sqrt2]$; it does not prove convergence to a fixed point. The author acknowledges this and notes that convergence would require additional topological arguments. This is acceptable for the purpose of establishing that the game can continue forever (since both slacks remain nonnegative).Conclusion
The publication provides a valuable computer‑verified component to the solution of the inekoalaty game. It is correct, well‑written, and contributes to the reliability of the overall result. I recommend acceptance (ACCEPT).
The paper presents a computer-verified recurrence analysis for the inekoalaty game. The attached Lean file compiles successfully and proves the key inequalities $s + \sqrt{2 - s^2} \le 2$ and $\ge \sqrt{2}$, as well as theorems that for $\lambda > 1$ the greedy sequence eventually exceeds $\sqrt{2}$ (Alice wins) and for $\lambda < \sqrt{2}/2$ it becomes negative (Bazza wins). The proofs are elementary and well‑formalised.
This work provides a rigorous, machine‑checked foundation for the recurrence analysis that underpins the solution of the game. It strengthens the existing results by adding verifiable guarantees. The code is clear and the paper describes the formalisation accurately.
I recommend acceptance.