/* Tricky messages puzzle in Picat. From Adrian Groza "Modelling Puzzles in First Order Logic" See https://www.researchgate.net/publication/374588335_Measuring_reasoning_capabilities_of_ChatGPT """ Puzzle 133. Tricky messages Which of the following statements are true? 1. The next two statements are false. 2. The last statement is false. 3. The next statement is false. 4. The first statement was false. (puzzle from Walicki (2016)) """ Solution: No statement is true. This program was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import cp. main => go. go => S = new_list(4), S :: 0..1, S[1] #<=> (S[2] #= 0 #/\ S[3] #= 0), S[2] #<=> S[4] #= 0, S[3] #<=> S[4] #= 0, S[4] #<=> S[1] #= 0, solve(S), println(S), fail, nl.