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 ∈ Siff there existst : ℕ^βwithp (v, t) = 0.DiophFn: a predicate on a function stating that it is Diophantine in the sense that its graph is Diophantine as a set.
Main statements #
pell_diophstates that solutions to Pell's equation form a Diophantine set.pow_diophstates 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 
PolytoMvPolynomial 
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
 
Equations
- Poly.instFunLike = { coe := Subtype.val, coe_injective' := ⋯ }
 
The constant function with value n : ℤ.
Equations
- Poly.const n = ⟨fun (x : α → ℕ) => n, ⋯⟩
 
Equations
- Poly.instZero = { zero := Poly.const 0 }
 
Equations
- Poly.instOne = { one := Poly.const 1 }
 
Equations
- Poly.instInhabited α = { default := 0 }
 
Equations
- One or more equations did not get rendered due to their size.
 
Equations
- One or more equations did not get rendered due to their size.
 
Equations
- One or more equations did not get rendered due to their size.
 
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
 
Diophantine sets #
Diophantine sets are closed under intersection.
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))
 
Diophantine sets are closed under union.
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))
 
Deleting the first component preserves the Diophantine property.
Equations
- Dioph.«termD∃» = Lean.ParserDescr.node `Dioph.«termD∃» 30 (Lean.ParserDescr.symbol "D∃")
 
Local abbreviation for Fin2.ofNat'
Equations
- Dioph.«term&_» = Lean.ParserDescr.node `Dioph.«term&_» 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "&") (Lean.ParserDescr.cat `term 1023))
 
Projection preserves Diophantine functions.
Equations
- Dioph.«termD&_» = Lean.ParserDescr.node `Dioph.«termD&_» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "D&") (Lean.ParserDescr.cat `term 100))
 
The constant function is Diophantine.
Equations
- Dioph.«termD._» = Lean.ParserDescr.node `Dioph.«termD._» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "D.") (Lean.ParserDescr.cat `term 100))
 
The set of places where two Diophantine functions are equal is Diophantine.
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))
 
Diophantine functions are closed under addition.
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))
 
Diophantine functions are closed under multiplication.
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))
 
The set of places where one Diophantine function is at most another is Diophantine.
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))
 
The set of places where one Diophantine function is less than another is Diophantine.
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))
 
The set of places where two Diophantine functions are unequal is Diophantine.
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))
 
Diophantine functions are closed under subtraction.
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))
 
The set of places where one Diophantine function divides another is Diophantine.
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))
 
Diophantine functions are closed under the modulo operation.
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))
 
The set of places where two Diophantine functions are congruent modulo a third is Diophantine.
Equations
- Dioph.«termD≡» = Lean.ParserDescr.node `Dioph.«termD≡» 1024 (Lean.ParserDescr.symbol " D≡ ")
 
Diophantine functions are closed under integer division.
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))