$$
\hat{\Pi}{T}(\omega)=\hat{\mathbf{H}}{0} \cdot \mathbf{S}{0}+\sum{i=0}^{n} \int_{0}^{T} H_{t}^{(i)} d S_{t}^{(i)} \geq \tilde{\Pi}{T}(\omega) \quad \forall \omega \in \mathcal{F}{T}
$$
then, necessarily,
$$
\hat{\Pi}{t} \geq \tilde{\Pi}{t} \quad \forall t \in[0, T],
$$
and, in particular
$$
\hat{\Pi}{0} \geq \tilde{\Pi}{0}
$$
Otherwise there exists an arbitrage opportunity by buying the cheaper portfolio and selling the overvalued one. In fact, by this argumentation, the value of $\tilde{\Pi}{0}$ has to be the solution of the constrained optimization problem $$ \tilde{\Pi}{0}=\min {\left(H{t}\right){t \in[0, T]}} \hat{\Pi}{0}
$$
STAT4021 COURSE NOTES :
$$
d S_{t}^{}=S_{t}^{}\left((\mu-r) d t+\sigma d W_{t}\right),
$$
which, by Girsanov’s Theorem $4.31$, shows that
$$
W_{t}^{Q}=W_{t}+\frac{\mu-r}{\sigma} t
$$
turns into a martingale, namely
$$
S_{0}^{}=E_{Q}\left[S_{t}^{}\right],
$$
under the equivalent measure $Q$, given by