/* Not so 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 134. Not so Tricky messages Which of the following statements are true? 1. The next statement is false. 2. The next two statements are false. 3. The next statement is false. 4. The first statement was false. (taken from Walicki (2016)) """ Solution: [1,0,1,0] i.e. statement 1 and 3 are 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[2] #<=> (S[3] #= 0 #/\ S[4] #= 0), S[3] #<=> S[4] #= 0, S[4] #<=> S[1] #= 0, solve(S), println(S), fail, nl.