How to formalize "if and only" in propositional logic

62 Views Asked by At

I want to formalize and proof the validity of "If I train or if I don't train if and only my friend competes, I'll go to the meeting"

  • p = I train
  • q = my friend competes
  • r = go to the meeting

My guess is (p ∨ (¬ p ↔ q)) → r, but I'm not sure about what "if and only" means in this case.