How to find a lambda term to complete a function?
We can remove the dependence on what the values stored in the sequences are by assuming that we pass "the same thing" as the first two arguments. Regardless of what $b_1, b_2, b_3$ are:

$$([b_1b_2b_3]\,x)\,x = \lambda f. ((f\,x)\,x)\,x$$

This gives you an effective way to tell the difference between an empty sequence and a non-empty sequence :

$$(([]\left&lt;M,u\right&gt;)\left&lt;M,u\right&gt;)\,(\lambda x. x) = \lambda x. x$$
$$(([b_1]\left&lt;M,u\right&gt;)\left&lt;M,u\right&gt;)\,(\lambda x. x) = \left&lt;M,u\right&gt;$$
$$(([b_1b_2]\left&lt;M,u\right&gt;)\left&lt;M,u\right&gt;)\,(\lambda x. x) = \left&lt;M,u\right&gt;$$
$$(([b_1b_2b_3]\left&lt;M,u\right&gt;)\left&lt;M,u\right&gt;)\,(\lambda x. x) = \left&lt;M,u\right&gt;$$

So if $s$ is a sequence, consider this:

$$((((s\left&lt;M,u\right&gt;) \left&lt;M,u\right&gt;) (\lambda x. x))\,\hbox{false}$$

What does it reduce to if $s$ is empty? What does it reduce to if it's non-empty?