Proof of the Unique Readability Theorem So, I'm assuming that I have the language $L_p$ of propositional logic with the symbols $(,),\lnot,\to, A_0,A_1,\ldots$, where the last few symbols is a countable sequence of atomic formulas. I'm also told that these symbols are distinct and that no symbol is a subsequence of another symbol.
Then, I am told that atomic formula is a formula or if $\alpha$ is a formula, then $(\lnot \alpha)$ is a formula or if $\alpha$ and $\beta$ are formulas, then $(\alpha \to \beta)$ is a formula. No other sequence of symbols is a formula.
Now, I want to prove that every formula of $L_p$ satisfies exactly one of the three conditions above.

Proof Attempt:
Let $\phi$ be a formula of $L_p$. If $\phi$ is an atomic formula, then we're done. Now, suppose that $\phi$ is not an atomic formula. Suppose also that $\phi$ satisfies neither of the other two conditions for forming formulas.
Then, $\phi$ is a finite sequence of symbols that differs from $(\lnot \alpha)$ or $(\alpha \to \beta)$ in at least one symbol. But then this is impossible because, then, it cannot be a formula. Hence, it has to satisfy at least one of these.
Now, suppose that it satisfies both of these. So, there exists a formula $\alpha$ such that $\phi$ can be written as $(\lnot \alpha)$ and there exist formulas $\beta$ and $\gamma$ such that $\phi$ can be written as $(\beta \to \gamma)$. However, this is impossible because it would imply that $\lnot \alpha$ and $\beta \to \gamma$ are subsequences of each other. In particular, it would mean that $\lnot$ is a subsequence of $\to$ or vice versa. This is impossible. Hence, $\phi$ can only satisfy one of these conditions. But that just means that $\phi$ satisfies exactly one condition and this proves the desired result. $\Box$
Does the proof work? If it doesn't, then why? How can I fix it?
Also, I had a few separate questions regarding the structure of this whole argument, regardless of whether it's right or wrong. So, I noticed that while I'm doing this argument, I'm sort of making use of an underlying, internal reasoning in order to prove something in logic.
That is, the deductive reasoning I'm using to get to the conclusion seems to be very different from the what deduction would mean in logic, even though I haven't actually conceptualized the logic that I'm using in the argument. So, my question is if this is valid or not? If it is, then why am I allowed to do this? If it isn't valid, then how do I formalize the logic that I am using in the argument? Or am I getting this wrong entirely and am not looking at things in the best way possible?
 A: Your argument for uniqueness needs a bit of work. First, you really ought to explain why we’re done if $\varphi$ is an atomic formula $A_k$: if $\varphi$ could also be written as $(\neg\alpha)$ or $(\alpha\to\beta)$, then $($ would be a subsequence of $A_k$, which is not the case.
More important, your argument that $\varphi$ cannot be decomposed both as $(\neg\alpha)$ and as $(\beta\to\gamma)$ isn’t correct: $\neg\alpha$ and $\beta\to\gamma$ being the same sequence does not imply that $\neg$ is a subsequence of $\to$ or vice versa. A correct argument could go like this:

Suppose that $\varphi$ is both $(\neg\alpha)$ and $(\beta\to\gamma)$. This does not mean that ‘$\neg$ is a subsequence of $\to$ or vice versa’: it means that $\neg\alpha$ is the same string of symbols as $\beta\to\gamma$, so it means that $\neg$ is the first symbol of $\beta$, where $\beta$ is a formula. It’s easy to prove by induction that every formula that is not atomic begins with a left parenthesis, and $\beta$ is a formula, so either $\beta$ is $A_k$ for some $k$, or $\beta$ is $(\sigma$ for some string $\sigma$ of symbols in the language. And this is impossible, since $\neg$ is not a substring of any $A_k$, and neither of $($ and $\neg$ is a substring of the other.

Proving this, however, is not sufficient: you also need to show that $\varphi$ cannot be written as $(\neg\alpha)$ or as $(\beta\to\gamma)$ in two different ways. The first is easy: it’s clear that if $(\neg\alpha)=(\neg\alpha')$, then $\alpha=\alpha'$. If $\varphi$ contains at least two instances of $\to$, however, it’s conceivable that it can be written as $(\beta\to\gamma)$ and as $(\beta'\to\gamma')$, where $\beta\ne\beta'$ and $\gamma\ne\gamma'$, and in order to have unique readability, we need to rule out that possibility.
Without loss of generality we may assume that $\beta'=\beta\delta$ for some non-empty string $\delta$, so the strings $\beta\to\gamma$ and $\beta\delta\to\gamma'$ are identical. This means that $\beta$ is a formula, and $\delta$ begins with $\to$. Let $\delta$ be $\to\delta'$, so that $\beta'$ is $\beta\to\delta'$. Now $\beta'$ is a formula, and it’s clearly not atomic, so it must begin with a left parenthesis and end with the matching right parenthesis. But $\beta$ is also a formula, and we now know that it begins with a left parenthesis, so it must end with the matching right parenthesis. This is impossible: the left parenthesis at the beginning of $\beta\to\delta'$ cannot have two different matching right parentheses.1 Thus, $\phi$ cannot be written in the form $(\beta\to\gamma)$ in two different ways, and we’re done.
1 This parenthesis matching argument can be made more rigorous, but it does take a bit of work.
