[proofplan]
We construct the meet and join as orthogonal projections onto the subspaces suggested by the range formulas. The key point is to show that these projections actually belong to $M$; for this we use the defining von Neumann algebra identity $M=M''$, where $M'$ is the commutant of $M$ and $M''$ is the double commutant. The commutant argument requires reducing subspaces: every operator in $M'$ and its adjoint preserve the relevant closed subspaces, so the associated orthogonal projections commute with all of $M'$ and hence lie in $M$.
[/proofplan]
[step:Construct the meet projection from the intersection of the ranges]
Define the closed subspace $K\subseteq H$ by
\begin{align*}
K:=\bigcap_{i\in I}p_iH.
\end{align*}
If $I=\varnothing$, this means $K=H$. Since each $p_iH$ is closed, $K$ is closed. Let $e\in\mathcal{L}(H)$ be the [orthogonal projection](/theorems/437) onto $K$.
We claim that $e\in M$. Let $T\in M'$ be arbitrary. For each $i\in I$, the equality $Tp_i=p_iT$ implies that $T(p_iH)\subseteq p_iH$. Since $M$ is self-adjoint, $a^*\in M$ for every $a\in M$; from $Ta^*=a^*T$ and taking adjoints, we get $aT^*=T^*a$, so $T^*\in M'$. Applying the preceding invariance argument to $T^*$ gives $T^*(p_iH)\subseteq p_iH$. Hence each $p_iH$ is reducing for $T$, and therefore their intersection $K$ is invariant under both $T$ and $T^*$.
It follows that $K^\perp$ is invariant under $T$. Indeed, if $y\in K^\perp$ and $z\in K$, then $T^*z\in K$, so
\begin{align*}
(Ty,z)_H=(y,T^*z)_H=0.
\end{align*}
Thus $Ty\in K^\perp$. Therefore both $K$ and $K^\perp$ are invariant under $T$, so $T$ commutes with the orthogonal projection $e$ onto $K$. Since $T\in M'$ was arbitrary, $e\in M''$. By the bicommutant characterization of von Neumann algebras, $M=M''$, so $e\in M$.
[guided]
The projection onto the intersection of the ranges is the only plausible candidate for the meet, but we must first prove that it lies in the von Neumann algebra $M$. Define
\begin{align*}
K:=\bigcap_{i\in I}p_iH.
\end{align*}
If $I=\varnothing$, the intersection is taken to be all of $H$. The subspace $K$ is closed because every $p_iH$ is the range of an orthogonal projection and hence is closed. Let $e\in\mathcal{L}(H)$ be the orthogonal projection onto $K$.
To show $e\in M$, we use the von Neumann algebra identity $M=M''$ from the formalized statement. Thus it is enough to prove that $e$ commutes with every operator in $M'$. Fix $T\in M'$. Since each $p_i$ belongs to $M$, the definition of the commutant gives
\begin{align*}
Tp_i=p_iT.
\end{align*}
If $x\in p_iH$, then $x=p_iy$ for some $y\in H$, and hence
\begin{align*}
Tx=Tp_iy=p_iTy\in p_iH.
\end{align*}
Thus $p_iH$ is invariant under $T$.
We also need invariance under $T^*$, not only under $T$, because commuting with an orthogonal projection is equivalent to reducing the projected subspace. We verify that $T^*\in M'$. If $a\in M$, then $a^*\in M$ because $M$ is self-adjoint; since $T\in M'$, we have $Ta^*=a^*T$. Taking adjoints gives $aT^*=T^*a$, so $T^*$ commutes with every $a\in M$. Hence $T^*\in M'$, and the same range-invariance computation gives $T^*(p_iH)\subseteq p_iH$. Therefore each $p_iH$ is reducing for $T$. Intersections of subspaces invariant under $T$ and $T^*$ are again invariant under $T$ and $T^*$, so $K$ is invariant under both $T$ and $T^*$.
Now we prove that $K^\perp$ is invariant under $T$. Let $y\in K^\perp$ and $z\in K$. Since $K$ is invariant under $T^*$, we have $T^*z\in K$. Hence
\begin{align*}
(Ty,z)_H=(y,T^*z)_H=0.
\end{align*}
Because this holds for every $z\in K$, we have $Ty\in K^\perp$. Thus $T$ preserves both $K$ and $K^\perp$. With respect to the [orthogonal decomposition](/theorems/436) $H=K\oplus K^\perp$, the operator $T$ is block diagonal, and therefore it commutes with the projection $e$ onto the first summand. Since every $T\in M'$ commutes with $e$, we have $e\in M''=M$.
[/guided]
[/step]
[step:Verify that the constructed projection is the greatest lower bound]
For every $i\in I$, the inclusion $eH=K\subseteq p_iH$ gives $e\le p_i$. Hence $e$ is a lower bound for the family $(p_i)_{i\in I}$.
Let $q\in\mathcal{P}(M)$ be any lower bound, so $q\le p_i$ for every $i\in I$. By the definition of the projection order, $qH\subseteq p_iH$ for every $i\in I$, and hence
\begin{align*}
qH\subseteq \bigcap_{i\in I}p_iH=K=eH.
\end{align*}
Thus $q\le e$. Therefore $e$ is the greatest lower bound of the family, and
\begin{align*}
e=\bigwedge_{i\in I}p_i.
\end{align*}
[/step]
[step:Construct the join projection from the closed span of the ranges]
Define the closed subspace $L\subseteq H$ by
\begin{align*}
L:=\overline{\operatorname{span}\left(\bigcup_{i\in I}p_iH\right)}.
\end{align*}
If $I=\varnothing$, this gives $L=\{0\}$. Let $f\in\mathcal{L}(H)$ be the orthogonal projection onto $L$.
We show that $f\in M$. Let $T\in M'$. For every $i\in I$, the equality $Tp_i=p_iT$ gives $T(p_iH)\subseteq p_iH$. As above, self-adjointness of $M$ implies $T^*\in M'$, so $T^*(p_iH)\subseteq p_iH$ for every $i\in I$. Therefore both $T$ and $T^*$ leave the algebraic span of $\bigcup_{i\in I}p_iH$ invariant, and by boundedness they leave its closure $L$ invariant.
We next show that $L^\perp$ is invariant under $T$. Let $y\in L^\perp$ and $z\in L$. Since $L$ is invariant under $T^*$, we have $T^*z\in L$. Hence
\begin{align*}
(Ty,z)_H=(y,T^*z)_H=0.
\end{align*}
Because this holds for every $z\in L$, we have $Ty\in L^\perp$. Thus both $L$ and $L^\perp$ are invariant under $T$, so $T$ commutes with the orthogonal projection $f$ onto $L$. Since $T\in M'$ was arbitrary, $f\in M''=M$.
[/step]
[step:Verify that the constructed projection is the least upper bound]
For every $i\in I$, the inclusion $p_iH\subseteq L=fH$ gives $p_i\le f$. Hence $f$ is an upper bound for the family $(p_i)_{i\in I}$.
Let $q\in\mathcal{P}(M)$ be any upper bound, so $p_i\le q$ for every $i\in I$. Then $p_iH\subseteq qH$ for every $i\in I$. Since $qH$ is a closed subspace of $H$, it contains the closed linear span of these ranges:
\begin{align*}
L=\overline{\operatorname{span}\left(\bigcup_{i\in I}p_iH\right)}\subseteq qH.
\end{align*}
Thus $fH\subseteq qH$, so $f\le q$. Therefore $f$ is the least upper bound of the family, and
\begin{align*}
f=\bigvee_{i\in I}p_i.
\end{align*}
This proves both completeness of $\mathcal{P}(M)$ and the stated range formulas for meets and joins.
[/step]