Boolean valuation (source code)

= Boolean valuation
{c}

A <Boolean valuation> $v$ assigns each primitive <proposition> a value in $\{\mathrm F,\mathrm T\}$, equivalently $\{0,1\}$, and extends recursively to every <propositional formula> using the classical <logical connectives>. The same primitive <proposition> always receives the same value within one <Boolean valuation>. For compound <propositional formulas> $A$ and $B$,
$$
\begin{aligned}
v(\neg A)=\mathrm T&\iff v(A)=\mathrm F,\\
v(A\land B)=\mathrm T&\iff v(A)=\mathrm T\text{ and }v(B)=\mathrm T,\\
v(A\lor B)=\mathrm T&\iff v(A)=\mathrm T\text{ or }v(B)=\mathrm T,\\
v(A\to B)=\mathrm F&\iff v(A)=\mathrm T\text{ and }v(B)=\mathrm F.
\end{aligned}
$$
Every other case receives the opposite value. Thus $v(p)=\mathrm T,v(q)=\mathrm F$ gives $v((p\to q)\land p)=\mathrm F$. A <truth table> varies the assignment; recursive evaluation computes one row. The truth-functional restriction means that changing what the primitive <propositions> describe, while retaining their values, cannot change the value of the compound <propositional formula>. See https://forallx.openlogicproject.org/html/Ch9.html[forall x: Calgary, chapter 9] and https://forallx.openlogicproject.org/html/Ch10.html[section 10.1].