My problem involves using operators of equal precedence in propositional logic.
I'm trying to use truth tables to prove the following:
p ⇔ q ⇔ (p ⇒ q) ∧ (q ⇒ p)
My problem however stems from the fact that I can see 2 ways to go about this. One being:
(p ⇔ q) ⇔ ((p ⇒ q) ∧ (q ⇒ p))
and the other:
p ⇔ (q ⇔ (p ⇒ q) ∧ (q ⇒ p))
When writing out the truth tables for each, both of them result in a tautology, as can be seen here:
Truth table for (p ⇔ q) ⇔ ((p ⇒ q) ∧ (q ⇒ p))

Truth table for p ⇔ (q ⇔ (p ⇒ q) ∧ (q ⇒ p))

I'm certain that only one of those is correct. Would someone be able to explain which one and why?