Problem: prove that the relation "is a subformula of" is transitive for propositional formulas.
let $\phi \in Sub(\psi)$ and $\psi \in Sub(\chi)$ prove that $\phi \in Sub(\chi)$.
my proof:
if $\phi \in Sub(\psi)$ then $\phi=\psi_i$ with $i\leq n$ (with $\psi_i$ a step of the formation sequence of $\psi$ and $\psi_n=\psi$)
if $\psi \in Sub(\chi)$ then $\psi=\chi_j$ with $j\leq m$ (with $\psi_j$ a step of the formation sequence of $\chi$ and $\psi_m=\psi$)
Then must be $\psi_i=\chi_k$ with $k\leq j$
So $\phi=\chi_k$ and $\phi \in Sub(\chi)$ $\square$
I was wandering whether my proof was correct and looking for a different proof which uses the recursive definition of subformula of a formula.
As always in these cases, we can apply induction on the "complexity" of the formula, i.e. on the number of occurrences of connectives, which amounts to follow the formation tree.
See Definition 2.1.7 [page 12] for the definition of the set $Sub(\varphi)$ of subformulas of $\varphi$.
i) Basis : If $\varphi$ is atomic, then $Sub(\varphi)$ contains only $\varphi$; but the only subformula of $\varphi$ is $\varphi$ itself. Thus the subformulas of subformulas of $\varphi$ are subformulas of $\varphi$, and the property holds.
ii) Induction step : We have to consider the basic connectives : $\land$, $\lor$ and $\lnot$.
For $\land$, consider $\varphi := \varphi_1 \land \varphi_2$ :
and we assume that the property holds for $\varphi_1$ and $\varphi_2$.
This means that if $\sigma \in Sub(\theta)$ and $\theta \in Sub(\varphi_i)$, then $\sigma \in Sub(\varphi_i)$.
Thus, if $\sigma \in Sub(\theta)$ and $\theta \in Sub(\varphi)$, we have two cases :
a) $\theta$ is $\varphi$ itself, and we are done; otherwise :
b) $\theta$ is a subformula of $\varphi_i$, in which case the induction hypotheses apply.