/- Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Catalan's conjecture and related Diophantine equations

References:

namespace Catalan

The only natural number solution to the equation $x^a - y^b = 1$ such that $a, b > 1$ and $x, y > 0$ is given by $a = 2$, $b = 3$, $x = 3$, and $y = 2$.

@[category research solved, AMS 11] theorem declaration uses 'sorry'catalans_conjecture (a b x y : ) (ha : 1 < a) (hb : 1 < b) (hx : 0 < x) (hy : 0 < y) (heq : x ^ a - y ^ b = 1) : a = 2 b = 3 x = 3 y = 2 := a:b:x:y:ha:1 < ahb:1 < bhx:0 < xhy:0 < yheq:x ^ a - y ^ b = 1a = 2 b = 3 x = 3 y = 2 All goals completed! 🐙

For positive integers a, b, and c, there are only finitely many positive solutions (x, y, m, n) to the equation $ax^n - by^m = c$ where $(m, n) \neq (2, 2)$ and $x, y > 1$.

@[category research open, AMS 11] theorem declaration uses 'sorry'pillais_conjecture (a b c : ) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : { (x, y, m, n) : ( × × × ) | 1 < x 1 < y 1 < m 1 < n (m, n) (2, 2) a * x^n - b * y^m = c }.Finite := a:b:c:ha:0 < ahb:0 < bhc:0 < c{(x, y, m, n) | 1 < x 1 < y 1 < m 1 < n (m, n) (2, 2) a * x ^ n - b * y ^ m = c}.Finite All goals completed! 🐙 end Catalan /- ## Lebesgue-Nagell equation -/ namespace LebesgueNagell

Lebesgue-Nagell Equation Conjecture

For any odd prime $p$, the only integer solutions $(x, y)$ to the equation $x^2 - 2 = y^p$ are $(x, y) = (\pm 1, -1)$.

Reference: Ethan Katz and Kyle Pratt, "On the Lebesgue-Nagell equation $x^2 - 2 = y^p$", arXiv:2507.12397

@[category research open, AMS 11] theorem declaration uses 'sorry'lebesgue_nagell (p : ) (hp : p.Prime) (hodd : Odd p) (x y : ) : x ^ 2 - 2 = y ^ p (x = 1 x = -1) y = -1 := p:hp:Nat.Prime phodd:Odd px:y:x ^ 2 - 2 = y ^ p (x = 1 x = -1) y = -1 All goals completed! 🐙

The pair $(1, -1)$ is a solution to $x^2 - 2 = y^p$ for any odd $p$.

@[category test, AMS 11] theorem lebesgue_nagell_solution_pos_one (p : ) (hodd : Odd p) : (1 : ) ^ 2 - 2 = (-1 : ) ^ p := p:hodd:Odd p1 ^ 2 - 2 = (-1) ^ p All goals completed! 🐙

The pair $(-1, -1)$ is a solution to $x^2 - 2 = y^p$ for any odd $p$.

@[category test, AMS 11] theorem lebesgue_nagell_solution_neg_one (p : ) (hodd : Odd p) : (-1 : ) ^ 2 - 2 = (-1 : ) ^ p := p:hodd:Odd p(-1) ^ 2 - 2 = (-1) ^ p All goals completed! 🐙 end LebesgueNagell