01 Logic and Quantifiers

A structured guide to evaluating propositions, using logical connectives and truth tables, simplifying equivalent statements, and translating quantified English into formal logic.

Propositions and Statements

A is a declarative sentence with exactly one truth value: true or false. Examples include “7 is prime,” which is true, and “10 is less than 3,” which is false. A command such as “Close the door” and a question such as “Is the test tomorrow?” are not propositions.

An expression such as x+2=5x+2=5 is not yet a when the value of xx is unspecified. Its truth depends on the value assigned to the variable, so it is instead an open statement or expression.

Propositions are often represented by lowercase letters such as pp, qq, and rr. Combining propositions produces compound propositions. For example, if pp means “the number is positive” and qq means “the number is even,” then “the number is positive and even” is represented by p∧qp\land q.

Takeaway: Before manipulating a statement, determine whether it already has a definite truth value or whether it still depends on variables.

Logical Connectives

A forms a compound from simpler propositions. The main connectives are:

  • Negation: ¬p\neg p, meaning “not pp.” It reverses the truth value of pp.

  • Conjunction: p∧qp\land q, meaning “pp and qq.” It is true only when both components are true.

  • Disjunction: p∨qp\lor q, meaning “pp or qq.” In mathematical logic, this is inclusive: it is true when at least one component is true, including when both are true.

  • Conditional: p→qp\to q, meaning “if pp, then qq.” It is false only when pp is true and qq is false.

  • Biconditional: p↔qp\leftrightarrow q, meaning “pp if and only if qq.” It is true when the two components have the same truth value.

The conditional p→qp\to q is not generally the same as its converse q→pq\to p. For example, divisibility by 44 implies being even, but being even does not imply divisibility by 44. A biconditional asserts both directions:

pleftrightarrowqequiv(ptoq)land(qtop).p\\leftrightarrow q\\equiv(p\\to q)\\land(q\\to p).

Takeaway: Pay particular attention to the direction of a conditional and to whether “or” is intended inclusively.

Truth Tables and Evaluation

A evaluates a compound by listing every possible assignment of truth values to its components. For two propositions, the four rows are the assignments TTTT, TFTF, FTFT, and FFFF. The basic behavior is:

  • p∧qp\land q is true only in the TTTT row.

  • p∨qp\lor q is false only in the FFFF row.

  • p→qp\to q is false only in the TFTF row.

  • p↔qp\leftrightarrow q is true in the TTTT and FFFF rows.

To evaluate a longer expression, calculate its smaller components first. For example, for (p∧q)→p(p\land q)\to p, first determine p∧qp\land q, then compare that result with pp. The final column is true in every row, so the expression is a tautology.

Unless parentheses specify otherwise, use this precedence order:

  1. ¬\neg

  2. ∧\land

  3. ∨\lor

  4. →\to

  5. ↔\leftrightarrow

Thus, ¬p∨q∧r\neg p\lor q\land r means (¬p)∨(q∧r)(\neg p)\lor(q\land r). Parentheses are preferable whenever the intended grouping could be unclear.

Takeaway: Truth tables provide a systematic method for checking every possible case rather than relying on intuition.

Equivalence and Logical Laws

Two expressions have when they match in truth value for every possible assignment. This relationship is written P≡QP\equiv Q. It can be demonstrated with a or by applying logical laws.

Important laws include double negation, ¬(¬p)≡p\neg(\neg p)\equiv p, the conditional equivalence p→q≡¬p∨qp\to q\equiv\neg p\lor q, and the contrapositive equivalence p→q≡¬q→¬pp\to q\equiv\neg q\to\neg p. De Morgan’s laws are:

neg(plandq)equivnegplornegq\\neg(p\\land q)\\equiv\\neg p\\lor\\neg q
neg(plorq)equivnegplandnegq.\\neg(p\\lor q)\\equiv\\neg p\\land\\neg q.

For example, simplify ¬(p∨¬q)\neg(p\lor\neg q) by applying De Morgan’s law and then double negation:

neg(plornegq)equivnegplandneg(negq)equivnegplandq.\\neg(p\\lor\\neg q)\\equiv\\neg p\\land\\neg(\\neg q)\\equiv\\neg p\\land q.

A that is always true is a tautology. A that is always false is a contradiction. If its truth value changes across assignments, it is contingent.

Takeaway: When simplifying, change one recognizable subexpression at a time and name the law that justifies each step.

Predicates, Domains, and Quantifiers

A is a statement involving variables whose truth depends on assigned values. For example, P(x):x>5P(x): x>5 is true for x=7x=7 and false for x=3x=3. It becomes a when a value is substituted or when a quantifier binds the variable.

The specifies the objects under consideration. A relation such as R(x,y):x<yR(x,y):x<y is a with two variables. Always state the domain because the interpretation of a depends on which objects are allowed.

Quantifiers turn predicates into propositions:

  • The ∀\forall means “for every.” The statement ∀x∈D  P(x)\forall x\in D\;P(x) claims that every element of DD satisfies PP.

  • The ∃\exists means “there exists at least one.” The statement ∃x∈D  P(x)\exists x\in D\;P(x) claims that at least one element of DD satisfies PP.

  • Unique existence, written ∃!x  P(x)\exists!x\;P(x), means that exactly one value satisfies the .

For example, ∃n∈Z  (n2=9)\exists n\in\mathbb Z\;(n^2=9) is true because n=3n=3 and n=−3n=-3 are witnesses. By contrast, ∃!x∈R  (x+2=5)\exists!x\in\mathbb R\;(x+2=5) is true because the only solution is x=3x=3.

Takeaway: A quantified statement is meaningful only when the variables, predicates, and domain are all clear.

Negating Quantified Statements

Negating a quantified statement requires both reversing the quantifier and negating the :

neg(forallxinD;P(x))equivexistsxinD;negP(x)\\neg(\\forall x\\in D\\;P(x))\\equiv\\exists x\\in D\\;\\neg P(x)
neg(existsxinD;P(x))equivforallxinD;negP(x).\\neg(\\exists x\\in D\\;P(x))\\equiv\\forall x\\in D\\;\\neg P(x).

In words, “not everything has property PP” means “at least one thing does not have property PP,” while “nothing has property PP” means “everything lacks property PP.”

Negating comparisons also requires care. The negation of x>3x>3 is x≤3x\le 3; the negation of x≥3x\ge 3 is x<3x<3; and the negation of x=3x=3 is x≠3x\ne 3. For example, the negation of

forallxinmathbbR;(x2ge0)\\forall x\\in\\mathbb R\\;(x^2\\ge 0)

is

existsxinmathbbR;(x2<0).\\exists x\\in\\mathbb R\\;(x^2<0).

The negated statement is false, because no real number has a negative square.

Takeaway: To negate a quantified claim, reverse ∀\forall and ∃\exists, then negate the condition accurately.

Translating English into Formal Logic

Formal translation begins with the domain and the meanings of the predicates. Then identify indicator words, preserve the logical structure, and check the scope of each quantifier.

For “Every integer is rational,” let I(x)I(x) mean “xx is an integer” and R(x)R(x) mean “xx is rational.” The correct form is:

forallx;(I(x)toR(x)).\\forall x\\;(I(x)\\to R(x)).

The implication matters: the statement says that anything which is an integer is rational, not that every object is an integer.

For “Some integer is even and prime,” if E(x)E(x) means “xx is even” and P(x)P(x) means “xx is prime,” write:

existsxinmathbbZ;(E(x)landP(x)).\\exists x\\in\\mathbb Z\\;(E(x)\\land P(x)).

A witness is x=2x=2. For “Only registered users may access the system,” let R(x)R(x) mean “xx is registered” and A(x)A(x) mean “xx may access the system.” The word “only” introduces a necessary condition:

forallx;(A(x)toR(x)).\\forall x\\;(A(x)\\to R(x)).

With multiple quantifiers, order changes meaning. The statement ∀x∃y  R(x,y)\forall x\exists y\;R(x,y) allows a different yy for each xx, whereas ∃y∀x  R(x,y)\exists y\forall x\;R(x,y) requires one particular yy that works for every xx. Over the integers, if R(x,y)R(x,y) means x<yx<y, the first statement is true but the second is false.

Use this checklist:

  1. Identify the domain.

  2. Define every and relation.

  3. Locate words such as “every,” “some,” “no,” “only,” and “exactly one.”

  4. Translate conjunctions, disjunctions, negations, and implications.

  5. Check parentheses, scope, and quantifier order.

  6. Test the result with a witness or counterexample.

Takeaway: Most translation errors come from a reversed implication, an omitted domain, or an incorrect quantifier scope.