Predicate Logic Translator: English to Logic Converter

Type an English sentence and get its predicate logic formula, the predicates it uses, a plain-English reading and the steps behind it. It understands a fixed set of common sentence patterns (listed below), and tells you plainly when a sentence falls outside them instead of guessing.

Sentence patterns the translator understands

A, B and V stand for the words in your sentence. Plural and singular forms both work (“dogs” and “dog”), and a property can be joined to another with a single “and” or “or”.

PatternExampleFormula shape
All A are BAll dogs are mammals∀x (A(x) → B(x))
Some A are BSome cats are black∃x (A(x) ∧ B(x))
No A are BNo student is lazy∀x (A(x) → ¬B(x))
Not all A are BNot all birds can fly¬∀x (A(x) → B(x))
Exactly one A is BExactly one prime is even∃!x (A(x) ∧ B(x))
There is an A that is BThere exists a student who is not lazy∃x (A(x) ∧ B(x))
Every A (verb) some BEvery student has a mentor∀x (A(x) → ∃y (B(y) ∧ R(x, y)))
Some A (verb) every BSome student likes every course∃x (A(x) ∧ ∀y (B(y) → R(x, y)))
All / some A (verb)Every dog barks∀x (A(x) → V(x))

Worked translations

Each result below comes from the translator itself, so what you read here is exactly what the tool produces.

“All dogs are mammals”

∀x (Dog(x) → Mammal(x))

Reading: For every x: if x is a dog, then x is a mammal.

Predicates: Dog(x) means “x is a dog”; Mammal(x) means “x is a mammal”.

“Some cats are black”

∃x (Cat(x) ∧ Black(x))

Reading: There is some x such that x is a cat and x is black.

Predicates: Cat(x) means “x is a cat”; Black(x) means “x is black”.

“No student is lazy”

∀x (Student(x) → ¬Lazy(x))

Reading: For every x: if x is a student, then it is not the case that x is lazy.

Predicates: Student(x) means “x is a student”; Lazy(x) means “x is lazy”.

“Not all birds can fly”

¬∀x (Bird(x) → CanFly(x))

Reading: It is not the case that for every x: if x is a bird, then x can fly.

Predicates: Bird(x) means “x is a bird”; CanFly(x) means “x can fly”.

“Exactly one prime is even”

∃!x (Prime(x) ∧ Even(x))

Reading: There is exactly one x such that x is a prime and x is even.

Predicates: Prime(x) means “x is a prime”; Even(x) means “x is even”.

“There exists a student who is not lazy”

∃x (Student(x) ∧ ¬Lazy(x))

Reading: There is some x such that x is a student and it is not the case that x is lazy.

Predicates: Student(x) means “x is a student”; Lazy(x) means “x is lazy”.

“Every integer is even or odd”

∀x (Integer(x) → (Even(x) ∨ Odd(x)))

Reading: For every x: if x is a integer, then x is even or x is odd.

Predicates: Integer(x) means “x is a integer”; Even(x) means “x is even”; Odd(x) means “x is odd”.

“Every student has a mentor”

∀x (Student(x) → ∃y (Mentor(y) ∧ Have(x, y)))

Reading: For every x: if x is a student, then there is some y such that y is a mentor and x has y.

Predicates: Student(x) means “x is a student”; Mentor(x) means “y is a mentor”; Have(x, y) means “x has y”.

“Some student likes every course”

∃x (Student(x) ∧ ∀y (Course(y) → Like(x, y)))

Reading: There is some x such that x is a student and for every y: if y is a course, then x likes y.

Predicates: Student(x) means “x is a student”; Course(x) means “y is a course”; Like(x, y) means “x likes y”.

“Every dog barks”

∀x (Dog(x) → Bark(x))

Reading: For every x: if x is a dog, then x barks.

Predicates: Dog(x) means “x is a dog”; Bark(x) means “x barks”.

How an English sentence becomes predicate logic

Predicate logic describes a domain (the things you are talking about) with predicates such as Dog(x) and quantifiers that say how many members satisfy them. The translator reads the quantifier word first, then the two groups of words, then the property.

Why ∀ goes with → and ∃ goes with ∧

“All dogs are mammals” says if something is a dog, then it is a mammal: ∀x (Dog(x) → Mammal(x)). Writing ∧ instead would claim that everything is a dog and a mammal. “Some cats are black” says there is at least one thing that is both a cat and black: ∃x (Cat(x) ∧ Black(x)). Writing → instead would make the statement true as soon as anything at all is not a cat.

The negated patterns

“No A are B” becomes ∀ with a negated property, and it is equivalent to saying there is no A that is B. “Not all A are B” puts a negation in front of the whole universal statement, which is equivalent to “some A is not B”. The translator shows these equivalent forms with each answer, and they are checked against every small model in this site’s test suite.

Two quantifiers: order matters

In “Every student has a mentor” each student may have a different mentor: ∀x ∃y. Swapping the order to ∃y ∀x would say one single mentor serves every student, which is a different claim.

What it cannot do

The translator is rule based, not a general language model. It does not handle relative clauses (“students who passed”), more than two quantifiers, pronouns, or sentences about specific named individuals. When it cannot translate a sentence faithfully it says so. Predicate names are conventions: Mentor(y) or IsMentor(y) are equally valid choices.

To evaluate a formula over a finite domain, use the predicate logic calculator. For statements without quantifiers, use the logic calculator and its truth tables.

Frequently asked questions

How do you translate an English sentence into predicate logic?

Fix the domain, name a predicate for each group or property, choose ∀ for words like “all” and “every” or ∃ for “some” and “there is”, then join the predicates with → under ∀ and with ∧ under ∃. The translator applies these rules to the sentence you type.

Why does “all” use → but “some” use ∧?

“All dogs are mammals” means if something is a dog then it is a mammal, so ∀x (Dog(x) → Mammal(x)). Using ∧ would claim everything is a dog. “Some cats are black” needs one thing that is both, so ∃x (Cat(x) ∧ Black(x)). Using → would be true whenever anything is not a cat.

Which sentences can the translator handle?

Statements of the forms “All A are B”, “Some A are B”, “No A are B”, “Not all A are B”, “Exactly one A is B”, “There is an A that is B”, two-quantifier sentences such as “Every student has a mentor”, and simple verb statements such as “Every dog barks”. Anything else is reported as unsupported instead of being guessed.

Is the translation unique?

No. Predicate names are conventions, and many formulas are logically equivalent. For example, “No A are B” can be written ∀x (A(x) → ¬B(x)) or ¬∃x (A(x) ∧ B(x)). The translator shows the common equivalent form alongside its answer.