[guided]We now define the algorithm explicitly. The iteration is over $j = 1, \dots, 2^n$, and for each $j$ we do three things.
**Step (a) — evaluate the hypotheses.** For each formula $s_i \in S$, compute $\tilde{v}_j(s_i) \in \{0,1\}$. The evaluation is mechanical: $s_i$ is a finite parse tree, with primitive propositions at leaves and connectives at internal nodes. At each leaf, look up the value assigned by $v_j$. At each internal node, combine the child values using the truth table of the connective ($\land, \lor, \neg, \to$, etc.). A post-order traversal computes the value in time linear in the size of $s_i$.
**Step (b) — check whether $v_j$ satisfies $S$.** If all $\tilde{v}_j(s_i) = 1$, then $\tilde{v}_j$ satisfies $S$ and we must check whether it satisfies $t$. Evaluate $\tilde{v}_j(t)$ the same way. If $\tilde{v}_j(t) = 0$, we have found a model of $S$ that is not a model of $t$, so $S \not\models t$, hence by Completeness $S \not\vdash t$; we output "No" and halt.
**Step (c) — skip if $v_j$ does not satisfy $S$.** If $\tilde{v}_j(s_i) = 0$ for some $i$, the implication "valuation satisfies $S$ $\implies$ valuation satisfies $t$" is vacuously true under this $v_j$, and contributes nothing to deciding $S \models t$. Move on.
If the loop completes without ever finding a counterexample valuation, we have verified that **every** $v_j \in \{0,1\}^P$ that satisfies $S$ also satisfies $t$. Since any valuation on $L$ is equivalent on $S \cup \{t\}$ to some $\tilde{v}_j$, this means $S \models t$, hence by Completeness $S \vdash t$; output "Yes".[/guided]