Definition · applies to formulas in logic · also called closed formula

Undergraduate (first-order logic)

Consider a formula of first-order logic, such as $\forall x \, (x^2 \geq 0)$ or $x > 3$. The formula is a sentence if it has no free variables: every variable in it is bound by a quantifier.

Examples

Examples

Non-examples

Things that may be mistaken for examples.

  • “$7$ is prime” High school
    “$7$ is prime” is not a sentence of first-order logic, because “$7$ is prime” is written in English, not as a string of symbols of a formal language.
  • “$x > 3$” High school
    “$x > 3$” is not a sentence, because $x$ is a free variable.
  • $\exists y \, (y > x)$ Undergraduate
    $\exists y \, (y > x)$ is not a sentence, although $\exists y \, (y > x)$ has a quantifier: the quantifier binds $y$, but $x$ is free, so the truth of $\exists y \, (y > x)$ depends on the value of $x$ (for example, if $x$ and $y$ range over the natural numbers, then the formula is true for every $x$, and if $x$ and $y$ range over $\setdef{1, 2, 3}$, then the formula is false for $x = 3$).
  • $p \land \neg q$ Undergraduate
    $p \land \neg q$ is not a sentence of first-order logic, because the variables $p$ and $q$ stand for whole statements, not for objects such as numbers, and $p \land \neg q$ has no quantifiers; a sentence such as $\forall x \, (x^2 \geq 0)$ has variables that stand for objects, and a quantifier binds each of those variables.

Properties

  • Once its symbols are interpreted in a structure (such as $\reals$ with its usual operations), a sentence is true or false, so it expresses a proposition.
  • A formula with free variables, such as $x > 3$, expresses a predicate. Quantifying every free variable turns it into a sentence.

Notes

In everyday grammar, a “sentence” is any complete sentence, including questions and commands, which are not propositions.

Distinctions involving this term

  • Formula vs. sentence: In first-order logic, statements about objects are written as strings of symbols with variables and quantifiers. A formula is every such string that is built by the rules of the language, such as $x > 3$ or $\forall x \, (x^2 \geq 0)$, and the variables in a formula can be free or bound by quantifiers. A sentence is a formula in which a quantifier binds every variable, so a sentence is true or false once its symbols are interpreted, without assigning values to variables.
  • Sentence vs. proposition: In logic, a statement can be studied as a string of symbols or as a claim that is true or false. A sentence is a formula of first-order logic, a string of symbols in which a quantifier binds every variable. A proposition is a claim that is true or false. A sentence expresses a proposition only once its symbols are interpreted, for example by choosing the set that the variables range over, and the same sentence can express different propositions under different interpretations.
  • Sentence vs. propositional formula: Formal logic has formulas at two levels: propositional logic (zeroth-order logic), whose variables stand for whole statements, and first-order logic, whose variables stand for objects such as numbers. A sentence is a formula of first-order logic in which a quantifier, such as “for all” ($\forall$) or “there exists” ($\exists$), binds every variable, and the sentence is true or false once its symbols are interpreted, for example as statements about real numbers. A propositional formula is a formula of propositional logic, built from propositional variables with logical connectives such as $\land$ and $\neg$, and the formula is true or false once each variable is assigned a truth value.

All definitions · All distinctions · All examples