# DiophantineSolutionPackage¶

solvedio.spad line 1 [edit on github]

any solution of a homogeneous linear Diophantine equation can be represented as a sum of minimal solutions, which form a “basis” (a minimal solution cannot be represented as a nontrivial sum of solutions) in the case of an inhomogeneous linear Diophantine equation, each solution is the sum of a inhomogeneous solution and any number of homogeneous solutions therefore, it suffices to compute two sets: 1. all minimal inhomogeneous solutions 2. all minimal homogeneous solutions the algorithm implemented is a completion procedure, which enumerates all solutions in a recursive depth-first-search it can be seen as finding monotone paths in a graph for more details see Reference

- dioSolve: Equation Polynomial Integer -> Record(varOrder: List Symbol, inhom: Union(List Vector NonNegativeInteger, failed), hom: List Vector NonNegativeInteger)
`dioSolve(u)`

computes a basis of all minimal solutions for linear homogeneous Diophantine equation`u`

, then all minimal solutions of inhomogeneous equation