A formal system for automated reasoning about retrograde chess problems using Coq Marko Maliković Faculty of Arts and Sciences University of Rijeka Omladinska 14, 51000 Rijeka, Croatia marko.malikovic@ffri.hr Abstract. This paper presents a formal system for automated reasoning about retrograde chess problems using Coq – a formal proof management system. The system is divided into two parts. The first part describes the environment that includes the axioms, definitions and hypotheses of chess objects, and also the functions for computing changes in states. The second part is developed for generating possible retrograde chess moves and includes Coq’s tactics combined with the use of tacticals (elements of Ltac - the Coq’s language for combining tactics). All of these tactics are defined as one Ltac function. This approach enables reasoning about retrograde chess problems with respect to reasoning about sequences of retrograde moves. In the aforementioned Ltac function, a number of heuristic solutions are implemented with the aim of solving the problems within a big search space such as retrograde chess analysis. These heuristics, as well as tactics and tacticals, are not the subject of this article. Keywords. retrograde chess analysis, formal system, Coq, automated reasoning 1 Introduction Retrograde chess analysis is a method employed by chess problem solvers to determine which moves were played leading up to a given position. These moves are called the history of the position. Also, using retrograde chess analysis sometimes it is possible to determine if castling is disallowed, whether an en passant capture is possible or if a particular position is legal. Retrograde analysis is essentially a matter of logical reasoning as we can see in the example shown on diagram 1. The solver must deduce what were the last three moves. Diagram 1. What were the last 3 moves? # # # # # # # # # # # # # ä # à # # À # # # # # # É # # # # # # # # è # # Black king is in check but the bishop making the check cannot have made the last checking move. Therefore the white king must have moved off b3 to discover the check. On b3 the white king was in check by both the rook and the bishop which is, at first thought, impossible. But, if white had a pawn on c2 and black had a pawn on b4, then white blocked the bishop’s check by c2c4 and after black’s b4xc3 en passant, white is in double check. Since the black pawn is no longer on the board, white must have captured it in the last move. So, the solution to this problem is 1. c2c4, b4c3ep 2. Kb3c3x and the position before three moves is shown in diagram 1a. We define a retrograde chess move as follows: Definition (retrograde chess move). If in accordance with the laws of chess [4] position P n+1 arises from position P n due to the move p of piece f then the retrograde chess move p’ of move p is the movement of piece f due to the position P n arising from position P n+1 .