2

What kind of mathematical object is this substitution(is it a function or what). We assuming set of variables exist.

Sushil
  • 2,821

2 Answers2

3

Let us construct a toy language with terms defined recursively as

$$\mathcal{T} = x \mid y \mid \mathtt{f(}t_1\mathtt{)} \mid \mathtt{g(}t_2\mathtt{,}t_3\mathtt{)} $$ where $x,y \in \mathcal{V}$ are variables and $t_1, t_2, t_3 \in \mathcal{T}$ are terms. Now we could define substitution for our toy language as any function $\phi : \mathcal{V} \to \mathcal{T}$ and extended it to whole $\mathcal{T}$ as follows: \begin{align} \phi'(x) &= \phi(x)\\ \phi'(y) &= \phi(y)\\ \phi'\Big(\mathtt{f(}t_1\mathtt{)}\Big) &= \mathtt{f(}\phi'(t_1)\mathtt{)} \\ \phi'\Big(\mathtt{g(}t_2\mathtt{,}t_3\mathtt{)}\Big) &= \mathtt{g(}\phi'(t_2)\mathtt{,}\phi'(t_3)\mathtt{)} \end{align}

As our terms are finite, it's easy to see that $\phi' : \mathcal{T} \to \mathcal{T}$ is a properly defined function that transforms terms into some other terms.

People usually don't distinguish between $\phi$ and $\phi'$ unless they need to be extra formal or extra cautious, and both of these functions are called "substitution". In other words, substituion is any function $\mathcal{V} \to \mathcal{T}$ or its extension to some bigger set of terms.

Still, this is only one particular approach, there are other ways to define substitution and there are some complications when you introduce quantifiers and other constructs, but I hope you got the general meaning.

Also, here I use "function" but in many texts on logic there are various levels of meta-languages, and to avoid confusion functions in one level are called just "functions" while on some other levels they may be called "transforms", "mappings", etc. For example, if for whatever reason we would like to call the symbol $\mathtt{f}$ a function, then we may call $\phi$ and $\phi'$ transformations.

Edit:

Let me define $\mathcal{T}$ and $\phi'$ more precisely (the index $i$ below is often called nesting depth).

\begin{align} T_0 &= \mathcal{V} \\ T_{i} &= \Big\{\mathtt{f(}t'\mathtt{)} \ \Big|\ t' \in T_j, j < i \Big\}\\ &\hspace{2pt}\cup \Big\{\mathtt{g(}t''\mathtt{,}t'''\mathtt{)} \ \Big|\ t'' \in T_j, j < i, t''' \in T_k, k < i \Big\} \\ \mathcal{T} &= \bigcup_{i \in \mathbb{N}}T_i \end{align} Now, take arbitrary function $\phi : \mathcal{V} \to \mathcal{T}$, define $\phi'_i : \left(\bigcup_{j = 0}^{i}T_j\right) \to \mathcal{T}$ as follows \begin{align} \phi'_0(t) &= \phi(t)\\ \phi'_i(t) &= \phi'_{i-1}(t) & \text{ for any }t \in \mathcal{T}_{i-1}\\ \phi'_i\Big(\mathtt{f(}t_1\mathtt{)}\Big) &= \mathtt{f(}\phi'_{i-1}(t_1)\mathtt{)} & \text{ otherwise}\\ \phi'_i\Big(\mathtt{g(}t_2\mathtt{,}t_3\mathtt{)}\Big) &= \mathtt{g(}\phi'_{i-1}(t_2)\mathtt{,}\phi'_{i-1}(t_3)\mathtt{)} &\text{ otherwise} \end{align} and finally set $\phi' = \bigcup_{i \in \mathbb{N}} \phi'_i$. Of course, there are some things to consider, moreover, please be aware that this is not the only way to define things (for example, not all recursive definitions allow such simple interpretation). On the other hand, the above constitutes a precise definition. I hope the inductive scheme behind it (which works because the nesting depth is a well-order) is apparent now, perhaps this will clear your doubts.

Edit 2:

In response to:

But there is problem I think. In theorem 8.4 function $ρ$ needs to be defined from natural number to a set $A$ (as you defined). But then function $h$ we get is also from $\mathbb{N}$ to $A$. What is range of $\mathcal{F}$ here and what will be the range of final function $h$ (here $T_i$)?

where I defined $\mathcal{F}$ as

$$\mathcal{F}(B) = \{\mathtt{f(}t'\mathtt{)} \mid t' \in B\} \cup \{\mathtt{g(}t''\mathtt{,}t'''\mathtt{)} \mid t'', t''' \in B\}.$$

What is the symbol $\mathtt{f}$ in the definition of $\mathcal{T}$ (or for that matter $\mathcal{F}$)? Is there any axiom that says I can use it? In the standard approach there are only sets or things defined using sets like $\mathbb{N}$. In other words, we have to define somehow $\mathtt{f}$ as a set, number or something similar. What we do, is that we create an informal mapping between terms and numbers, for example $$x \to 7, y \to 1, \mathtt{(} \to 2, \mathtt{)} \to 3, \mathtt{,} \to 4, \mathtt{f} \to 5, \mathtt{g} \to 6$$ would imply that $\mathtt{g(}x\mathtt{,f(}y\mathtt{,}x\mathtt{))}$ is $62745214733$. Then, when we talk about terms, we talk about specifically structured numbers, but think about them as terms. If we were to use the above mapping we get $T : \mathbb{N} \to 2^\mathbb{N}$, $\mathcal{T} \subset \mathbb{N}$ and $\mathcal{F} : 2^\mathbb{N} \to 2^\mathbb{N}$. To be compatible with Munkers (compare with the second example after theorem 8.4) set

\begin{align} \rho(f) &= \mathcal{F}\big(f(m)\big) \quad \text{ where } f : \{0,\ldots,m\} \to \mathbb{N} \\ T(0) &= \mathcal{V} \\ T(i) &= \rho\Big(T\big|_{\{0,\ldots,i-1\}}\Big) \end{align}

Edit 3:

In response to:

But we were defining terms. How do you first define $\mathcal{F}$ on $\mathcal{T}$ without knowing $\mathcal{T}$?

We do not need to know $\mathcal{T}$ to define $\mathcal{F}$, we only need to know that $\mathcal{T}⊂\mathbb{N}$.

Let $\bullet_{10}$ be the base-10 concatenation of numbers, that is, $x \bullet_{10} y = x\cdot 10^{|y|_{10}}+ y,$ where $|y|_{10}$ is the length of $y$ in base-10 notation; for example $123 \bullet_{10} 456 = 123456$. Now define $\mathcal{F} : 2^\mathbb{N} \to 2^\mathbb{N}$ as

$$\mathcal{F}(B) = \{52\bullet_{10} t' \bullet_{10} 3 \mid t' \in B\} \cup \{62\bullet_{10} t''\bullet_{10} 4 \bullet_{10} t'''\bullet_{10} 3 \mid t'', t''' \in B\}.$$

I hope this helps $\ddot\smile$

dtldarek
  • 37,381
  • Ok let me clarify if I am right: f can stand for 'negation' and g for 'or' 'and' 'implication'. and then you defining ϕ′. But how can you extend it to whole of T. I am having problem in it considering principle of recursion given in munkers page 54. 'To define a mapping you first need a mapping p which assigns to each function from a section of integers to T which assigns it to an element of T' which p you will use – Sushil Jul 11 '15 at 04:42
  • http://www.math.ucsb.edu/~bigelow/145/munkres.pdf – Sushil Jul 11 '15 at 04:43
  • similar question I asked: http://math.stackexchange.com/questions/1357130/constructions-of-terms-using-variable – Sushil Jul 11 '15 at 06:39
  • @Sushil Please see the edit and let me know if that cleared things for you. – dtldarek Jul 11 '15 at 10:07
  • I am only talking about T. You have given a sequence of sets. How can we be sure there exist such a sequence – Sushil Jul 11 '15 at 12:00
  • Let me give more clarification about comment. e.g, for defining (xn) as x1= A, x2=A^2 . .. . xn=A^n .... we need axiom of replacement and recursion. Here how can we say we can define Tn like this? – Sushil Jul 11 '15 at 12:01
  • @Sushil You mean $\mathcal{F}(T) = {f(t') \mid t' \in T} \cup {g(t'',t''') \mid t'', t''' \in T}$ and $\mathcal{T}(0) = \mathcal{V}$ and $\mathcal{T}(i+1) = \mathcal{F}(\mathcal{T}(i))$? – dtldarek Jul 11 '15 at 12:27
  • yes you are using previously defined terms of sequence to define next term – Sushil Jul 11 '15 at 12:39
  • @Sushil But then you can use $\rho=\mathcal{F}$ and apply the principle of recursion 8.4 you wanted. I don't understand what you have trouble with :-| – dtldarek Jul 11 '15 at 12:54
  • But there is problem I think. In theorem 8.4 function ρ need to defined from natural no. to a set A(as you defined). But then function h we get is also from N to A. What is range of F here and what will be the range of final function h(here Ti) – Sushil Jul 11 '15 at 13:05
  • @Sushil I think I finally understood your problem, see the last edit. – dtldarek Jul 11 '15 at 14:42
  • But we were define terms. how you first define F on T without knowing T – Sushil Jul 11 '15 at 15:36
  • @Sushil We do not need to know $\mathcal{T}$ to define $\mathcal{F}$, we only need to know that $\mathcal{T} \subset \mathbb{N}$. I did one more edit, see if it helps you. – dtldarek Jul 11 '15 at 15:57
0

If I understood correctly, say you have a wff on n variables. Then substituting in a variable, you map into the collection of wffs on $(n-1)$ variables. If you substitute for all n variables, or if $n=1$, you map into a world, or interpretation for the wff. But there may not be possible worlds where the wff holds, e.g., if your wff is a contradiction.

Gary.
  • 2,432
  • (for all sets x)(for all wff m)(there exist y) (for allz)(zey iff zex and m(y)) I have written Specification axiom. Now for any wff like x=x we can put x=x in above replacing m by x=x. What is this replacement? – Sushil Jul 10 '15 at 19:42
  • You need to be careful not to use the same x to quantify over all sets and to serve as a variable simultaneously. But I believe you end up with a wff that quantifies over 3 , instead of 4 variables; $m$ is not a variable anymore. – Gary. Jul 10 '15 at 19:47
  • So I guess I agree with Mauro Allegranza's comment that this instantiation/substitution maps from the set(maybe class) of wff's on $m$ variables to the set of wff's on $m-1$ variables. – Gary. Jul 10 '15 at 19:52
  • @Gary - not exactly ... the substitution as defined in the textbook I'm referencing to is an operation (i.e. a function) that maps terms into terms and formulae into formulae. When we write $s[t/x]$, with $x$ variable and $s,t$ terms, we have to remind that a term is : a variable, a constant or a "complex" term, like $x+1$ in the language of arithmetic. Thus, the result of the substitution is again a term, but the number of variable can increase; consider the subst : $(x+1)[(y+z)/x]$: the result will be $(y+z)+1$. – Mauro ALLEGRANZA Jul 11 '15 at 13:09
  • @Sushil - you have $\forall x \ \exists y \ \forall z \ (z \in y \leftrightarrow z \in x \land \varphi(z,x))$. In the Ax schema of specification the set "defined" by specification (i.e. $y$) must not be "referenced" into the spec formula $\varphi$. Now, if we subst $x=x$ in place of $\varphi$ we get : $\forall x \ \exists y \ \forall z \ (z \in y \leftrightarrow z \in x \land x=x)$ that amounts to : $\forall x \ \exists y \ \forall z \ (z \in y \leftrightarrow z \in x)$ which is obviously true. – Mauro ALLEGRANZA Jul 11 '15 at 13:17
  • Please, note that in this case we are substituting the formula $x=x$ (and not a term) into the Axiom schema. It is a "schema" because it "includes" through the meta-variable $\varphi$ for formulae an infinite supply of axioms, one for each well-formed formula of first-order set theory, like e.g. $x=x, \ x \in z, \ldots$. – Mauro ALLEGRANZA Jul 11 '15 at 13:25
  • ∀x ∃y ∀z (z∈y↔z∈x∧φ(z,x)) why it is not ∀x ∀φ ∃y ∀z (z∈y↔z∈x∧φ(z,x) @MauroALLEGRANZA – Sushil Jul 11 '15 at 13:33
  • @Sushil - because formally axiomatic set th is a first-order theory, and thus we are not allowed to quantify over formulae or predicate letters. This is exactly the reason why we introduce axiom schema with meta-variables like $\varphi$... – Mauro ALLEGRANZA Jul 11 '15 at 13:39
  • But if we are not quantifying over formula then how does φ get introduced suddenly in a proposition. And to what it corresponds? How will we answer these questions? @MauroALLEGRANZA – Sushil Jul 11 '15 at 13:48
  • @Sushil - please, read carefully the def of Axiom schema of spec : "One instance of the schema is included for each formula $\varphi$ in the language of set theory with free variables among $x, w, A$. So $B$ is not free in $\varphi$. In the formal language of set theory, the axiom schema is: [...] or in words: Given any set $A$, there is a set $B$ such that, given any set $x$, $x$ is a member of $B$ if and only if $x$ is a member of $A$ and $\varphi$ holds for $x$. 1/2 – Mauro ALLEGRANZA Jul 11 '15 at 13:51
  • ... Note that there is one axiom for every such predicate $\varphi$; thus, this is an axiom schema." 2/2 – Mauro ALLEGRANZA Jul 11 '15 at 13:52
  • So you mean for each different φ we have a different axioms, all together are called axiom of specification @MauroALLEGRANZA – Sushil Jul 11 '15 at 14:00