[proofplan]
We prove the inclusion directly from the verifier definition of $\mathsf{NP}$. Given a polynomial-time deterministic decider for a language $L$, we build a polynomial-time verifier that ignores its certificate and simply runs the decider. The empty certificate witnesses membership for every string in $L$, while no certificate can make the verifier accept a string outside $L$ because the decider rejects exactly those strings.
[/proofplan]
[step:Start with an arbitrary language decided in polynomial time]
Let $L \subseteq \Sigma^*$ be an arbitrary language with $L \in \mathsf{P}$. By the definition of $\mathsf{P}$, there exist a deterministic Turing machine $M$ and a polynomial $q: \mathbb{N} \to \mathbb{N}$ such that, for every string $x \in \Sigma^*$, the machine $M$ halts on input $x$ within at most $q(|x|)$ steps and satisfies
\begin{align*}
M(x) \text{ accepts } \iff x \in L.
\end{align*}
[/step]
[step:Construct a verifier that ignores the certificate]
Let $\varepsilon \in \Sigma^*$ denote the empty string. Define a deterministic Turing machine $V$ with two inputs, a string $x \in \Sigma^*$ and a certificate string $c \in \Sigma^*$, as follows: on input $(x,c)$, the machine $V$ ignores $c$, simulates $M$ on input $x$, and accepts exactly when $M$ accepts.
Formally, for all $x,c \in \Sigma^*$,
\begin{align*}
V(x,c) \text{ accepts } \iff M(x) \text{ accepts }.
\end{align*}
Since $V$ simulates $M$ on $x$ and performs only a fixed amount of additional work independent of the certificate, there is a polynomial $r: \mathbb{N} \to \mathbb{N}$, for example $r(n) = q(n) + n + 1$, such that $V$ halts on every input pair $(x,c)$ with $|c| \leq 1$ within at most $r(|x|)$ steps.
[guided]
We need to turn a deterministic decider into a nondeterministic polynomial-time verifier. The natural certificate is the empty string, because a deterministic computation does not need any extra witness.
Let $\varepsilon \in \Sigma^*$ be the empty string. We define a deterministic Turing machine $V$ whose inputs are a string $x \in \Sigma^*$ and a certificate string $c \in \Sigma^*$. The rule for $V$ is: ignore $c$, run the deterministic machine $M$ on $x$, and accept exactly when $M$ accepts. Thus, for every $x,c \in \Sigma^*$,
\begin{align*}
V(x,c) \text{ accepts } \iff M(x) \text{ accepts }.
\end{align*}
The verifier condition in $\mathsf{NP}$ requires polynomial running time in the input length, under a polynomial bound on certificate length. We choose the certificate-length bound $p: \mathbb{N} \to \mathbb{N}$ by $p(n) = 1$. This allows the empty certificate because $|\varepsilon| = 0 \leq 1$. Since $M$ runs in time at most $q(|x|)$, and $V$ only simulates $M$ after a fixed setup step, $V$ runs in polynomial time. For instance, the polynomial $r: \mathbb{N} \to \mathbb{N}$ defined by $r(n) = q(n) + n + 1$ bounds the running time of $V$ on all pairs $(x,c)$ with $|c| \leq 1$.
[/guided]
[/step]
[step:Verify the certificate condition for exactly the strings in the language]
Define the certificate-length bound $p: \mathbb{N} \to \mathbb{N}$ by $p(n) = 1$. We prove that, for every $x \in \Sigma^*$,
\begin{align*}
x \in L \iff \exists c \in \Sigma^* \text{ such that } |c| \leq p(|x|) \text{ and } V(x,c) \text{ accepts}.
\end{align*}
First suppose $x \in L$. Since $M$ decides $L$, the machine $M$ accepts $x$. Taking $c = \varepsilon$, we have $|c| = 0 \leq 1 = p(|x|)$, and the definition of $V$ gives that $V(x,c)$ accepts.
Conversely, suppose there exists $c \in \Sigma^*$ such that $|c| \leq p(|x|)$ and $V(x,c)$ accepts. By the definition of $V$, the machine $M$ accepts $x$. Since $M$ decides $L$, this implies $x \in L$.
[/step]
[step:Conclude that every polynomial-time language lies in nondeterministic polynomial time]
The machine $V$ is a deterministic polynomial-time verifier, and the polynomial $p(n) = 1$ bounds the length of certificates needed for accepted inputs. Therefore $L \in \mathsf{NP}$. Since $L \in \mathsf{P}$ was arbitrary, every language in $\mathsf{P}$ lies in $\mathsf{NP}$, so
\begin{align*}
\mathsf{P} \subseteq \mathsf{NP}.
\end{align*}
[/step]