Hilbert's Tenth Problem in Coq (Extended Version) (Logical Methods in Computer Science, 2022)