Using the computational knowledge in python it is possible to write a code that uses the functions to make a a prolog program to answer the following queries
<h3>Writting the code in python:</h3>
<em>valid([]).</em>
<em>valid([Head|Tail]) :-</em>
<em>fd_all_different(Head),</em>
<em>valid(Tail).</em>
<em />
<em>sudoku(Puzzle, Solution) :-</em>
<em>Solution = Puzzle,</em>
<em>Puzzle = [S11, S12, S13, S14,</em>
<em>S21, S22, S23, S24,</em>
<em>S31, S32, S33, S34,</em>
<em>S41, S42, S43, S44],</em>
<em />
<em>fd_domain(Solution, 1, 4),</em>
<em />
<em>Row1 = [S11, S12, S13, S14],</em>
<em>Row2 = [S21, S22, S23, S24],</em>
<em>Row3 = [S31, S32, S33, S34],</em>
<em>Row4 = [S41, S42, S43, S44],</em>
<em />
<em>Col1 = [S11, S21, S31, S41],</em>
<em>Col2 = [S12, S22, S32, S42],</em>
<em>Col3 = [S13, S23, S33, S43],</em>
<em>Col4 = [S14, S24, S34, S44],</em>
<em />
<em>Square1 = [S11, S12, S21, S22],</em>
<em>Square2 = [S13, S14, S23, S24],</em>
<em>Square3 = [S31, S32, S41, S42],</em>
<em>Square4 = [S33, S34, S43, S44],</em>
<em />
<em>valid([Row1, Row2, Row3, Row4,</em>
<em>Col1, Col2, Col3, Col4,</em>
<em>Square1, Square2, Square3, Square4]).</em>
<em />
<em>| ?- sudoku([_, 4, 3, 2,</em>
<em>3, _, _, _,</em>
<em>4, 1, _, _,</em>
<em>_, _, 4, 1],</em>
<em>Solution).</em>
<em>Solution = [1,4,3,2,3,2,1,4,4,1,2,3,2,3,4,1]</em>
<em>yes</em>
See more about python at brainly.com/question/18502436
#SPJ1