Ninety per cent of first-attempt proof errors trace back to a single confusion: which part is the hypothesis and which part is the conclusion? In an "if P, then Q" statement, you assume P and you prove Q. Swap those two jobs — even briefly — and the proof becomes circular. This article walks through a parser that colour-codes the two halves for every common phrasing you will meet.

The parser in action

Drag the slider to cycle through five phrasings of the same mathematical claim. The antecedent is highlighted in yellow ("assume this"), the consequent in green ("prove this").

Five common phrasings of the same conditional statement. In every case, yellow is $P$ (the antecedent, what you assume) and green is $Q$ (the consequent, what you prove). The surface grammar changes; the logical roles do not.

Why this parsing matters: a direct proof starts by writing down the antecedent on its own line ("Suppose P") and ends by writing down the consequent on its own line ("so Q"). If you mis-identify which half is P and which is Q, you will "assume" what you were supposed to prove — a circular argument that proves nothing.

The five patterns and how to parse them

1. Canonical if-then

"If P, then Q."

The comma is the separator. Everything between "if" and "then" is P. Everything after "then" is Q. This is the form textbooks prefer — cleanest and least ambiguous. Parse time: instant.

2. Implies-keyword

"P implies Q." or "P \Rightarrow Q."

The word "implies" (or the \Rightarrow symbol) sits between antecedent and consequent. Left side is P, right side is Q. Same logical content as pattern 1.

3. Whenever-form

"Whenever P, Q." or "Q whenever P."

The "whenever" keyword marks the antecedent. Look for "whenever" and highlight whatever phrase it governs as P. Everything else is Q. In the second phrasing, the English order is reversed, but the logical roles stay put — the phrase after "whenever" is still P.

4. Only-if form

"P only if Q."

This one trips people up. "Only if" is not the same as "if." The statement "P only if Q" means "if P, then Q" — that is, P \Rightarrow Q. So the phrase before "only if" is still P, and the phrase after "only if" is still Q. If a student reads "P only if Q" and parses it as "Q \Rightarrow P," they are about to prove the converse by mistake. See if-vs-only-if-difference-everyday-language for the full rule.

5. Reversed-order if

"Q if P."

Same logical meaning as "if P, then Q" — just with the English halves swapped. The antecedent is whatever follows the lone "if," not whatever comes first in the sentence. If you see "n^2 is odd if n is odd," the antecedent is "n is odd" and the consequent is "n^2 is odd." Parse by keyword, not by position.

Worked parses on realistic statements

Try parsing each of these before reading the answer:

  1. "Suppose a and b are both rational. Then a + b is rational."P: "a and b are both rational" · Q: "a + b is rational."

  2. "n \in \mathbb{Z} and n > 1 \Rightarrow n has a prime factor."P: "n \in \mathbb{Z} and n > 1" · Q: "n has a prime factor."

  3. "For every real x, if x > 0 then x^2 > 0." → (For the statement at a fixed x) P: "x > 0" · Q: "x^2 > 0." The "for every real x" is a universal quantifier that applies to the whole implication.

  4. "A positive integer is prime only if it has exactly two divisors."P: "a positive integer is prime" · Q: "it has exactly two divisors."

  5. "Let f be differentiable at a. Then f is continuous at a."P: "f is differentiable at a" · Q: "f is continuous at a." The word "let" is functioning like "suppose."

The three common parsing errors

The parser as a proof-writing habit

Before you put pen to paper on any direct proof, write two lines at the top of your scratch sheet:

P (assume):   ______________________
Q (prove):    ______________________

Fill both in by parsing the statement. This one step eliminates most circular-reasoning errors. It takes ten seconds and saves ten minutes. Every proof you will ever write starts with "Suppose P," so naming P correctly is the first act of the proof.

Related: Mathematical Proof — Direct Proof · 'If' vs 'Only If' — They Feel the Same but Point Opposite Ways · Converse vs Contrapositive — Why They Are Not the Same Thing · Logic and Propositions