cs.thefarshad
intro

Connectives & Well-Formed Formulas

Atomic sentences, the five truth-functional connectives, and the rules for building formulas.

Formal logic starts by stripping arguments down to their form. We represent simple declarative sentences with capital letters — PP, QQ, RR — called atomic sentences, and we glue them together with a small set of connectives. Each connective is truth-functional: the truth value of the whole is fixed entirely by the truth values of its parts.

Type a formula below (or use the symbol buttons) and read its truth value under every assignment.

Type symbols or ASCII: ~ ! → ¬, & → ∧, | → ∨, -> → →, <-> → ↔.

PQ¬(P ∧ Q)
TTF
TFT
FTT
FFT
This formula is a contingent — true under some assignments, false under others.

The five connectives

ConnectiveHereTeller’s primerRead asTrue exactly when
Negation¬P\lnot PP\sim Pnot PPPP is false
ConjunctionPQP \land QP&QP \mathbin{\&} QPP and QQboth are true
DisjunctionPQP \lor QPQP \lor QPP or QQat least one is true
ConditionalPQP \rightarrow QPQP \supset Qif PP then QQPP is false or QQ is true
BiconditionalPQP \leftrightarrow QPQP \equiv QPP if and only if QQboth sides match

The disjunction is inclusive (PQP \lor Q is true when both are true). The conditional is material: PQP \rightarrow Q only fails in the single case where PP is true and QQ is false — so a false antecedent makes the whole conditional true (“vacuously true”).

Well-formed formulas

Not every string of symbols is legal. A well-formed formula (WFF) is built by these rules:

  • every atomic sentence (PP, QQ, …) is a WFF;
  • if XX is a WFF, so is ¬X\lnot X;
  • if XX and YY are WFFs, so are (XY)(X \land Y), (XY)(X \lor Y), (XY)(X \rightarrow Y), and (XY)(X \leftrightarrow Y).

Parentheses prevent ambiguity. To cut down on clutter we drop outer parentheses and use a precedence order — ¬\lnot binds tightest, then \land, then \lor, then \rightarrow, then \leftrightarrow — so ¬PQR\lnot P \land Q \rightarrow R means ((¬PQ)R)((\lnot P \land Q) \rightarrow R).

The main connective

Every WFF has exactly one main connective — the last one applied as you build it up. It determines what kind of sentence you have: ¬(PQ)\lnot(P \land Q) is a negation, while ¬PQ\lnot P \land Q is a conjunction. Misreading the main connective is the most common beginner mistake, and the visualizer above makes the difference concrete — compare the two formulas and watch their columns differ.

Takeaways

  • Atomic sentences plus five truth-functional connectives (¬,,,,\lnot, \land, \lor, \rightarrow, \leftrightarrow) generate every formula of sentence logic.
  • A connective is truth-functional: the whole’s value depends only on the parts’ values.
  • The conditional PQP \rightarrow Q is false only when PP is true and QQ is false.
  • Precedence and the main connective decide how a formula is read.

References

  • Paul Teller, A Modern Formal Logic Primer, Prentice Hall (1989) — free at tellerprimer.ucdavis.edu. This track follows the primer’s curriculum; the explanations, examples, and exercises here are original.