Logic, Sets and Infinity

How to Translate English Sentences Into Logical Symbols

A step-by-step method for turning everyday and mathematical English into logic, with the traps hidden in "unless", "only if" and "any".

Key takeaways

  • Start by listing the simple claims and any quantities such as "all", "some" or "none", then rebuild the sentence around them.
  • "P only if Q" means P → Q, while "P if Q" means Q → P.
  • "All A are B" pairs ∀ with →, and "some A are B" pairs ∃ with ∧.
  • Test every translation against situations where you already know whether the English sentence is true.

To translate a sentence into logic, find the simple claims inside it, give each a name, work out which words join them, and then check that your formula is true and false in the same situations as the original.

That last check is the heart of the job. Translation is not word-for-word substitution, because English often says one thing with several structures and several things with one.

The symbols you will need

Symbol Meaning
¬P not P
P ∧ Q P and Q
P ∨ Q P or Q (or both)
P → Q if P then Q
P ↔ Q P if and only if Q
∀x for all x
∃x there exists an x

If the first five are unfamiliar, their exact definitions are given in propositional logic and truth tables.

A method in five steps

From an English sentence to a formula
1 Find the claims Underline each simple statement 2 Name them Letters, or predicates with blanks 3 Spot quantities All, some, none, exactly one 4 Join the pieces Pick connectives and add brackets 5 Test it Compare truth in sample cases Find the claims Underline each simple statement 1 Name them Letters, or predicates with blanks 2 Spot quantities All, some, none, exactly one 3 Join the pieces Pick connectives and add brackets 4 Test it Compare truth in sample cases 5
  1. Find the claims. In "The shop opens if it is a weekday and the manager has arrived", there are three.
  2. Name them positively. Let O be "the shop opens", W "it is a weekday" and M "the manager has arrived". Keep negation out of the letters.
  3. Notice quantities. This sentence has none.
  4. Join the pieces. The word "if" introduces the condition, so the formula is (W ∧ M) → O.
  5. Test. A weekday with the manager present and the shop shut makes both the sentence and the formula false.

Words that hide "and", "or" and "not"

Many words mean "and" with an added tone: but, although, yet, whereas, even though. "The number is large but prime" is simply L ∧ P. Logic drops the surprise.

"Neither P nor Q" is ¬P ∧ ¬Q, which by De Morgan's laws equals ¬(P ∨ Q). "Not both P and Q" is ¬(P ∧ Q). These two are different: the first rules out each one, the second only rules out having them together.

"Or" in mathematics is inclusive unless the sentence says otherwise. A menu's "soup or salad" is usually exclusive, which you would write (S ∨ A) ∧ ¬(S ∧ A).

The many faces of "if"

Conditionals cause the most errors. In each row, the formula is the same: P → Q.

English Note
If P, then Q the standard form
Q if P the order of words is reversed
P only if Q Q is needed for P
P is sufficient for Q P is enough
Q is necessary for P no P without Q
Whenever P, Q covers every occasion

The phrase "only if" deserves a moment. "You may vote only if you are registered" does not promise that registration is enough. It says that voting implies registration: V → R.

Unless is another puzzle. "I will walk unless it rains" says that if it does not rain, I walk: ¬R → W. This is equivalent to W ∨ R. Some speakers also mean that if it rains, I will not walk. That stronger reading would be W ↔ ¬R. Logic texts usually take the weaker one, and good mathematical writing avoids the doubt.

"Just in case" and "exactly when", as mathematicians use them, mean ↔.

Adding predicates and quantifiers

When a sentence talks about all or some members of a group, letters are not enough. You need predicates, as introduced in predicate logic. Let D(x) be "x is a dog" and B(x) be "x barks", with the domain being all animals.

English Formula
All dogs bark ∀x (D(x) → B(x))
Some dog barks ∃x (D(x) ∧ B(x))
No dog barks ∀x (D(x) → ¬B(x))
Not all dogs bark ∃x (D(x) ∧ ¬B(x))
Only dogs bark ∀x (B(x) → D(x))

Notice the last row. "Only" reverses the arrow, just as "only if" did.

Why not ∀x (D(x) ∧ B(x)) for "all dogs bark"? That formula says every animal is a barking dog. And ∃x (D(x) → B(x)) is made true by any cat, since a false "if" part makes the conditional true.

"Any" is slippery. In "any child can do this", it means every child. In "if any child cries, we stop", it means: if there exists a crying child. Rephrase with "every" or "at least one" before you symbolize.

Sentences with two quantifiers

Let the domain be people and let L(x, y) mean "x likes y".

Everyone likes someone:          ∀x ∃y L(x, y)
Someone is liked by everyone:    ∃y ∀x L(x, y)
Someone likes everyone:          ∃x ∀y L(x, y)
Everyone is liked by someone:    ∀y ∃x L(x, y)

"Everyone likes someone" is ambiguous in casual speech: one favorite celebrity, or each person with their own choice? Logic forces you to pick. The first line allows different choices; the second names a single universally liked person.

Mathematical sentences nest the same way. "There is no largest integer" becomes ¬∃m ∀n (n ≤ m), which is equivalent to ∀m ∃n (n > m).

Counting words

"At least two", "at most one" and "exactly one" need equality. "At most one king is in the room", with K(x) for "x is a king in the room", is ∀x ∀y ((K(x) ∧ K(y)) → x = y). "Exactly one" adds the claim ∃x K(x).

The word "the" often carries this load. "The largest planet in our solar system is a gas giant" asserts that there is exactly one largest planet and that it has the property.

A longer mathematical example

Take the statement "every even integer greater than 2 is a sum of two primes", which is Goldbach's conjecture, open as of the mid-2020s. Let the domain be the integers, E(n) be "n is even" and Pr(p) be "p is prime".

∀n ((E(n) ∧ n > 2) → ∃p ∃q (Pr(p) ∧ Pr(q) ∧ n = p + q))

Check the structure. "Every even integer greater than 2" gives ∀n with a two-part condition and an arrow. "Is a sum of two primes" gives two existential quantifiers joined to their requirements with ∧. Nothing says p ≠ q, which is right, because 4 = 2 + 2 should count.

Its negation is found by flipping quantifiers: there exists an even n > 2 such that for all p and q, it is not the case that both are prime and n = p + q. That is exactly what a counterexample would be. For practice with this step, see negating mathematical statements.

Where the negation lands

The position of "not" changes meaning more than any other small word. Let S(x) be "x passed", with the domain being the students in a class.

Not every student passed:     ¬∀x S(x)      same as ∃x ¬S(x)
Every student did not pass:   ∀x ¬S(x)      same as ¬∃x S(x)

The first allows most of the class to pass. The second says nobody did. Casual English blurs them: "all the students didn't pass" is heard both ways, so rewrite it as "not all passed" or "none passed" before translating.

Scope matters for conditionals too. "It is not true that if the alarm rang, we left" is ¬(R → L), equivalent to R ∧ ¬L: the alarm rang and we stayed. "If the alarm did not ring, we left" is ¬R → L, a completely different claim. Brackets are how logic records which of these a speaker meant, so add them as soon as a sentence has two connectives.

Hidden negations deserve the same care. Words such as "fail", "lack", "without" and "refuse" often carry a "not" inside them. Name the positive claim and write the negation explicitly.

Checking your work

  • Build a tiny world, say two dogs and a cat, and decide whether the English and the formula agree.
  • Try the empty case. If there are no dogs, "all dogs bark" comes out true in logic, a point explained in why a false premise makes an implication true.
  • Read the formula back into stiff English and see whether the meaning changed.
  • Confirm that every variable is bound by a quantifier.

Where translation loses something

Logic keeps only what affects truth. Emphasis, politeness and implied timing vanish. "She got on the bike and rode off" suggests an order that ∧ does not record. "Most birds fly" cannot be expressed with ∀ and ∃ alone. Words such as "might", "must" and "ought" call for modal or other extended logics.

When a sentence admits two readings, write both formulas and say which you mean. Spotting the ambiguity is often the most valuable thing the exercise produces.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 41 articles in Logic, Sets and Infinity →

Latest news on this topic