For instance we know that $\left(p\wedge q\right)\rightarrow p$ is a tautology and the proof for it is:
$$\left(\left(p\wedge q\right)\rightarrow p\right)\equiv\left(\neg\left(p\wedge q\right)\vee p\right)$$
$$\equiv\left(\left(\neg p\vee \neg q\right)\vee p\right)$$
$$\equiv\left(\left(\neg p\vee p\right)\vee\neg q\right)$$
$$\equiv\left(True\vee\neg q\right)$$
$$\equiv True$$
Now if we could replace p and q in the proof with A and B which are variables standing for formulas/True/False to get:
$$\left(\left(A\wedge B\right)\rightarrow A\right)\equiv\left(\neg\left(A\wedge B\right)\vee A\right)$$
$$\equiv\left(\left(\neg A\vee \neg B\right)\vee A\right)$$
$$\equiv\left(\left(\neg A\vee A\right)\vee\neg B\right)$$
$$\equiv\left(True\vee\neg B\right)$$
$$\equiv True$$
Then every formula which is achieved by replacing A and B in $\left(\left(A\wedge B\right)\rightarrow A\right)$ with formulas/True/False is proved, like $\left(p\wedge \left(q\vee r\right)\right)\rightarrow p$, $\left(\left(\neg p\vee r\right)\wedge q\right)\rightarrow \left(\neg p\vee r\right)$ and $\left(p\wedge False\right)\rightarrow p$.
So I wanna know if there's anything wrong with that replacement

1 Answer
1

Yes. This is called the Substitution Theorem. It holds for logical tautologies, logical contradictions, logical equivalences and logical implications, i.e. any kind of property or relationship that involves some kind of 'necessity'.

It does not hold for properties and relations that involve mere 'possibility'. For example, $P$ is a logical contingency, but if you substitute something for $P$ the result may no longer be a contingency (e.g substitute $A \land \neg A$, and the result is not a contingency). Likewise, it does not work for logical consistency: $\{ P, Q \}$ is logically consistent, but substitute $A$ for $P$, and $\neg A$ for $Q$, and it is no longer logically consistent.

So ... care must be taken with this Substitution Theorem! But yes, it does hold for tautologies.