úÎ)6&ò      Safe-InferredThe 2 function takes a list of integers that specifies A the coefficients of linear Diophantine equation and a constant,  and returns the equation'#s minimal, non-negative solutions. ?When solving an inhomogeneous equation, the first element of a D solution is zero if it solves the associated homogeneous equation,  and one otherwise. "Thus to solve 2x + y - z = 2, use    linDiophEq [2,1,-1] 2 = [[0,0,1,1] ,[1,1,0,0] ,[0,1,0,2] ,[1,0,2,0]] @The two minimal solutions to the homogeneous equation are [0,1,1]  and [1,0,2]0, so any linear combinations of these solutions > contributes to a solution. The solution that corresponds to  [1,0,0]9 is x = w + 1, y = v, and z = v + 2w. The solution that  corresponds to [0,2,0]& is x = w, y = v + 2, and z = v + 2w.   Safe-InferredAA substitution maps variables into terms. For the show and read B methods, the substitution is a list of maplets, and the variable D and the term in each element of the list are separated by a colon. @An equation is a pair of terms. For the show and read methods, / the two terms are separated by an equal sign. 5A term in a commutative monoid is represented by the > identity element, or as the sum of factors. A factor is the ? product of a positive integer coefficient and a variable. No B variable occurs twice in a term. For the show and read methods, F zero is the identity element, the plus sign is the monoid operation. ) represents the identity element (zero). <A variable is an alphabetic Unicode character followed by a B sequence of alphabetic or numeric digit Unicode characters. The ? show method for a term works correctly when variables satisfy  the  predicate. 2Return a term that consists of a single variable. AMultiply every coefficient in a term by an non-negative integer. Add two terms. ?Return all variable-coefficient pairs in the term in ascending  variable order. :Convert a list of variable-coefficient pairs into a term. =Construct a substitution from a list of variable-term pairs. <Return all variable-term pairs in ascending variable order. 8Return the result of applying a substitution to a term. Given 0 (t0, t1), return a most general substitution s ; such that s(t0) = s(t1) modulo the equational axioms of a  commutative monoid. #   !"#$%&'()*+      !"#$%&'()*+,      !"#$%&'()*+cmu-1.9$Algebra.CommutativeMonoid.LinDiophEq%Algebra.CommutativeMonoid.Unification linDiophEq SubstitutionEquationTermideisVarvarmuladdassocssubstmapletsapplyunifyVectorvectorbasisnewMinimalResultsbreadthFirstSearchprodunnecessaryBrancheslessEqtermMapletnegmgugenChargenSymgenSymsAvoiding isNumToken isVarTokenscan$fReadSubstitution$fShowSubstitution $fReadMaplet $fShowMaplet$fReadEquation$fShowEquation $fReadTerm $fShowTerm