# Analysis of Stage Game

## Win Probability

Two players i and j exert efforts x_i ≥ 0 and x_j ≥ 0. Player i's win
probability is:

W_i(x_i, x_j) := (x_i + ε)/(x_i + x_j + 2 * ε);

Where ε is > 0 is a small parameter which guarantees positive
probabilities of winning for both players.

## Expected Utility and Best Response

When competing against player j we define player i's expected utility as:

EU_i(x_i, x_j, S_i, F_i) := (1 - (x_j + ε)/(x_i + x_j + 2 * ε))*(S_i) + ((x_j + ε)/(x_i + x_j + 2 * ε)) * (F_i) - x_i;

Where S_i is player i's prize, when she wins the contest and F_i is her
prize, when she loses the contest.

Next we define the expected utility of a bystander o, who does not
participate in the stage game contest, but receives S_o, when player i
wins and F_0, when she loses: 

EU_o(x_i, x_j, S_o, F_o) := (1 - (x_j + ε)/(x_i + x_j + 2 * ε))*(S_o) + ((x_j + ε)/(x_i + x_j + 2 * ε)) * (F_o);

If we can assume (S_i - F_i) > (x_j + 2ε)²/(x_j + ε), player i's best response
is:

BR_i(x_j, S_i, F_i) := sqrt((S_i - F_i) * (x_j + ε)) - (x_j + 2 * ε);

If that condition holds, an alternative way to write out player i's expected
utility is then:

EU_i2(x_j, S_i, F_i) :=S_i + x_j + 2 * ε - 2 * sqrt((S_i - F_i) * (x_j + ε));

Analogously, we can then define the bystander's expected utility as:

EU_o2(x_j, S_o, F_o, S_i, F_i) := S_o + (x_j + ε)/sqrt((S_i - F_i) * (x_j + ε)) * (F_o - S_o);

## Cases

We delve into the different cases:

### Case I: One player prefers winning, the other
losing

S_i ≤ F_i and F_j < S_j (a) or S_i > F_i und F_j ≥ S_j (b)

### Case Ia: Player j prefers winning, i losing

x_i1a : 0;

x_j1a : BR_i(x_i1a, S_j, F_j);

EU_i1a : radcan(EU_i(x_i1a, x_j1a, S_i, F_i));

EU_j1a : radcan(EU_i(x_j1a, x_i1a, S_j, F_j));

### Case Ib: Player i prefers winning, j losing

x_j1b : 0;

x_i1b : BR_i(x_j1b, S_i, F_i);

EU_i1b : radcan(EU_i(x_i1b, x_j1b, S_i, F_i));

EU_j1b : radcan(EU_i(x_j1b, x_i1b, S_j, F_j));

### Case II: Neither player wants to win

S_i ≤ F_i and S_j ≤ F_j

x_i2 : 0;

x_j2 : 0;

EU_i2 : radcan(EU_i(x_i2, x_j2, S_i, F_i));

EU_j2 : radcan(EU_i(x_j2, x_i2, S_2, F_2));

### Case III: Both players want to win

S_i > F_i and S_j > F_j

x_i3 : ((S_i - F_i)^2 * (S_j - F_j)) / (S_i - F_i + S_j - F_j)^2 - ε;

x_j3 : ((S_i - F_i) * (S_j - F_j)^2) / (S_i - F_i + S_j - F_j)^2 - ε;

EU_i3 : F_i + (S_i - F_i)^3 / (S_j - F_j + S_i - F_i)^2 + ε;

EU_j3 : F_j + (S_j - F_j)^3 / (S_j - F_j + S_i - F_i)^2 + ε;

EU_o3 : (S_i - F_i)/(S_i + S_j - F_i - F_j) * S_o + (S_j - F_j)/(S_i + S_j - F_i - F_j) * F_o;

# Analysis of Full Game

## Setup

We set up V_1, V_2, and E:

V_1 : 1;

V_2 : 0;

E : 1/3 + 1/3 * V_3;

We define expected effort, when ε → 0:

ex_eff_0 : ((223888806293)/(339116361570));

We set up the assumptions about our variables:

assume(ε > 0, ε < 1 - V_2,  ε < 1 - V_3, ε < 1 - E, ε < V_3 - V_2, ε < E - V_2, V_2 < 1, V_2 ≥ 0, E < 1, E > 1/3, V_3 > 0, V_3 < 1, V_3 > V_2, V_3 < 1, V_3 > 0);

## Analysis of the Nodes

### Node d:

We define the prizes:

S_2d : V_2;

F_2d : V_3;

S_3d : V_2;

F_3d : V_3;

S_2d - F_2d;

S_3d - F_3d;

### Cases A - B:

S_2d ≤ F_2d and S_3d ≤ F_3d, hence case II.

We calculate best responses, expected utilities and through ex_x_d the
expected effort in the node:

x_2d : 0;

radcan(x_2d);

radcan(limit(x_2d, ε, 0, plus));

x_3d: 0;

radcan(x_3d);

radcan(limit(x_3d, ε, 0, plus));

ex_x_d : x_2d + x_3d;

We calculate expected effort in this and all subsequent nodes:

EU_1d : V_1;

radcan(limit(EU_1d, ε, 0, plus));

EU_2d : 1/2 * (V_3 + V_2);

radcan(limit(EU_2d, ε, 0, plus));

EU_3d : 1/2 * (V_3 + V_2);

radcan(limit(EU_3d, ε, 0, plus));

### Node e:

We define the prizes:

S_2e : E;

F_2e : V_3;

S_3e : V_1;

F_3e : E;

And prize differences:

S_2e - F_2e;

S_3e - F_3e;

### Case A:

S_2e > F_2e and S_3e > F_3e, hence case III.

We calculate best responses:

x_2ea : x_i3, S_i = S_2e, F_i = F_2e, F_j = F_3e, S_j = S_3e;

radcan(x_2ea);

radcan(limit(x_2ea, ε, 0, plus));

x_3ea : x_j3, S_i = S_2e, F_i = F_2e, F_j = F_3e, S_j = S_3e;

radcan(x_3ea);

radcan(limit(x_3ea, ε, 0, plus));

We calculate expected effort in this node:

ex_x_ea : radcan(limit(x_2ea + x_3ea, ε, 0, plus));

We calculate expected utilities:

EU_1ea : EU_o3, S_i = S_2e, F_i = F_2e, F_j = F_3e, S_j = S_3e, S_o = E, F_o = V_2;

radcan(limit(EU_1ea, ε, 0, plus));

EU_2ea : EU_i3, S_i = S_2e, F_i = F_2e, F_j = F_3e, S_j = S_3e;

radcan(limit(EU_2ea, ε, 0, plus));

EU_3ea : EU_j3,  S_i = S_2e, F_i = F_2e, F_j = F_3e, S_j = S_3e;

radcan(limit(EU_3ea, ε, 0, plus));

### Case B:

S_2e ≤ F_2e and S_3e > F_3e, hence case I.

We calculate best responses:

x_2eb : 0;

radcan(x_2eb);

radcan(limit(x_2eb, ε, 0, plus));

x_3eb: BR_i(x_2eb, S_3e, F_3e);

radcan(x_3eb);

radcan(limit(x_3eb, ε, 0, plus));

We calculate expected effort in this node:

ex_x_eb : radcan(x_2eb + x_3eb), ε = 0;

We calculate expected utilities:

EU_1eb : V_2 + sqrt(ε/(V_1 - E)) * (E - V_2);

radcan(limit(EU_1eb, ε, 0, plus));

EU_2eb : EU_i1a, S_i = S_2e, F_i = F_2e, S_j = S_3e, F_j = F_3e;

radcan(EU_2eb);

radcan(limit(EU_2eb, ε, 0, plus));

EU_3eb : EU_j1a, S_i = S_2e, F_i = F_2e, S_j = S_3e, F_j = F_3e;

radcan(limit(EU_3eb, ε, 0, plus));

### Knoten f:

We define the prizes:

S_2f : V_1;

F_2f : E;

S_3f : E;

F_3f : V_3;

And prize differences:

S_2f - F_2f;

S_3f - F_3f;

### Case A:

S_2f > F_2f and S_3f > F_3f, hence case III.

We calculate best responses:

x_2fa : x_i3, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(x_2fa);

radcan(limit(x_2fa, ε, 0, plus));

x_3fa : x_j3, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(x_3fa);

radcan(limit(x_3fa, ε, 0, plus));

We calculate expected effort in this node:

ex_x_fa : radcan(limit(x_2fa + x_3fa, ε, 0, plus));

We calculate expected utilities:

EU_1fa : EU_o3, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f, S_o = V_2, F_o = E;

radcan(limit(EU_1fa, ε, 0, plus));

EU_2fa : EU_i3, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(limit(EU_2fa, ε, 0, plus));

EU_3fa : EU_j3, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(limit(EU_3fa, ε, 0, plus));

### Case B:

S_2f > F_2f and S_3f ≤ F_3f, hence case I.

We calculate best responses:

x_3fb : 0;

radcan(x_3fb);

radcan(limit(x_3fb, ε, 0, plus));

x_2fb : BR_i(x_3fb, S_2f, F_2f);

radcan(x_2fb);

radcan(limit(x_2fb, ε, 0, plus));

We calculate expected effort in this node:

ex_x_fb : radcan(limit(x_2fb + x_3fb, ε, 0, plus));

We calculate expected utilities:

EU_1fb : V_2 + sqrt(ε/(V_1 - E)) * (E - V_2);

radcan(limit(EU_1fb, ε, 0, plus));

EU_2fb : EU_i1b, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(limit(EU_2fb, ε, 0, plus));

EU_3fb : EU_j1b, S_i = S_2f, F_i = F_2f, F_j = F_3f, S_j = S_3f;

radcan(limit(EU_3fb, ε, 0, plus));

### Node g:

We define the prizes:

S_2g : V_1;

F_2g : V_2;

S_3g : V_1;

F_3g : V_2;

And prize differences:

S_2g - F_2g;

S_3g - F_3g;

### Case A - B:

S_2g > F_2g and S_3g > F_3g, hence case III.

We calculate best responses:

x_2g : (V_1 - V_2)/4 - ε;

radcan(x_2g);

radcan(limit(x_2g, ε, 0, plus));

x_3g : (V_1 - V_2)/4 - ε;

radcan(x_3g);

radcan(limit(x_3g, ε, 0, plus));

We calculate expected effort in this node:

ex_x_g : radcan(limit(x_2g + x_3g, ε, 0, plus));

We calculate expected utilities:

EU_1g : V_3;

radcan(limit(EU_1g, ε, 0, plus));

EU_2g : 1/4 * V_1 + 3/4 * V_2 + ε;

radcan(limit(EU_2g, ε, 0, plus));

EU_3g : 1/4 * V_1 + 3/4 * V_2 + ε;

radcan(limit(EU_3g, ε, 0, plus));

### Node b:

### Case A:

We define the prizes:

S_1ba : EU_1d;

F_1ba : EU_1ea;

S_3ba : EU_3ea;

F_3ba : radcan(EU_3d);

And prize differences:

S_1ba - F_1ba;

radcan(S_1ba - F_1ba);

S_3ba - F_3ba;

radcan(S_3ba - F_3ba);

S_1ba > F_1ba and S_3ba > F_3ba, hence case III.

We calculate best responses:

x_1ba : x_i3, S_i = S_1ba, F_i = F_1ba, F_j = F_3ba, S_j = S_3ba;

radcan(x_1ba);

radcan(limit(x_1ba, ε, 0, plus));

x_3ba : x_j3, S_i = S_1ba, F_i = F_1ba, F_j = F_3ba, S_j = S_3ba;

radcan(x_3ba);

radcan(limit(x_3ba, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ba : radcan(limit(x_1ba + x_3ba + x_1ba/(x_1ba + x_3ba) * ex_x_d + x_3ba/(x_1ba + x_3ba) * ex_x_ea, ε, 0, plus));

We calculate expected utilities:

EU_1ba : EU_i3, S_i = S_1ba, F_i = F_1ba, F_j = F_3ba, S_j = S_3ba;

radcan(limit(EU_1ba, ε, 0, plus));

EU_2ba : EU_o3, S_i = S_1ba, F_i = F_1ba, F_j = F_3ba, S_j = S_3ba, S_o = EU_2d, F_o = EU_2ea;

radcan(limit(EU_2ba, ε, 0, plus));

EU_3ba : EU_j3, S_i = S_1ba, F_i = F_1ba, F_j = F_3ba, S_j = S_3ba;

radcan(limit(EU_3ba, ε, 0, plus));

### Case B:

We define the prizes:

S_1bb : EU_1d;

F_1bb : EU_1eb;

S_3bb : EU_3eb;

F_3bb : radcan(EU_3d);

And prize differences:

S_1bb - F_1bb;

S_3bb - F_3bb;

S_1bb > F_1bb and S_3bb > F_3bb for small enough ε, hence case III.

We calculate best responses:

x_1bb : x_i3, S_i = S_1bb, F_i = F_1bb, F_j = F_3bb, S_j = S_3bb;

radcan(x_1bb);

radcan(limit(x_1bb, ε, 0, plus));

x_3bb : x_j3, S_i = S_1bb, F_i = F_1bb, F_j = F_3bb, S_j = S_3bb;

radcan(x_3bb);

radcan(limit(x_3bb, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_bb : radcan(limit(x_1bb + x_3bb + x_1bab/(x_1bb + x_3bb) * ex_x_d + x_3bb/(x_1bb + x_3bb) * ex_x_eb, ε, 0, plus));

We calculate expected utilities:

EU_1bb : EU_i3, S_i = S_1bb, F_i = F_1bb, F_j = F_3bb, S_j = S_3bb;

radcan(limit(EU_1bb, ε, 0, plus));

EU_2bb : EU_o3, S_i = S_1bb, F_i = F_1bb, F_j = F_3bb, S_j = S_3bb, S_o = EU_2d, F_o = EU_2eb;

radcan(limit(EU_2bb, ε, 0, plus));

EU_3bb : EU_j3, S_i = S_1bb, F_i = F_1bb, F_j = F_3bb, S_j = S_3bb;

radcan(limit(EU_3bb, ε, 0, plus));

### Node c:

### Case A:

We define the prizes:

S_1ca : EU_1fa;

F_1ca : EU_1g;

S_3ca : EU_3g;

F_3ca : EU_3fa;

And prize differences:

D_1ca : radcan(S_1ca - F_1ca);

This expression switches sign within the interval and thus also player 1's
behavior. We calculate the threshold:

D_1cazp : solve(num(D_1ca)=0, V_3);

allroots(num(D_1ca));

D_3ca : radcan(S_3ca - F_3ca);

This expression switches sign within the interval and thus also player 3's
behavior. We calculate the threshold:

D3_cazp : solve(num(D_3ca)=0, V_3);

allroots(num(D_3ca));

From this subcases A.1, A.2, A.3 follow:

### Subcase A.1:

S_1ca > F_1ca and S_3ca > F_3ca, hence case III.

We calculate best responses:

x_1ca1 : x_i3, S_i = S_1ca, F_i = F_1ca, F_j = F_3ca, S_j = S_3ca;

radcan(x_1ca1);

radcan(limit(x_1ca1, ε, 0, plus));

x_3ca1 : x_j3, S_i = S_1ca, F_i = F_1ca, F_j = F_3ca, S_j = S_3ca;

radcan(x_3ca1);

radcan(limit(x_3ca1, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ca1 : radcan(limit(x_1ca1 + x_3ca1 + x_1ca1/(x_1ca1 + x_3ca1) * ex_x_fa + x_3ca1/(x_1ca1 + x_3ca1) * ex_x_g, ε, 0, plus));

We calculate expected utilities:

EU_1ca1 : EU_i3, S_i = S_1ca, F_i = F_1ca, F_j = F_3ca, S_j = S_3ca;

radcan(limit(EU_1ca1, ε, 0, plus));

EU_2ca1 : EU_o3, S_i = S_1ca, F_i = F_1ca, F_j = F_3ca, S_j = S_3ca, S_o = EU_2fa, F_o = EU_2g;

radcan(limit(EU_2ca1, ε, 0, plus));

EU_3ca1 : EU_j3, S_i = S_1ca, F_i = F_1ca, F_j = F_3ca, S_j = S_3ca;

radcan(limit(EU_3ca1, ε, 0, plus));

### Subcase A.2:

S_1ca ≤ F_1ca and S_3ca > F_3ca, hence case I.

We calculate best responses:

x_1ca2 : 0;

radcan(x_1ca2);

radcan(limit(x_1ca2, ε, 0, plus));

x_3ca2 : radcan(BR_i(x_1ca2, S_3ca, F_3ca));

radcan(x_3ca2);

radcan(limit(x_3ca2, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ca2 : radcan(limit(x_1ca2 + x_3ca2 + ex_x_g, ε, 0, plus));

We calculate expected utilities:

EU_1ca2 : radcan(EU_i(x_1ca2, x_3ca2, S_1ca, F_1ca));

radcan(limit(EU_1ca2, ε, 0, plus));

EU_2ca2 : radcan(EU_o(x_1ca2, x_3ca2, EU_2fa, EU_2g));

radcan(limit(EU_2ca2, ε, 0, plus));

EU_3ca2 : radcan(EU_i2(x_1ca2, S_3ca, F_3ca));

radcan(limit(EU_3ca2, ε, 0, plus));

### Subcase A.3:

S_1ca ≤ F_1ca and S_3ca ≤ F_3ca, hence case I.

We calculate best responses:

x_1ca3 : 0;

radcan(x_1ca3);

radcan(limit(x_1ca3, ε, 0, plus));

x_3ca3 : 0;

radcan(x_3ca3);

radcan(limit(x_3ca3, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ca3 : radcan(limit(x_1ca3 + x_3ca3 + 1/2 * ex_x_fa + 1/2 * ex_x_g, ε, 0, plus));

We calculate expected utilities:

EU_1ca3 : radcan(1/2 * S_1ca + 1/2 * F_1ca);

radcan(limit(EU_1ca3, ε, 0, plus));

EU_2ca3 : radcan(1/2 * EU_2fa + 1/2 * EU_2g);

radcan(limit(EU_2ca3, ε, 0, plus));

EU_3ca3 : radcan(1/2 * F_3ca + 1/2 * S_3ca);

radcan(limit(EU_3ca3, ε, 0, plus));

### Case B:

We define the prizes:

S_1cb : EU_1fb;

F_1cb : EU_1g;

S_3cb : EU_3g;

F_3cb : EU_3fb;

S_1cb - F_1cb;

S_3cb - F_3cb;

S_1cb ≤ F_1cb and S_3cb ≤ F_3cb for small enough ε, hence case II.

We calculate best responses:

x_1cb :  0;

radcan(x_1cb);

radcan(limit(x_1cb, ε, 0, plus));

x_3cb : 0;

radcan(x_3cb);

radcan(limit(x_3cb, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_cb : radcan(limit(x_1cb + x_3cb + 1/2 * ex_x_g + 1/2 * ex_x_fb, ε, 0, plus));

We calculate expected utilities:

EU_1cb : radcan(1/2 * (S_1cb + F_1cb));

radcan(limit(EU_1cb, ε, 0, plus));

EU_2cb : radcan(1/2 * (V_1 + sqrt(ε/(V_1 - E)) * (E - V_1) - sqrt((V_1 - E) * ε) + 2 * ε + 1/4 * V_1 + 3/4 * V_2));

radcan(limit(EU_2cb, ε, 0, plus));

EU_3cb : radcan(1/2 * (F_3cb + S_3cb));

radcan(limit(EU_3cb, ε, 0, plus));

### Node a:

### Case A:

We define some prizes:

S_1aa : EU_1ba;

F_2aa : radcan(EU_2ba);

Note, that depending on the corresponding subcase, the rest of the
relevant prizes will be defined in the next sections:

### Subcase A.1:

We define the remaining prizes in this subcase:

F_1aa1 : EU_1ca1;

S_2aa1 : EU_2ca1;

And prize differences:

D_1aa1 : radcan(S_1aa - F_1aa1);

lim_D_1aa1 : radcan(limit(D_1aa1, ε, 0, plus));

D_2aa1 : radcan(S_2aa1 - F_2aa);

lim_D_2aa1 : radcan(limit(D_2aa1, ε, 0, plus));

We establish that for ε → 0 both prize differences are positive (case III).
To do so, we check the denominators of both expressions for roots to
prove that the function is continous within the interval. Then, we also
inspect the numerators for roots. Lastly, we cestablish that for at least
one V_3 both expressions are indeed positive, concluding our proof. We
use the function nroots to check for roots, which internally uses Sturm's
theorem.

denom_D_1aa1 : denom(radcan(lim_D_1aa1));

nroots(denom_D_1aa1, 0, 0.11);

num_D_1aa1 : num(radcan(lim_D_1aa1));

nroots(num_D_1aa1, 0, 0.11);

lim_D_1aa1, V_3 = 0.1;

denom_D_2aa1 : denom(radcan(lim_D_2aa1));

nroots(denom_D_2aa1, 0, 0.11);

num_D_2aa1 : num(radcan(lim_D_2aa1));

nroots(num_D_2aa1, 0, 0.11);

lim_D_2aa1, V_3 = 0.1;

We calculate best responses:

x_1aa1 : x_i3, S_i = S_1aa, F_i = F_1aa1, F_j = F_2aa, S_j = S_2aa1;

Auxiliary calculations:

lim_S_1aa : radcan(limit(S_1aa, ε, 0, plus));

lim_F_1aa1 : radcan(limit(F_1aa1, ε, 0, plus));

lim_F_2aa : radcan(limit(F_2aa, ε, 0, plus));

lim_S_2aa1 : radcan(limit(S_2aa1, ε, 0, plus));

lim_x_1aa1 : radcan(limit(x_i3, ε, 0, plus)), S_i = lim_S_1aa, F_i = lim_F_1aa1, F_j = lim_F_2aa, S_j = lim_S_2aa1;

x_2aa1 : x_j3, S_i = S_1aa, F_i = F_1aa1, F_j = F_2aa, S_j = S_2aa1;

lim_x_2aa1 : radcan(limit(x_2aa1, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_aa1 : radcan(limit(lim_x_1aa1 + lim_x_2aa1 + lim_x_1aa1/(lim_x_1aa1 + lim_x_2aa1) * ex_x_ba + lim_x_2aa1/(lim_x_1aa1 + lim_x_2aa1) * ex_x_ca1, ε, 0, plus));

We establish that for ε → 0 the expected effort for V_3 → 0 is larger than
for any V_3 in this interval. To do so, we check the denominator of the
difference for roots to prove that the function is continous within the
interval. Then, we also inspect the numerator for roots. Lastly, we
establish that for at least one V_3 the expressions is indeed positive,
concluding our proof. We use the function nroots to check for roots,
which internally uses Sturm's theorem.

denom_x_aa1 : denom(radcan(ex_eff_0 - ex_x_aa1));

num_x_aa1 : num(radcan(ex_eff_0 - ex_x_aa1));

nroots(denom_x_aa1, 0, 0.11);

nroots(num_x_aa1, 0, 0.11);

ex_eff_0 - ex_x_aa1, V_3 = 0.1;

We calculate expected utilities:

EU_1aa1 : radcan(EU_i3), S_i = S_1aa, F_i = F_1aa1, F_j = F_2aa, S_j = S_2aa1;

radcan(limit(EU_1aa1, ε, 0, plus));

EU_2aa1 : radcan(EU_j3), S_i = S_1aa, F_i = F_1aa1, F_j = F_2aa, S_j = S_2aa1;

radcan(limit(EU_2aa1, ε, 0, plus));

EU_3aa1 : radcan(EU_o3), S_i = S_1aa, F_i = F_1aa1, F_j = F_2aa, S_j = S_2aa1, S_o = EU_3ba, F_o = EU_3ca1;

radcan(limit(EU_3aa1, ε, 0, plus));

### Subcase A.2:

We define the remaining prizes in this subcase:

F_1aa2 : EU_1ca2 ;

S_2aa2 : EU_2ca2;

And prize differences:

D_1aa2 : radcan(S_1aa - F_1aa2);

lim_D_1aa2 : radcan(limit(D_1aa2, ε, 0, plus));

D_2aa2: radcan(S_2aa2 - F_2aa);

lim_D_2aa2 : radcan(limit(D_2aa2, ε, 0, plus));

We establish that for ε → 0 both prize differences are positive (case III).
To do so, we check the denominators of both expressions for roots to
prove that the function is continous within the interval. Then, we also
inspect the numerators for roots. Lastly, we cestablish that for at least
one V_3 both expressions are indeed positive, concluding our proof. We
use the function nroots to check for roots, which internally uses Sturm's
theorem.

denom_D_1aa2 : denom(radcan(lim_D_1aa2));

nroots(denom_D_1aa2, 0.1, 0.25);

num_D_1aa2 : num(radcan(lim_D_1aa2));

nroots(num_D_1aa2, 0.1, 0.25);

lim_D_1aa2, V_3 = 0.2;

denom_D_2aa2 : denom(radcan(lim_D_2aa2));

nroots(denom_D_2aa2, 0.1, 0.25);

num_D_2aa2 : num(radcan(lim_D_2aa2));

nroots(num_D_2aa2, 0.1, 0.25);

lim_D_2aa2, V_3 = 0.2;

We calculate best responses:

x_1aa2 : x_i3, S_i = S_1aa, F_i =  F_1aa2, F_j = F_2aa, S_j = S_2aa2;

x_1aa2 : radcan(x_1aa2);

lim_x_1aa2 : radcan(limit(x_1aa2, ε, 0, plus));

x_2aa2 :  x_j3, S_i = S_1aa, F_i =  F_1aa2, F_j = F_2aa, S_j = S_2aa2;

x_2aa2 : radcan(x_2aa2);

lim_x_2aa2 : radcan(limit(x_2aa2, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_aa2 : radcan(limit(lim_x_1aa2 + lim_x_2aa2 + lim_x_1aa2/(lim_x_1aa2 + lim_x_2aa2) * ex_x_ba + lim_x_2aa2/(lim_x_1aa2 + lim_x_2aa2) * ex_x_ca2, ε, 0, plus));

We establish that for ε → 0 the expected effort for V_3 → 0 is larger than
for any V_3 in this interval. To do so, we check the denominator of the
difference for roots to prove that the function is continous within the
interval. Then, we also inspect the numerator for roots. Lastly, we
establish that for at least one V_3 the expressions is indeed positive,
concluding our proof. We use the function nroots to check for roots,
which internally uses Sturm's theorem.

denom_x_aa2 : denom(radcan(ex_eff_0 - ex_x_aa2));

num_x_aa2 : num(radcan(ex_eff_0 - ex_x_aa2));

nroots(denom_x_aa2, 0.1, 0.25);

nroots(num_x_aa2, 0.1, 0.25);

ex_eff_0 - ex_x_aa2, V_3 = 0.2;

We calculate expected utilities:

EU_1aa2 : EU_i3, S_i = S_1aa, F_i =  F_1aa2, F_j = F_2aa, S_j = S_2aa2;

radcan(limit(EU_1aa2, ε, 0, plus));

EU_2aa2 : EU_j3, S_i = S_1aa, F_i =  F_1aa2, F_j = F_2aa, S_j = S_2aa2;

radcan(limit(EU_2aa2, ε, 0, plus));

EU_3aa2 : EU_o3, S_i = S_1aa, F_i =  F_1aa2, F_j = F_2aa, S_j = S_2aa2, S_o = EU_3ba, F_o = EU_3ca2;

Auxiliary calculations:

lim_S_1aa : radcan(limit(S_1aa, ε, 0, plus));

lim_F_1aa2 : radcan(limit(F_1aa2, ε, 0, plus));

lim_S_2aa2 : radcan(limit(S_2aa2, ε, 0, plus));

lim_F_2aa : radcan(limit(F_2aa, ε, 0, plus));

lim_S_o : radcan(limit(EU_3ba, ε, 0, plus));

lim_F_o : radcan(limit(EU_3ca2, ε, 0, plus));

radcan(limit(EU_o3, ε, 0, plus)), S_i = lim_S_1aa, F_i = lim_F_1aa2, F_j = lim_F_2aa, S_j = lim_S_2aa2, S_o = lim_S_o, F_o = lim_F_o;

### Subcase A.3:

We define the remaining prizes in this subcase:

F_1aa3 : EU_1ca3;

S_2aa3 : EU_2ca3;

And prize differences:

D_1aa3 : radcan(S_1aa - F_1aa3);

lim_D_1aa3 : radcan(limit(D_1aa3, ε, 0, plus));

D_2aa3 : radcan(S_2aa3 - F_2aa);

lim_D_2aa3 : radcan(limit(D_2aa3, ε, 0, plus));

We establish that for ε → 0 both prize differences are positive (case III).
To do so, we check the denominators of both expressions for roots to
prove that the function is continous within the interval. Then, we also
inspect the numerators for roots. Lastly, we cestablish that for at least
one V_3 both expressions are indeed positive, concluding our proof. We
use the function nroots to check for roots, which internally uses Sturm's
theorem.

denom_D_1aa3 : denom(radcan(lim_D_1aa3));

nroots(denom_D_1aa3, 0.24, 0.5);

num_D_1aa3 : num(radcan(lim_D_1aa3));

nroots(num_D_1aa3, 0.24, 0.5);

lim_D_1aa3, V_3 = 0.3;

denom_D_2aa3 : denom(radcan(lim_D_2aa3));

nroots(denom_D_2aa3, 0.24, 0.5);

num_D_2aa3 : num(radcan(lim_D_2aa3));

nroots(num_D_2aa3, 0.24, 0.5);

lim_D_2aa3, V_3 = 0.3;

We calculate best responses:

x_1aa3 : x_i3, S_i = S_1aa, F_i = F_1aa3, F_j = F_2aa, S_j = S_2aa3;

Auxiliary calculations:

lim_S_1aa : radcan(limit(S_1aa, ε, 0, plus));

lim_F_1aa3 : radcan(limit(F_1aa3, ε, 0, plus));

lim_F_2aa : radcan(limit(F_2aa, ε, 0, plus));

lim_S_2aa3 : radcan(limit(S_2aa3, ε, 0, plus));

lim_x_1aa3 : radcan(limit(x_i3, ε, 0, plus)), S_i = lim_S_1aa, F_i =  lim_F_1aa3, F_j = lim_F_2aa, S_j = lim_S_2aa3;

x_2aa3 : x_j3, S_i = S_1aa, F_i = F_1aa3, F_j = F_2aa, S_j = S_2aa3;

lim_x_2aa3 : radcan(limit(x_j3, ε, 0, plus)), S_i = lim_S_1aa, F_i =  lim_F_1aa3, F_j = lim_F_2aa, S_j = lim_S_2aa3;

We calculate expected effort in this and all subsequent nodes:

ex_x_aa3 : radcan(limit(lim_x_1aa3 + lim_x_2aa3 + lim_x_1aa3/(lim_x_1aa3 + lim_x_2aa3) * ex_x_ba + lim_x_2aa3/(lim_x_1aa3 + lim_x_2aa3) * ex_x_ca3, ε, 0, plus));

num_x_aa3 : num(radcan(ex_eff_0 - ex_x_aa3));

denom_x_aa3 : denom(radcan(ex_eff_0 - ex_x_aa3));

nroots(num_x_aa3, 0.24, 0.5);

nroots(denom_x_aa3, 0.24, 0.5);

ex_eff_0 - ex_x_aa3, V_3 = 0.3;

We calculate expected utilities:

EU_1aa3 : EU_i3, S_i = S_1aa, F_i = F_1aa3, F_j = F_2aa, S_j = S_2aa3;

radcan(limit(EU_1aa3, ε, 0, plus));

EU_2aa3 : EU_j3, S_i = S_1aa, F_i =  F_1aa3, F_j = F_2aa, S_j = S_2aa3;

radcan(limit(EU_2aa3, ε, 0, plus));

EU_3aa3 : EU_o3, S_i = S_1aa, F_i =  F_1aa3, F_j = F_2aa, S_j = S_2aa3, S_o = EU_3ba, F_o = EU_3ca3;

radcan(limit(EU_3aa3, ε, 0, plus));

### Case B:

We define the prizes:

S_1ab : EU_1bb;

F_1ab : EU_1cb;

S_2ab : EU_2cb;

F_2ab : EU_2bb;

S_1ab - F_1ab;

D_1ab : radcan(limit(S_1ab - F_1ab, ε, 0, plus));

D_1abzp : solve(num(D_1ab)=0, V_3);

allroots(num(D_1ab));

S_2ab - F_2ab;

D_2ab: radcan(limit(S_2ab - F_2ab, ε, 0, plus));

D_2abzp : solve(num(D_2ab)=0, V_3);

allroots(num(D_2ab));

From this subcases B.1, B.2, B.3 follow:

### Subcase B.1:

S_1ab > F_1ab and S_2ab > F_2ab, hence case III.

We calculate best responses:

x_1ab1 : x_i3, S_i = S_1ab, F_i = F_1ab, F_j = F_2ab, S_j = S_2ab;

lim_x_1ab1 : radcan(limit(x_1ab1, ε, 0, plus));

x_2ab1 : x_j3, S_i = S_1ab, F_i = F_1ab, F_j = F_2ab, S_j = S_2ab;

radcan(x_2ab1);

lim_x_2ab1 : radcan(limit(x_2ab1, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ab1 : radcan(limit(x_1ab1 + x_2ab1 + lim_x_1ab1/(lim_x_1ab1 + lim_x_2ab1) * ex_x_bb + lim_x_2ab1/(lim_x_1ab1 + lim_x_2ab1) * ex_x_cb, ε, 0, plus));

We establish that for ε → 0 the expected effort for V_3 → 0 is larger than
for any V_3 in this interval. To do so, we check the denominator of the
difference for roots to prove that the function is continous within the
interval. Then, we also inspect the numerator for roots. Lastly, we
establish that for at least one V_3 the expressions is indeed positive,
concluding our proof. We use the function nroots to check for roots,
which internally uses Sturm's theorem.

denom_x_ab1 : denom(radcan(ex_eff_0 - ex_x_ab1));

num_x_ab1 : num(radcan(ex_eff_0 - ex_x_ab1));

nroots(denom_x_ab1, 0.49, 0.77);

nroots(num_x_ab1, 0.49, 0.77);

ex_eff_0 - ex_x_ab1, V_3 = 0.6;

We calculate expected utilities:

EU_1ab1 : EU_i3, S_i = S_1ab, F_i = F_1ab, F_j = F_2ab, S_j = S_2ab;

radcan(limit(EU_1ab1, ε, 0, plus));

EU_2ab1 : EU_j3, S_i = S_1ab, F_i = F_1ab, F_j = F_2ab, S_j = S_2ab;

radcan(limit(EU_2ab1, ε, 0, plus));

EU_3ab1 : EU_o3, S_i = S_1ab, F_i = F_1ab, F_j = F_2ab, S_j = S_2ab, S_o = EU_3bb, F_o = EU_3cb;

Auxiliary calculations:

lim_S_1ab : radcan(limit(S_1ab, ε, 0, plus));

lim_F_1ab : radcan(limit(F_1ab, ε, 0, plus));

lim_F_2ab : radcan(limit(F_2ab, ε, 0, plus));

lim_S_2ab : radcan(limit(S_2ab, ε, 0, plus));

lim_S_o : radcan(limit(EU_3bb, ε, 0, plus));

lim_F_o : radcan(limit(EU_3cb, ε, 0, plus));

radcan(limit(EU_o3, ε, 0, plus)), S_i = lim_S_1ab, F_i = lim_F_1ab, F_j = lim_F_2ab, S_j = lim_S_2ab, S_o = lim_S_o, F_o = lim_F_o;

### Subcase B.2:

S_1ab ≤ F_1ab and S_2ab > F_2ab, hence case I.

We calculate best responses:

assume[S_2ab - F_2ab >= 0, S_1ab - F_1ab < 0];

x_1ab2 : 0;

radcan(x_1ab2);

radcan(limit(x_1ab2, ε, 0, plus));

x_2ab2 : BR_i(x_1ab2, S_2ab, F_2ab);

radcan(x_2ab2);

radcan(limit(x_2ab2, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ab2 : radcan(limit(x_1ab2 + x_2ab2 + ex_x_cb, ε, 0, plus));

Trivially, expected effort is higher when V_3 → 0 than within this interval:

ex_eff_0 - ex_x_ab2;

We calculate expected utilities:

EU_1ab2 : EU_i2(x_2ab2, S_1ab, F_1ab);

Auxiliary calculations:

lim_x_2ab2: radcan(limit(x_2ab2, ε, 0, plus));

lim_S_1ab : radcan(limit(S_1ab, ε, 0, plus));

lim_F_1ab : radcan(limit(F_1ab, ε, 0, plus));

radcan(limit(EU_i2(lim_x_2ab2, lim_S_1ab, lim_F_1ab), ε, 0, plus));

EU_2ab2 : EU_i(x_2ab2, x_1ab2, S_2ab, F_2ab);

radcan(limit(EU_2ab2, ε, 0, plus));

EU_3ab2 : EU_o(x_1ab2, x_2ab2, EU_3bb, EU_3cb);

radcan(limit(EU_3ab2, ε, 0, plus));

forget[S_2ab - F_2ab >= 0, S_1ab - F_1ab < 0];

### Subcase B.3:

S_1ab ≤ F_1ab and S_2ab ≤ F_2ab, hence case II.

We calculate best responses:

x_1ab3 : 0;

radcan(x_1ab3);

radcan(limit(x_1ab3, ε, 0, plus));

x_2ab3 : 0;

radcan(x_2ab3);

radcan(limit(x_2ab3, ε, 0, plus));

We calculate expected effort in this and all subsequent nodes:

ex_x_ab3 : radcan(limit(x_1ab3 + x_2ab3 + 1/2 * ex_x_bb + 1/2 * ex_x_cb, ε, 0, plus));

We establish that for ε → 0 the expected effort for V_3 → 0 is larger than
for any V_3 in this interval. To do so, we check the denominator of the
difference for roots to prove that the function is continous within the
interval. Then, we also inspect the numerator for roots. Lastly, we
establish
that for at least one V_3 the expressions is indeed positive, concluding
our proof. We use the function nroots to check for roots, which
internally uses Sturm's theorem.

denom_x_ab3 : denom(radcan(ex_eff_0 - ex_x_ab3));

num_x_ab3 : num(radcan(ex_eff_0 - ex_x_ab3));

nroots(denom_x_ab3, 0.92, 1);

nroots(num_x_ab3, 0.92, 1);

ex_eff_0 - ex_x_ab3, V_3 = 0.95;

We calculate expected utilities:

EU_1ab3 : radcan(1/2 * S_1ab + 1/2 * F_1ab);

radcan(limit(EU_1ab3, ε, 0, plus));

EU_2ab3 : radcan(1/2 * S_2ab + 1/2 * F_2ab);

radcan(limit(EU_2ab3, ε, 0, plus));

EU_3ab3 : radcan(1/2 * EU_3bb + 1/2 * EU_3cb);

radcan(limit(EU_3ab3, ε, 0, plus));