When may I replace a statement? If for example $p,q,r$ are statements, and I say
if $p$ then $q$. (i)
Also I know that $q$ is equivalent to $r$: $q$ is true whenever $r$ is true and reciprocally.
So I may say that the sentence (i) is equivalent to the following one:
if $p$ then $r$. (ii)
May I do it whenever I want? Are the sentences always true? For example if $t$ is equivalent to $p$, then say:
if $t$ then $r$. (iii) is equivalent to (ii) and then to (i).
I probably used some terms here different from usual because I never studied formally this subject, I would appreciate any correction, thank you.
 A: Yes, if two statements are logically equivalent to each other, then you can substitute for them anywhere in other logical statements because those statements always have the same truth value. The substitutions you made were valid. However, if you really want to prove, this you can do the following:
Assume $q \iff r$. Now, we want to prove that $p \implies q$ is logically equivalent to $p \implies r$. This can be done in two steps.
Step 1: $p \implies q$ implies $p \implies r$.
Assume $p \implies q$. We want to get $r$ on the end. In order to do this, we take our $q \iff r$ assumption and break it into $q \implies r$. Now, with the Law of Syllogism, we get $p \implies r$.
Step 2: $p \implies r$ implies $p \implies q$.
Assume $p \implies r$. We want to get $q$ on the end. In order to do this, we take our $q \iff r$ assumption and break it into $r \implies q$. Now, with the Law of Syllogism, we get $p \implies q$.
Now, we have that $p \implies q$ implies $p \implies r$ and vice versa, so the two statements are logically equivalent.
A: Logical equivalence works just like equals, so yes. Symbolically:
$$(\iff) = (=)$$
