Subderivations can be nested. For an example, we provide a derivation for the argument
We begin with the premises and then assume the antecedent of the conclusion.
Note. Each time we begin a new subderivation and enter a temporary assumption, there is a specific formula we are hoping to derive when it comes time to end the derivation and discharge the assumption. To make things easier to follow, we will add this formula to the annotation of the assumption. That formula will not officially be part of the annotation and does not affect the correctness of the derivation. Instead, it will serve as an informal reminder to ourselves noting where we are going.
This starts a subderivation to derive the argument's conclusion. Now we will try a Disjunction Elimination (DE) to derive its consequent:
This will require the showing two conditionals we need for the antecedent lines of a DE, namely:
We begin with the first of these conditionals.
This subderivation is easily finished.
5, 6 KI
1, 7 CE
Now we are ready to discharge the two assumptions at Lines 5 and 6.
Now it's time for the second conditional needed for our DE planned back at Line 4. We begin.
3, 14 CE
Note that we have a contradiction between Lines 12 and 15. But line 12 is in the wrong place. We need it in the same subderivation as Line 15. A silly trick at Lines 16 and 17 below will accomplish that. Then the assumptions at Lines 12 and 13 can be discharged.
12, 12 KI
Finally, with Lines 4, 11, and 19, we can perform the DE we've been wanting since Line 4.
4, 11, 19 DE
Now to finish the derivation by discharging the assumption at Line 4.