Diophantine functions and Matiyasevic's theorem #
Hilbert's tenth problem asked whether there exists an algorithm which for a given integer polynomial determines whether this polynomial has integer solutions. It was answered in the negative in 1970, the final step being completed by Matiyasevic who showed that the power function is Diophantine.
Here a function is called Diophantine if its graph is Diophantine as a set. A subset S ⊆ ℕ ^ α
in
turn is called Diophantine if there exists an integer polynomial on α ⊕ β
such that v ∈ S
iff
there exists t : ℕ^β
with p (v, t) = 0
.
Main definitions #
IsPoly
: a predicate stating that a function is a multivariate integer polynomial.Poly
: the type of multivariate integer polynomial functions.Dioph
: a predicate stating that a set is Diophantine, i.e. a setS ⊆ ℕ^α
is Diophantine if there exists a polynomial onα ⊕ β
such thatv ∈ S
iff there existst : ℕ^β
withp (v, t) = 0
.dioph_fn
: a predicate on a function stating that it is Diophantine in the sense that its graph is Diophantine as a set.
Main statements #
pell_dioph
states that solutions to Pell's equation form a Diophantine set.pow_dioph
states that the power function is Diophantine, a version of Matiyasevic's theorem.
References #
- [M. Carneiro, A Lean formalization of Matiyasevic's theorem][carneiro2018matiyasevic]
- [M. Davis, Hilbert's tenth problem is unsolvable][MR317916]
Tags #
Matiyasevic's theorem, Hilbert's tenth problem
TODO #
- Finish the solution of Hilbert's tenth problem.
- Connect
Poly
toMvPolynomial
Multivariate integer polynomials #
Note that this duplicates MvPolynomial
.
A predicate asserting that a function is a multivariate integer polynomial. (We are being a bit lazy here by allowing many representations for multiplication, rather than only allowing monomials and addition, but the definition is equivalent and this is easier to use.)
- proj: ∀ {α : Type u_1} (i : α), IsPoly fun (x : α → ℕ) => ↑(x i)
- const: ∀ {α : Type u_1} (n : ℤ), IsPoly fun (x : α → ℕ) => n
- sub: ∀ {α : Type u_1} {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun (x : α → ℕ) => f x - g x
- mul: ∀ {α : Type u_1} {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun (x : α → ℕ) => f x * g x
Instances For
The constant function with value n : ℤ
.
Equations
- Poly.const n = ⟨fun (x : α → ℕ) => n, ⋯⟩
Instances For
Equations
- Poly.instZero = { zero := Poly.const 0 }
Equations
- Poly.instOne = { one := Poly.const 1 }
Equations
- Poly.instInhabited α = { default := 0 }
Equations
- Poly.instAddCommGroup = AddCommGroup.mk ⋯
Equations
- Poly.instAddGroupWithOne = AddGroupWithOne.mk ⋯ SubNegMonoid.zsmul ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
Equations
- Poly.instCommRing = CommRing.mk ⋯
The sum of squares of a list of polynomials. This is relevant for
Diophantine equations, because it means that a list of equations
can be encoded as a single equation: x = 0 ∧ y = 0 ∧ z = 0
is
equivalent to x^2 + y^2 + z^2 = 0
.
Equations
- Poly.sumsq [] = 0
- Poly.sumsq (p :: ps) = p * p + Poly.sumsq ps
Instances For
Diophantine sets #
A set S ⊆ ℕ^α
is Diophantine if there exists a polynomial on
α ⊕ β
such that v ∈ S
iff there exists t : ℕ^β
with p (v, t) = 0
.
Equations
Instances For
Equations
- Dioph.«term_D∧_» = Lean.ParserDescr.trailingNode `Dioph.«term_D∧_» 35 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D∧ ") (Lean.ParserDescr.cat `term 0))
Instances For
Equations
- Dioph.«term_D∨_» = Lean.ParserDescr.trailingNode `Dioph.«term_D∨_» 35 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D∨ ") (Lean.ParserDescr.cat `term 0))
Instances For
Equations
- Dioph.«termD∃» = Lean.ParserDescr.node `Dioph.«termD∃» 30 (Lean.ParserDescr.symbol "D∃")
Instances For
Equations
- Dioph.«term&_» = Lean.ParserDescr.node `Dioph.«term&_» 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "&") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- Dioph.«termD&_» = Lean.ParserDescr.node `Dioph.«termD&_» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "D&") (Lean.ParserDescr.cat `term 100))
Instances For
Equations
- Dioph.«termD._» = Lean.ParserDescr.node `Dioph.«termD._» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "D.") (Lean.ParserDescr.cat `term 100))
Instances For
Equations
- Dioph.«term_D=_» = Lean.ParserDescr.trailingNode `Dioph.«term_D=_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D= ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Dioph.«term_D+_» = Lean.ParserDescr.trailingNode `Dioph.«term_D+_» 80 80 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D+ ") (Lean.ParserDescr.cat `term 81))
Instances For
Equations
- Dioph.«term_D*_» = Lean.ParserDescr.trailingNode `Dioph.«term_D*_» 90 90 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D* ") (Lean.ParserDescr.cat `term 91))
Instances For
Equations
- Dioph.«term_D≤_» = Lean.ParserDescr.trailingNode `Dioph.«term_D≤_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D≤ ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Dioph.«term_D<_» = Lean.ParserDescr.trailingNode `Dioph.«term_D<_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D< ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Dioph.«term_D≠_» = Lean.ParserDescr.trailingNode `Dioph.«term_D≠_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D≠ ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Dioph.«term_D-_» = Lean.ParserDescr.trailingNode `Dioph.«term_D-_» 80 80 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D- ") (Lean.ParserDescr.cat `term 81))
Instances For
Equations
- Dioph.«term_D∣_» = Lean.ParserDescr.trailingNode `Dioph.«term_D∣_» 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D∣ ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Dioph.«term_D%_» = Lean.ParserDescr.trailingNode `Dioph.«term_D%_» 80 80 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D% ") (Lean.ParserDescr.cat `term 81))
Instances For
Equations
- Dioph.«termD≡» = Lean.ParserDescr.node `Dioph.«termD≡» 1024 (Lean.ParserDescr.symbol " D≡ ")
Instances For
Equations
- Dioph.«term_D/_» = Lean.ParserDescr.trailingNode `Dioph.«term_D/_» 80 80 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " D/ ") (Lean.ParserDescr.cat `term 81))
Instances For
A version of Matiyasevic's theorem