← back to logic

Propositional Logic Syntax

Craig DeLancey · A Concise Introduction to Logic, Ch. 2 · CC BY-SA 4.0

Propositional logic has atomic propositions (P, Q, R) and five connectives: not, and, or, implies, iff. A well-formed formula is built recursively from these pieces. Parsing a formula means finding its structure.

R P Q Parse tree for (P ∧ Q) → R

Atomic propositions

An atomic proposition is a statement that is either true or false, with no internal logical structure. We use capital letters P, Q, R as variables standing for any proposition.

Scheme

Connectives

The five connectives build compound formulas from simpler ones.

Symbol Name English Arity
¬Negationnot P1 (unary)
ConjunctionP and Q2 (binary)
DisjunctionP or Q2 (binary)
Conditionalif P then Q2 (binary)
BiconditionalP if and only if Q2 (binary)

Well-formed formulas

A well-formed formula (wff) is defined recursively: every atom is a wff. If A is a wff, then (not A) is a wff. If A and B are wffs, then (A and B), (A or B), (A implies B), and (A iff B) are wffs. Nothing else is a wff.

Scheme

Parsing

Parsing a formula means recovering its tree structure. The main connective is the root of the parse tree: the last connective applied. For (P ∧ Q) → R, the main connective is → because implication was applied last.

Scheme