The laws of chess say
1.5. If the position is such that neither player can possibly checkmate the opponent’s king, the game is drawn (see Article 5.2.2).
5.2.2. The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7.
[Articles 3, 4.2-4.7 basically deal with making legal moves.]
This is interesting because it seems possibly non-obvious whether this condition applies (though presumably rare in actual games!). Update here is an interesting example. The game is legally a draw in this position because neither side can possibly checkmate by any sequence of moves. (The game will be a draw before white can checkmate.)
[fen "1k6/1P5p/BP3p2/1P6/8/8/5PKP/8 b - - 0 41"]
I think this must have been investigated before. I'm wondering:
(1) How computationally difficult is it to determine that no sequence of legal moves ends in checkmate? Is there a better algorithm than brute force?
(2) Do you know of interesting examples of positions where it is hard for a human to tell whether this condition applies?
(3) Are there any examples of historical games where this law was not followed due to players and officials not realizing the condition held? Especially interesting if the game did not end in a draw due to time expiring for one player.
(edit) See also this closely related question where the accepted answer has a couple more examples where there is sufficient material to mate, but it is impossible from that position.