@Lord_Farin The book I am reading defines the sub-formula of a formula as follows,
Definition $1.4$, The following rules define the subformulas of a formula.
Any formula is a subformula of itself.
Any subformula of F is also a subformula of ¬F.
Any subformula of F or G is also a subformula of (F ∧ G).
-----
But then later goes on to say,
Example $1.5$,
Let A and B be atomic and let F be the formula ¬(¬A∧¬B).
The formula A ∧ ¬B occurs as a substring of F, but it is not a subformula
of F. There is no way to build the formula F from the formula A∧¬B.