[proofplan]
We build the complex one facet at a time along the shelling order. At the $j$-th stage, the new facet is a $d$-simplex attached to the previous partial complex along a shellable subcomplex of its boundary. If the attaching subcomplex is a proper nonempty union of boundary facets, it is a ball and the attachment does not change the homotopy type. If the attaching subcomplex is the entire boundary, the quotient of the new simplex by its boundary is $S^d$, so one new $d$-sphere is wedged on. The shelling restriction face detects exactly which of these two cases occurs.
[/proofplan]
[step:Define the partial complexes and the attaching subcomplexes]
For each $j \in \{1,\dots,m\}$, define the partial simplicial complex
\begin{align*}
K_j := F_1 \cup \cdots \cup F_j,
\end{align*}
with the convention $K_0 := \varnothing$. Here each facet $F_j$ is regarded as the full $d$-simplex on its vertex set, including all of its faces.
For $j \geq 1$, define the attaching subcomplex
\begin{align*}
A_j := K_{j-1} \cap F_j.
\end{align*}
Thus
\begin{align*}
K_j = K_{j-1} \cup_{A_j} F_j.
\end{align*}
Since $F_j$ is a $d$-simplex, its boundary $\partial F_j$ is the subcomplex consisting of all proper faces of $F_j$. For $j > 1$, the shelling condition says that $A_j$ is a nonempty pure $(d-1)$-dimensional subcomplex of $\partial F_j$. For $j = 1$, one has $A_1 = \varnothing$.
The restriction face $R_j$ determines the faces newly introduced at stage $j$: a face $G \subseteq F_j$ belongs to $K_j \setminus K_{j-1}$ exactly when $R_j \subseteq G$. Therefore
\begin{align*}
A_j = \{G \subseteq F_j : R_j \nsubseteq G\}.
\end{align*}
In particular, $A_j = \partial F_j$ exactly when $R_j = F_j$, because then every proper face $G \subsetneq F_j$ fails to contain $R_j$.
[/step]
[step:Show that a proper attaching subcomplex is a ball]
Assume $j > 1$ and $R_j \neq F_j$. We prove that $A_j$ is a simplicial ball by giving an explicit combinatorial model.
Let $V_j$ denote the vertex set of the simplex $F_j$, and let $r_j \subset V_j$ be the subset corresponding to the restriction face $R_j$. Since $R_j \neq F_j$, the complement $W_j := V_j \setminus r_j$ is nonempty. The description
\begin{align*}
A_j = \{G \subseteq F_j : R_j \nsubseteq G\}
\end{align*}
shows that $A_j$ consists exactly of those faces of $F_j$ that omit at least one vertex of $r_j$.
Let $\Delta(r_j)$ denote the simplex on the vertex set $r_j$, and let $\partial\Delta(r_j)$ denote its boundary subcomplex. Let $\Delta(W_j)$ denote the simplex on the vertex set $W_j$. The preceding description gives the combinatorial identity
\begin{align*}
A_j = \partial\Delta(r_j) * \Delta(W_j),
\end{align*}
where $*$ denotes the simplicial join. Indeed, a face of $\partial\Delta(r_j) * \Delta(W_j)$ is exactly a union $G_r \cup G_W$ with $G_r \subsetneq r_j$ and $G_W \subseteq W_j$, equivalently a face $G \subseteq V_j$ that does not contain all of $r_j$. Since $\partial\Delta(r_j)$ is a sphere and $\Delta(W_j)$ is a nonempty simplex, their join is a simplicial ball. Hence $A_j$ is a simplicial ball.
[guided]
We want to understand the topology of the part of the boundary along which the new simplex is attached. The shelling data gives a concrete description. Let $V_j$ be the vertex set of the $d$-simplex $F_j$, and let $r_j \subseteq V_j$ be the set of vertices spanning the restriction face $R_j$.
By definition of the restriction face, a face $G \subseteq F_j$ is new at stage $j$ exactly when it contains $R_j$. Therefore the old faces of $F_j$, namely the faces in $A_j = K_{j-1} \cap F_j$, are precisely those faces that do not contain $R_j$:
\begin{align*}
A_j = \{G \subseteq F_j : R_j \nsubseteq G\}.
\end{align*}
Now assume $j>1$ and $R_j \neq F_j$. The set $r_j$ is proper because $R_j$ is not the whole facet. It is also nonempty: if $r_j$ were empty, then every face of $F_j$ would contain $R_j$, so every face of $F_j$ would be new and $A_j$ would be empty, contradicting the shelling condition that $A_j$ is a nonempty subcomplex for $j>1$. Thus $r_j$ is a proper nonempty subset of $V_j$, so the complementary vertex set $W_j := V_j \setminus r_j$ is nonempty. Let $\Delta(r_j)$ be the simplex on $r_j$, let $\partial\Delta(r_j)$ be its boundary, and let $\Delta(W_j)$ be the simplex on $W_j$. The old faces are exactly the faces whose part in $r_j$ is proper, so
\begin{align*}
A_j = \partial\Delta(r_j) * \Delta(W_j),
\end{align*}
where $*$ denotes the simplicial join.
This identity is useful because its topology is standard and concrete: $\partial\Delta(r_j)$ is a sphere, while $\Delta(W_j)$ is a nonempty simplex, hence a ball. The join of a sphere with a nonempty simplex is a ball. Thus, whenever $j > 1$ and $R_j \neq F_j$, the attaching subcomplex $A_j$ is a simplicial ball contained in $\partial F_j$.
[/guided]
[/step]
[step:Attach along a ball without changing the homotopy type]
Assume $j > 1$ and $R_j \neq F_j$. By the previous step, $A_j$ is a nonempty simplicial ball, and the simplex $F_j$ is also a simplicial ball. Hence both polyhedra $|A_j|$ and $|F_j|$ are contractible.
Define the inclusion map of polyhedra
\begin{align*}
\iota_j: |A_j| \to |F_j|.
\end{align*}
Since the domain and codomain are nonempty contractible spaces, $\iota_j$ is a homotopy equivalence. We use the homotopy extension gluing theorem for CW-pairs: if $i: A \hookrightarrow X$ is a cofibration and $f: A \to B$ is a homotopy equivalence, then the induced map $X \to X \cup_A B$ is a homotopy equivalence. Here $|A_j| \hookrightarrow |K_{j-1}|$ is a cofibration because it is the inclusion of a subcomplex in a finite simplicial complex, and $|A_j| \hookrightarrow |F_j|$ is the homotopy equivalence just constructed. Therefore the canonical inclusion
\begin{align*}
|K_{j-1}| \to |K_j| = |K_{j-1}| \cup_{|A_j|} |F_j|
\end{align*}
is a homotopy equivalence.
Thus a facet with $R_j \neq F_j$ does not change the homotopy type of the partial complex.
[/step]
[step:Attach along the full boundary to add one $d$-sphere]
Assume $R_j = F_j$. Then, as shown above,
\begin{align*}
A_j = \partial F_j.
\end{align*}
Hence
\begin{align*}
K_j = K_{j-1} \cup_{\partial F_j} F_j.
\end{align*}
First suppose $d = 0$. Then each facet is a vertex and $\partial F_j = \varnothing$. The condition $R_j = F_j$ means that the stage adds one new isolated point. A wedge of $q$ copies of $S^0$ is interpreted here as a finite discrete space with $q+1$ points, so adding one isolated point increases the number of $S^0$ wedge summands by one.
Now suppose $d \geq 1$. By the induction hypothesis used in the next step, $|K_{j-1}|$ is homotopy equivalent to a wedge of $d$-spheres. Therefore $|K_{j-1}|$ is path-connected when $d \geq 1$, and $\pi_{d-1}(|K_{j-1}|) = 0$: for $d = 1$ this says $\pi_0(|K_{j-1}|)$ is a singleton, and for $d \geq 2$ it follows because a wedge of $d$-spheres is $(d-1)$-connected. The attaching map
\begin{align*}
|\partial F_j| \cong S^{d-1} \to |K_{j-1}|
\end{align*}
is therefore nullhomotopic. A CW attachment of a $d$-cell along a nullhomotopic attaching map is homotopy equivalent to wedging on $S^d$. Applying this to the simplex $|F_j|$ attached along its boundary gives
\begin{align*}
|K_j| \simeq |K_{j-1}| \vee S^d.
\end{align*}
Thus a facet with $R_j = F_j$ contributes exactly one new $d$-sphere wedge summand.
[guided]
Now we consider the exceptional case. If $R_j = F_j$, then no proper face of $F_j$ contains $R_j$. Hence every proper face of $F_j$ is already present in $K_{j-1}$, which means
\begin{align*}
A_j = K_{j-1} \cap F_j = \partial F_j.
\end{align*}
So at this stage we attach a $d$-simplex along its entire boundary:
\begin{align*}
K_j = K_{j-1} \cup_{\partial F_j} F_j.
\end{align*}
There is a small dimension-zero exception. If $d = 0$, then $F_j$ is a single vertex and $\partial F_j = \varnothing$. Attaching along the empty boundary means taking a disjoint union with one new point. With the standard convention that a wedge of $q$ copies of $S^0$ has $q+1$ points, this adds exactly one $S^0$ wedge summand.
Assume now that $d \geq 1$. This step is used inside the induction over the shelling order, so we are in the situation where the induction hypothesis has already identified the old complex $|K_{j-1}|$ with a wedge of $d$-spheres. To conclude that the attachment splits as a wedge, it is not enough to know the quotient by $K_{j-1}$; we must know that the attaching map is nullhomotopic. The induction hypothesis gives that $|K_{j-1}|$ is path-connected when $d \geq 1$, and its $(d-1)$-st homotopy obstruction vanishes: for $d = 1$, the boundary $S^0$ maps into a path-[connected space](/page/Connected%20Space), and for $d \geq 2$, a wedge of $d$-spheres has $\pi_{d-1} = 0$.
Therefore the attaching map
\begin{align*}
|\partial F_j| \cong S^{d-1} \to |K_{j-1}|
\end{align*}
is nullhomotopic. The standard CW-cell attachment lemma then applies: attaching a $d$-cell along a nullhomotopic map produces a space homotopy equivalent to the wedge with $S^d$. Since the simplex $|F_j|$ is a closed $d$-cell and $|\partial F_j|$ is its boundary sphere, we obtain
\begin{align*}
|K_j| \simeq |K_{j-1}| \vee S^d.
\end{align*}
This is exactly why the condition $R_j = F_j$ counts the sphere summands: it is precisely the case in which the new simplex is attached along its whole boundary, and the induction hypothesis makes that boundary attachment homotopically trivial.
[/guided]
[/step]
[step:Induct over the shelling order]
We prove by induction on $j$ that, for $d \geq 1$,
\begin{align*}
|K_j| \simeq \bigvee_{q_j} S^d,
\end{align*}
where
\begin{align*}
q_j := \#\{i \in \{1,\dots,j\} : R_i = F_i\}.
\end{align*}
For $d = 0$, the same induction is read with the convention that a wedge of $q_j$ copies of $S^0$ is a discrete space with $q_j + 1$ points.
For $j = 1$, the complex $K_1 = F_1$ is a single $d$-simplex, hence is contractible when $d \geq 1$ and is one point when $d = 0$. Also $R_1 \neq F_1$, since the first facet introduces all of its faces and the minimal new face is the empty face. Thus $q_1 = 0$, and the base case agrees with the empty wedge convention for $d \geq 1$ and the one-point convention for $d = 0$.
Assume the statement holds for $K_{j-1}$. If $R_j \neq F_j$, the previous attachment step gives
\begin{align*}
K_j \simeq K_{j-1}.
\end{align*}
Also $q_j = q_{j-1}$, so
\begin{align*}
K_j \simeq \bigvee_{q_j} S^d.
\end{align*}
If $R_j = F_j$, the full-boundary attachment step gives
\begin{align*}
K_j \simeq K_{j-1} \vee S^d.
\end{align*}
By the induction hypothesis,
\begin{align*}
K_{j-1} \simeq \bigvee_{q_{j-1}} S^d.
\end{align*}
Since $q_j = q_{j-1} + 1$, we obtain
\begin{align*}
K_j \simeq \bigvee_{q_j} S^d.
\end{align*}
Taking $j = m$ gives $K_m = K$, and therefore, for $d \geq 1$,
\begin{align*}
|K| \simeq \bigvee_{q} S^d,
\end{align*}
where
\begin{align*}
q = \#\{j \in \{1,\dots,m\} : R_j = F_j\}.
\end{align*}
For $d = 0$, the same count says that $|K|$ is a discrete space with $q + 1$ points, equivalently a wedge of $q$ copies of $S^0$ under the stated convention. This is the claimed wedge decomposition, with the convention that $q = 0$ gives a contractible space.
[/step]