# Castling and En-passant capture in the Codex 2009

Glossary

by Werner Keym, Meisenheim

June 2010 and June 2011

Notes by the editor:

• This is an update of the original
article published in February 2010. For your convenience, you can find a
version of this article with
change marks here.

• Appendix added in June 2011

A substantial modification of article 16 of the „Codex for Chess Composition“
was resolved at the PCCC meeting on 4th September at Jurmala (see ‘Jurmala
codex of 2008’), and a smaller modification on 16th October 2009 in
Rio de Janeiro (see ‘Rio de Janeiro codex of 2009’). The new version
runs as follows:

* *

**Article 16 – Castling and En-passant capture**

*(1) Castling convention. Castling is permitted unless it can be
proved that it is not permissible.*

*(2) En-passant convention. An en-passant capture on the first move
is permitted only if it can be proved that the last move was the double
step of the pawn which is to be captured.*

*(3) Partial Retrograde Analysis (PRA) convention. Where the rights
to castle and/or to capture en-passant are mutually dependent, the solution
consists of several mutually exclusive parts. All possible combinations
of move rights, taking into account the castling convention and the
en-passant convention, form these mutually exclusive parts. If
in the case of mutual dependency of castling rights a solution is not
possible according to the PRA convention, then the Retro-Strategy (RS)
convention should be applied: whichever castling is executed first is
deemed to be permissible.*

*(4) Other conventions should be expressly stipulated, for example
if in the course of the solution an en-passant capture has to be legalised
by subsequent castling (a posteriori (AP) convention).*

Article 16 contains four conventions without a supplementary
stipulation (castling convention, En-passant convention, Partial
Retrograde Analysis convention, Retro-Strategy convention) and one
example with a recommended supplementary stipulation (a posteriori
convention). The following problems nos. 1–13 are PRA or RS problems, no.
14 is an AP problem. – The problems nos. 15 and 16 need a special
convention.

### Partial Retrograde Analysis (PRA) Convention and Retro-Strategy (RS)
Convention

The text of the PRA and RS conventions is not simple, but their
application mostly straightforward. That shall be shown in 13 instructive
problems of different types. Nos. 1–8 deal with castling, no. 9 with e.p.
captures, nos. 10–13 with the two special moves.

The castling convention (16.1) and the e.p. convention (16.2) have
been well known for a long time and are clear. So the question arises
whether and for what purpose the PRA and RS conventions are needed at
all. Let us look at **no. 1**. According to 16.1 long castling is
permitted, as the Rh8 can have moved last; according to 16.1 short castling
is permitted, as the Ra8 can have moved last. However, a proof game
from the initial position to the diagram position in which neither the
Ke8 nor the Ra8 nor the Rh8 has moved is impossible. So Black does not
have the right to castle both long *and* short, but either long
*or* short. Therefore no.1 consists of two partial problems: 1)
0-0-0 is permitted, then the solution is 1.Qd4! Rg8 2.Qd7+ Kf8 3.Qxe7#;
2) 0-0 is permitted, then the solution is 1.Qg5! Kd8 2.Qd5+ K~ 3.Qxa8#.

But the question remains: what if the Ke8 moved last? Are there three
solutions (1.Qd4 and 1.Qg5 and 1.Qc5) in this case? No, since the assumption that
the two castlings are not permitted does not correspond with the PRA
convention which demands expressly “to take into account” the
castling convention, i.e. to exclude no (castling) right for no reason.
In other words: one can prove that the two castlings exclude each other,
but not that both of them are not permitted. So only the two above-mentioned
partial problems (with the solution either 1.Qd4 or 1.Qg5) remain. Therefore
no.1 does not have two (independent) solutions, but **one solution**
that consists of **two parts** which – and this is decisive – exclude
each other. That’s why no.1 is a two-part PRA problem.

Traditional problems with two solutions need the supplementary stipulation
“2 solutions”. In PRA problems, however, the number of partial problems
is deducible from retroanalysis, that means that the solver himself
finds out the number of logical multiple possibilities. This is a fascinating
speciality of chess composition and an enrichment compared with the
chess game in which only one of these possibilities is realized.

But one may object that the clear castling and e.p. conventions are
cancelled by the PRA convention. No, they are intelligently completed
under strictly defined circumstances. Here is an example in comparison:
When from four different directions four motorists come to a crossing
without road signs, the right “right side before left side” (in GB in
reverse order) is not cancelled for anybody, but completed by a convention
that regulates the rival rights. It is analogous in the case of the
mutually exclusive special move rights and the PRA convention.

In short, the **Partial Retrograde Analysis convention** means:
**If several legal special move rights are mutually dependent, ***each*
of these rights should once be acknowledged; this also applies to the
remaining rights. The quality of this convention can particularly
be seen in complex cases, i.e. in three- and four-part problems (no.
13 and 12).

In **no. 2** either 0-0-0 or 0-0 is permitted. The white Pawns
captured 14 times, among others a promoted piece from h1 or a1, which
eliminates one castling. If 0-0-0 is permitted, then the solution is
not 1.Qe5+? because of Kf3! and White cannot mate since 0-0 is not allowed,
but 1.Qc5+! Kd3/Kf3 2.0-0-0/Qf2#. If 0-0 is permitted, then not 1.Qe5+?
because of Kd3! and White cannot mate since 0-0-0 is not allowed, but
1.Qg5+! Kf3/Kd3 2.0-0/Qd2#. PRA in try and solution!

This well-known mechanism of the “promotion of an edge Pawn” clearly
shows that the PRA convention deals with *special move rights*,
not with the *last move*. So in nos. 2, 5, 7 and 8 the question
who has moved last does not play a part. For good reason the codex contains
no “convention of the last move”, since the famous last move in a position
is certainly a possible aid to find out move rights, but certainly not
the only one: many move rights are not defined by the last move, but
by other criteria (e. g. capture balance, lack of tempo).

In **no. 3** the castlings exclude each other. If 0-0 is permitted
(1. partial problem) the solution is 1.Kc2 Ra2+ 2.Kc1 0-0#. However,
there is no mate in 2 moves, if 0-0-0 is permitted (2. partial problem).
Therefore a solution is not possible according to the PRA convention.
In such a case the **Retro Strategy convention** (16.3) should be
applied: “whichever castling is executed first is deemed to be permissible.”
Here it is 0-0. So no. 3 is a RS problem with the sole solution 1.Kc2.
It is a good thing that the RS convention also applies to the case of
the set play: 1.- 0-0-0+ 2.Ke2 Rd2#.

In **no.** **4a)** the solution is either 1.Kd7! 0-0-0+ 2.Kc8
Rhe1 3.Rc7 Rxe8#, if 0-0-0 is permitted, or 1.Kf5! 0-0+ 2.Kg4 Rae1 3.Rh5
Re4#, if 0-0 is permitted. A typical PRA problem with one solution which
consists of two parts. However, **no. 4b)** has the solutions 1.Kf5!
0-0+ 2.Kg4 Rae1 3.Rh5 Re4# and 1.Kf7! 0-0+ 2.Kg8 Rae1 3.Rag7 Rxe8#,
if 0-0 is permitted. But there is no mate in 3 moves, if 0-0-0 is permitted.
So no. 4b) is a RS problem with two solutions. A witty twin with PRA
and RS!

In **no. 5** the b/w castlings exclude each other. Either the Rf3
is a promoted piece and 0-0-0 is not permitted (then the solutions are
1.Rhf1 and 0-0) or it comes from a1 and 0-0 is not permitted (then there
is no mate in 2 moves). So no. 5 is not a PRA problem, but a RS problem:
1.0-0! (White castles first and thereby prevents 0-0-0) ~ 2.Rf8#. A
famous RS example is *Problem Database* P0001700.

In **no. 6** the b/w castlings exclude each other. If 0-0-0 is
permitted, the solution is 1.Rxh2! 0-0-0 2.Rxe2 Rh1 3.Re7 Rh8#. If 0-0
is permitted, then 1.0-0! Pa4 2.Kh8 Ra3 3.Rg8 Rh3#. The classic PRA
helpmate.

In **no. 7** the existing Pawns could never capture. At some time
a King or a Rook captured an adversary piece. The last moves were e.
g. wPa2-a3 bRc8xQa8 (b0-0-0 not permitted) Qe4xBa8 etc. or wKf1xSe1
(w0-0-0 not permitted) Sf3xSe1 etc. Therefore the castlings exclude
each other. The solution according to the RS convention is 1.Rd8! 0-0-0
2.Rd7 Rf1 3.Kd8 Rf8#. A try is 1.0-0-0? [2.Rd7 3.Kd8], but now w0-0-0
is not permitted and a mate in 3 moves not possible. Black can castle
first, but he lets White go first in a co-operative and intelligent
manner.

In the examples nos. 3–7 one can see typical common features of PRA and
RS: identical retrograde analysis and partially identical solution. If
two castlings exclude each other, the PRA problem has a (partial)
solution for each of the two cases (both partial solutions together form
the complete solution), the RS problem, however, has a complete solution
for one of the two cases.

In **no. 8** each of the four castlings is permitted, but the following
castlings are mutually exclusive: 1) white, 2) black, 3) long, 4) short.
The retroanalysis is not easy: wSxBf8, bPd3xXc2 and Pc2-c1B (=Ba7),
the promoted pieces Rb7 and Ra5 either came from a8 and h1 (then only
w0-0-0 and b0-0 are permitted) or from h8 and a1 (then only w0-0 and
b0-0-0 are permitted). In the first case the solution is 1.Rf1! Kd8
2.Qxc6 Kc8 3.Qxc7#, in the second 1.Rd1! Kf8/Rxh6 2.Qg6/Qg6+ Kg8/Rxg6
3.Qxg7/Rh8#. So no. 8 (with four castling rights) is “only” a two-part
problem. Tries are 1.0-0? 0-0-0! and 1.0-0-0? 0-0!. A double PRA paradox:
if White can castle long, he is only successful when he gives up precisely
this right. It is the same in the case of short castling.

The castling problems nos. 1–8, especially no. 4, are examples for
the equal rights of PRA and RS problems. The regulation of 16.3 to apply
the PRA convention first and the RS convention only in case of a negative
result is an aid for some solvers to identify PRA and RS problems (without
any supplementary stipulation) as such. This regulation is a logical
order, not a ranking order.

**No. 9** deals with the en-passant capture. According to 16.2
the e.p. capture Pc5xd6 is not permitted, as the bPf can have moved
last (namely Pf7-f5); according to 16.2 the e.p. capture Pg5xf6 is not
permitted, as the bPd can have moved last (namely Pd7-d5). Therefore
in the first case the solution is 1.Pg5xf6 e.p.! Pd4 2.Pf7#, in the
second 1.Pc5xd6 e.p.! Pf4 2.Pd7#. The case that the two e.p. captures
are permitted and the case that both of them are not permitted are not
legal, i.e. they cannot occur in a proof game from the initial position
to the diagram position. – If you added a bPa3 in no. 1 and 9, they
would no longer be PRA problems nor solvable since in no. 1 the two
castlings would be allowed and in no. 9 the two e.p. captures would
not be allowed, as the Pa3 could have moved last.

Comparing no. 1 with 9 one can see the essential difference between
the move rights of the two special moves. The right to castle is positively
defined, since in general castling is permitted; its opposite right
is negative. However, the right to the e.p. capture is negatively defined,
since in general the e.p. capture is not permitted; its opposite right
is positive.

In **no. 10** castling and e.p. capture are mutually dependent.
If 0-0 is permitted, then the last move was Pg7-g5 and the e.p. capture
is permitted, too; in that case the solution is 1.Ph5xg6 e.p.! 0-0 2.Ph7#.
If Ph5xg6 e.p. is not permitted, then Ke8 or Rh8 must have moved; in
this case the solution is 1.Ke6! ~ 2.Rd8#. A very economical PRA problem.

In **no. 11** wBc1 died on c1 and the bSa1 did not promote on a1.
The Ra6 is either a promoted piece – then the Ke8 has already moved
and 0-0-0 as well as Pc5xb6 e.p. are not permitted – or it came from
a1 via e1 – then 0-0 is not permitted, but 0-0-0 as well as Pc5xb6 e.p.
are permitted (last moves Pb7-b5 Rc6xXa6+). In the first case the solution
is 1.0-0! (1.Rf1? Sxc2+!) ~ 2.Rf8#, in the second 1.Pc5xb6 e.p.+! ~
2.Qf8#. The first direct PRA problem with mutually exclusive w/b castlings.

In** no. 12 **the white Pawns captured 8 times, among others the
promoted piece from a1 (bXxPa happened before); the last move was not
bPc6xXd5 for lack of white pieces. In no. 12 there are four special
move rights: 0-0-0 permitted, 0-0 permitted, Pc5xd6 e.p. not permitted,
Pg5xf6 e.p. not permitted. For each partial problem this is valid: three
rights are acknowledged, but not the fourth; this one becomes the opposite
right. 1) If 0-0-0 and 0-0 are permitted and Pc5xd6 e.p. is not permitted,
then the last move was Pf7-f5 and Pg5xf6 e.p. is allowed, therefore
1.Pg5xf6 e.p.! Rxh5+ 2.Rxh5 Rxa1/Pg6xh5 3.Rh8/Rxa8#. 2) If 0-0-0 and
0-0 are permitted and Pg5xf6 e.p. is not permitted, then the last move
was Pd7-d5 and Pc5xd6 e.p. is allowed, therefore 1.Pc5xd6 e.p.! Ra5+
2.Rxa5 Pg2xh1Q/Pg6xh5 3.Bxg6/Ra8#. 3) If 0-0-0 is permitted and Pc5xd6
e.p. as well as Pg5xf6 are not permitted, then 0-0 is not allowed, therefore
1.Bf6! Rxa1 2.Bxg6+ Kf8 3.Rxh8#. 4) If 0-0 is permitted and Pc5xd6 e.p.
as well as Pg5xf6 e.p. are not permitted, then 0-0-0 is not allowed,
therefore 1.Bd6! Rxa1 2.Bxg6+ Kd8 3.Rxh8#. Please remember: the case
where the two castlings are not permitted may occur in a proof game,
but it does not correspond with the PRA convention since it excludes
one castling right for no reason (cf. no. 1); so this case (with the
two solutions 1.Bd6 and 1.Bf6) is irrelevant. No. 12 is the first dual-free
four-part PRA problem. PRA problems can have five parts at most (see
*Problem Database* P0004880–P0004883).

In **no. 13** the white Pawns captured 3 times, among others a
promoted piece from h1 or a1 (either 0-0-0 or 0-0 is permitted). The
last move was K-e1 or R-a1 or Pd2-d4 or Pf2-f4. If 0-0-0 is permitted,
then 0-0 is not permitted and one of the two e.p. captures is allowed.
So the solution is either 1.Pg4xf3 e.p.! Bxg1 2.Qd3 Rxh4# or 1.Pc4xd3
e.p.! Bxg1 2.Pe2 Sd2#; both times the move right 0-0-0 is *acknowledged*,
but not executed! If 0-0 is permitted, then 0-0-0 is not permitted.
In this case the last move could be R-a1, therefore no e.p. capture
is allowed. So the solution is 1.Rxg3! Sxg3+ 2.Kf3 0-0#. That’s why
no. 13 is “only” a three-part problem. Here the PRA convention and the
composer show what they can.

In the codex it is not regulated how to find out the partial problems
of a PRA problem. Here is a **formal method** that is suitable particularly
for complex cases as in nos. 11–13.

1) In no. 13 there are four special move rights; the opposite rights
are marked with ’.

A = 0-0-0 is permitted A’ = 0-0-0 is not permitted
B = 0-0 is permitted B’ = 0-0 is not permitted
C = Pc4:d3 e.p. is not permitted C’ = Pc4:d3 e.p. is permitted
D = Pg4:f3 e.p. is not permitted D’ = Pg4:f3 e.p. is permitted

2) The calculation results into 2^{4} = 16 combinations of
special move rights:

__ABCD__, __ABCD’__,__ ABC’D__, __ABC’D’__ – __
AB’CD__, AB’CD’, AB’C’D, __AB’C’D’__ – A’BCD, *A’BCD’, A’BC’D,*
__A’BC’D’__ – *A’B’CD, A’B’CD’, A’B’C’D*, __A’B’C’D’__.

3) The combinations that are not legal are eliminated. These are the
eight __underlined__ ones.

4) The combinations that do not correspond with the castling or en-passant
convention are eliminated. These are the five in *italics*.

5) The remaining combinations form the partial problems. There are
three of these.

6) The first partial problem (AB’CD’) has the solution 1.Pg4xf3 e.p.!,
the second (AB’C’D) 1.Pc4xd3 e.p.!, the third (A’BCD) 1.Rxg3!. Quod
erat demonstrandum.

BALANCE: The examples nos. 1–13 show three items: 1) The new PRA and RS
conventions can easily be applied, whereas the retroanalyses of the
positions are partly easy, partly difficult. 2) The new conventions
work faultlessly. 3) PRA and RS problems have equal rights and need
no supplementary stipulation (neither “PRA” nor “RS”) any more. All
these effects are commonly produced by two principles: the “principle
of the combination of special move rights” (based on Gerd Rinder’s “principle
of the permuted questions” of 1970) and the “principle of the logical
order” (the PRA convention first, in case of a negative result the RS
convention). I found the latter after an intensive exchange of ideas
with Valery Liskovets, who had discovered a gap (concerning no. 3) in
the codex of 2008. I thank G. Rinder and V. Liskovets very much for their
support.

**A Posteriori Convention**

This convention remains unmodified. By castling it is proved a posteriori
that the last move was a double step of a Pawn and therefore the e.p.
capture is permitted. This idea, which is unknown to the chess game,
enriches the chess composition. **No. 14** is the first achievement.
The solution is 1.Pe5xd6 e.p.! 0-0-0 2.Pd6xe7 Rf8 3.Pe7xd8Q,R#. The
first AP helpmate with black to play is Pr*oblem Database*
P0001879, the first correct direct mate P0004340. The codex recommends
the supplementary stipulation “AP”. Some composers note it always, some
in direct problems only, some never (“in order not to betray anything”).
– Other (controversial) AP types, e.g. those in which the right to the
first move is proved a posteriori, are deliberately not treated here.

### Special Partial Retrograde Analysis (SPRA) Convention

The vague term “Retro Variants” is no longer used in the
codex. Most of the retro problems which were published with the
supplementary stipulation “Retro Variants” or “RV” before 2008 are PRA
problems after the modification of the codex 2008 and now need no
supplement. In few former RV problems, however, an en-passant key is
intended, although the double step of the Pawn cannot be proved according
to article 16.2 (e.g. nos. 15 and 16). Such problems are solvable by
means of a special convention as proposed by G. Rinder in 1970. I call it
the Special Partial Retrograde Analysis (SPRA) convention. It means a
Partial Retrograde Analysis convention with the special feature that an
en-passant capture is permitted unless it can be proved that it is not
permissible. Here the right to capture en-passant is analogous with the
right to castle (16.1). The SPRA convention should be expressly
stipulated (16.4).

In **no. 15** it is permitted either to castle (1.0-0-0#) or to
capture en-passant (1.Pd5xe6 e.p.#). In the second case the last move was
Pe7-e5 and the Bh4 is a promoted piece from g1 or e1, therefore castling
is not permitted. So no. 15 is a two-part SPRA problem. Without the
supplement “SPRA” the sole solution would be 1.0-0-0#, but not 1.Pd5xe6
e.p.# since it cannot be proved that the double step of the Pawn (Pe7-e5)
was the last move as demanded by the en-passant convention. A well-known
four-part SPRA problem is P0002179, a perfect one P1068197.

A nice example is **no. 16**. White loses by 1.Kc3? Ke6, draws
by 1.Pc5xd6 e.p.? and wins by 1.Pc5xb6 e.p.!. Without the supplement
“SPRA” the sole solution would be 1.Kc3 (loss).

### Conclusion

The new version of article 16 of the Codex 2009 removes the often
discussed well-known contradictions and ensures equal rights for PRA
and RS problems. This is great progress for numerous retro problems,
among them excellent compositions of famous authors.

I thank all those
who supported the new version, especially Thomas Brand, Günter Büsing, Michel Caillaud,
Bernd Ellinghoven, Hans Gruber and Kjell Widlert. I am very grateful
to Wolfgang Dittmann, a stimulating reader of this paper, to Andrew Buchanan, a sharp-witted assistant, to John Rice, an
experienced translator, and to Otto Janko, the indefatigable Retro Corner
chief. Notes and comments are welcome to W.Keym@gmx.net

This paper except the part “Special Partial Retrograde Analysis” was
first published in Die Schwalbe, February 2010, issue 241: “Partielle
Retroanalyse und Retro-Strategie im Kodex 2009”.

## Annex (June 2011)

**A retro triplet with four castlings **

by Werner Keym, Meisenheim

Werner Keym

Die Schwalbe 2010

#3 (14+9) a) Diagram b) –wBb5 c) +bSh7

This triplet (= *Problem Database* P1108942) is an improved version of
my earlier problems P1101002 and P1108941. It deals with Partial Retrograde
Analysis (PRA), with Retro-Strategy (RS) and with neither of the two.

a) Each castling is permitted, but not four castlings altogether. These
three castlings are permitted at most: w0-0/w0-0-0/b0-0. This is a possible
genesis of the position: d7xPc6, h3xSg4xPf5xBe6, d4xQe5, f3xSe4, wXxPa,
a2→a8X, last move h6xXg5. Tries: 1.Bxg5? 0-0!, 1.Rd1? 0-0!, 1.Rf1? Rxa6!.
Solution: 1.0-0! [2.Qd3] Rf8/Kd8 2.Sxg7+/Qd3+ Kd8/Kc8 3.Rxf8/Qd7#. However,
there is a genesis of the position in which b0-0-0 is permitted: f3xSe4,
f7→f1X, a4xXb5, a7→a1X, b5xXc6, d7xPc6, c4xSd5xBe6, d4xQe5, g2→g6, h6xQg5,
h2→h8Q (= Qa3), last move R-h8; in that case w0-0, w0-0-0 and b0-0 are not
allowed. Tries: 1.Bxg5? 0-0-0!, 1.Rf1? Rxa6/0-0-0!. Solution: 1.Rd1! [2.Qf3]
Rd8/Kf8 2.Sxc7+/Qf3+ Kf8/Kg8 3.Rxd8/Qf7#. So **a) is a two-part PRA problem:
either 1.0-0! or 1.Rd1!**.

b) Each castling is permitted, but not four castlings altogether. Three
castlings are permitted at most. If w0-0/w0-0-0/b0-0 or w0-0/w0-0/b0-0-0 or
w0-0/b0-0/b0-0-0 is permitted, then the solution seems to be 1.0-0 as in
version a); there is an additional variant when b0-0-0 is permitted: 1.- 0-0-0
2.Sb4,Sc5 ~ 3.Qa8#. However, if w0-0-0/b0-0/b0-0-0 is permitted (last move
f6xPg5, earlier d7xBc6), then w0-0 is not allowed and there is no (partial)
solution in 3 moves. Now the Retro-Strategy convention works: the castling
which is executed first (w0-0) is permitted and excludes the unsolvable case
(w0-0-0/b0-0/b0-0-0). Therefore the sole solution is **1.0-0!** Rf8/Kd8/0-0-0 … So
**b) is a RS problem**.

c) No castling is permitted and no PRA or RS convention is relevant. This is
a possible genesis of the position: g2→g6, wXxPa, a2→a8X, h6xXg5, h2→h8X,
d7xXc6, f3xSe4, f7→f1X, c4xXd5xBe6, d4xQe5. The try 1.Bxg5? in a) and b)
becomes the solution of c): **1.Bxg5!** [2.Qxe7#] Sxg5,Sf6/K- 2.Sf6+,Sxf6+/Qxe7+
~/K- 3.Rxh8/Q7#. So **c) is a ‘normal’ retro problem without PRA or RS**.

The ‘simple’ positions with their slight modifications demand different
tricky retrograde analyses and show a varied mainly dual-free forward play
with virtual or real castling. My best retro problem with four castlings.