- If P, then Q.
- P.
- Therefore, Q.

Many people assume that this works the other way as well, so that one could say:

- If P then Q.
- Q.
- Therefore P.

But this is a Logical fallacy called Affirming the consequent. Since P entails Q, but Q does not necessarily entail P. You can see this if we simply substitute in actuall statements for P. and Q.

- If there is fire here, then there is oxygen here.
- There is oxygen here.
- Therefore, there is fire here.

Sometimes P and Q entail each other, in that case we can say P if and only if Q. (Sometimes the shorthand P iff Q is used rather than writing out if and only if).