# How to formalize "if and only" in propositional logic

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.

• i have no idea how to parse that phrase. Don't even know what "I'll go to the evening" means. I expect there is a language issue here.
– lulu
Jun 3 at 11:23
• What does it mean "if and only"? We have "if and only if". Jun 3 at 12:42
• That is exactly my question. This is directly copied from an exercise. Maybe there is a typo in the question itself? And if we suppose that they made a typo and the correct phrase is: "If I train or if I don't train if and only if my friend competes, I'll go to the meeting", is my solution correct?
– Lita
Jun 3 at 12:56
• My best guess to fix the broken question is to turn "if and" into "and if". It then becomes meaningful but ambiguous English, probably intended to to mean $(p \lor (\lnot p \land q)) \to r$ (where $q$ means "only my friend competes"), suggesting that you don't think you need to train to beat your friend. However, your interpretation and mine are not valid without further assumptions. Jun 3 at 19:36
• Thank you for your help!
– Lita
Jun 5 at 21:59