I'm a math master student. I'm trying to follow a course-note that unfortunately has chasms to fill for this specific derivation. Rigour unfortunately has been thrown to the gutter.
Let $G$ denote a payoff function of some option, and suppose $G$ depends only on the final value of the underlying stock, so $G(S_T)$, where $T$ denotes the maturity. Let $V_t := F(t, S_t)$ denote the price process of the option. Lastly, let $f_x$ denote the partial of $f$ wrt $x$. Then, below is the Black-scholes PDE (as defined in my notes): \begin{equation}\label{eq1} \begin{aligned} F_t(t, s) + (r-q)sF_s(t,s) + \frac{1}{2}\sigma^2 s^2 F_{ss}(t,s) - rF(t, s) &= 0 \\ F(T, s) &= G(s). \end{aligned} \end{equation} In particular $G$ also doubles as the boundary condition in the Feynman-Kac formula. To make everything more concrete, let me state Ito's lemma for SDEs and the Feynman-Kac formula. Firstly though let the SDE be $dX_t = \mu(t, X_t)dt + \sigma(t, X_t)dW_t$, with initial condition $X_s=x$ for some $s \leq t$.
Ito's lemma (sde): $F(t, S_t) - F(s, S_s) = \int_s^t\left[\sigma(u, S_u)F_s(u, S_u)\right]dW_u + \int_s^t\left[ F_t(u, S_u) + \mu(u, S_u)F_s(u, S_u) + \frac{1}{2}\sigma(u, S_u)F_{ss}(u, S_u) \right]du$
Feynman-Kac formula: Let $B(s) := F(T,s)$ be the boundary conditions. Now suppose $$F_t(t, s) + \mu(t, s)F_s(t, s) + \frac{1}{2}\sigma^2(t, s)F_{ss}(t, s) = 0.$$ In particular this implies that the second integral in the Ito's lemma is 0, and thus we obtain that ($s \leq t$): $$ F(s, S_s) = \mathbb{E}\left[ B(S_T) |\mathcal{F}_s \right] $$
How is PDE "proved" in my lecture notes? First note that under the risk-neutral principle, $V_t = F(t, S_t) = \exp(-r(T-t))\mathbb{E}\left[G(S_T)|\mathcal{F}_t\right]$.
Then we suppose a function $H(t,s)$ that is a solution to: $$ \begin{aligned} H_t(t, s) + (r-q)sH_s(t, s) + \frac{1}{2}\sigma^2s^2H_{ss}(t, s) &= 0 \\ H(T, s) &= \exp(-rT)G(s), \end{aligned} $$ where the RHS of the second line is the boundary condition $B(s)$. Note, to compare with the Feynman-Kac formula, in this case $\mu(t, s) = (r-q)s$ and $\tilde{\sigma}(t, s) = \sigma s$.
Then by Feynman-Kac $$H(t, S_t) = \mathbb{E}\left[ B(s) | \mathcal{F}_t \right] = \exp(-rT)\mathbb{E}\left[ G(s) | \mathcal{F}_t \right].$$ Multiply both sides by $\exp(rt)$ to obtain $$ \exp(rt)H(t, S_t) = \exp(-r(T-t))\mathbb{E}\left[G(S_T)|\mathcal{F}_t\right] = F(t, S_t). $$
Finally the notes simply say take the partials of $F$ to obtain the initial PDE, but I can't make sense of this step.
I see components all over the place, but I can't assemble them together. We have the functions $\mu$ and $\tilde{\sigma}$, we have an expression for $F$ dependant on some $H$ satisfying the Feynman-Kac conditions, why do we need to create the PDE for $F$ then?
I feel like my question is slightly incoherent (and notation may be slightly messy), but that reflects the confused state I'm in now.