Formulas and Well-Formed Expressions

College Depth 51 in the knowledge graph I know this Set as goal
Unlocks 69 downstream topics
syntax first-order-logic

Core Idea

Well-formed formulas are recursively defined: every atomic formula is a wff; if φ and ψ are wffs, then so are ¬φ, (φ ∧ ψ), (φ ∨ ψ), (φ → ψ), ∀x φ, and ∃x φ. This syntax is the foundation for assigning meanings via interpretations in structures.

Explainer

You already know how to construct terms (expressions that name objects) and atomic formulas (the simplest sentences, like R(t₁, t₂) or t₁ = t₂). A well-formed formula (wff) is a syntactic expression that has a definite grammatical structure — it is a legitimate sentence of the logical language, as opposed to a random string of symbols. The definition is recursive: start from atomic formulas, then close under the logical connectives and quantifiers. Every atomic formula is a wff. If φ is a wff, then so is ¬φ. If φ and ψ are wffs, then so are (φ ∧ ψ), (φ ∨ ψ), and (φ → ψ). If φ is a wff and x is a variable, then ∀x φ and ∃x φ are wffs. Nothing else is a wff.

This recursive definition is not just an arbitrary grammar rule — it is what makes logical syntax compositional. The meaning of a compound formula is determined entirely by the meanings of its parts and the connective that joins them. Without a precise grammar, we could not define semantics at all: "what does this expression mean?" presupposes that the expression is grammatically legitimate. The wff definition is the contract between syntax and semantics — it specifies exactly which strings the semantics is obligated to interpret.

The recursive structure also enables structural induction, the primary proof technique for results about formulas. To prove a property holds for all wffs, prove it for all atomic formulas (base case), then show that if it holds for φ and ψ, it holds for ¬φ, (φ ∧ ψ), ∀x φ, and so on (inductive step). Almost every result in logic — soundness, completeness, compactness — is proved by structural induction on the formula. When you encounter a metatheorem like "every valid formula is provable," you should expect to prove it by induction on the complexity of the formula.

A key distinction the wff definition enables is between free and bound occurrences of variables. In ∀x (P(x) → Q(x, y)), the variable x is bound (governed by ∀x) while y is free (no quantifier governs it). The wff definition makes this distinction precise: a variable occurrence is bound if it falls within the scope of a quantifier for that variable, which the recursive structure tracks exactly. Free variables are the "parameters" of a formula — the formula expresses a property of them. Bound variables are internal bookkeeping. This distinction is foundational for substitution, semantics, and the correct statement of every theorem about first-order logic.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsFunction Notation ReviewDomain and RangeIntroduction to Predicate Logic (First-Order Logic)Predicates and Relations in First-Order LogicQuantifier Notation and Basic SemanticsExistential Quantification: Meaning and ScopeFree Variables and Bound VariablesSubstitution and Instantiation in Predicate LogicTerms and Atomic FormulasFormulas and Well-Formed Expressions

Longest path: 52 steps · 262 total prerequisite topics

Prerequisites (3)

Leads To (1)