I'm new to stochastic calculus on jump processes and encountered a difficulty. I would appreciate some clarification from the community on the following question.
Let $g_t$ be a $\mathcal{F_t}$-adapted process where $\mathcal{F_t}$ is the natural filtration generated by a Poisson process $N_t$.
Define stochastic integral $Y_t$ as $$Y_t = \int_0^t g_{s^{-}} d\hat{N_s}$$ where $\hat{N_t} = N_t - \lambda t$ is the compensated Poisson process.
Suppose $Z_t = f(t,Y_t)$ is once differentiable in $t$, then the Ito formula for Poisson Process is \begin{equation}dZ_t = \bigg\{\partial_t f(t,Y_t) + \lambda \Big(\big[f(t, Y_{t^{-}} + g_{t^{-}}) - f(t,Y_{t^{-}})\big] - g_t \partial_y f(t,Y_t) \Big) \bigg\}dt + \bigg[ f(t,Y_{t^{-}} + g_{t^{-}}) - f(t, Y_{t^{-}}) \bigg]d\hat{N_t} \end{equation}
so my question is why then do we have, by Ito formula, \begin{equation} H(\tau, N_\tau) = H(t,N_t) + \int_t^\tau (\partial_t + \mathcal{L}_s)H(s, N_s)ds + \int_t^\tau \left[ H(s, N_{s^{-}} + 1) - H(s,N_{s^{-}})\right]d\hat{N_s} \end{equation} where $\mathcal{L_t}{H(t,n)} = \lambda(t,n,u) \left[ H(t,n+1) - H(t,n)\right]$? Take $N_t = n$.
Why did the $-g_t \partial_y{H(t, N_t)}$ term disappear? I believe $Y_t = \int_0^t 1 d\hat{N_s} = \hat{N_t}$ so $-g_t \partial_y{H(t, N_t)} = -\partial_{\hat{N_t}} H(t,N_t) = 0$? Wouldn't $\partial_\hat{N_t} H(t,N_t) = \partial_{N_t} H(t,N_t)$ instead?
Thanks