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 P∼P\sim Pnot PPPP is false
ConjunctionP∧QP \land QP&QP \mathbin{\&} QPP and QQboth are true
DisjunctionP∨QP \lor QP∨QP \lor QPP or QQat least one is true
ConditionalP→QP \rightarrow QP⊃QP \supset Qif PP then QQPP is false or QQ is true
BiconditionalP↔QP \leftrightarrow QP≡QP \equiv QPP if and only if QQboth sides match

The disjunction is inclusive (P∨QP \lor Q is true when both are true). The conditional is material: P→QP \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 (X∧Y)(X \land Y), (X∨Y)(X \lor Y), (X→Y)(X \rightarrow Y), and (X↔Y)(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 ¬P∧Q→R\lnot P \land Q \rightarrow R means ((¬P∧Q)→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: ¬(P∧Q)\lnot(P \land Q) is a negation, while ¬P∧Q\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 P→QP \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.