Solution (source code)

= Solution

A <martingale> with the specified terminal value must equal its <conditional expectation>. If $\widehat S_t=0$, <default> has already occurred and the terminal <European call option> payoff is zero. If $\widehat S_t>0$, put $h=T-t$. Conditional on survival to $T$,
$$
\widehat S_T=\widehat S_t e^{\lambda h}
  \exp\{-\sigma^2h/2+\sigma\sqrt h\,Y\},
$$
where $Y$ has the <standard normal distribution>; the <conditional probability> of this survival is $e^{-\lambda h}$. The <conditional expectation> of the payoff in the enlarged <filtration> used in part (c) is consequently
$$
e^{-\lambda h}\widehat S_t e^{\lambda h}
 F\left(\sigma^2h,\frac{Ke^{-\lambda h}}{\widehat S_t}\right).
$$
This expression is already measurable with respect to the <natural filtration> of $\widehat S$, so the <tower property of conditional expectation> gives the same value there. \b[The survival factor cancels the compensating growth factor]:
$$
\boxed{\widehat C_t=
\begin{cases}
\widehat S_t F\!\left(\sigma^2(T-t),\dfrac{Ke^{-\lambda(T-t)}}{\widehat S_t}\right),&\widehat S_t>0,\\
0,&\widehat S_t=0.
\end{cases}}
$$
The separate zero branch avoids division by zero. At $t=T$ it gives the required payoff, using $F(0,m)=(1-m)^+$; <integrability> follows from $(\widehat S_T-K)^+\leq\widehat S_T$.