Value of Formula under Assignment Determined by Free Variables

Theorem
Let $\mathbf A$ be a WFF of predicate logic.

Let $\mathcal A$ be a structure for predicate logic.

Let $\sigma, \sigma'$ be assignments for $\mathbf A$ in $\mathcal A$ such that:


 * For each free variable $x$ of $\mathbf A$, $\sigma \left({x}\right) = \sigma' \left({x}\right)$

Then:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right] = \mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma'}\right]$

where $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right]$ is the value of $\mathbf A$ under $\sigma$.

Proof
Proceed by the Principle of Structural Induction applied to the bottom-up specification of predicate logic.

If $\mathbf A = p \left({\tau_1, \ldots, \tau_n}\right)$, then:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right] = p_{\mathcal A} \left({ \mathop{ \operatorname{val}_{\mathcal A} \left({\tau_1}\right) } \left[{\sigma}\right], \ldots, \mathop{ \operatorname{val}_{\mathcal A} \left({\tau_n}\right) } \left[{\sigma}\right] }\right)$

Because $\mathbf A$ contains no quantifiers, all its variables are free, and hence are in the domain of $\sigma, \sigma'$ as assignments.

Thus $\sigma, \sigma'$ are assignments for each $\tau_i$, and by Value of Term under Assignment Determined by Variables:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\tau_i}\right) } \left[{\sigma}\right] = \mathop{ \operatorname{val}_{\mathcal A} \left({\tau_i}\right) } \left[{\sigma'}\right]$

for each $\tau_i$.

It is immediate that:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right] = \mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma'}\right]$

If $\mathbf A = \neg \mathbf B$ and the induction hypothesis applies to $\mathbf B$, then:

If $\mathbf A = \mathbf B \circ \mathbf B'$ for $\circ$ one of $\land, \lor, \implies, \iff$ and the induction hypothesis applies to $\mathbf B, \mathbf B'$:

If $\mathbf A = \exists x: \mathbf B$ or $\mathbf A = \forall x : \mathbf B$, and the induction hypothesis applies to $\mathbf B$, then from the definition of value under $\sigma$:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right]$

is determined by the values:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf B}\right) } \left[{\sigma + \left({x / a}\right)}\right]$

where $a$ ranges over $\mathcal A$, and $\sigma + \left({x / a}\right)$ is the extension of $\sigma$ mapping $x$ to $a$.

Now, for a free variable $y$ of $\mathbf B$:

Hence, by the induction hypothesis:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf B}\right) } \left[{\sigma + \left({x / a}\right)}\right] = \mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf B}\right) } \left[{\sigma' + \left({x / a}\right)}\right]$

It follows that:


 * $\mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma}\right] = \mathop{ \operatorname{val}_{\mathcal A} \left({\mathbf A}\right) } \left[{\sigma'}\right]$

The result follows from the Principle of Structural Induction.