Eric Duchêne

Marc Heinrich

Urban Larsson

Aline Parreau

The switch operators and push-the-button games: a sequential compound over rulesets

Keywords: Combinatorial game, Ruleset compound, Nim, Wythoff Nim, Euclid's game

We study operators that combine combinatorial games. This field was initiated by Sprague-Grundy (1930s), Milnor (1950s) and Berlekamp-Conway-Guy (1970-80s) via the now classical disjunctive sum operator on (abstract) games. The new class consists in operators for rulesets, dubbed the switch-operators. The ordered pair of rulesets (R 1 , R 2 ) is compatible if, given any position in R 1 , there is a description of how to move in R 2 . Given compatible (R 1 , R 2 ), we build the push-the-button game R 1 R 2 , where players start by playing according to the rules R 1 , but at some point during play, one of the players must switch the rules to R 2 , by pushing the button ' '. Thus, the game ends according to the terminal condition of ruleset R 2 . We study the pairwise combinations of the classical rulesets Nim, Wythoff and Euclid. In addition, we prove that standard periodicity results for Subtraction games transfer to this setting, and we give partial results for a variation of Domineering, where R 1 is the game where the players put the domino tiles horizontally and R 2 the game where they play vertically (thus generalizing the octal game 0.07).

1 Gallimaufry-new combinations of games Combinatorial Game Theory (CGT) concerns combinations of individual games. The most famous example is the disjunctive game sum operator, G + H, which, given two games G and H, consists in playing in either G or H until both games are exhausted. Several variations of this compound were defined by Conway in his reference book [START_REF] Conway | On numbers and games[END_REF] and Berlekamp Conway Guy in [START_REF] Berlekamp | Winning Ways for your Mathematical Plays[END_REF]. One such example is the ordinal sum operator, which behaves like a disjunctive sum, with the additional constraint that any move in G annihilates the game H.

More recently, the so-called sequential compound operator was introduced [START_REF] Stromquist | Sequential compounds of combinatorial games[END_REF]. It consists in playing successively the ordered pair of games (G, H), where H starts only when G is exhausted. These constructions are in this sense static: the starting position of the second game is fixed until 1 the first game is exhausted. In this work, we study dynamic compounds, where the starting position of the second game depends on the moves that were made in the first game. As a consequence, our construction requires the full rulesets of the two games to build the compound.

In order to define such compounds, we will say that an ordered pair of combinatorial game rulesets (R 1 , R 2 ) is compatible if, given any position of R 1 , there is a description of how to move in R 2 . Note that we do not give a formal definition of this notion deliberately, as in the current context, we will only consider the case where R 1 and R 2 have the same set of positions. Typically, a pair of rulesets (R 1 , R 2 ) is compatible whenever there is a function mapping any position of R 1 into a position of R 2 . In our case, this function is just the identity. Given a compatible pair of rulesets (R 1 , R 2 ) and a specially designed switch procedure '⇒' (it can be a game in itself or anything else that declares a shift of rules), players start the game R 1 ⇒ R 2 with the rules R 1 . At their turn, a player can choose, instead of playing according to R 1 , to play in the switch procedure, and when this procedure has terminated, the rules are switched to R 2 (using the current game configuration). Thus, we call this class of operators switch operators (or switch procedures).

In the current paper, the switch procedure is called the push-the-button operator (for short push operator ). It consists in a button that must be pushed once and only once, by either player. Pushing the button counts as a move, hence after a player pushes the button, his opponent makes the next move. The button can be pushed any time, even before playing any move in R 1 , or when there is no move left in either game. In particular, if there is no move left in R 1 and the button has not been pushed, then it has to be pushed before playing in R 2 (the only way to invoke R 2 is via the push-the-button move). In all cases, the game always ends according to the rules of R 2 .

We first recall some definitions and results about combinatorial game theory needed in this paper, and then give in Section 2 a formal definition of the push operator. In Section 3, we motivate this operator by the resolution of a particular game called Zeruclid, which we demonstrate is a push compound of the classical games of two-heap Nim [START_REF] Bouton | Nim, a game with a complete mathematical theory[END_REF] and Euclid [START_REF] Cole | A game based on the euclidean algorithm and a winning strategy for it[END_REF]. Moreover we show that the second player's winning positions are similar to those of another classical game, Wythoff Nim (a.k.a Wythoff) [START_REF] Wythoff | A modification of the game of Nim[END_REF]. Then, in Section 4 we continue by studying various push compounds of these three classical games. We also prove that standard periodicity results for Subtraction games transfer to this setting. We finish off by studying in Section 5 a variation of Domineering, where R 1 is the game where the players put the domino tiles horizontally and R 2 the game where they play vertically (thus generalizing the octal game 0.07).

More overview

Examples of popular traditional rulesets which can be considered as sequential compounds of several rulesets include Three Men's Morris, Picaria [START_REF] Larsson | Eternal Picaria[END_REF] (first place then slide to neighbours) and Nine men's morris (which is often played in three phases, first place, then slide and perhaps capture, and at last one of the players can move their pieces freely).

In addition, there has recently been scientific progress in building new games from combinations of the rules themselves. A nice illustration of this process is the game Clobbineering [Bur], whose rules are defined as a kind of union of the rules of the games Clobber and Domineering [START_REF] Michael | Lessons in Play: An Introduction to Combinatorial Game Theory[END_REF]. Indeed, in Clobbineering, the players choose either a Clobber or a Domineering move. Both types of moves are made on the same board.

One can also mention the more recent Building Nim [START_REF] Duchêne | Building nim[END_REF], which behaves like Nine men's morris (i.e., the starting position of R 2 is a final position of R 1 ). However, if all these games are fun to play with, and may sometimes be solved thanks to ad hoc techniques, there is no known work relating to a formal definition of a compound of compatible rules.

A similar construction called conjoined ruleset has been recently introduced in [HN17] and used to create the games Go-Cut and Sno-Go which are compounds of the rulesets NoGo, Cut-Throat and Snort. In a conjoined ruleset, the players start playing according to a first ruleset until they reach a terminal position. Then, the game continues from the current position using the second ruleset. This case, as well as Building Nim, can be viewed as examples of a switch operator where the switch procedure automatically changes the rules to the second ruleset when the players reach a terminal position.

Like in a conjoined ruleset, the push-the-button operator can be considered as a sequential compound of two sets of rules, in the sense that the two compound sets are considered successively while playing. The main difference between these two switch procedures is that in the push-thebutton operator, the rules can be changed at any time during the game. Moreover, one great interest of the push-the-button operator is its correlation with games allowing pass moves. Indeed, such games can be considered as a special instance of this operator, in analogy with how classical sequential compounds generalize the misère convention in combinatorial game theory [START_REF] Stromquist | Sequential compounds of combinatorial games[END_REF].

Impartial games and their outcomes

The fundament of a combinatorial game is the set of game positions; a 'game board' together with some pieces (to place, move or remove etc). The description of how to manipulate the pieces on the game board is the ruleset.

1 Definition 1.2.1 (Ruleset). Given a set Ω of game positions, an impartial ruleset R over Ω is a function R : Ω → 2 Ω .
The function R gives the set of move options from each position in Ω. This ruleset can be extended to a function over sets of positions by saying that, for a set of positions A ⊂ Ω, R(A) = g∈A R(g).

Specifically, given a position g ∈ Ω, the elements of R(g) ⊂ Ω are called the options of g. Our study is carried out in the usual context of short games, i.e., games with a finite number of positions, and where no position is repeated during the play. The followers of g ∈ Ω are the positions in sets of the form R i (g), where R i = R(R i-1 ), for i > 0, and R 0 is the identity function. We say that a ruleset R is short, if any game g ∈ Ω is short. That is, for any g ∈ Ω, there is an i such that R i (g) = ∅.

According to [START_REF] Siegel | Combinatorial Game Theory[END_REF] (Chapter I), a game is defined as the combination of a ruleset R over Ω with a specific starting position g ∈ Ω (but without an explicit definition of 'ruleset'). The game will be denoted by (g) R (or simply g if the context is clear).

Example. Consider the classical game of Nim, which is played with heaps of finitely many tokens. At their turn, players can remove any number of tokens from one single heap (at least one and at most a whole heap). The game ends when there is no token left. Any position, with say k heaps, can be represented by a k-tuple of non negative integers, (n 1 , . . . , n k ), with the set of options

1≤j≤k {(n 1 , . . . n j-1 , i, n j+1 , . . . , n k ) | 0 ≤ i < n j }. It is easy to check that R = Nim is a short ruleset.
In what follows, rulesets will be written with small capitals, or using the letters R, R 0 , R 1 , . . . while g, g , h are game positions. For a given ruleset, there are usually two main conventions to determine the winner:

• normal play: the first player with no move available loses the game.

• misere play: the first player with no moves available wins the game (i.e., the last to play loses the game).

A short impartial game has two possible outcomes: either the first player has a strategy to ensure a win, or the second player has one. In normal (misere) play, we denote o R (g) (o - R (g)) the outcome of the game (g) R , with N if the first player has a winning strategy, and P otherwise (for Next player and Previous player respectively). In this paper, unless specified otherwise, we will consider games under the normal convention. A well-known property of impartial games yields necessary and sufficient conditions to characterize the outcomes of a game. Proposition 1.2.2. Given a game (g) R we have:

o R (g) = P if ∀g ∈ R(g), o R (g ) = N N if ∃g ∈ R(g), o R (g ) = P o - R (g) = P if R(g) = ∅ and ∀g ∈ R(g), o - R (g ) = N N if R(g) = ∅ or ∃g ∈ R(g), o - R (
g ) = P. We will use the following notation to define the P-positions of a given ruleset: Definition 1.2.3 (P-positions). Let R be a ruleset over Ω. The set of P-positions for R, in normal and misere play, are the sets

P = {g ∈ Ω | o R (g) = P} and P -= {g ∈ Ω | o - R (g) = P} respectively.

Disjunctive sums and Sprague-Grundy theory

The disjunctive sum of two games (g 1 ) R 1 and (g 2 ) R 2 consists in putting the two games side by side, and at each turn a player makes a move either in g 1 or in g 2 . In our approach, since we focus on rulesets rather than games, we slightly reformulate the standard definition (content remains the same).

Definition 1.3.1 (Disjunctive sum). Consider two rulesets R 1 over Ω 1 and R 2 over Ω 2 . Their disjunctive sum, denoted by R 1 + R 2 is the ruleset defined over

Ω 1 × Ω 2 such that, for all (g 1 , g 2 ) ∈ Ω 1 × Ω 2 , (R 1 + R 2 )(g 1 , g 2 ) = {(g 1 , g 2 ), g 1 ∈ R 1 (g 1 )} ∪ {(g 1 , g 2 ), g 2 ∈ R 2 (g 2 )}.
Analogously, the disjunctive sum of a pair of given games, over given rulesets, is denoted

(g 1 ) R 1 + (g 2 ) R 2 .
This notion of disjunctive sum arises quite naturally for several rulesets. For example, the game of Nim played on a position with k heaps can be seen as a disjunctive sum of k different 1-heap Nim rulesets. From this construction, a very natural question arises: what can we say on the outcome of (g 1 ) R 1 + (g 2 ) R 2 by studying the two games separately? An answer to this question is obtained by refining the notion of outcome by assigning to a game a numeric value called the Sprague-Grundy value [START_REF] Patrick | Mathematics and games[END_REF][START_REF] Sprague | Uber mathematische kampfspiele[END_REF] (for short value): Definition 1.3.2 (Value). Given a game (g) R , its value G R (g) is a non negative integer (coded in binary) defined by: G R (g) = mex{G R (g ), g ∈ R(g)}

where mex(S) (for Minimum EXcluded value) is the smallest non negative integer not in the set S. ]). Consider games (g) R , (g 1 ) R 1 and (g 2 ) R 2 . Then

Proposition 1.3.3 ([Gru39, Spr35
• the game (g) R has outcome P if and only if its value is 0.

• the value of (g

1 ) R 1 + (g 2 ) R 2 is G R 1 (g 1 ) ⊕ G R 2 (g 2 )
where ⊕ is the bitwise XOR operator.

Values are a refinement of the notion of outcome, since the P-positions of a ruleset are exactly the games with value 0, and the outcome of a sum of games can be easily computed from the values of each game separately.

When the ruleset is clear from the context, we might omit the subscript in our notations, and write simply o(g) and G(g) to denote respectively the outcome and the value of the game (g) R .

2 The switch compound: push-the-button Given two rulesets R 1 and R 2 over the same set of positions Ω, clearly both orders of the pair of rulesets are compatible. Unless otherwise specified, players start the game according to R 1 . At their turn, a player can decide, instead of playing according to R 1 , to push a single allocated button, which switches the rules to the second ruleset R 2 . The button must be pushed exactly once, at some point during play, by either player. It can be pushed before any move has been made, at some intermediate stage, or even if there is no other move available. We call this operator, the push operator, denoted by ' '. By pushing the button, the current position, which is a position of the first ruleset, becomes the starting position for the second ruleset.

Definition 2.0.1 (The push operator). Let R 1 and R 2 be two rulesets over the same set of positions Ω. The push-the-button ruleset (for short push ruleset) R 1 R 2 is defined over {1, 2} × Ω by:

(R 1 R 2 ) : (1, g) -→ {(1, g ), g ∈ R 1 (g)} ∪ (2, g) (2, g) -→ {(2, g ), g ∈ R 2 (g)}.
Once the button is pressed, the game is played according to the rules R 2 . In other words, we have (2, g) R 1 R 2 = (g) R 2 . Consequently, when the ruleset is of the form R 1 R 2 , the interesting positions are those of the form (1, g) for g ∈ Ω. Thus, to simplify notation, we write

(g) R 1 R 2 instead of (1, g) R 1 R 2 .

General properties of the push compound

We now state a few general properties of the push operator. The first one concerns the equivalence between the push-compound of a ruleset with itself and games including a (compulsory) pass move, that is a Nim heap of size 1.

Lemma 2.1.1. Let R be a ruleset over a set of positions Ω. We have:

∀g ∈ Ω, (g) R R = (g) R + * ,
where * is a single Nim heap of size 1.

Proof. We combine Definitions 2.0.1 and 1.3.1. Since pushing the button does not change the rules, it mimics * in disjunctive sum with any game g ∈ Ω.

The following characterization of the P-positions of push rulesets is the natural extension of the normal play part of Proposition 1.2.2: Proposition 2.1.2. Given a push ruleset R 1 R 2 over a set Ω, and a position g ∈ Ω, we have:

o R 1 R 2 (g) = P ⇔ o R 2 (g) = N and ∀g ∈ R 1 (g), o R 1 R 2 (g ) = N . Proof. The moves from (g) R 1 R 2 are either to (g) R 2 if the button is pushed, or to (g ) R 1 R 2 if the move is played according to R 1 .
We have the following reformulation of Proposition 2.1.2. It will be used further to characterize the P-positions of several push rulesets.

Corollary 2.1.3. Let R 1 R 2 be a push ruleset over Ω. A subset P ⊂ Ω is the set of P-positions of R 1 R 2 if and only if:

(i) ∀g ∈ P, o R 2 (g) = N , (ii) ∀g ∈ P , R 1 (g) ⊂ Ω \ P , (iii) ∀g ∈ Ω \ P , either o R 2 (g) = P or R 1 (g) ∩ P = ∅.
Proof. Obvious, according to Definition 1.2.3 and Proposition 1.2.2.

In some cases, the P-positions of R 1 R 2 can be determined directly from the P-positions of R 1 . Indeed, adding the possibility to change the rules can be seen as a way to disrupt the game R 1 . The following results give sufficient conditions for which such a disruption preserves the P-positions of R 1 .

Proposition 2.1.4. Let R 1 and R 2 be two rulesets over Ω and let g in Ω be a game position. We denote by P 1 , P 2 and P - 1 the set of P-positions for respectively R 1 and R 2 under normal convention, and R 1 under misere convention.

The ruleset R 1 R 2 satisfies the following properties:

(i) If o R 2 (g) = P, then o R 1 R 2 (g) = N . (ii) If P 1 ∩ P 2 = ∅, then o R 1 R 2 (g) = P ⇔ g ∈ P 1 . (iii) If P - 1 ∩ P 2 = ∅ and R 1 (g) = ∅ implies g ∈ P 2 , then o R 1 R 2 (g) = P ⇔ g ∈ P - 1 .
Proof. (i) Pushing the button is a winning move.

(ii) We check that P 1 satisfies the three conditions (i), (ii) and (iii) of Corollary 2.1.3. The condition (i): for all g ∈ P 1 , o R 2 (g) = N , corresponds to the assumption we made that P 1 ∩ P 2 = ∅. Since P 1 is the set of P-positions for the ruleset R 1 , there is no move, according to R 1 , from a position in P 1 to another one, hence (ii) holds. Moreover for any position not in P 1 , there is a move, according to R 1 , to a position in P 1 and (iii) holds.

(iii) The argument is essentially the same as above. If a position g has no move for R 1 , then by hypothesis, pushing the button is a winning move. Otherwise, g has at least one option. If g ∈ P - 1 , then all moves, according to R 1 , are out of P - 1 , and by hypothesis, pushing the button is a losing move. If g ∈ P - 1 , then there exists at least one move, according to R 1 , landing in g ∈ P - 1 .

This result gives sufficient conditions for which the P-positions of R 1 remain unchanged by adding the possibility to switch the rules to R 2 . In the following sections, we study some games which use this property.

Zeruclid

We now present the ruleset that is the source of the switch compound. It is called Zeruclid (a.k.a. Ruthlein), and is is a variant of the ruleset Susen [START_REF] Mullen | The self-referential games minnie and wynnie and some variants[END_REF]. Both are part of a larger family of rulesets called in the literature non-invariant [START_REF] Duchêne | Invariant games[END_REF] (or simply 'variant') with the interesting subclass of self-referential [START_REF] Mullen | The self-referential games minnie and wynnie and some variants[END_REF] games. Previous naming conventions for classes of 'variant' games are for example pilesize dynamic in [START_REF] Holshouser | Dynamic one-pile Nim[END_REF][START_REF] Holshouser | Pilesize Dynamic One-Pile Nim and Beatty's Theorem[END_REF], and time and size dependent take-away game in [START_REF] Flanigan | One-pile time and size dependent take-away games[END_REF].

Definition 3.0.1 (Zeruclid). The game Zeruclid is played on several heaps of tokens. At each turn, a player can remove from any heap a number of tokens which is a positive multiple of the smallest non-zero heap. The heap sizes must remain non-negative.

Zeruclid on two heaps is very similar to the well-known game Euclid, with the only difference that the latter game requires positive heap sizes. Definition 3.0.2 (Euclid). The game Euclid is played on two heaps of tokens. A player can remove a positive multiple of the smallest heap from the largest heap. The heap sizes must remain positive.

Played on two heaps, Zeruclid has only two differences with Euclid:

• In Zeruclid, the game ends when both heaps are zero, whereas in Euclid it ends when they are equal.

• In Zeruclid, it is possible to remove the smallest heap in a single move.

One can easily check that these two differences do not modify the P-positions. Indeed, in the 2heap case, removing the smallest heap is always a losing move in Zeruclid. Hence the P-positions of 2-heap Zeruclid with non-zero coordinates, and the P-positions of Euclid are the same. They are given by the following result:

Proposition 3.0.3 ([CD69]). A position (a, b), with 1 ≤ a ≤ b is a P-position of Euclid if and only if b a < Φ,
where Φ is the golden ratio.

Played on three heaps, our game is similar to the game 3-Euclid introduced in [CL08], and to some of its variations studied in [START_REF] Nhan | Variations of the game 3-Euclid[END_REF]. The main difference with the game Zeruclid is that 3-Euclid requires the heap sizes to remain positive. In particular, the number of heaps does not vary during the game. In our version, it is allowed to completely remove the smallest heap, and thus to decrease the total number of heaps. An example is given in Figure 1.

(2, 3, 5) First, remark that Euclid and Nim are not played exactly on the same set of positions: the position (0, i) is not a valid position for Euclid, while it is a valid position for Nim. Consequently, what we call Euclid here, and in all the rest of Section 3, is the variant where there is a single move from (0, i) to (0, 0) if i > 0. In particular, the position (0, i) is an N -position.

(0, 3, 5) (2, 1, 5) (2, 3, 3) (2, 3, 1)
Proof. Before the heap with 1 token is taken, it is possible to remove any number of tokens from any of the two other heaps, hence the rules are those of Nim on two heaps. Once the heap with size one is removed, the rules are essentially those of Euclid, up to some minor differences, which, as mentioned before, do not modify the set of P-positions. Removing the heap of size one corresponds to pushing the button.

The rest of this section will be dedicated to finding characterizations of the P-positions of Nim Euclid. By the previous proposition, this also gives a characterization of the P-positions for Zeruclid(1, a, b).

Surprisingly, the P-positions of Nim Euclid are very similar to the P-positions of another well-known game: Definition 3.1.2 (Wythoff's game). The game Wythoff is played on two heaps of tokens. A move consists in either removing a positive number of tokens from one heap, or removing the same number of tokens from both heaps.

In the following, let a n = Φn and b n = Φn + n.

Proposition 3.1.3 ([Wyt07]). The P-positions of Wythoff are:

{(a n , b n ), (b n , a n ), n ≥ 0}.
According to the proposition above, the pairs (a n , b n ) for n ≥ 0 are generally called Wythoff pairs. Definition 3.1.4. Denote by (F n ) n≥0 the Fibonacci sequence starting with F 0 = 0 and F 1 = 1. The sequence (u n ) n≥0 is defined by u n = F n+1 -1.

Proposition 3.1.5. For all n ≥ 0, the pair (u 2n , u 2n+1 ) is a Wythoff pair. This is a well known result. Since we will reuse the proof afterwards, we put the details of it below.

Proof. Let Φ denote the golden ratio. Using the closed form formula for the Fibonacci numbers, we can write that:

F n+1 -ΦF n = Φ n+1 -(-Φ) -n-1 2Φ -1 -Φ Φ n -(-Φ) -n 2Φ -1 = 1 (-Φ) n (Φ -1 Φ ) 2Φ -1 = 1 (-Φ) n (2Φ -1)
.

This gives F 2n+1 -1 Φ 2n (2Φ-1) = ΦF 2n , and by taking the integer part on both sides of the equality, we obtain u 2n = ΦF 2n . Additionally we have

u 2n+1 = F 2n+2 -1 = F 2n+1 -1 + F 2n = ΦF 2n + F 2n = Φ 2 F 2n .
Consequently, the equality (u 2n , u 2n+1 ) = ( ΦF 2n , Φ 2 F 2n ) proves that it is a Wythoff pair. Theorem 3.1.6. The set of P-positions of Nim Euclid is given by:

P = {(a n , b n ), n ≥ 0} \ {(u 2n , u 2n+1 ), n ≥ 0} {(u 2n+1 , u 2n+2 ), n ≥ 0}.
This set coincides with the P-positions of Wythoff, except for a very small fraction of the positions. The first P-positions of the two games are given in Table 1.

Proof. Denote by (a n , b n ) the positions of P , with b n ≥ a n , reordered by increasing a n . Denote by A and B the two sets defined by A = {a n , n ≥ 0} and B = {b n , n ≥ 0}. We know by [START_REF] Wythoff | A modification of the game of Nim[END_REF] that the sets {a n , n ≥ 0} and {b n , n ≥ 0} are complementary. Additionally, using Proposition 3.1.5 and the fact that the u i for i ≥ 1 are all distinct, we can deduce that A and B are complementary. This implies that there is no move, according to Nim from a position of P to an other position of P .

In order to apply Corollary 2.1.3, we only need to show that: (i) pushing the button on a position (a n , b n ) is a losing move, and (ii) from any position (a, b) ∈ P , there is either a move, according to Nim, to a position in P , or pushing the button is a winning move.

We start by showing that, for n ≥ 1, the position (a n , b n ) satisfies the equality b n = Φa n . If (a n , b n ) is a Wythoff pair, this relation is a well known result (this is proved for example in Lemma 5 from [START_REF] Aviezri | The Raleigh game[END_REF] or in [START_REF] Silber | A fibonacci property of wythoff pairs[END_REF]). Consequently, we only need to prove it in the case (a n , b n ) = (u 2n+1 , u 2n+2 ). Reusing the computations from the proof of Proposition 3.1.5, we know that:

u 2n+2 -Φu 2n+1 = F 2n+3 -1 -ΦF 2n+2 + Φ = 1 Φ 2n+2 (2Φ -1) -1 + Φ.
This shows that u 2n+2 -Φu 2n+1 ≤ Φ -1 + 1 Φ 2 (2Φ-1) < 1 and additionally, u 2n+2 -Φu 2n+1 > 0, which proves that u 2n+2 = Φu 2n+1 .

We have (a 0 , b 0 ) = (0, 1), and pushing the button from this position is a losing move. If n ≥ 1, then b n a n > Φ, consequently, by Proposition 3.0.3, pushing the button is also a losing move. Now suppose that we have (a, b) ∈ P . We want to show that either there is a move, according to Nim, to a position in P , or pushing the button is a winning move. If a = 0, then either b = 0 and pushing the button is a winning move, or b > 0, and there is a move to (0, 1) ∈ P . Consequently, we can assume a > 0. Suppose a = b n for some n. Thus we have b ≥ a = b n > a n , and there is a move, according to Nim, to the position (b n , a n ). Otherwise, since A and B are complementary, we have a = a n for some n. If b > b n , then again, there exists a move, according to Nim, to (a n , b n ). Otherwise, we have b < b n . Since b n = Φa n , we must have b a < Φ, which implies by Proposition 3.0.3 that pushing the button is a winning move. Table 1: Sequence of the first P-positions for the games Wythoff and Nim Euclid. Some blanks were inserted to highlight the similarities between the two sequences.

There exists several ways to characterize the P-positions for the game Wythoff. Quite naturally, similar characterization also exist for Nim Euclid. They are given in the following theorems. The proofs are very similar to those for Wythoff and are left in the Appendix.

Theorem 3.1.7. The P-positions of Nim Euclid are the (A n , B n ) where A n and B n are given by the following recurrence equations:

   A 0 = 0, B 0 = 1, A n = mex{A i , B i , i < n}, B n = ΦA n .
As is the case for Wythoff, we finally give a third characterization of the P-positions using the following Fibonacci numeration system: Definition 3.1.8. Any natural number n can be written uniquely as a sum of Fibonacci numbers:

n = i≥2 x i F i with x i ∈ {0, 1}, without two consecutive 1s (i.e. x i = 1 ⇒ x i+1 = 0).
For a given integer n, its Fibonacci representation is written as the bit string x k x k-1 . . . x 2 . We write (10) * for bit strings of the form 101010 . . . 10. Theorem 3.1.9. As in Theorem 3.1.7, denote by A = {A n } n≥0 and B = {B n } n≥0 the sets of coordinates of the P-positions of Nim Euclid. Given a non-negative integer x, we have x ∈ A if and only if its Fibonacci representation s:

• either ends with an even number of 0s, and s = (10) * 1,

• or s = (10) * . Moreover, if s A is the Fibonacci representation of some A n , then the Fibonacci representation s B of the corresponding B n satisfies:

• s B = s A 0 (i.e. a shift with 0 of s A ) if s A = (10) * , • s B = s A 1 (i.e. a shift with 1 of s A ) if s A = (10) * .
Remark. Although the P-positions of Zeruclid with the smallest heap of size 1 are well characterized, the values seem to have a much more complicated structure (see Figure 2). Note that the patterns we obtained seem very close to those obtained in [START_REF] Abrams | Periodicity and other structure in a colorful family of nim-like arrays[END_REF] about variations of the game Nim.

3-heaps Zeruclid: general case

We have seen that Zeruclid(1, a, b) has the same outcome as the push ruleset Nim Euclid. In the more general case where the smallest heap contains a > 1 tokens, the game cannot be viewed as a push ruleset. Indeed, there are three 'special moves' changing the rules of the game: removing the heap of size a, or decreasing one of the two other heaps to a size less than a. For this reason, the P-positions seem more complicated to compute in the general 3-heaps case. However we can still prove some properties on the P-positions. These results are given in the following theorems. Since this part is less relevant to our study of push rulesets, only the statements of the theorems are given; the proofs are left in the Appendix. Note that in the last theorem, we do not necessarily have c ≥ b. In particular, not all positions satisfying the properties of Theorem 3.2.1 are P-positions.

Push compounds of Nim, Wythoff and Euclid

We start with examples of push rulesets played on two heaps of tokens. The set of positions of these games can be seen as the integer lattice N 2 . More precisely we will exhibit a full characterization of the P-positions when we combine the rulesets of Nim, Wythoff, and Euclid (see Definitions 3.0.2 and 3.1.2). Recall that the case Nim Euclid was already considered in the previous section; it corresponds to 3-heap Zeruclid with the smallest heap of size 1. The three results below cover the other compounds of Nim with Euclid and Wythoff.

Proposition 4.1.1. The P-positions of Nim Wythoff is the set P N W defined as:

P N W = {(0, 1); (1, 0); (k, k), k ≥ 2}.
Proof. The set P N W is known as the set of P-positions of Nim under misere convention [START_REF] Bouton | Nim, a game with a complete mathematical theory[END_REF]. Using Proposition 2.1.4 (iii), one only needs to show that:

• If g is a position with no option for Nim, then it is a P-position for Wythoff. This is immediate because the only position with no option for Nim is (0, 0).

• All the positions of P N W are winning for Wythoff. This also holds since the P-positions of Wythoff are of the form ( Φn , Φn + n) (see Proposition 3.1.3), and none of these positions is in P N W .

Proposition 4.1.2. A position (a, b) with a ≤ b is a P-positions of Euclid Nim if and only if one of the following assumptions holds:

• b a < Φ and b a = F 2i+2 F 2i+1 for any i,
• b a = F 2i+1 F 2i for some i, where the F i are the Fibonacci numbers.

Proof. If we note P the set of positions defined by the union of the two above conditions, then P is the set of P-positions of Euclid in misere convention [START_REF] Gurvich | On the misere version of game euclid and miserable games[END_REF]. To show that this also corresponds to the set of P-positions of Euclid Nim, using Property 2.1.4, we only need to show that for any position in P , this position is winning for Nim, and that all the terminal positions of Euclid are P-positions of Nim. This is straightforward since the P-positions of Nim are of the form (a, a), and a/a = 1 = F 2 F 1 , thus (a, a) ∈ P . In addition, the terminal positions of Euclid are exactly these positions.

Proposition 4.1.3. The P-positions of Wythoff Nim is the set P W N defined as follows:

P W N = {(a n -1, b n -1) n ≥ 1}.
where (a n , b n ) are the P-positions of Wythoff. This is an example where the P-positions of the compound ruleset differs from the P-positions of the original ruleset (both in normal or misere convention). Therefore, Proposition 2.1.4 cannot be applied.

Proof. According to Proposition 3.1.3, the sets A = {a n -1} n≥1 and B = {b n -1} n≥1 are complementary sets and (a n -1) -(b n -1) = a n -b n = n. As a consequence, there is no move, according to Wythoff, from one position in P W N to another. Moreover, since a n -b n = n > 0 for n ≥ 1, none of these elements are P-positions of Nim. Hence, to prove that this set is the set of P-positions, it only remains to show that for any position not in P W N , either pushing the button is a winning move, or there is a move according to Wythoff ruleset to a position in P W N . The proof is essentially the same as for the classical Wythoff.

Take a position (a, b) ∈ P W N with 0 ≤ a ≤ b. If a = b, changing the rules to Nim (by pushing the button) is a winning move. Suppose now that a < b. Since A and B are complementary, there are two possibilities:

• a = b n -1 for some n ≥ 1, then b > a = b n -1 ≥ a n -1.
In this case there is a move to (b n -1, a n -1) by playing on the second heap.

• a = a n -1 for some n ≥ 1. If b > b n -1,

Subtraction games

We now consider the push operator applied to Subtraction rulesets.

Definition 4.2.1. Let S be a finite set of positive integers. The ruleset Subtraction(S) is played with one heap of tokens. At his turn a player can remove v ∈ S tokens from the heap, provided there are at least v tokens in the heap.

For a ruleset R = Subtraction(S) for some fixed set S, it is common to look at the sequence of values (G R (n)) n≥0 . It is already known that the sequence of values of Subtraction games are periodic [START_REF] Berlekamp | Winning Ways for your Mathematical Plays[END_REF]. A special case of this result is given in the proposition below: Proposition 4.2.2 ([BCG04]). Let k be a positive integer, and R = Subtraction({1, . . . k}) be a Subtraction ruleset. The sequence of outcomes in normal and misere convention are periodic with period k + 1. More precisely:

• In normal convention, o R (n) = P ⇔ n ≡ 0 mod (k + 1). • In misere convention, o - R (n) = P ⇔ n ≡ 1 mod (k + 1
). We show that the periodicity of outcomes and values still holds if Subtraction rulesets are composed using the push-the-button construction.

Theorem 4.2.3. Suppose that R 2 is a ruleset over N with periodic P-positions of period k, and R 1 = Subtraction(S) for a finite set S. The ruleset R 1 R 2 has ultimately periodic P-positions. The lengths of the period and pre-period are at most k • 2 max(S) .

In addition, if the values of R 2 are also periodic of period k, then the values of R 1 R 2 are periodic with period and pre-period at most k(|S| + 2) max(S) .

Proof. We note M = max(S). Remark that the function n → o R (n) is such that its value on an integer n only depends on two things:

• The value of o R 2 (n), which only depends on the congruence class of n modulo k.

• The value of o R (n -i) for 1 ≤ i ≤ M .
As a consequence, we can write:

o R (n) = f (o R (n -1), . . . , o R (n -M ), n mod k) for some function f : {P, N } M × Z k -→ {P, N }. If we note X the set {P, N } M × Z k , we can define the function g : X → X as: g(a 1 , . . . a M , m) = (f (a 1 , . . . a M , m), a 1 , . . . a M -1 , m + 1 mod k).
We denote by F 0 the initial vector (o R (M -1), . . . o R (0), M ), and g (m) the function g composed m times. We can see that the first element of the tuple g (m) (F 0 ) is o R (M + m -1). Now, since |X| = k2 M , there exists n 0 and p smaller than |X| such that g (n 0 +p) (F 0 ) = g (n 0 ) (F 0 ), and consequently, for all

m ≥ n 0 , o R (m + p) = o R (m).
For the periodicity of the Grundy function, simply observe that there are at most |S|+1 possible moves at any moment. Consequently the Grundy function takes values in the set {0, . . . , |S| + 1}. Using exactly the same argument as above with the set X = {0, . . . , |S| + 1} M × Z k , we get the desired bound on the length of the period.

For some specific subtraction sets, it is possible to describe exactly the period of the P-positions: Theorem 4.2.4. Let k 1 , k 2 be two positive integers, and consider the ruleset R = (R 1 R 2 ), with R 1 = Subtraction({1, . . . , k 1 }) and R 2 = Subtraction({1, . . . , k 2 }).

Let a be the smallest integer such that (k 1 + 1)a ≡ -1 mod (k 2 + 1). The P-positions of R 1 R 2 are periodic with period (k 1 + 1)a + 1. If no such a exist, the period is simply k 1 + 1.

Proof. Assume that there exists an a such that (k 1 + 1)a ≡ -1 mod (k 2 + 1), and take the smallest one with this property. Again, the outcome of (m) R is determined by two things:

• The outcome of (m) R 2 , the game obtained after pushing the button, which only depends on the value of m modulo (k 2 + 1).

• The outcome of the k 1 previous positions m -1, m -2, . . . m -k 1 , and more precisely whether these positions are all N -positions for R or not.

As a consequence, if we manage to find two positions m and m such that m ≡ m mod (k 2 + 1) and o R (m) = o R (m ) = P, then the P-positions will be periodic with period m -m. Now, we can check easily that o R (0) = N and o R (1) = P. The games (2) R , (3) R . . . (k 1 + 1) R have outcome N since they all have a move to (1) R . The position (k 1 +2), and similarly all positions (b(k 1 + 1) + 1) for b < a are P-positions for ruleset R and the positions in-between are N -position. Indeed by minimality of a, pushing the button on a position b(k 1 + 1) + 1 for b < a is a losing move. Furthermore, there is no move from b(k 1 + 1) + 1 to some b (k 1 + 1) + 1, and finally every position in-between these position has a move to some b(k 1 + 1) + 1 for some b ≥ 0. The position a(k 1 + 1) + 1 is a winning position since pushing the button is a winning move by definition of a. Consequently, (a(k 1 + 1) + 2) R is a losing game: all k 1 previous positions are N -positions, and pushing the button is a losing move. By definition of a, we have a(k 1 + 1) + 2 ≡ 1 mod (k 2 + 1), and o R (1) = P. Consequently the sequence of outcomes is periodic with period a(k 1 + 1) + 1.

If such a a does not exists, according to Proposition 4.2.2 we have:

• The P-positions of R 1 in misere convention are the positions m such that m ≡ 1 mod (k 1 + 1).

• The P-positions of R 2 are the positions m for which m ≡ 0 mod (k 2 + 1).

By hypothesis on k 1 , k 2 , these two sets do not intersect. Additionally, 0 is the only terminal position of R 1 and it is a P-position for R 2 . By Proposition 2.1.4, the P-positions of R are the P-positions of R 1 in misere convention which are periodic with period k 1 + 1.

Push compounds of placement games: the Cram ruleset

In previous sections, we studied several games played with heaps of tokens. We now move to a different kind of game: placement games. We look in particular at the game Domineering and its impartial variant Cram, and study a push compound of this game.

Definition 5.0.1. The game of Cram is played on a square grid. A move consists in placing either a vertical or an horizontal 2 × 1 domino on the grid, not overlapping other dominoes.

Using some symmetry arguments, this game is known to be solved on rectangular grids with at least one even dimension. On even by even grids, the second player has a winning strategy by playing his opponent's central symmetric move. On even by odd boards, the first player can place a domino in the center, and then apply the central symmetric strategy. For (2n + 1) × (2m + 1) grids however, the computational complexity of finding the outcome is an open problem.

We here study a variation of Cram where the players first play only vertical dominoes, then, when the button is pushed, switch to horizontal ones (and since the rules are defined on the same game board they are compatible). We call Push Cram this new game, and present a solution for some of its non trivial sub-cases. In this subsection, the notation m × n will denote the grid with m rows and n columns.

The game of Cram played on a 1 × n row has the same rules as the octal game 0.07. Its values are periodic, with period 34 and pre-period 52 [START_REF] Berlekamp | Winning Ways for your Mathematical Plays[END_REF]. In particular, if we have G 0.07 (n) = 0, then n is odd (i.e.: positions 1 × (2k) have outcome N ). In Push Cram played on an m × n grid, when the button is pushed, the game decomposes into a disjunctive sum of m distinct 0.07 positions. Indeed, after the button is pushed the players can only place horizontal dominoes, and each domino placed on a row does not affect the other rows. In this case, the outcome can be computed easily using Proposition 1.3.3 and the periodicity of the values of 0.07. Proposition 5.0.2. Let k and n be two non-negative integers. We have the following outcomes for Push Cram:

(i) (2k) × n is an N -position, (ii) (2k + 1) × n is an N -position if G 0.07 (n) = 0, (iii) 3 × (2k
) is a P-position, (iv) n × 3 is a P-position if and only if G 0.07 (n) = 0, (v) (2k + 1) × 4 is a P-position.

Proof. For each of these cases, we describe a winning strategy for one of the players.

(i) The first player directly wins by pushing the button. Indeed, once the button is pushed, the game decomposes into a disjunctive sum of 2k games, each game corresponding to a row. Since all rows have the same length, the value (obtained by the XOR of the values of each game) is zero.

(ii) Again, the first player pushes the button and wins since once the button is pushed, the games corresponding to each row have value 0.

(iii) We give a strategy for the second player: play the move symmetrically to the first player relatively to the vertical line cutting the grid in half. Since such a move is always possible, we only have to show that for the first player pushing the button is always a losing move. Each move of the players cuts the horizontal rows. Looking at the connected horizontal pieces of rows, they go in pairs with their symmetric except for three of them in the center which are their own symmetric. Among these three, two of them have the same length, and the remaining one has even length (see Figure 3). Moreover, 0.07 played on a row of even length has a value different from zero. As a consequence, for the first player pushing the button on such a symmetric game is losing.

(iv) The second player can play his optimal strategy for 0.07 on the last column and play symmetrically on the two other ones. At some point, the opponent will run out of moves and will be forced to push the button, giving a winning position to the second player (see Figure 4). At any point during the game, when it's the first player's turn, there is an odd number of rows with 2 or 3 empty Figure 3: Case (iii). The blue dotted vertical line is the symmetry axis All the rows go by pair except one (in red with a dashed border) which has even size. Since 0.07 played on a row of even size has a non-zero value, pushing the button is a losing move on symmetric positions. cells. Indeed, if the first player plays on one of the two first columns, by playing symmetrically, two rows with either 2 or 3 empty cells are transformed into rows with 0 or 1 empty cells. Additionally, playing into the last column changes the number of free cells of the two rows from 3 to 2 or from 1 to 0. After pushing the button, the value of the game is the number modulo 2 of rows with 2 or 3 empty cells. Consequently, for the first player, pushing the button is a losing move. (v) Group the columns in two consecutive pairs. Either the second player can push the button and win, or, by playing the symmetric in the paired column, the value of the game for 0.07 does not change (see Figure 5). If he plays on a side column (case (a)), his move removes two rows of size 1, and does not change the value for 0.07 on these rows. If he plays on a middle column (case (b)), then he changes rows of length 1 to 0, and rows of length 3 to 2. Since G 0.07 (1) = G 0.07 (0) and G 0.07 (3) = G 0.07 (2), the value for 0.07 is not changed either by the move.

A game is a bluff game [START_REF] Brešar | How long can one bluff in the domination game? Discussiones Mathematicae Graph Theory[END_REF] if it is a first player win, and any first move is a winning move. Using numeric computations, we were able to formulate the following conjecture:

Conjecture 5.0.3. For all k ≥ 0, the grid of size 3 × (2k + 1) is an N -position for the game Push-Cram. In addition, it is a bluff game.

This conjecture was verified up to grids of size 3 × 25 for the outcome, and 3 × 13 for the bluff property. The remaining unsolved case for Push Cram on rectangular grids is when there is an odd

Open problems and conclusion

Other variants of the switch procedure could be interesting. In this study we took the convention that pushing the button requires a move. It is possible to look at variants for which it does not, and the players can push the button either before playing, after playing, or both. It is also possible to study the case where pushing the button cannot be done if there is no move left for the first ruleset. With this convention, the push operator is a direct extension of the pass move construction: the players are allowed a single pass move which can be played once, at any moment during the game except at the very end when there is no other move available. This construction was studied in [START_REF] Morrison | Combinatorial games with a pass: A dynamical systems approach[END_REF], and also in [START_REF] Hong | Low. An atlas of n-and p-positions in 'nim with a pass[END_REF] for the particular case of Nim, and in [START_REF] David | Regularity in the G-sequences of octal games with a pass[END_REF] for Octal rulesets with a pass. For all these variations of the switch construction, it is possible to get results similar to Proposition 2.1.4 giving sufficient conditions for which the losing positions are not modified. It is also likely that Theorem 4.2.3 on the periodicity of Subtraction games can also be adapted for these variations, perhaps with a different bound on the period.

The construction might also be interesting to look at from a complexity point of view. Given two compatible rulesets R 1 and R 2 , are there relations between the complexities of computing the outcome of positions of R 1 , R 2 and R 1 R 2 ?

The game Push Cram is a special case of a more general construction that allows to transform any partizan game into a push ruleset: the player both start by playing only Left-type moves, then when the button is pushed, they continue only using Right's moves. Push Cram is the game obtained by applying this construction to Domineering. It could be interesting to study how other partizan games are modified with this construction.

It seems also relevant to look at games that can be decomposed into a sum of positions. Typically, this happens for Cram, when the board can be split into several connected components. Usually, the outcome of such games is obtained by computing the values of the components. Yet, for switch rulesets (Push Cram for example), these positions do not correspond to a disjunctive sum. Indeed, pushing the button changes the rules for all the components at the same time. In an upcoming work [DH], we look at how to handle sums of positions for push rulesets using tools from misere game theory.

Appendices

A Zeruclid Theorem 3.1.7. The P-positions of Nim Euclid are the (A n , B n ) where A n and B n are given by the following recurrence equations:

   A 0 = 0, B 0 = 1, A n = mex{A i , B i , i < n}, B n = ΦA n .
Proof. By definition of A n and B n , the sets {A n } n≥0 and {B n } n≥0 are complementary. Consequently there is no move from (A n , B n ) to some (A m , B m ). Moreover, by definition we also have Bn An > Φ, hence pushing the button is a losing move.

Let (a, b) be a position with a ≤ b. One of the following holds:

• either b a < Φ in which case the first player wins by pushing the button (see Proposition 3.0.3). • or b a > Φ. Since {A n } n≥0 and {B n } n≥0 are complementary sequences, there is an integer n such that either a = A n or a = B n . In the first case, since b a > Φ, we have b > B n and the move to (A n , B n ) is a winning move. In the second case, b ≥ a = B n > A n , hence there is a move to (B n , A n ).

Theorem 3.1.9. As in Theorem 3.1.7, denote by A = {A n } n≥0 and B = {B n } n≥0 the sets of coordinates of the P-positions of Nim Euclid. Given a non-negative integer x, we have x ∈ A if and only if its Fibonacci representation s:

• either ends with an even number of 0s, and s = (10) * 1,

• or s = (10) * . Moreover, if s A is the Fibonacci representation of some A n , then the Fibonacci representation s B of the corresponding B n satisfies:

• s B = s A 0 (i.e. a shift with 0 of s A ) if s A = (10) * ,

• s B = s A 1 (i.e. a shift with 1 of s A ) if s A = (10) * .

Proof. This result is the consequence of the following two facts:

• the pair (a, b) is a Wythoff pair if and only if the Fibonacci representation s a of a ends with an even number of 0, and the representation of b is s a 0 (see [START_REF] Aviezri | Wythoff games, continued fractions, cedar trees and fibonacci searches[END_REF] for a proof of this result).

• The Fibonacci representation of F 2n+1 -1 is (10) n 1. Indeed, we have the following:

Figure 1 :

 1 Figure 1: Example of the possible moves for Zeruclid on position (2, 3, 5).

3. 1

 1 Zeruclid(1, a, b) We call Zeruclid(1, a, b) the game Zeruclid played on three heaps of tokens where the smallest heap has size 1. The link between this game and the push-the-button operator is given in the following proposition: Proposition 3.1.1. The game Zeruclid played on position (1, a, b) has the same outcome as the push ruleset Nim Euclid on position (a, b).

  Theorem 3.2.1. Let a, b and c be three integers with c ≥ b ≥ a > 0 such that (a, b, c) is a P-position of Zeruclid. The triple (a, b, c) satisfies: Φb ≤ c ≤ Φb + a -1. Theorem 3.2.2. Given two positive integers a and b with b ≥ a, there are exactly a values c such that (a, b, c) is a P-position of Zeruclid, one for each congruence class modulo a.

Figure 2 :

 2 Figure 2: Values for positions (1, a, b) of 3-heaps Zeruclid. Color blue corresponds to small values while yellow and red correspond to high values. The P-positions can be seen along the line y = Φx and its symmetric. Other small positive G-values seem to be close to the diagonal y = x.

  then there is a move to (a n -1, b n -1) by playing on the second heap. Otherwise b < b n -1, and let m = b -a. We have m < b n -1 -a n -1 = n. Consequently, by choosing k = a m -a n , the move to (a -k, b -k) = (a m -1, b m -1) is a winning move.

Figure 4 :

 4 Figure 4: Subcases (a) -(d) consist in playing symmetric moves on the two first columns. (e) is the case where the player plays on the last column. Grey tiles correspond to previous moves. The green tile is the last move played by the opponent, and the dotted one is the move that the player wants to play by applying the strategy.

Figure 5 :

 5 Figure 5: The second player can play symmetrically to the other player on each pair of column.

F 2k- 1 =

 1 F 2n+1 -F 1 = F 2n+1 -1.

Note that Definition 1.2.1 deals with impartial rulesets, i.e., rulesets where both players always have the same available moves during the play. However, it can be extended to partizan (i.e., non-impartial) games by separating the ruleset into two parts, each corresponding to the moves available to one player.

Push compounds of heap gamesIn this section we investigate the push operator on several other well-known impartial rulesets played on heaps of tokens.

* Supported by the ANR-14-CE25-0006 project of the French National Research Agency and the CNRS PICS-07315 project.

A similar argument shows that the Fibonacci representation of F 2n+2 -1 is (10) n . Using these facts, the statement of the Theorem is simply a consequence of Theorem 3.1.6. Given (A n , B n ) as in the statement of the Theorem, either

In the first case the Fibonacci representation s A of A n ends with an even number of zeros, and B n = s A 0, with s A = (01) k . In the second case, the Fibonacci representations of A n and B n are respectively (10) k and (10) k 1.

Proof. The left inequality comes from the fact that if c < Φb , then c b < Φ, hence moving to (0, b, c) is winning. Using the characterization of Theorem 3.1.7, the right inequality holds when a = 1. Assume a > 1, and suppose by contradiction that there is at least one P-position (a, b, c) with a ≤ b ≤ c such that c ≥ Φb + a. We look at the smallest such position (a, b, c) for the lexicographic order.

By assumption, there exists c < c such that: c ≡ c mod a, and Φb ≤ c ≤ Φb + a -1. Since there is a move from (a, b, c) to (a, b, c ) and (a, b, c) is a P-position, (a, b, c ) is a N -position. Because (a, b, c ) is a N -position, there is a winning move from (a, b, c ) to some P-position. From (a, b, c ), there are only 3 possible types of moves:

• The move to (0, b, c ) is losing since by assumption on c , c ≥ Φb .

• Any move to (a, b, c ) with c < c is also losing since otherwise we would have a winning move from (a, b, c) to (a, b, c ) which is a contradiction of the fact that (a, b, c) is a P-position.

• A move to a position (a, b -qa, c ) for some q > 0.

In this third case, there are two possibilities. Either b -qa ≥ a in which case we have:

This is a contradiction of the minimality of (a, b, c). The other possibility is b -qa < a. Using again the minimality of (a, b, c), we know that (b -qa, a, c ) satisfies the inequalities of the theorem, hence:

But we already know that c ≥ Φb , which implies:

This is a contradiction of the hypothesis b ≥ a.

Theorem 3.2.2. Given two positive integers a and b with b ≥ a, there are exactly a values c such that (a, b, c) is a P-position of Zeruclid, one for each congruence class modulo a.