2

I'm reading Leary's Mathematical Logic text where it defines the phrase "substitutable" and most of it is sensible:

$t$ is substitutable for $x$ in $\phi$ if

  1. $\phi$ is atomic.

  2. $\phi := \neg \alpha$ and $t$ is substitutable for $x$ in $\alpha$.

  3. $\phi := \alpha \lor \beta$ and $t$ is substitutable for $x$ in both $\alpha$ and $\beta$.

  4. $\phi := (\forall y)\alpha$ and either

    a. $x$ is not free in $\phi$ or

    b. $y$ does not occur in $t$ and $t$ substitutable for $x$ in $\alpha$.

All of this except 4.a. makes sense to me, but why would you want $x$ not free in $\phi$? I mean you could have $\phi = (\forall x)(Px)$ so that $x$ is not free in $\phi$ but you would think this is the precise case where you don't want to say that $t$ is substitutable for $x$, right? (Here I take $x=y$, and it is common for Leary to use variables to possibly take as a value other variables.)

From the material earlier in the book I don't think the intention here is to say that, in such a case, $\phi_t^x = (\forall t)(Pt)$ because, for one thing, this is not what follows from the definition of substitution given earlier and for another thing he is trying to allow for $t$ to be functions of terms---and nowhere in the book does he write something like $(\forall f(c))(P(f(c))$.

Addem
  • 5,656
  • I guess the intension is to let $\phi^x_t = \phi$ if every occurence of $x$ in $\phi$ is bounded. Or more generally $\phi^x_t$ replaces $x$ with $t$ only in places where $x$ is free. – Stefan Mesken Feb 10 '16 at 04:36
  • @Stefan I was kind of wondering the same, but then wouldn't that mean that $t$ is always substitutable for $x$? Because the way $\phi_t^x$ is defined, if no substitution actually happens then $\phi_t^x=\phi$. – Addem Feb 10 '16 at 05:07
  • Consider the formula $\phi \equiv \forall x(x=y)$ and the term $t \equiv x$. Now $y$ is free in $\phi$, but $t$ is certainly not substitutable for $y$ in $\phi$. – Stefan Mesken Feb 10 '16 at 05:10
  • @Stefan That's true in the sense of "substitutable" that I tend to have in mind, but I thought we were talking about the possibility that this book is defining "substitutable" as meaning that a variable is substitutable whenever $\phi_t^x$ is defined. But in this case with your given values of $\phi$ and $t$ we would have $\phi_t^x=\phi$ and therefore defined. – Addem Feb 10 '16 at 05:12
  • That's not what I wrote in my first comment. In the case I provided could $\phi^x_t$ be defined, but $\phi^x_t \equiv \forall x(x=x)$. However, we don't want to allow such substitutions, because they violate the so-called substitution lemma. – Stefan Mesken Feb 10 '16 at 05:16
  • @Stefan I don't think I understand your first comment then. Are we saying that $t\equiv f(y)$ is substitutable for $x$ in $\phi \equiv (\forall x)(x=x)$? It seems to me we shouldn't call this substitutable but the definition is saying that it is. – Addem Feb 10 '16 at 05:39
  • Yes, it is substitutabel, but then $\phi^x_{f(y)} = \phi$, because every occurence of $x$ in $\phi$ is bounded. – Stefan Mesken Feb 10 '16 at 05:45
  • 3
    To elaborate on @Stefan's comment, he's saying the definition of substitution itself may already guard against $x$ being free in $\phi$ treating like the atomic case, in which case it's as fine to say that $t$ is substitutable for $x$ in $(\forall x)(Px)$ (and the substitution is $(\forall x)(Px)$ no matter what $t$ is), for the same reason it is fine to say $t$ is substitutable for $x$ in $3$. – Derek Elkins left SE Feb 10 '16 at 05:47
  • 1
    To further elaborate on @DerekElkins' comment, see previous paragraph of Leary: "The idea is that if t is substitutable for $x$ in $\varphi$, we will not run into the problems discussed at the beginning of this section—we will not substitute a term in such a way that a variable contained in that term is inadvertently bound by a quantifier." If $x$ is bound in $\varphi$, the previous def of substitution will avoid already the trouble, because the subst will produce no change in $\varphi$. – Mauro ALLEGRANZA Feb 10 '16 at 07:42
  • 2
    @Addem Yes, $t$ is substitutable for $x$ in $\phi := (\forall x)(x=x)$, and the result is $\phi$ (no change). It's a pity that Leary defines substitutable but, at least here, doesn't define what the result of the substitution actually is. – BrianO Feb 10 '16 at 07:42

1 Answers1

2

I don't have the book, but this must go with a definition of substitution of $t$ for $x$ in $\phi$, which I'd write $\phi[t/x]$ and which you are writing as $\phi^x_t$. The definition goes like this (where $y$ denotes any variable other than $x$): $$ \begin{array}{tcl} x[t/x] & = & t \\ y[t/x] & = & y \\ (\lnot\alpha)[t/x] & = & \lnot(\alpha [t/x]) \\ (\alpha \lor \beta)[t/x] & = & \alpha[t/x] \lor \beta[t/x] \\ ((\forall x) \alpha)[t/x] & = & (\forall x) \alpha \\ ((\forall y) \alpha) [t/x] & = & (\forall y) (\alpha[t/x]) \end{array} $$

However, the last clause is not always semantically acceptable. To see what can go wrong, consider the formula $(\forall x)\lnot((\forall y)y + 1 \le x)$. This formula is true and we want to be able to deduce consequences of it by instantiating the bound variable $x$. I.e., given any term $t$, we should have that $\lnot((\forall y) y + 1 \le x)[t/x]$. But if $y$ appears free in $t$, this breaks down: if we just do the substitution according to the above definition with $t \equiv y + 1$, we get the false statement $\lnot((\forall y) y + 1 \le y + 1)$. This has gone wrong because $t$ is not substitutable for $x$ in $(\forall y) y + 1 \le x$ and doing the substitution has invalidly identified the outside world's $y$ with the bound $y$ inside $\forall y\, y + 1 \le x$. To do the substitution validly, we need to rename the bound variable $y$ in $\lnot((\forall y) y + 1 \le x)[t + 1/x]$ to give the equivalent formula $\lnot((\forall z) z + 1 \le x)[t + 1/x]$ and then we get the valid statement $\lnot((\forall z) z + 1 \le y + 1)$.

It would be more intuitive to say validly substitutable rather than substitutable, because substitutable read informally does suggest that it's OK just to replace all the $x$s by $t$s. You have to read it in the context of a definition of substitution for $x$ that always treats bound occurrences of $x$ correctly (by leaving them alone) but only sometimes treats bound occurrences of other variables correctly.

Rob Arthan
  • 48,577
  • Ok, I think I was misunderstanding the intention of the definition. I figured "substitutable" should mean "Both syntactically and semantically, the substitution is valid (or meaning-preserving so to speak)." But now I'm starting to think that the actual substitution rule is the one taking care of the syntactic issues, while the definition of "substitutable" is to express that a given substitution is in some sense meaning-preserving. – Addem Feb 10 '16 at 17:47
  • 1
    So $t:= x$ is substitutable for $x$ in $\phi := (\forall x)\alpha$ because the meaning is preserved since the result of substitution is just $\phi$. However $t:=x$ is not substitutable for $y$ in $\psi:= (\forall x)(x=y)$ because although syntatically the result would be $\psi_t^x = (\forall x)(x=x)$, a legitimate expression but with very different meaning. – Addem Feb 10 '16 at 17:49
  • Yes, that's a good example. – Rob Arthan Feb 10 '16 at 20:06