For (endgame) training purposes, I would like to write a python program (using python chess) that generates all pairs of corresponding squares in a pawn endgame. Following the definition from Dvoretsky's Endgame Manual, I define corresponding squares as squares of reciprocal zugzwang. This definition, however, does not seem to formalize corresponding squares.
Suppose we have access to a scoring function s that returns, for any position p, a score s(p) from a totally ordered domain S of scores. The maximal score means that White wins, and the minimal score means that Black wins. The simplest scoring domain is the ordered set {-1,0,1}, where -1 is a win for Black, 0 is a draw, and 1 is a win for White.
Given such a scoring function, I now define a reciprocal zugzwang as a position p such that s(p_w) < s(p_b), where p_w and p_b are the positions derived from p wherein White resp. Black is to move. This definition states that White would prefer to Black to move, and vice versa.
However, this definition of reciprocal zugzwang does not yield the usual notion of corresponding squares. For example, consider the Fahrni - Alapin position. If Black is to move, White can win easily. White is to move can secure a win by means of triangulation. Nevertheless, Dvoretsky claims that the kings are placed on corresponding squares.
What would be a sensible formal definition of corresponding squares?