Answers.Body: <p>Answer to 1.</p>
  <p>For concise rules, FIDE differs between making a move and completing a move (and notating a move, which has no effects on play whatsoever, except that §8 is coming on you if you neglect it). Thus:</p>
  <ul>
  <li>Yes, &quot;ending&quot; moves end the game immediately, §5.</li>
  <li>While it's not explicitely written down in §5, it suffice to make the move.</li>
  <li>You don't have to complete it (by pressing the clock) nor write it down.</li>
  <li>The 50 move/triple repetition check will only set in <em>after</em> completing the move, thus the ending move has the right of way.</li>
  <li>As a corollary, even a spectator can scream &quot;Mate!&quot; (but this is still frowned upon, even on kids tourneys).</li>
  </ul>
  <p>Answer to 2:</p>
  <p>&quot;Why&quot; questions need a psychic, but FIDE implicitely assumes that at the first illegality a referee interferes (or at least a player protests). If that doesn't happen, what could one do anyway?</p>
  <ul>
  <li>Thus only an illegality that is irrevocable (ends the game on the spot) <em>must</em> be checked.</li>
  <li>Even in that case, if, say, the loser accepts the mate, shakes hands and signs the sheets, the result will normally stand if the player finds a &quot;Wait? The mating move was illegal!!&quot; in the analysis.</li>
  </ul>
  <p>Answer to 3:</p>
  <p>This is explicitly in the rulebook also (§7).</p>
  <ul>
  <li>An illegality found <em>during the game</em> must be corrected. Even if was 100 moves ahead ($7.4). (Think of the referee coming to the board and see two same-colored bishops...)</li>
  <li>And this &quot;during&quot; is the whole reason to the formulation, since mate ends the game, so otherwise you could mate with an illegal move and claim it can't be corrected since the game has ended.</li>
  <li>As a corollary (to deal with your comment), if you steal the queen of your opponent somewhen in the game who doesn't realize it until mated - tough luck. In-game rules are on your side in this case, but expect to not celebrate victory for long. A tournament jury might bring the Catch-Em-All (§12.1) on you and restore the &quot;just&quot; result by §13.4! (I don't know of an actual case, naturally.)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-13T04:13:39.090Z
Answers.Text: Can you upgrade your answer to something more comprehensive, please, and I can award you the coveted green tick of glory. An even stronger corollary in the second paragraph is possible. Even if the prior position was and remains illegal (e.g. Pa1) as long as the mating *move* is legal, nothing can be done about it. But what if the opponent protests?
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-18T09:24:25.673Z
Answers.Text: @Laska: Better?
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-18T10:53:54.193Z
Answers.Text: Oh yes thank you so much - tick awarded
Answers.UserDisplayName: Laska
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-12T09:51:22.637Z
Answers.LastActivityDate: 2023-12-18T09:22:14.810Z
Answers.LastEditDate: 2023-12-18T09:22:14.810Z
Answers.UserDisplayName: Hauke Reddmann
Body: <p>Question for FIDE Arbiters and similar knowledgeable folk...</p>
  <blockquote>
  <p><strong>FIDE Law Article 5.1.1</strong> The game is won by the player who has checkmated his/her opponent’s
  king. This immediately ends the game, provided that the move producing the checkmate position was in accordance with Article 3 and Articles 4.2 – 4.7.</p>
  </blockquote>
  <p>Article 3 covers the moves of the pieces, while Article 4 covers touch-move.</p>
  <p>Exactly the same final sentence is used with 5.2.1 Stalemate and 5.2.2 Dead Position.</p>
  <p>Motivation: I am trying to understand the background for this final sentence, for purposes of fairy chess problems &amp; illegal positions. I think we should be able to evaluate the game state, even if there is no possible history. For example, some problems involve set play, where the player to move is flipped - there is no requirement that a set play position be legal.</p>
  <p>Here's an instance:</p>
  <pre><code>8/8/8/8/8/8/PPrp4/KRk5 w - - 0 1
  </code></pre>
  <p>(If you think this position is more complicated than it needs to be, for absolute watertightness, remember that we need to ensure that there is no possible last move that White may have made, even from an illegal position where White (to move) was already apparently checking Black! (So-called &quot;lèse-majesté&quot; situation.))</p>
  <p>We would say that this is checkmate, but ah no according to FIDE Laws it isn't because there's no legal prior move. So we are stuck in a hole: there are no legal moves, but the game isn't over.</p>
  <p>In practical terms, I will recommend that the Chess Problem Codex <a href="https://www.wfcc.ch/1999-2012/codex/" rel="nofollow noreferrer">https://www.wfcc.ch/1999-2012/codex/</a> should exclude this sentence, wherever it occurs, from application to problems.</p>
  <p>But I still want to understand the rule from an otb (over the board) perspective.</p>
  <p>(1) What does &quot;immediately&quot; mean? Don't have to hit the clock? Don't have to write the move? Counter for 50-move immediately suspended? (So one can't draw &amp; win the game at the same time.)</p>
  <p>(2) Why does only the <strong>last</strong> move have to be legal?</p>
  <p>(3) What happens if there was an earlier uncorrected legality? Does it matter if the <strong>position</strong> is legal or illegal prior to the final move?</p>
  <p>Side remark: for some reason Article 4.1 (&quot;Each move must be played with one hand only.&quot;) is explicitly excluded from the scope. FIDE clearly intend that a player may theatrically make their final move with both hands, as if straining to lift and place a huge weight! This is covered here: <a href="https://chess.stackexchange.com/questions/32711/mate-with-both-hands-result">Mate with both hands: Result?</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-12T07:57:40.617Z
Comments.Text: I think you should write this as two completely separate questions.
Comments.UserDisplayName: James Martin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-12T08:06:26.220Z
Comments.Text: I don't understand the issue with fairy chess and other problems. There are many laws to do with touch move, the clock, procedure after illegal moves, conduct of the players, recording of the moves, etc, which obviously don't apply to chess problems. The law you quote is just one of them. (By the way, it doesn't say that the position isn't checkmate. When talking about whether "the game ends" it means the "game" as an actual competitive event. In a chess problem there is no such competitive event, and no need to define whether or not the "game" can be rewound to deal with some irregularity!)
Comments.UserDisplayName: James Martin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-12T08:42:18.567Z
Comments.Text: @JamesMartin Thanks for your comments. 
  I will make the title more general, but no point starting n correlated SE questions about one marginal sentence in the rules.
  The Codex specifically includes for Problems only FIDE Laws Articles 1-5 + 9.2 & 9.3. However the sentence under question is part of Article 5, so we need to deal with it. One might think that Article 4 is irrelevant for problems, but there are some compositions built around the general idea of Touch-Move, so it's retained.
Comments.UserDisplayName: Laska
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-12-12T09:40:14.700Z
Comments.Text: FIDE rules couldn't care less about positions that can't appear legally in a game, so "undefined" doesn't hurt. We problem chess componists (read: hardboiled trolls :-) of course think otherwise...
Comments.UserDisplayName: Hauke Reddmann
Tags: <fide><problems><checkmate><stalemate><dead-position>
Title: Questions about legality of last move
ThreadText: # Questions about legality of last move
  
  (Asked by: username_0 on 2023-12-12)
  
  Question for FIDE Arbiters and similar knowledgeable folk...
  
  > **FIDE Law Article 5.1.1** The game is won by the player who has checkmated his/her opponent’s
  > king. This immediately ends the game, provided that the move producing the checkmate position was in accordance with Article 3 and Articles 4.2 – 4.7.
  
  Article 3 covers the moves of the pieces, while Article 4 covers touch-move.
  
  Exactly the same final sentence is used with 5.2.1 Stalemate and 5.2.2 Dead Position.
  
  Motivation: I am trying to understand the background for this final sentence, for purposes of fairy chess problems & illegal positions. I think we should be able to evaluate the game state, even if there is no possible history. For example, some problems involve set play, where the player to move is flipped - there is no requirement that a set play position be legal.
  
  Here's an instance:
  
  ```
  8/8/8/8/8/8/PPrp4/KRk5 w - - 0 1
  
  ```
  
  (If you think this position is more complicated than it needs to be, for absolute watertightness, remember that we need to ensure that there is no possible last move that White may have made, even from an illegal position where White (to move) was already apparently checking Black! (So-called "lèse-majesté" situation.))
  
  We would say that this is checkmate, but ah no according to FIDE Laws it isn't because there's no legal prior move. So we are stuck in a hole: there are no legal moves, but the game isn't over.
  
  In practical terms, I will recommend that the Chess Problem Codex <https://www.wfcc.ch/1999-2012/codex/> should exclude this sentence, wherever it occurs, from application to problems.
  
  But I still want to understand the rule from an otb (over the board) perspective.
  
  (1) What does "immediately" mean? Don't have to hit the clock? Don't have to write the move? Counter for 50-move immediately suspended? (So one can't draw & win the game at the same time.)
  
  (2) Why does only the **last** move have to be legal?
  
  (3) What happens if there was an earlier uncorrected legality? Does it matter if the **position** is legal or illegal prior to the final move?
  
  Side remark: for some reason Article 4.1 ("Each move must be played with one hand only.") is explicitly excluded from the scope. FIDE clearly intend that a player may theatrically make their final move with both hands, as if straining to lift and place a huge weight! This is covered here: [Mate with both hands: Result?](https://chess.stackexchange.com/questions/32711/mate-with-both-hands-result)
  
  **Tags:** fide, problems, checkmate, stalemate, dead-position
  
  > **Comments:**
  > **username_1**: I think you should write this as two completely separate questions.  
  > **username_1**: I don't understand the issue with fairy chess and other problems. There are many laws to do with touch move, the clock, procedure after illegal moves, conduct of the players, recording of the moves, etc, which obviously don't apply to chess problems. The law you quote is just one of them. (By the way, it doesn't say that the position isn't checkmate. When talking about whether "the game ends" it means the "game" as an actual competitive event. In a chess problem there is no such competitive event, and no need to define whether or not the "game" can be rewound to deal with some irregularity!)  
  > **username_0**: @username_1 Thanks for your comments.  I will make the title more general, but no point starting n correlated SE questions about one marginal sentence in the rules. The Codex specifically includes for Problems only FIDE Laws Articles 1-5 + 9.2 & 9.3. However the sentence under question is part of Article 5, so we need to deal with it. One might think that Article 4 is irrelevant for problems, but there are some compositions built around the general idea of Touch-Move, so it's retained.  
  > **username_2**: FIDE rules couldn't care less about positions that can't appear legally in a game, so "undefined" doesn't hurt. We problem chess componists (read: hardboiled trolls :-) of course think otherwise...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-12-12. Score: 4 | Accepted answer
  
  Answer to 1.
  
  For concise rules, FIDE differs between making a move and completing a move (and notating a move, which has no effects on play whatsoever, except that §8 is coming on you if you neglect it). Thus:
  
  * Yes, "ending" moves end the game immediately, §5.
  * While it's not explicitely written down in §5, it suffice to make the move.
  * You don't have to complete it (by pressing the clock) nor write it down.
  * The 50 move/triple repetition check will only set in *after* completing the move, thus the ending move has the right of way.
  * As a corollary, even a spectator can scream "Mate!" (but this is still frowned upon, even on kids tourneys).
  
  Answer to 2:
  
  "Why" questions need a psychic, but FIDE implicitely assumes that at the first illegality a referee interferes (or at least a player protests). If that doesn't happen, what could one do anyway?
  
  * Thus only an illegality that is irrevocable (ends the game on the spot) *must* be checked.
  * Even in that case, if, say, the loser accepts the mate, shakes hands and signs the sheets, the result will normally stand if the player finds a "Wait? The mating move was illegal!!" in the analysis.
  
  Answer to 3:
  
  This is explicitly in the rulebook also (§7).
  
  * An illegality found *during the game* must be corrected. Even if was 100 moves ahead ($7.4). (Think of the referee coming to the board and see two same-colored bishops...)
  * And this "during" is the whole reason to the formulation, since mate ends the game, so otherwise you could mate with an illegal move and claim it can't be corrected since the game has ended.
  * As a corollary (to deal with your comment), if you steal the queen of your opponent somewhen in the game who doesn't realize it until mated - tough luck. In-game rules are on your side in this case, but expect to not celebrate victory for long. A tournament jury might bring the Catch-Em-All (§12.1) on you and restore the "just" result by §13.4! (I don't know of an actual case, naturally.)
  
  > **Comments:**
  > **username_0**: Can you upgrade your answer to something more comprehensive, please, and I can award you the coveted green tick of glory. An even stronger corollary in the second paragraph is possible. Even if the prior position was and remains illegal (e.g. Pa1) as long as the mating *move* is legal, nothing can be done about it. But what if the opponent protests?  
  > **username_2**: @username_0: Better?  
  > **username_0**: Oh yes thank you so much - tick awarded  
  
  ---
  
  