Solution (source code)

= Solution

Assume $E\to G$ under label $a$, $F\to G$ under label $b$, and $E\lor F$ under label $c$. A temporary case assumption $E$ gives $G$ by the <modus ponens rule> using $a$. A temporary case assumption $F$ gives $G$ by the <modus ponens rule> using $b$. The <disjunction elimination rule> discharges these case assumptions and concludes $G$ under $a,b,c$.

Apply the <implication introduction rule> three times, discharging $c$, then $b$, then $a$. The resulting theorem is
$$
(E\to G)\to((F\to G)\to((E\lor F)\to G)).
$$
The displayed parentheses make explicit the right association of the source formula.