Let $X(t)$ be a non-homogenous Poisson process with rate $\lambda(t)$ (a function of $t$). Prove that $X(t) - \int_0^t \! \lambda(s) \, \mathrm{d}s$ is a martingale.
I read it from https://www.maths.univ-evry.fr/pages_perso/jeanblanc/conferences/Cimpa-sauts.pdf (Page11, proposition 1.3.1). It seems to be a well-known martingale property so the author does not provide a proof in the notes.
I can't figure out how to do that, any suggestions?
Let $\mathcal{F}_t$ be the natural filtration. Since $X_t$ has independent increments, if $0\leq s\leq t$ then $$ \mathbb{E}[X_t-\int_0^t\lambda(u)\;du\mid \mathcal{F}_s]=\mathbb{E}[X_t-X_s+X_s\mid\mathcal{F}_s]-\int_0^t\lambda(u)\;du$$ $$ =\mathbb{E}[X_t-X_s]+X_s-\int_0^t\lambda(u)\;du=X_s+\int_s^t\lambda(u)\;du-\int_0^t\lambda(u)\;du$$ $$=X_s-\int_0^s\lambda(u)\;du$$