KonkurStudy
همه کارت‌ها

Predicate-Logic Translation and Quantifier Rules

Translate natural language by pairing ∀\forall with →\to and ∃\exists with ∧\wedge; remember ∀\forall distributes over ∧\wedge and ∃\exists over ∨\vee (and never the mismatched pairs).

کارت مفهوم کنکور ارشد علوم کامپیوتر

اهمیت
۰/۵

Translating English (or Persian) into first-order logic is mechanical once you know two pattern rules and two algebraic laws. Most exam errors come from mixing up the restriction pattern or reversing an implication.

1. The two restriction patterns

A restricted quantifier ("all AA are BB", "some AA is BB") always pairs a quantifier with a fixed connective:

Phrase Correct form Wrong form
every AA is a BB ∀x (A(x)→B(x))\forall x\,(A(x) \to B(x)) ∀x (A(x)∧B(x))\forall x\,(A(x) \wedge B(x))
there is an AA that is a BB ∃x (A(x)∧B(x))\exists x\,(A(x) \wedge B(x)) ∃x (A(x)→B(x))\exists x\,(A(x) \to B(x))

The rule: ∀\forall goes with →\to, and ∃\exists goes with ∧\wedge. Using ∃x (A(x)→… )\exists x\,(A(x) \to \dots) is almost always wrong, because A(x)→…A(x) \to \dots is vacuously true for any xx outside AA, so the formula no longer says "some AA".

So "there is a factory that sells cars only to plateless people" begins ∃x [K(x)∧… ]\exists x\,[K(x) \wedge \dots], not ∀x [K(x)→… ]\forall x\,[K(x) \to \dots] — the latter would assert the property of every factory.

2. Quantifier distribution over connectives

Quantifiers distribute over only one connective each, and the match is the natural pairing ∀/∧\forall/\wedge and ∃/∨\exists/\vee:

∀x (P(x)∧Q(x))  ≡  ∀x P(x)∧∀x Q(x),\forall x\,(P(x) \wedge Q(x)) \;\equiv\; \forall x\,P(x) \wedge \forall x\,Q(x),

∃x (P(x)∨Q(x))  ≡  ∃x P(x)∨∃x Q(x).\exists x\,(P(x) \vee Q(x)) \;\equiv\; \exists x\,P(x) \vee \exists x\,Q(x).

The mismatched pairs give only a one-way implication, never equivalence:

∃x (P(x)∧Q(x))  ⇒  ∃x P(x)∧∃x Q(x)(converse fails),\exists x\,(P(x) \wedge Q(x)) \;\Rightarrow\; \exists x\,P(x) \wedge \exists x\,Q(x) \quad(\text{converse fails}),

∀x P(x)∨∀x Q(x)  ⇒  ∀x (P(x)∨Q(x))(converse fails).\forall x\,P(x) \vee \forall x\,Q(x) \;\Rightarrow\; \forall x\,(P(x) \vee Q(x)) \quad(\text{converse fails}).

The failure always has the same cause: the two separate quantifiers may pick different witnesses. For ∃\exists over ∧\wedge, take domain {1,2}\{1,2\} with P(1), ¬P(2), ¬Q(1), Q(2)P(1),\,\neg P(2),\,\neg Q(1),\,Q(2). Then ∃x P(x)\exists x\,P(x) and ∃x Q(x)\exists x\,Q(x) are both true (witnesses 11 and 22), yet no single xx satisfies P(x)∧Q(x)P(x) \wedge Q(x), so ∃x (P(x)∧Q(x))\exists x\,(P(x) \wedge Q(x)) is false — the formulas are not equivalent.

3. Getting the implication direction right

Many trap options keep the right shape but reverse an implication. Two keywords to watch:

  • "only": "xx does PP only to QQs" means doing PP forces being a QQ, i.e. P→QP \to Q — not Q→PQ \to P. So "sells cars only to plateless people" is (C(y)∧S(x,y,z))→(P(z)∧¬H(z))\big(C(y) \wedge S(x,y,z)\big) \to \big(P(z) \wedge \neg H(z)\big), with the act of selling as antecedent. Writing (P(z)∧¬H(z))→(C(y)∧S(x,y,z))\big(P(z) \wedge \neg H(z)\big) \to \big(C(y) \wedge S(x,y,z)\big) instead says "every plateless person is sold a car" — a different claim.
  • "unless": "PP unless QQ" ≡P∨Q≡¬Q→P\equiv P \vee Q \equiv \neg Q \to P. The condition is the negated clause, so the implication runs from ¬Q\neg Q, never from QQ.

Mini-example

Translate "every student who studies passes": the subject is restricted (∀\forall with →\to), and "who studies" is an extra restriction folded into the antecedent:

∀x ((Student(x)∧Studies(x))→Passes(x)).\forall x\,\big(\big(\mathrm{Student}(x) \wedge \mathrm{Studies}(x)\big) \to \mathrm{Passes}(x)\big).

Note both restrictions sit on the left of the →\to, joined by ∧\wedge — the universal pattern.

Exam trick: Lock in the four pairings: ∀\forall with →\to, ∃\exists with ∧\wedge for restriction; ∀\forall over ∧\wedge, ∃\exists over ∨\vee for distribution. Any other combination (∃\exists with →\to, ∀\forall with ∧\wedge as a restriction, or distributing ∃\exists over ∧\wedge / ∀\forall over ∨\vee as an equivalence) is a planted wrong answer.

فرمول‌های کلیدی

Universal restriction
∀x (A(x)→B(x))\forall x\,(A(x) \to B(x))

"every A is a B" — universal pairs with implication.

Existential restriction
∃x (A(x)∧B(x))\exists x\,(A(x) \wedge B(x))

"some A is a B" — existential pairs with conjunction.

Quantifier distribution
∀x (P(x)∧Q(x))≡∀x P(x)∧∀x Q(x);∃x (P(x)∨Q(x))≡∃x P(x)∨∃x Q(x)\forall x\,(P(x)\wedge Q(x)) \equiv \forall x\,P(x)\wedge\forall x\,Q(x); \quad \exists x\,(P(x)\vee Q(x)) \equiv \exists x\,P(x)\vee\exists x\,Q(x)

Forall distributes over and; exists over or. The mismatched pairs are one-way only.

#predicate-logic#fol-translation#quantifiers#quantifier-distribution#restricted-quantification#natural-language#implication-direction#unless#only-to

سوالات تمرینی · 8/13

همهٔ 13 سؤال →