Recent from talks
Contribute something
Nothing was collected or created yet.
First-order logic
View on WikipediaFirst-order logic, also called predicate logic, predicate calculus, or quantificational logic, is a type of formal system used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over non-logical objects, and allows the use of sentences that contain variables. Rather than propositions such as "all humans are mortal", in first-order logic one can have expressions in the form "for all x, if x is a human, then x is mortal", where "for all x" is a quantifier, x is a variable, and "... is a human" and "... is mortal" are predicates.[1] This distinguishes it from propositional logic, which does not use quantifiers or relations;[2]: 161 in this sense, propositional logic is the foundation of first-order logic.
A theory about a topic, such as set theory, a theory for groups,[3] or a formal theory of arithmetic, is usually a first-order logic together with a specified domain of discourse (over which the quantified variables range), finitely many functions from that domain to itself, finitely many predicates defined on that domain, and a set of axioms believed to hold about them. "Theory" is sometimes understood in a more formal sense as just a set of sentences in first-order logic.
The term "first-order" distinguishes first-order logic from higher-order logic, in which there are predicates having predicates or functions as arguments, or in which quantification over predicates, functions, or both, are permitted.[4]: 56 In first-order theories, predicates are often associated with sets. In interpreted higher-order theories, predicates may be interpreted as sets of sets.
There are many deductive systems for first-order logic which are both sound, i.e. all provable statements are true in all models; and complete, i.e. all statements which are true in all models are provable. Although the logical consequence relation is only semidecidable, much progress has been made in automated theorem proving in first-order logic. First-order logic also satisfies several metalogical theorems that make it amenable to analysis in proof theory, such as the Löwenheim–Skolem theorem and the compactness theorem.
First-order logic is the standard for the formalization of mathematics into axioms, and is studied in the foundations of mathematics. Peano arithmetic and Zermelo–Fraenkel set theory are axiomatizations of number theory and set theory, respectively, into first-order logic. No first-order theory, however, has the strength to uniquely describe a structure with an infinite domain, such as the natural numbers or the real line. Axiom systems that do fully describe these two structures, i.e. categorical axiom systems, can be obtained in stronger logics such as second-order logic.
The foundations of first-order logic were developed independently by Gottlob Frege and Charles Sanders Peirce.[5] For a history of first-order logic and how it came to dominate formal logic, see José Ferreirós (2001).
Introduction
[edit]| Logical connectives | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||
| Related concepts | ||||||||||||||||||||||||||
| Applications | ||||||||||||||||||||||||||
|
|
While propositional logic deals with simple declarative propositions, first-order logic additionally covers predicates and quantification. A predicate evaluates to true or false for an entity or entities in the domain of discourse.
Consider the two sentences "Socrates is a philosopher" and "Plato is a philosopher". In propositional logic, these sentences themselves are viewed as the individuals of study, and might be denoted, for example, by variables such as p and q. They are not viewed as an application of a predicate, such as , to any particular objects in the domain of discourse, instead viewing them as purely an utterance which is either true or false.[6] However, in first-order logic, these two sentences may be framed as statements that a certain individual or non-logical object has a property. In this example, both sentences happen to have the common form for some individual , in the first sentence the value of the variable x is "Socrates", and in the second sentence it is "Plato". Due to the ability to speak about non-logical individuals along with the original logical connectives, first-order logic includes propositional logic.[7]: 29–30
The truth of a formula such as "x is a philosopher" depends on which object is denoted by x and on the interpretation of the predicate "is a philosopher". Consequently, "x is a philosopher" alone does not have a definite truth value of true or false, and is akin to a sentence fragment.[8] Relationships between predicates can be stated using logical connectives. For example, the first-order formula "if x is a philosopher, then x is a scholar", is a conditional statement with "x is a philosopher" as its hypothesis, and "x is a scholar" as its conclusion, which again needs specification of x in order to have a definite truth value.
Quantifiers can be applied to variables in a formula. The variable x in the previous formula can be universally quantified, for instance, with the first-order sentence "For every x, if x is a philosopher, then x is a scholar". The universal quantifier "for every" in this sentence expresses the idea that the claim "if x is a philosopher, then x is a scholar" holds for all choices of x.
The negation of the sentence "For every x, if x is a philosopher, then x is a scholar" is logically equivalent to the sentence "There exists x such that x is a philosopher and x is not a scholar". The existential quantifier "there exists" expresses the idea that the claim "x is a philosopher and x is not a scholar" holds for some choice of x.
The predicates "is a philosopher" and "is a scholar" each take a single variable. In general, predicates can take several variables. In the first-order sentence "Socrates is the teacher of Plato", the predicate "is the teacher of" takes two variables.
An interpretation (or model) of a first-order formula specifies what each predicate means, and the entities that can instantiate the variables. These entities form the domain of discourse or universe, which is usually required to be a nonempty set. For example, consider the sentence "There exists x such that x is a philosopher." This sentence is seen as being true in an interpretation such that the domain of discourse consists of all human beings, and that the predicate "is a philosopher" is understood as "was the author of the Republic." It is true, as witnessed by Plato in that text.[clarification needed]
There are two key parts of first-order logic. The syntax determines which finite sequences of symbols are well-formed expressions in first-order logic, while the semantics determines the meanings behind these expressions.
Syntax
[edit]| Part of a series on |
| Formal languages |
|---|
Unlike natural languages, such as English, the language of first-order logic is completely formal, so that it can be mechanically determined whether a given expression is well formed. There are two key types of well-formed expressions: terms, which intuitively represent objects, and formulas, which intuitively express statements that can be true or false. The terms and formulas of first-order logic are strings of symbols, where all the symbols together form the alphabet of the language.
Alphabet
[edit]As with all formal languages, the nature of the symbols themselves is outside the scope of formal logic; they are often regarded simply as letters and punctuation symbols.
It is common to divide the symbols of the alphabet into logical symbols, which always have the same meaning, and non-logical symbols, whose meaning varies by interpretation.[9] For example, the logical symbol always represents "and"; it is never interpreted as "or", which is represented by the logical symbol . However, a non-logical predicate symbol such as Phil(x) could be interpreted to mean "x is a philosopher", "x is a man named Philip", or any other unary predicate depending on the interpretation at hand.
Logical symbols
[edit]Logical symbols are a set of characters that vary by author, but usually include the following:[10]
- Quantifier symbols: ∀ for universal quantification, and ∃ for existential quantification
- Logical connectives: ∧ for conjunction, ∨ for disjunction, → for implication, ↔ for biconditional, ¬ for negation. Some authors[11] use Cpq instead of → and Epq instead of ↔, especially in contexts where → is used for other purposes. Moreover, the horseshoe ⊃ may replace →;[8] the triple-bar ≡ may replace ↔; a tilde (~), Np, or Fp may replace ¬; a double bar , ,[12] or Apq may replace ∨; and an ampersand &, Kpq, or the middle dot ⋅ may replace ∧, especially if these symbols are not available for technical reasons.
- Parentheses, brackets, and other punctuation symbols. The choice of such symbols varies depending on context.
- An infinite set of variables, often denoted by lowercase letters at the end of the alphabet x, y, z, ... . Subscripts are often used to distinguish variables: x0, x1, x2, ... .
- An equality symbol (sometimes, identity symbol) = (see § Equality and its axioms below).
Not all of these symbols are required in first-order logic. Either one of the quantifiers along with negation, conjunction (or disjunction), variables, brackets, and equality suffices.
Other logical symbols include the following:
- Truth constants: T, or ⊤ for "true" and F, or ⊥ for "false". Without any such logical operators of valence 0, these two constants can only be expressed using quantifiers.
- Additional logical connectives such as the Sheffer stroke, Dpq (NAND), and exclusive or, Jpq.
Non-logical symbols
[edit]Non-logical symbols represent predicates (relations), functions and constants. It used to be standard practice to use a fixed, infinite set of non-logical symbols for all purposes:
- For every integer n ≥ 0, there is a collection of n-ary, or n-place, predicate symbols. Because they represent relations between n elements, they are also called relation symbols. For each arity n, there is an infinite supply of them:
- Pn0, Pn1, Pn2, Pn3, ...
- For every integer n ≥ 0, there are infinitely many n-ary function symbols:
- f n0, f n1, f n2, f n3, ...
When the arity of a predicate symbol or function symbol is clear from context, the superscript n is often omitted.
In this traditional approach, there is only one language of first-order logic.[13] This approach is still common, especially in philosophically oriented books.
A more recent practice is to use different non-logical symbols according to the application one has in mind. Therefore, it has become necessary to name the set of all non-logical symbols used in a particular application. This choice is made via a signature.[14]
Typical signatures in mathematics are {1, ×} or just {×} for groups,[3] or {0, 1, +, ×, <} for ordered fields. There are no restrictions on the number of non-logical symbols. The signature can be empty, finite, or infinite, even uncountable. Uncountable signatures occur for example in modern proofs of the Löwenheim–Skolem theorem.
Though signatures might in some cases imply how non-logical symbols are to be interpreted, interpretation of the non-logical symbols in the signature is separate (and not necessarily fixed). Signatures concern syntax rather than semantics.
In this approach, every non-logical symbol is of one of the following types:
- A predicate symbol (or relation symbol) with some valence (or arity, number of arguments) greater than or equal to 0. These are often denoted by uppercase letters such as P, Q and R. Examples:
- In P(x), P is a predicate symbol of valence 1. One possible interpretation is "x is a man".
- In Q(x,y), Q is a predicate symbol of valence 2. Possible interpretations include "x is greater than y" and "x is the father of y".
- Relations of valence 0 can be identified with propositional variables, which can stand for any statement. One possible interpretation of R is "Socrates is a man".
- A function symbol, with some valence greater than or equal to 0. These are often denoted by lowercase roman letters such as f, g and h. Examples:
- f(x) may be interpreted as "the father of x". In arithmetic, it may stand for "-x". In set theory, it may stand for "the power set of x".
- In arithmetic, g(x,y) may stand for "x+y". In set theory, it may stand for "the union of x and y".
- Function symbols of valence 0 are called constant symbols, and are often denoted by lowercase letters at the beginning of the alphabet such as a, b and c. The symbol a may stand for Socrates. In arithmetic, it may stand for 0. In set theory, it may stand for the empty set.
The traditional approach can be recovered in the modern approach, by simply specifying the "custom" signature to consist of the traditional sequences of non-logical symbols.
Formation rules
[edit]| BNF grammar |
|---|
<index> ::= ""
| <index> "'"
<variable> ::= "x" <index>
<constant> ::= "c" <index>
<unary function> ::= "f1" <index>
<binary function> ::= "f2" <index>
<ternary function> ::= "f3" <index>
<unary predicate> ::= "p1" <index>
<binary predicate> ::= "p2" <index>
<ternary predicate> ::= "p3" <index>
<term> ::= <variable>
| <constant>
| <unary function> "(" <term> ")"
| <binary function> "(" <term> "," <term> ")"
| <ternary function> "(" <term> "," <term> "," <term> ")"
<atomic formula> ::= "TRUE"
| "FALSE"
| <term> "=" <term>
| <unary predicate> "(" <term> ")"
| <binary predicate> "(" <term> "," <term> ")"
| <ternary predicate> "(" <term> "," <term> "," <term> ")"
<formula> ::= <atomic formula>
| "¬" <formula>
| <formula> "∧" <formula>
| <formula> "∨" <formula>
| <formula> "⇒" <formula>
| <formula> "⇔" <formula>
| "(" <formula> ")"
| "∀" <variable> <formula>
| "∃" <variable> <formula>
|
| The above context-free grammar in Backus-Naur form defines the language of syntactically valid first-order formulas with function symbols and predicate symbols up to arity 3. For higher arities, it needs to be adapted accordingly.[15][citation needed] |
The example formula ∀x ∃x' (¬x=c) ⇒ f2(x,x')=c' describes multiplicative inverses when f2', c, and c' are interpreted as multiplication, zero, and one, respectively.
|
The formation rules define the terms and formulas of first-order logic.[16] When terms and formulas are represented as strings of symbols, these rules can be used to write a formal grammar for terms and formulas. These rules are generally context-free (each production has a single symbol on the left side), except that the set of symbols may be allowed to be infinite and there may be many start symbols, for example the variables in the case of terms.
Terms
[edit]The set of terms is inductively defined by the following rules:[17]
- Variables. Any variable symbol is a term.
- Functions. If f is an n-ary function symbol, and t1, ..., tn are terms, then f(t1,...,tn) is a term. In particular, symbols denoting individual constants are nullary function symbols, and thus are terms.
Only expressions which can be obtained by finitely many applications of rules 1 and 2 are terms. For example, no expression involving a predicate symbol is a term.
Formulas
[edit]The set of formulas (also called well-formed formulas[18] or WFFs) is inductively defined by the following rules:
- Predicate symbols. If P is an n-ary predicate symbol and t1, ..., tn are terms then P(t1,...,tn) is a formula.
- Equality. If the equality symbol is considered part of logic, and t1 and t2 are terms, then t1 = t2 is a formula.
- Negation. If is a formula, then is a formula.
- Binary connectives. If and are formulas, then () is a formula. Similar rules apply to other binary logical connectives.
- Quantifiers. If is a formula and x is a variable, then (for all x, holds) and (there exists x such that ) are formulas.
Only expressions which can be obtained by finitely many applications of rules 1–4 are formulas. The formulas obtained from the first two rules are said to be atomic formulas.
For example:
is a formula, if f is a unary function symbol, P a unary predicate symbol, and Q a ternary predicate symbol. However, is not a formula, although it is a string of symbols from the alphabet.
The role of the parentheses in the definition is to ensure that any formula can only be obtained in one way—by following the inductive definition (i.e., there is a unique parse tree for each formula). This property is known as unique readability of formulas. There are many conventions for where parentheses are used in formulas. For example, some authors use colons or full stops instead of parentheses, or change the places in which parentheses are inserted. Each author's particular definition must be accompanied by a proof of unique readability.
Notational conventions
[edit]For convenience, conventions have been developed about the precedence of the logical operators, to avoid the need to write parentheses in some cases. These rules are similar to the order of operations in arithmetic. A common convention is:
- is evaluated first
- and are evaluated next
- Quantifiers are evaluated next
- and are evaluated last.
Moreover, extra punctuation not required by the definition may be inserted—to make formulas easier to read. Thus the formula:
might be written as:
Free and bound variables
[edit]In a formula, a variable may occur free or bound (or both). One formalization of this notion is due to Quine, first the concept of a variable occurrence is defined, then whether a variable occurrence is free or bound, then whether a variable symbol overall is free or bound. In order to distinguish different occurrences of the identical symbol x, each occurrence of a variable symbol x in a formula φ is identified with the initial substring of φ up to the point at which said instance of the symbol x appears.[8]p.297 Then, an occurrence of x is said to be bound if that occurrence of x lies within the scope of at least one of either or . Finally, x is bound in φ if all occurrences of x in φ are bound.[8]pp.142--143
Intuitively, a variable symbol is free in a formula if at no point is it quantified:[8]pp.142--143 in ∀y P(x, y), the sole occurrence of variable x is free while that of y is bound. The free and bound variable occurrences in a formula are defined inductively as follows.
- Atomic formulas
- If φ is an atomic formula, then x occurs free in φ if and only if x occurs in φ. Moreover, there are no bound variables in any atomic formula.
- Negation
- x occurs free in ¬φ if and only if x occurs free in φ. x occurs bound in ¬φ if and only if x occurs bound in φ
- Binary connectives
- x occurs free in (φ → ψ) if and only if x occurs free in either φ or ψ. x occurs bound in (φ → ψ) if and only if x occurs bound in either φ or ψ. The same rule applies to any other binary connective in place of →.
- Quantifiers
- x occurs free in ∀y φ, if and only if x occurs free in φ and x is a different symbol from y. Also, x occurs bound in ∀y φ, if and only if x is y or x occurs bound in φ. The same rule holds with ∃ in place of ∀.
For example, in ∀x ∀y (P(x) → Q(x,f(x),z)), x and y occur only bound,[19] z occurs only free, and w is neither because it does not occur in the formula.
Free and bound variables of a formula need not be disjoint sets: in the formula P(x) → ∀x Q(x), the first occurrence of x, as argument of P, is free while the second one, as argument of Q, is bound.
A formula in first-order logic with no free variable occurrences is called a first-order sentence. These are the formulas that will have well-defined truth values under an interpretation. For example, whether a formula such as Phil(x) is true must depend on what x represents. But the sentence ∃x Phil(x) will be either true or false in a given interpretation.
Example: ordered abelian groups
[edit]In mathematics, the language of ordered abelian groups has one constant symbol 0, one unary function symbol −, one binary function symbol +, and one binary relation symbol ≤. Then:
- The expressions +(x, y) and +(x, +(y, −(z))) are terms. These are usually written as x + y and x + y − z.
- The expressions +(x, y) = 0 and ≤(+(x, +(y, −(z))), +(x, y)) are atomic formulas. These are usually written as x + y = 0 and x + y − z ≤ x + y.
- The expression is a formula, which is usually written as This formula has one free variable, z.
The axioms for ordered abelian groups can be expressed as a set of sentences in the language. For example, the axiom stating that the group is commutative is usually written
Semantics
[edit]An interpretation of a first-order language assigns a denotation to each non-logical symbol (predicate symbol, function symbol, or constant symbol) in that language. It also determines a domain of discourse that specifies the range of the quantifiers. The result is that each term is assigned an object that it represents, each predicate is assigned a property of objects, and each sentence is assigned a truth value. In this way, an interpretation provides semantic meaning to the terms, predicates, and formulas of the language. The study of the interpretations of formal languages is called formal semantics. What follows is a description of the standard or Tarskian semantics for first-order logic. (It is also possible to define game semantics for first-order logic, but aside from requiring the axiom of choice, game semantics agree with Tarskian semantics for first-order logic, so game semantics will not be elaborated herein.)
First-order structures
[edit]The most common way of specifying an interpretation (especially in mathematics) is to specify a structure (also called a model; see below). The structure consists of a domain of discourse D and an interpretation function I mapping non-logical symbols to predicates, functions, and constants.
The domain of discourse D is a nonempty set of "objects" of some kind. Intuitively, given an interpretation, a first-order formula becomes a statement about these objects; for example, states the existence of some object in D for which the predicate P is true (or, more precisely, for which the predicate assigned to the predicate symbol P by the interpretation is true). For example, one can take D to be the set of integers.
Non-logical symbols are interpreted as follows:
- The interpretation of an n-ary function symbol is a function from Dn to D. For example, if the domain of discourse is the set of integers, a function symbol f of arity 2 can be interpreted as the function that gives the sum of its arguments. In other words, the symbol f is associated with the function which, in this interpretation, is addition.
- The interpretation of a constant symbol (a function symbol of arity 0) is a function from D0 (a set whose only member is the empty tuple) to D, which can be simply identified with an object in D. For example, an interpretation may assign the value to the constant symbol .
- The interpretation of an n-ary predicate symbol is a set of n-tuples of elements of D, giving the arguments for which the predicate is true. For example, an interpretation of a binary predicate symbol P may be the set of pairs of integers such that the first one is less than the second. According to this interpretation, the predicate P would be true if its first argument is less than its second argument. Equivalently, predicate symbols may be assigned Boolean-valued functions from Dn to .
Evaluation of truth values
[edit]A formula evaluates to true or false given an interpretation and a variable assignment μ that associates an element of the domain of discourse with each variable. The reason that a variable assignment is required is to give meanings to formulas with free variables, such as . The truth value of this formula changes depending on the values that x and y denote.
First, the variable assignment μ can be extended to all terms of the language, with the result that each term maps to a single element of the domain of discourse. The following rules are used to make this assignment:
- Variables. Each variable x evaluates to μ(x)
- Functions. Given terms that have been evaluated to elements of the domain of discourse, and a n-ary function symbol f, the term evaluates to .
Next, each formula is assigned a truth value. The inductive definition used to make this assignment is called the T-schema.
- Atomic formulas (1). A formula is associated the value true or false depending on whether , where are the evaluation of the terms and is the interpretation of , which by assumption is a subset of .
- Atomic formulas (2). A formula is assigned true if and evaluate to the same object of the domain of discourse (see the section on equality below).
- Logical connectives. A formula in the form , , etc. is evaluated according to the truth table for the connective in question, as in propositional logic.
- Existential quantifiers. A formula is true according to M and if there exists an evaluation of the variables that differs from at most regarding the evaluation of x and such that φ is true according to the interpretation M and the variable assignment . This formal definition captures the idea that is true if and only if there is a way to choose a value for x such that φ(x) is satisfied.
- Universal quantifiers. A formula is true according to M and if φ(x) is true for every pair composed by the interpretation M and some variable assignment that differs from at most on the value of x. This captures the idea that is true if every possible choice of a value for x causes φ(x) to be true.
If a formula does not contain free variables, and thus is a sentence, then the initial variable assignment does not affect its truth value. In other words, a sentence is true according to M and if and only if it is true according to M and every other variable assignment .
There is a second common approach to defining truth values that does not rely on variable assignment functions. Instead, given an interpretation M, one first adds to the signature a collection of constant symbols, one for each element of the domain of discourse in M; say that for each d in the domain the constant symbol cd is fixed. The interpretation is extended so that each new constant symbol is assigned to its corresponding element of the domain. One now defines truth for quantified formulas syntactically, as follows:
- Existential quantifiers (alternate). A formula is true according to M if there is some d in the domain of discourse such that holds. Here is the result of substituting cd for every free occurrence of x in φ.
- Universal quantifiers (alternate). A formula is true according to M if, for every d in the domain of discourse, is true according to M.
This alternate approach gives exactly the same truth values to all sentences as the approach via variable assignments.
Validity, satisfiability, and logical consequence
[edit]If a sentence φ evaluates to true under a given interpretation M, one says that M satisfies φ; this is denoted[20] . A sentence is satisfiable if there is some interpretation under which it is true. This is a bit different from the symbol from model theory, where denotes satisfiability in a model, i.e. "there is a suitable assignment of values in 's domain to variable symbols of ".[21]
Satisfiability of formulas with free variables is more complicated, because an interpretation on its own does not determine the truth value of such a formula. The most common convention is that a formula φ with free variables , ..., is said to be satisfied by an interpretation if the formula φ remains true regardless which individuals from the domain of discourse are assigned to its free variables , ..., . This has the same effect as saying that a formula φ is satisfied if and only if its universal closure is satisfied.
A formula is logically valid (or simply valid) if it is true in every interpretation.[22] These formulas play a role similar to tautologies in propositional logic.
A formula φ is a logical consequence of a formula ψ if every interpretation that makes ψ true also makes φ true. In this case one says that φ is logically implied by ψ.
Algebraizations
[edit]An alternate approach to the semantics of first-order logic proceeds via abstract algebra. This approach generalizes the Lindenbaum–Tarski algebras of propositional logic. There are three ways of eliminating quantified variables from first-order logic that do not involve replacing quantifiers with other variable binding term operators:
- Cylindric algebra, by Alfred Tarski, et al.;
- Polyadic algebra, by Paul Halmos;
- Predicate functor logic, primarily by Willard Quine.
These algebras are all lattices that properly extend the two-element Boolean algebra.
Tarski and Givant (1987) showed that the fragment of first-order logic that has no atomic sentence lying in the scope of more than three quantifiers has the same expressive power as relation algebra.[23]: 32–33 This fragment is of great interest because it suffices for Peano arithmetic and most axiomatic set theory, including the canonical Zermelo–Fraenkel set theory (ZFC). They also prove that first-order logic with a primitive ordered pair is equivalent to a relation algebra with two ordered pair projection functions.[24]: 803
First-order theories, models, and elementary classes
[edit]A first-order theory of a particular signature is a set of axioms, which are sentences consisting of symbols from that signature. The set of axioms is often finite or recursively enumerable, in which case the theory is called effective. Some authors require theories to also include all logical consequences of the axioms. The axioms are considered to hold within the theory and from them other sentences that hold within the theory can be derived.
A first-order structure that satisfies all sentences in a given theory is said to be a model of the theory. An elementary class is the set of all structures satisfying a particular theory. These classes are a main subject of study in model theory.
Many theories have an intended interpretation, a certain model that is kept in mind when studying the theory. For example, the intended interpretation of Peano arithmetic consists of the usual natural numbers with their usual operations. However, the Löwenheim–Skolem theorem shows that most first-order theories will also have other, nonstandard models.
A theory is consistent (within a deductive system) if it is not possible to prove a contradiction from the axioms of the theory. A theory is complete if, for every formula in its signature, either that formula or its negation is a logical consequence of the axioms of the theory. Gödel's incompleteness theorem shows that effective first-order theories that include a sufficient portion of the arithmetic of the natural numbers can never be both consistent and complete.
Empty domains
[edit]The definition above requires that the domain of discourse of any interpretation must be nonempty. There are settings, such as inclusive logic, where empty domains are permitted. Moreover, if a class of algebraic structures includes an empty structure (for example, there is an empty poset), that class can only be an elementary class in first-order logic if empty domains are permitted or the empty structure is removed from the class.
There are several difficulties with empty domains, however:
- Many common rules of inference are valid only when the domain of discourse is required to be nonempty. One example is the rule stating that implies when x is not a free variable in . This rule, which is used to put formulas into prenex normal form, is sound in nonempty domains, but unsound if the empty domain is permitted.
- The definition of truth in an interpretation that uses a variable assignment function cannot work with empty domains, because there are no variable assignment functions whose range is empty. (Similarly, one cannot assign interpretations to constant symbols.) This truth definition requires that one must select a variable assignment function (μ above) before truth values for even atomic formulas can be defined. Then the truth value of a sentence is defined to be its truth value under any variable assignment, and it is proved that this truth value does not depend on which assignment is chosen. This technique does not work if there are no assignment functions at all; it must be changed to accommodate empty domains.
Thus, when the empty domain is permitted, it must often be treated as a special case. Most authors, however, simply exclude the empty domain by definition.
Deductive systems
[edit]This section needs additional citations for verification. (June 2025) |
A deductive system is used to demonstrate, on a purely syntactic basis, that one formula is a logical consequence of another formula. There are many such systems for first-order logic, including Hilbert-style deductive systems, natural deduction, the sequent calculus, the tableaux method, and resolution. These share the common property that a deduction is a finite syntactic object; the format of this object, and the way it is constructed, vary widely. These finite deductions themselves are often called derivations in proof theory. They are also often called proofs but are completely formalized unlike natural-language mathematical proofs.
A deductive system is sound if any formula that can be derived in the system is logically valid. Conversely, a deductive system is complete if every logically valid formula is derivable. All of the systems discussed in this article are both sound and complete. They also share the property that it is possible to effectively verify that a purportedly valid deduction is actually a deduction; such deduction systems are called effective.
A key property of deductive systems is that they are purely syntactic, so that derivations can be verified without considering any interpretation. Thus, a sound argument is correct in every possible interpretation of the language, regardless of whether that interpretation is about mathematics, economics, or some other area.
In general, logical consequence in first-order logic is only semidecidable: if a sentence A logically implies a sentence B then this can be discovered (for example, by searching for a proof until one is found, using some effective, sound, complete proof system). However, if A does not logically imply B, this does not mean that A logically implies the negation of B. There is no effective procedure that, given formulas A and B, always correctly decides whether A logically implies B.
Rules of inference
[edit]A rule of inference states that, given a particular formula (or set of formulas) with a certain property as a hypothesis, another specific formula (or set of formulas) can be derived as a conclusion. The rule is sound (or truth-preserving) if it preserves validity in the sense that whenever any interpretation satisfies the hypothesis, that interpretation also satisfies the conclusion.
For example, one common rule of inference is the rule of substitution. If t is a term and φ is a formula possibly containing the variable x, then φ[t/x] is the result of replacing all free instances of x by t in φ. The substitution rule states that for any φ and any term t, one can conclude φ[t/x] from φ provided that no free variable of t becomes bound during the substitution process. (If some free variable of t becomes bound, then to substitute t for x it is first necessary to change the bound variables of φ to differ from the free variables of t.)
To see why the restriction on bound variables is necessary, consider the logically valid formula φ given by , in the signature of (0,1,+,×,=) of arithmetic. If t is the term "x + 1", the formula φ[t/y] is , which will be false in many interpretations. The problem is that the free variable x of t became bound during the substitution. The intended replacement can be obtained by renaming the bound variable x of φ to something else, say z, so that the formula after substitution is , which is again logically valid.
The substitution rule demonstrates several common aspects of rules of inference. It is entirely syntactical; one can tell whether it was correctly applied without appeal to any interpretation. It has (syntactically defined) limitations on when it can be applied, which must be respected to preserve the correctness of derivations. Moreover, as is often the case, these limitations are necessary because of interactions between free and bound variables that occur during syntactic manipulations of the formulas involved in the inference rule.
Hilbert-style systems and natural deduction
[edit]A deduction in a Hilbert-style deductive system is a list of formulas, each of which is a logical axiom, a hypothesis that has been assumed for the derivation at hand or follows from previous formulas via a rule of inference. The logical axioms consist of several axiom schemas of logically valid formulas; these encompass a significant amount of propositional logic. The rules of inference enable the manipulation of quantifiers. Typical Hilbert-style systems have a small number of rules of inference, along with several infinite schemas of logical axioms. It is common to have only modus ponens and universal generalization as rules of inference.
Natural deduction systems resemble Hilbert-style systems in that a deduction is a finite list of formulas. However, natural deduction systems have no logical axioms; they compensate by adding additional rules of inference that can be used to manipulate the logical connectives in formulas in the proof.
Sequent calculus
[edit]The sequent calculus was developed to study the properties of natural deduction systems.[25] Instead of working with one formula at a time, it uses sequents, which are expressions of the form:
where A1, ..., An, B1, ..., Bk are formulas and the turnstile symbol is used as punctuation to separate the two halves. Intuitively, a sequent expresses the idea that implies .
Tableaux method
[edit]
Unlike the methods just described the derivations in the tableaux method are not lists of formulas. Instead, a derivation is a tree of formulas. To show that a formula A is provable, the tableaux method attempts to demonstrate that the negation of A is unsatisfiable. The tree of the derivation has at its root; the tree branches in a way that reflects the structure of the formula. For example, to show that is unsatisfiable requires showing that C and D are each unsatisfiable; this corresponds to a branching point in the tree with parent and children C and D.
Resolution
[edit]The resolution rule is a single rule of inference that, together with unification, is sound and complete for first-order logic. As with the tableaux method, a formula is proved by showing that the negation of the formula is unsatisfiable. Resolution is commonly used in automated theorem proving.
The resolution method works only with formulas that are disjunctions of atomic formulas; arbitrary formulas must first be converted to this form through Skolemization. The resolution rule states that from the hypotheses and , the conclusion can be obtained.
Provable identities
[edit]Many identities can be proved, which establish equivalences between particular formulas. These identities allow for rearranging formulas by moving quantifiers across other connectives and are useful for putting formulas in prenex normal form. Some provable identities include:
- (where must not occur free in )
- (where must not occur free in )
Equality and its axioms
[edit]There are several different conventions for using equality (or identity) in first-order logic. The most common convention, known as first-order logic with equality, includes the equality symbol as a primitive logical symbol which is always interpreted as the real equality relation between members of the domain of discourse, such that the "two" given members are the same member. This approach also adds certain axioms about equality to the deductive system employed. These equality axioms are:[26]: 198–200
- Reflexivity. For each variable x, x = x.
- Substitution for functions. For all variables x and y, and any function symbol f,
- x = y → f(..., x, ...) = f(..., y, ...).
- Substitution for formulas. For any variables x and y and any formula φ(z) with a free variable z, then:
- x = y → (φ(x) → φ(y)).
These are axiom schemas, each of which specifies an infinite set of axioms. The third schema is known as Leibniz's law, "the principle of substitutivity", "the indiscernibility of identicals", or "the replacement property". The second schema, involving the function symbol f, is (equivalent to) a special case of the third schema, using the formula:
- φ(z): f(..., x, ...) = f(..., z, ...)
Then
- x = y → (f(..., x, ...) = f(..., x, ...) → f(..., x, ...) = f(..., y, ...)).
Since x = y is given, and f(..., x, ...) = f(..., x, ...) true by reflexivity, we have f(..., x, ...) = f(..., y, ...)
Many other properties of equality are consequences of the axioms above, for example:
First-order logic without equality
[edit]An alternate approach considers the equality relation to be a non-logical symbol. This convention is known as first-order logic without equality. If an equality relation is included in the signature, the axioms of equality must now be added to the theories under consideration, if desired, instead of being considered rules of logic. The main difference between this method and first-order logic with equality is that an interpretation may now interpret two distinct individuals as "equal" (although, by Leibniz's law, these will satisfy exactly the same formulas under any interpretation). That is, the equality relation may now be interpreted by an arbitrary equivalence relation on the domain of discourse that is congruent with respect to the functions and relations of the interpretation.
When this second convention is followed, the term normal model is used to refer to an interpretation where no distinct individuals a and b satisfy a = b. In first-order logic with equality, only normal models are considered, and so there is no term for a model other than a normal model. When first-order logic without equality is studied, it is necessary to amend the statements of results such as the Löwenheim–Skolem theorem so that only normal models are considered.
First-order logic without equality is often employed in the context of second-order arithmetic and other higher-order theories of arithmetic, where the equality relation between sets of natural numbers is usually omitted.
Defining equality within a theory
[edit]If a theory has a binary formula A(x,y) which satisfies reflexivity and Leibniz's law, the theory is said to have equality, or to be a theory with equality. The theory may not have all instances of the above schemas as axioms, but rather as derivable theorems. For example, in theories with no function symbols and a finite number of relations, it is possible to define equality in terms of the relations, by defining the two terms s and t to be equal if any relation is unchanged by changing s to t in any argument.
Some theories allow other ad hoc definitions of equality:
- In the theory of partial orders with one relation symbol ≤, one could define s = t to be an abbreviation for s ≤ t t ≤ s.
- In set theory with one relation ∈, one may define s = t to be an abbreviation for ∀x (s ∈ x ↔ t ∈ x) ∀x (x ∈ s ↔ x ∈ t). This definition of equality then automatically satisfies the axioms for equality. In this case, one should replace the usual axiom of extensionality, which can be stated as , with an alternative formulation , which says that if sets x and y have the same elements, then they also belong to the same sets.
Metalogical properties
[edit]One motivation for the use of first-order logic, rather than higher-order logic, is that first-order logic has many metalogical properties that stronger logics do not have. These results concern general properties of first-order logic itself, rather than properties of individual theories. They provide fundamental tools for the construction of models of first-order theories.
Completeness and undecidability
[edit]Gödel's completeness theorem, proved by Kurt Gödel in 1929, establishes that there are sound, complete, effective deductive systems for first-order logic, and thus the first-order logical consequence relation is captured by finite provability. Naively, the statement that a formula φ logically implies a formula ψ depends on every model of φ; these models will in general be of arbitrarily large cardinality, and so logical consequence cannot be effectively verified by checking every model. However, it is possible to enumerate all finite derivations and search for a derivation of ψ from φ. If ψ is logically implied by φ, such a derivation will eventually be found. Thus first-order logical consequence is semidecidable: it is possible to make an effective enumeration of all pairs of sentences (φ,ψ) such that ψ is a logical consequence of φ.
Unlike propositional logic, first-order logic is undecidable (although semidecidable), provided that the language has at least one predicate of arity at least 2 (other than equality). This means that there is no decision procedure that determines whether arbitrary formulas are logically valid. This result was established independently by Alonzo Church and Alan Turing in 1936 and 1937, respectively, giving a negative answer to the Entscheidungsproblem posed by David Hilbert and Wilhelm Ackermann in 1928. Their proofs demonstrate a connection between the unsolvability of the decision problem for first-order logic and the unsolvability of the halting problem.
There are systems weaker than full first-order logic for which the logical consequence relation is decidable. These include propositional logic and monadic predicate logic, which is first-order logic restricted to unary predicate symbols and no function symbols. Other logics with no function symbols which are decidable are the guarded fragment of first-order logic, as well as two-variable logic. The Bernays–Schönfinkel class of first-order formulas is also decidable. Decidable subsets of first-order logic are also studied in the framework of description logics.
The Löwenheim–Skolem theorem
[edit]The Löwenheim–Skolem theorem shows that if a first-order theory of cardinality λ has an infinite model, then it has models of every infinite cardinality greater than or equal to λ. One of the earliest results in model theory, it implies that it is not possible to characterize countability or uncountability in a first-order language with a countable signature. That is, there is no first-order formula φ(x) such that an arbitrary structure M satisfies φ if and only if the domain of discourse of M is countable (or, in the second case, uncountable).
The Löwenheim–Skolem theorem implies that infinite structures cannot be categorically axiomatized in first-order logic. For example, there is no first-order theory whose only model is the real line: any first-order theory with an infinite model also has a model of cardinality larger than the continuum. Since the real line is infinite, any theory satisfied by the real line is also satisfied by some nonstandard models. When the Löwenheim–Skolem theorem is applied to first-order set theories, the nonintuitive consequences are known as Skolem's paradox.
The compactness theorem
[edit]The compactness theorem states that a set of first-order sentences has a model if and only if every finite subset of it has a model.[29] This implies that if a formula is a logical consequence of an infinite set of first-order axioms, then it is a logical consequence of some finite number of those axioms. This theorem was proved first by Kurt Gödel as a consequence of the completeness theorem, but many additional proofs have been obtained over time. It is a central tool in model theory, providing a fundamental method for constructing models.
The compactness theorem has a limiting effect on which collections of first-order structures are elementary classes. For example, the compactness theorem implies that any theory that has arbitrarily large finite models has an infinite model. Thus, the class of all finite graphs is not an elementary class (the same holds for many other algebraic structures).
There are also more subtle limitations of first-order logic that are implied by the compactness theorem. For example, in computer science, many situations can be modeled as a directed graph of states (nodes) and connections (directed edges). Validating such a system may require showing that no "bad" state can be reached from any "good" state. Thus, one seeks to determine if the good and bad states are in different connected components of the graph. However, the compactness theorem can be used to show that connected graphs are not an elementary class in first-order logic, and there is no formula φ(x,y) of first-order logic, in the logic of graphs, that expresses the idea that there is a path from x to y. Connectedness can be expressed in second-order logic, however, but not with only existential set quantifiers, as also enjoys compactness.
Lindström's theorem
[edit]Per Lindström showed that the metalogical properties just discussed actually characterize first-order logic in the sense that no stronger logic can also have those properties (Ebbinghaus and Flum 1994, Chapter XIII). Lindström defined a class of abstract logical systems, and a rigorous definition of the relative strength of a member of this class. He established two theorems for systems of this type:
- A logical system satisfying Lindström's definition that contains first-order logic and satisfies both the Löwenheim–Skolem theorem and the compactness theorem must be equivalent to first-order logic.
- A logical system satisfying Lindström's definition that has a semidecidable logical consequence relation and satisfies the Löwenheim–Skolem theorem must be equivalent to first-order logic.
Limitations
[edit]Although first-order logic is sufficient for formalizing much of mathematics and is commonly used in computer science and other fields, it has certain limitations. These include limitations on its expressiveness and limitations of the fragments of natural languages that it can describe.
For instance, first-order logic is undecidable, meaning a sound, complete and terminating decision algorithm for provability is impossible. This has led to the study of interesting decidable fragments, such as C2: first-order logic with two variables and the counting quantifiers and .[30]
Expressiveness
[edit]The Löwenheim–Skolem theorem shows that if a first-order theory has any infinite model, then it has infinite models of every cardinality. In particular, no first-order theory with an infinite model can be categorical. Thus, there is no first-order theory whose only model has the set of natural numbers as its domain, or whose only model has the set of real numbers as its domain. Many extensions of first-order logic, including infinitary logics and higher-order logics, are more expressive in the sense that they do permit categorical axiomatizations of the natural numbers or real numbers[clarification needed]. This expressiveness comes at a metalogical cost, however: by Lindström's theorem, the compactness theorem and the downward Löwenheim–Skolem theorem cannot hold in any logic stronger than first-order.
Formalizing natural languages
[edit]First-order logic is able to formalize many simple quantifier constructions in natural language, such as "every person who lives in Perth lives in Australia". Hence, first-order logic is used as a basis for knowledge representation languages, such as FO(.).
Still, there are complicated features of natural language that cannot be expressed in first-order logic. "Any logical system which is appropriate as an instrument for the analysis of natural language needs a much richer structure than first-order predicate logic".[31]
| Type | Example | Comment |
|---|---|---|
| Quantification over properties | If John is self-satisfied, then there is at least one thing he has in common with Peter. | Example requires a quantifier over predicates, which cannot be implemented in single-sorted first-order logic: Zj → ∃X(Xj∧Xp). |
| Quantification over properties | Santa Claus has all the attributes of a sadist. | Example requires quantifiers over predicates, which cannot be implemented in single-sorted first-order logic: ∀X(∀x(Sx → Xx) → Xs). |
| Predicate adverbial | John is walking quickly. | Example cannot be analysed as Wj ∧ Qj; predicate adverbials are not the same kind of thing as second-order predicates such as colour. |
| Relative adjective | Jumbo is a small elephant. | Example cannot be analysed as Sj ∧ Ej; predicate adjectives are not the same kind of thing as second-order predicates such as colour. |
| Predicate adverbial modifier | John is walking very quickly. | — |
| Relative adjective modifier | Jumbo is terribly small. | An expression such as "terribly", when applied to a relative adjective such as "small", results in a new composite relative adjective "terribly small". |
| Prepositions | Mary is sitting next to John. | The preposition "next to" when applied to "John" results in the predicate adverbial "next to John". |
Restrictions, extensions, and variations
[edit]There are many variations of first-order logic. Some of these are inessential in the sense that they merely change notation without affecting the semantics. Others change the expressive power more significantly, by extending the semantics through additional quantifiers or other new logical symbols. For example, infinitary logics permit formulas of infinite size, and modal logics add symbols for possibility and necessity.
Restricted languages
[edit]First-order logic can be studied in languages with fewer logical symbols than were described above:
- Because can be expressed as , and can be expressed as , either of the two quantifiers and can be dropped.
- Since can be expressed as and can be expressed as , either or can be dropped. In other words, it is sufficient to have and , or and , as the only logical connectives.
- Similarly, it is sufficient to have only and as logical connectives, or to have only the Sheffer stroke (NAND) or the Peirce arrow (NOR) operator.
- It is possible to entirely avoid function symbols and constant symbols, rewriting them via predicate symbols in an appropriate way. For example, instead of using a constant symbol one may use a predicate (interpreted as ) and replace every predicate such as with . A function such as will similarly be replaced by a predicate interpreted as . This change requires adding additional axioms to the theory at hand, so that interpretations of the predicate symbols used have the correct semantics.[32]
Restrictions such as these are useful as a technique to reduce the number of inference rules or axiom schemas in deductive systems, which leads to shorter proofs of metalogical results. The cost of the restrictions is that it becomes more difficult to express natural-language statements in the formal system at hand, because the logical connectives used in the natural language statements must be replaced by their (longer) definitions in terms of the restricted collection of logical connectives. Similarly, derivations in the limited systems may be longer than derivations in systems that include additional connectives. There is thus a trade-off between the ease of working within the formal system and the ease of proving results about the formal system.
It is also possible to restrict the arities of function symbols and predicate symbols, in sufficiently expressive theories. One can in principle dispense entirely with functions of arity greater than 2 and predicates of arity greater than 1 in theories that include a pairing function. This is a function of arity 2 that takes pairs of elements of the domain and returns an ordered pair containing them. It is also sufficient to have two predicate symbols of arity 2 that define projection functions from an ordered pair to its components. In either case it is necessary that the natural axioms for a pairing function and its projections are satisfied.
Many-sorted logic
[edit]Ordinary first-order interpretations have a single domain of discourse over which all quantifiers range. Many-sorted first-order logic allows variables to have different sorts, which have different domains. This is also called typed first-order logic, and the sorts called types (as in data type), but it is not the same as first-order type theory. Many-sorted first-order logic is often used in the study of second-order arithmetic.[33]
When there are only finitely many sorts in a theory, many-sorted first-order logic can be reduced to single-sorted first-order logic.[34]: 296–299 One introduces into the single-sorted theory a unary predicate symbol for each sort in the many-sorted theory and adds an axiom saying that these unary predicates partition the domain of discourse. For example, if there are two sorts, one adds predicate symbols and and the axiom:
- .
Then the elements satisfying are thought of as elements of the first sort, and elements satisfying as elements of the second sort. One can quantify over each sort by using the corresponding predicate symbol to limit the range of quantification. For example, to say there is an element of the first sort satisfying formula , one writes:
- .
Additional quantifiers
[edit]Additional quantifiers can be added to first-order logic.
- Sometimes it is useful to say that "P(x) holds for exactly one x", which can be expressed as ∃!x P(x). This notation, called uniqueness quantification, may be taken to abbreviate a formula such as ∃x (P(x) ∀y (P(y) → (x = y))).
- First-order logic with extra quantifiers has new quantifiers Qx,..., with meanings such as "there are many x such that ...". Also see branching quantifiers and the plural quantifiers of George Boolos and others.
- Bounded quantifiers are often used in the study of set theory or arithmetic.
Infinitary logics
[edit]Infinitary logic allows infinitely long sentences. For example, one may allow a conjunction or disjunction of infinitely many formulas, or quantification over infinitely many variables. Infinitely long sentences arise in areas of mathematics including topology and model theory.
Infinitary logic generalizes first-order logic to allow formulas of infinite length. The most common way in which formulas can become infinite is through infinite conjunctions and disjunctions. However, it is also possible to admit generalized signatures in which function and relation symbols are allowed to have infinite arities, or in which quantifiers can bind infinitely many variables. Because an infinite formula cannot be represented by a finite string, it is necessary to choose some other representation of formulas; the usual representation in this context is a tree. Thus, formulas are, essentially, identified with their parse trees, rather than with the strings being parsed.
The most commonly studied infinitary logics are denoted Lαβ, where α and β are each either cardinal numbers or the symbol ∞. In this notation, ordinary first-order logic is Lωω. In the logic L∞ω, arbitrary conjunctions or disjunctions are allowed when building formulas, and there is an unlimited supply of variables. More generally, the logic that permits conjunctions or disjunctions with less than κ constituents is known as Lκω. For example, Lω1ω permits countable conjunctions and disjunctions.
The set of free variables in a formula of Lκω can have any cardinality strictly less than κ, yet only finitely many of them can be in the scope of any quantifier when a formula appears as a subformula of another.[35] In other infinitary logics, a subformula may be in the scope of infinitely many quantifiers. For example, in Lκ∞, a single universal or existential quantifier may bind arbitrarily many variables simultaneously. Similarly, the logic Lκλ permits simultaneous quantification over fewer than λ variables, as well as conjunctions and disjunctions of size less than κ.
Non-classical and modal logics
[edit]- Intuitionistic first-order logic uses intuitionistic rather than classical reasoning; for example, ¬¬φ need not be equivalent to φ and ¬ ∀x.φ is in general not equivalent to ∃ x.¬φ .
- First-order modal logic allows one to describe other possible worlds as well as this contingently true world which we inhabit. In some versions, the set of possible worlds varies depending on which possible world one inhabits. Modal logic has extra modal operators with meanings which can be characterized informally as, for example "it is necessary that φ" (true in all possible worlds) and "it is possible that φ" (true in some possible world). With standard first-order logic we have a single domain, and each predicate is assigned one extension. With first-order modal logic we have a domain function that assigns each possible world its own domain, so that each predicate gets an extension only relative to these possible worlds. This allows us to model cases where, for example, Alex is a philosopher, but might have been a mathematician, and might not have existed at all. In the first possible world P(a) is true, in the second P(a) is false, and in the third possible world there is no a in the domain at all.
- First-order fuzzy logics are first-order extensions of propositional fuzzy logics rather than classical propositional calculus.
Fixpoint logic
[edit]Fixpoint logic extends first-order logic by adding the closure under the least fixed points of positive operators.[36]
Higher-order logics
[edit]The characteristic feature of first-order logic is that individuals can be quantified, but not predicates. Thus
is a legal first-order formula, but
is not, in most formalizations of first-order logic. Second-order logic extends first-order logic by adding the latter type of quantification. Other higher-order logics allow quantification over even higher types than second-order logic permits. These higher types include relations between relations, functions from relations to relations between relations, and other higher-type objects. Thus the "first" in first-order logic describes the type of objects that can be quantified.
Unlike first-order logic, for which only one semantics is studied, there are several possible semantics for second-order logic. The most commonly employed semantics for second-order and higher-order logic is known as full semantics. The combination of additional quantifiers and the full semantics for these quantifiers makes higher-order logic stronger than first-order logic. In particular, the (semantic) logical consequence relation for second-order and higher-order logic is not semidecidable; there is no effective deduction system for second-order logic that is sound and complete under full semantics.
Second-order logic with full semantics is more expressive than first-order logic. For example, it is possible to create axiom systems in second-order logic that uniquely characterize the natural numbers and the real line. The cost of this expressiveness is that second-order and higher-order logics have fewer attractive metalogical properties than first-order logic. For example, the Löwenheim–Skolem theorem and compactness theorem of first-order logic become false when generalized to higher-order logics with full semantics.
Automated theorem proving and formal methods
[edit]Automated theorem proving refers to the development of computer programs that search and find derivations (formal proofs) of mathematical theorems.[37] Finding derivations is a difficult task because the search space can be very large; an exhaustive search of every possible derivation is theoretically possible but computationally infeasible for many systems of interest in mathematics. Thus complicated heuristic functions are developed to attempt to find a derivation in less time than a blind search.[38]
The related area of automated proof verification uses computer programs to check that human-created proofs are correct. Unlike complicated automated theorem provers, verification systems may be small enough that their correctness can be checked both by hand and through automated software verification. This validation of the proof verifier is needed to give confidence that any derivation labeled as "correct" is actually correct.
Some proof verifiers, such as Metamath, insist on having a complete derivation as input. Others, such as Mizar and Isabelle, take a well-formatted proof sketch (which may still be very long and detailed) and fill in the missing pieces by doing simple proof searches or applying known decision procedures: the resulting derivation is then verified by a small core "kernel". Many such systems are primarily intended for interactive use by human mathematicians: these are known as proof assistants. They may also use formal logics that are stronger than first-order logic, such as type theory. Because a full derivation of any nontrivial result in a first-order deductive system will be extremely long for a human to write,[39] results are often formalized as a series of lemmas, for which derivations can be constructed separately.
Automated theorem provers are also used to implement formal verification in computer science. In this setting, theorem provers are used to verify the correctness of programs and of hardware such as processors with respect to a formal specification. Because such analysis is time-consuming and thus expensive, it is usually reserved for projects in which a malfunction would have grave human or financial consequences.
For the problem of model checking, efficient algorithms are known to decide whether an input finite structure satisfies a first-order formula, in addition to computational complexity bounds: see Model checking § First-order logic.
See also
[edit]- ACL2 — A Computational Logic for Applicative Common Lisp
- Aristotelian logic
- Equiconsistency
- Ehrenfeucht-Fraisse game
- Extension by definitions
- Extension (predicate logic)
- Herbrandization
- List of logic symbols
Notes
[edit]- ^ Hodgson, J. P. E., Professor Emeritus ("First Order Logic"), Saint Joseph's University, Philadelphia, 1995.
- ^ Hughes, G. E., & Cresswell, M. J., A New Introduction to Modal Logic (London: Routledge, 1996), p.161.
- ^ a b A. Tarski, Undecidable Theories (1953), p. 77. Studies in Logic and the Foundation of Mathematics, North-Holland
- ^ Mendelson, E. (1964). Introduction to Mathematical Logic. Van Nostrand Reinhold. p. 56.
- ^ Eric M. Hammer: Semantics for Existential Graphs, Journal of Philosophical Logic, Volume 27, Issue 5 (October 1998), page 489: "Development of first-order logic independently of Frege, anticipating prenex and Skolem normal forms"
- ^ H. Friedman, "Adventures in Foundations of Mathematics 1: Logical Reasoning", Ross Program 2022, lecture notes. Accessed 28 July 2023.
- ^ Goertzel, B., Geisweiller, N., Coelho, L., Janičić, P., & Pennachin, C., Real-World Reasoning: Toward Scalable, Uncertain Spatiotemporal, Contextual and Causal Inference (Amsterdam & Paris: Atlantis Press, 2011), pp. 29–30.
- ^ a b c d e W. V. O. Quine, Mathematical Logic (1981). Harvard University Press, 0-674-55451-5.
- ^ Davis, Ernest (1990). Representations of Commonsense Knowledge. Morgan Kauffmann. pp. 27–28. ISBN 978-1-4832-0770-4.
- ^ "Predicate Logic | Brilliant Math & Science Wiki". brilliant.org. Retrieved 2020-08-20.
- ^ "Introduction to Symbolic Logic: Lecture 2". cstl-cla.semo.edu. Retrieved 2021-01-04.[permanent dead link]
- ^ Hans Hermes (1973). Introduction to Mathematical Logic. Hochschultext (Springer-Verlag). London: Springer. ISBN 3540058192. ISSN 1431-4657.
- ^ More precisely, there is only one language of each variant of one-sorted first-order logic: with or without equality, with or without functions, with or without propositional variables, ....
- ^ The word language is sometimes used as a synonym for signature, but this can be confusing because "language" can also refer to the set of formulas.
- ^ Eberhard Bergmann and Helga Noll (1977). Mathematische Logik mit Informatik-Anwendungen. Heidelberger Taschenbücher, Sammlung Informatik (in German). Vol. 187. Heidelberg: Springer. pp. 300–302.
- ^ Smullyan, R. M., First-order Logic (New York: Dover Publications, 1968), [https://books.google.com/books?id=kgvhQ-oSZiUC&pg=PA5&redir_esc=y#v=onepage&q&f=false p. 5].
- ^ Takeuti, G., Proof Theory (Garden City, NY: Dover Publications, 2013), p. 6.
- ^ Some authors who use the term "well-formed formula" use "formula" to mean any string of symbols from the alphabet. However, most authors in mathematical logic use "formula" to mean "well-formed formula" and have no term for non-well-formed formulas. In every context, it is only the well-formed formulas that are of interest.
- ^ y occurs bound by rule 4, although it doesn't appear in any atomic subformula
- ^ It seems that symbol was introduced by Kleene, see footnote 30 in Dover's 2002 reprint of his book Mathematical Logic, John Wiley and Sons, 1967.
- ^ F. R. Drake, Set theory: An introduction to large cardinals (1974)
- ^ Rogers, R. L., Mathematical Logic and Formalized Theories: A Survey of Basic Concepts and Results (Amsterdam/London: North-Holland Publishing Company, 1971), p. 39.
- ^ Brink, C., Kahl, W., & Schmidt, G., eds., Relational Methods in Computer Science (Berlin / Heidelberg: Springer, 1997), pp. 32–33.
- ^ Anon., Mathematical Reviews (Providence: American Mathematical Society, 2006), p. 803.
- ^ Shankar, N., Owre, S., Rushby, J. M., & Stringer-Calvert, D. W. J., PVS Prover Guide 7.1 (Menlo Park: SRI International, August 2020).
- ^ Fitting, M., First-Order Logic and Automated Theorem Proving (Berlin/Heidelberg: Springer, 1990), pp. 198–200.
- ^ Use formula substitution with φ(z) being z=x, so, φ(x) is x=x which implies φ(y): y=x, then use reflexivity.
- ^ Use formula substitution with φ(a) being a=z to obtain y=x → (y=z → x=z), then use symmetry and uncurrying.
- ^ Hodel, R. E., An Introduction to Mathematical Logic (Mineola NY: Dover, 1995), p. 199.
- ^ Horrocks, Ian (2010). "Description Logic: A Formal Foundation for Languages and Tools" (PDF). Slide 22. Archived (PDF) from the original on 2015-09-06.
- ^ Gamut 1991, p. 75.
- ^ Left-totality can be expressed by an axiom ; right-uniqueness by , provided the equality symbol is admitted. Both also apply to constant replacements (for ).
- ^ Uzquiano, Gabriel (October 17, 2018). "Quantifiers and Quantification". In Zalta, Edward N. (ed.). Stanford Encyclopedia of Philosophy (Winter 2018 ed.). See in particular section 3.2, Many-Sorted Quantification.
- ^ Enderton, H. A Mathematical Introduction to Logic, second edition. Academic Press, 2001, pp.296–299.
- ^ Some authors only admit formulas with finitely many free variables in Lκω, and more generally only formulas with < λ free variables in Lκλ.
- ^ Bosse, Uwe (1993). "An Ehrenfeucht–Fraïssé game for fixpoint logic and stratified fixpoint logic". In Börger, Egon (ed.). Computer Science Logic: 6th Workshop, CSL'92, San Miniato, Italy, September 28 - October 2, 1992. Selected Papers. Lecture Notes in Computer Science. Vol. 702. Springer-Verlag. pp. 100–114. ISBN 3-540-56992-8. Zbl 0808.03024.
- ^ Melvin Fitting (6 December 2012). First-Order Logic and Automated Theorem Proving. Springer Science & Business Media. ISBN 978-1-4612-2360-3.
- ^ "15-815 Automated Theorem Proving". www.cs.cmu.edu. Retrieved 2024-01-10.
- ^ Avigad, et al. (2007) discuss the process of formally verifying a proof of the prime number theorem. The formalized proof required approximately 30,000 lines of input to the Isabelle proof verifier.
References
[edit]- Rautenberg, Wolfgang (2010), A Concise Introduction to Mathematical Logic (3rd ed.), New York, NY: Springer Science+Business Media, doi:10.1007/978-1-4419-1221-3, ISBN 978-1-4419-1220-6
- Andrews, Peter B. (2002); An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof, 2nd ed., Berlin: Kluwer Academic Publishers. Available from Springer.
- Avigad, Jeremy; Donnelly, Kevin; Gray, David; and Raff, Paul (2007); "A formally verified proof of the prime number theorem", ACM Transactions on Computational Logic, vol. 9 no. 1 doi:10.1145/1297658.1297660
- Barwise, Jon (1977). "An Introduction to First-Order Logic". In Barwise, Jon (ed.). Handbook of Mathematical Logic. Studies in Logic and the Foundations of Mathematics. Amsterdam, NL: North-Holland (published 1982). ISBN 978-0-444-86388-1.
- Monk, J. Donald (1976). Mathematical Logic. New York, NY: Springer New York. doi:10.1007/978-1-4684-9452-5. ISBN 978-1-4684-9454-9.
- Barwise, Jon; and Etchemendy, John (2000); Language Proof and Logic, Stanford, CA: CSLI Publications (Distributed by the University of Chicago Press)
- Bocheński, Józef Maria (2007); A Précis of Mathematical Logic, Dordrecht, NL: D. Reidel, translated from the French and German editions by Otto Bird
- Ferreirós, José (2001); "The Road to Modern Logic — An Interpretation", Bulletin of Symbolic Logic, Volume 7, Issue 4, 2001, pp. 441–484, doi:10.2307/2687794, JSTOR 2687794
- Gamut, L. T. F. (1991), Logic, Language, and Meaning, Volume 2: Intensional Logic and Logical Grammar, Chicago, Illinois: University of Chicago Press, ISBN 0-226-28088-8
- Hilbert, David; and Ackermann, Wilhelm (1950); Principles of Mathematical Logic, Chelsea (English translation of Grundzüge der theoretischen Logik, 1928 German first edition)
- Hodges, Wilfrid (2001); "Classical Logic I: First-Order Logic", in Goble, Lou (ed.); The Blackwell Guide to Philosophical Logic, Blackwell
- Ebbinghaus, Heinz-Dieter; Flum, Jörg; and Thomas, Wolfgang (1994); Mathematical Logic, Undergraduate Texts in Mathematics, Berlin, DE/New York, NY: Springer-Verlag, Second Edition, ISBN 978-0-387-94258-2
- Tarski, Alfred and Givant, Steven (1987); A Formalization of Set Theory without Variables. Vol. 41 of American Mathematical Society colloquium publications, Providence RI: American Mathematical Society, ISBN 978-0821810415
External links
[edit]- "Predicate calculus", Encyclopedia of Mathematics, EMS Press, 2001 [1994]
- Stanford Encyclopedia of Philosophy (2000): Shapiro, S., "Classical Logic". Covers syntax, model theory, and metatheory for first-order logic in the natural deduction style.
- Magnus, P. D.; forall x: an introduction to formal logic. Covers formal semantics and proof theory for first-order logic.
- Metamath: an ongoing online project to reconstruct mathematics as a huge first-order theory, using first-order logic and the axiomatic set theory ZFC. Principia Mathematica modernized.
- Podnieks, Karl; Introduction to mathematical logic
- Cambridge Mathematical Tripos notes (typeset by John Fremlin). These notes cover part of a past Cambridge Mathematical Tripos course taught to undergraduate students (usually) within their third year. The course is entitled "Logic, Computation and Set Theory" and covers Ordinals and cardinals, Posets and Zorn's Lemma, Propositional logic, Predicate logic, Set theory and Consistency issues related to ZFC and other set theories.
- Tree Proof Generator can validate or invalidate formulas of first-order logic through the semantic tableaux method.
First-order logic
View on GrokipediaIntroduction
Overview
First-order logic (FOL), also known as first-order predicate logic, is a formal system for expressing statements about objects and their relations in a precise, symbolic manner. It employs quantifiers (such as ∀ for "for all" and ∃ for "there exists"), predicates to describe properties and relations, functions to denote operations on objects, and logical connectives (including negation ¬, conjunction ∧, disjunction ∨, and implication →) to combine these elements into well-formed expressions.[8] This system allows for the representation of complex assertions about domains of individuals, making it a cornerstone for rigorous argumentation in various fields. The term "first-order" distinguishes FOL from higher-order logics, as its quantifiers range exclusively over individual objects (or variables) in a given domain, rather than over predicates, relations, or functions themselves.[8] The core components of FOL include its syntax, which defines the rules for constructing well-formed formulas from these symbols; its semantics, which interprets formulas in mathematical structures (such as domains with assigned meanings to predicates and functions) to determine truth values; and proof systems, which provide deductive rules for deriving valid inferences from premises.[8] These elements together enable the formal analysis of logical consequence and validity. FOL plays a pivotal role in the foundations of mathematics, where it underpins axiomatic systems like Zermelo-Fraenkel set theory with choice (ZFC), allowing all mathematical entities to be modeled as sets and theorems to be derived via first-order deduction.[9] In computer science, it forms the basis for automated reasoning tools and theorem provers, facilitating tasks such as program verification and artificial intelligence inference.[10] Philosophically, FOL provides a framework for clarifying concepts of truth, entailment, and necessity in arguments. For instance, the statement "All humans are mortal" can be formalized in FOL as ∀x (Human(x) → Mortal(x)), where Human and Mortal are unary predicates.[8]Historical background
The roots of first-order logic trace back to Aristotelian syllogistic logic, which formalized deductive reasoning through categorical propositions in the 4th century BCE, laying foundational principles for later developments in quantificational inference.[11] In the 19th century, George Boole advanced algebraic approaches to logic with his 1847 work The Mathematical Analysis of Logic, treating logical operations as mathematical manipulations of classes, which influenced the shift toward symbolic methods. Augustus De Morgan further contributed by exploring relational logic and introducing early notions of quantifiers in his 1847 and subsequent papers on syllogisms, extending Boolean algebra to handle relations and negation laws that prefigured modern predicate structures.[12] Gottlob Frege's Begriffsschrift (1879) marked the inception of modern predicate logic, presenting the first complete system of first-order logic with a formal notation for quantifiers (universal and existential) and function-argument structures, enabling precise expression of mathematical inferences beyond propositional limits. This innovation addressed deficiencies in earlier systems by incorporating quantification over variables ranging over individual objects, establishing a conceptual-script for pure thought modeled on arithmetic. Alfred North Whitehead and Bertrand Russell's Principia Mathematica (1910–1913) employed ramified type theory, a higher-order logical system, to pursue logicism, attempting to derive all of mathematics from logical axioms, which restricted quantification to avoid paradoxes like Russell's own antinomy.[4] David Hilbert's formalist program in the 1920s sought to prove the consistency of mathematical systems using finitary methods, promoting first-order logic as a rigorous framework for metamathematics; this culminated in the 1928 textbook Grundzüge der theoretischen Logik co-authored with Wilhelm Ackermann, which standardized first-order syntax and proof theory.[13][14] Kurt Gödel's 1930 completeness theorem demonstrated that every valid first-order formula is provable within the system, confirming its adequacy for capturing semantic entailment and solidifying its status as the canonical logic for mathematics.[15] Alan Turing's 1936 results on undecidability, via his analysis of computable functions, revealed inherent limits to mechanizing first-order theorem proving, influencing understandings of logical decidability.[16] Post-World War II advancements in proof theory and model theory were propelled by Alfred Tarski's semantic foundations for truth and logical consequence in the 1930s–1950s, alongside Leon Henkin's 1949 simplification of the completeness proof using term models, which enhanced accessibility and applications in model-theoretic constructions.[17][18]Syntax
Alphabet and symbols
The alphabet of first-order logic consists of a fixed set of logical symbols, which are common to all first-order languages, and a variable set of non-logical symbols, which depend on the specific language being used. The logical symbols include the Boolean connectives for negation (¬), conjunction (∧), disjunction (∨), implication (→), and equivalence (↔); the quantifiers for universal quantification (∀) and existential quantification (∃); and auxiliary punctuation such as parentheses ((), to group subexpressions.[19] These symbols provide the basic machinery for constructing compound expressions and binding variables, ensuring a standardized way to express logical relationships across different domains. Non-logical symbols, in contrast, are tailored to the domain of discourse and include variables, constant symbols, function symbols, and predicate symbols. Variables, typically denoted by letters such as or indexed as , form a countably infinite set to allow for arbitrary quantification. Constant symbols, such as or , represent specific individual objects in the domain. Function symbols, like for a unary function or for a binary function, denote mappings from objects to other objects, while predicate symbols, such as for a unary predicate or for a binary relation, express properties or relations among objects (e.g., or .[19] There is an infinite supply of these non-logical symbols available in principle, but practical languages employ only a finite subset. The collection of non-logical symbols used in a particular first-order language is specified by its signature (or vocabulary), which assigns an arity (number of arguments) to each function and predicate symbol while listing the constants (which have arity 0). For example, a signature for the language of ordered structures might include a binary predicate symbol (representing the less-than relation) and a constant symbol . Signatures are typically finite for specific theories, enabling focused axiomatizations, though the overall pool of possible symbols remains infinite to accommodate extensions.[19] This distinction between logical and non-logical symbols allows first-order logic to be both universal in its connective structure and adaptable to diverse mathematical and non-mathematical applications.Terms
In first-order logic, terms are the basic expressions used to denote objects in a structure, constructed recursively from the language's alphabet without involving predicates or quantifiers. A term is either a variable, a constant symbol, or an application of a function symbol to one or more terms.[20] The set of terms is defined inductively as follows: variables and constant symbols form the base cases, serving as terms; for the inductive step, if is an -ary function symbol and are terms, then is also a term. This recursive construction allows for nested applications, enabling terms to represent complex expressions built from simpler ones.[20] Terms may contain variables, all of which are free since variable binding occurs only in formulas through quantifiers.[21] For example, in the first-order theory of groups, where the signature includes a constant symbol for the identity, a binary function symbol for multiplication, and a unary function symbol for inversion, the expression is a term denoting the product of and the inverse of .[22] This illustrates how terms can nest functions to capture algebraic operations without evaluating truth values.Formulas
In first-order logic, formulas, also known as well-formed formulas (wffs), are constructed recursively from terms, predicate symbols, logical connectives, and quantifiers, ensuring that every expression is syntactically valid. The recursive definition begins with atomic formulas as the base case and builds compound formulas through iterative application of connectives and quantifiers. This structure guarantees that all subexpressions within a formula are themselves well-formed, with parentheses used to delineate the scope of operators and quantifiers.[21] Atomic formulas are the simplest well-formed expressions and consist of either a predicate symbol applied to a sequence of terms or an equality between two terms, if equality is included in the language's signature. Specifically, if is an -ary predicate symbol and are terms, then is an atomic formula; likewise, forms an atomic formula when the equality symbol is part of the signature. Terms serve as the arguments to predicates, representing objects or computations within the logic. Examples include for a unary predicate and constant , or for a function , variable , and constant .[21][23] Compound formulas are formed by applying logical connectives or quantifiers to existing well-formed formulas. The connectives include negation , conjunction , disjunction , implication , and equivalence , where and are formulas. Quantifiers introduce universal or existential quantification over a variable in a formula . For example, the negation of the formula , where the domain is the real numbers, is . This recursive process ensures well-formedness propagates: if and are well-formed, so are the resulting compounds, with parentheses enforcing operator scope—for instance, .[24][21] Notational conventions simplify writing formulas while preserving clarity. Parentheses are often suppressed based on operator precedence: quantifiers and negation bind most tightly, followed by conjunction and disjunction (same level, left-associative), then implication and equivalence (also same level, left-associative). For example, is understood as without additional parentheses. Bound variables in quantified formulas may be distinguished notationally with bars, such as , though this is optional and context-dependent. A representative example is the formula , which expresses that for every , if holds, then holds.[23][21]Variable binding
In first-order logic, variables in a formula can be either free or bound, depending on whether they fall within the scope of a quantifier. A free variable is one that is not governed by any universal quantifier or existential quantifier , allowing it to act as a placeholder that can be instantiated with specific terms during interpretation. For instance, in the atomic formula , the variable is free, as no quantifier restricts its scope.[8][25] Conversely, a bound variable is captured by a quantifier within whose scope it appears, limiting its reference to the domain elements quantified over. In the formula , the variable is bound by the universal quantifier, meaning its occurrences are tied exclusively to the quantification.[8][25] The distinction between free and bound variables is crucial for understanding formula structure and equivalence. Formulas are considered up to alpha-equivalence, where two formulas are logically identical if they differ only in the renaming of bound variables, provided no free variables are affected. For example, is alpha-equivalent to , as the bound variable can be consistently renamed without altering the formula's meaning. This equivalence ensures that the choice of variable names for binding is arbitrary and does not impact logical content.[8][25] A special case arises with sentences, which are formulas containing no free variables—all variables are bound by quantifiers, making the formula self-contained and interpretable as a complete proposition without external parameters. For example, is a sentence, whereas is not, due to the free occurrence of . In axiomatic theories, such as the axioms of group theory, sentences like express properties where (the multiplicative inverse) is bound by the existential quantifier, while and (the identity) are appropriately scoped.[8][25] Substitution operations further highlight the need for careful handling of variable bindings to avoid unintended capture. The substitution replaces all free occurrences of in the formula with a term , but only if is "free for " in —meaning no free variables in would become bound by quantifiers in after replacement. For example, substituting a constant for in yields , but substituting for in must preserve 's freeness to avoid capturing it as bound. This precaution maintains the formula's intended structure and prevents errors in logical manipulation.[8][25]Semantics
Structures
In first-order logic, a structure, also known as a model, provides an interpretation for the symbols of a first-order language, consisting of a non-empty domain together with assignments of meanings to the non-logical symbols in the language's signature. Formally, for a language with signature comprising constant symbols, function symbols, and predicate symbols, a structure for is a pair , where is a non-empty set called the domain (or universe) of discourse, and is an interpretation function that assigns: to each constant symbol an element ; to each -ary function symbol an -ary function ; and to each -ary predicate symbol an -ary relation .[25] The signature must match the language , ensuring that every symbol in receives an interpretation and no extraneous symbols are interpreted.[25] A representative example is the structure for the theory of ordered abelian groups, where the signature includes a binary function symbol , a constant symbol , and a binary predicate symbol . Here, the domain (the integers), is the usual addition on integers, , and is the standard less-than relation on integers.[25] Structures related by mappings that preserve their interpretations are connected through homomorphisms and isomorphisms. A homomorphism between structures and for the same language preserves constants, functions, and relations: for any constant , ; for any -ary function and elements , ; and for any -ary predicate and , if and only if . An isomorphism is a bijective homomorphism, meaning is one-to-one and onto, establishing that and are essentially the same up to relabeling of elements. For instance, the structure of natural numbers under addition is isomorphic to the structure of even natural numbers via the map , where is ordinary addition.[26] The requirement of a non-empty domain in standard semantics excludes empty structures, as they lead to issues such as both and being vacuously true or false in conflicting ways, complicating logical inference. However, some alternative semantics, such as those proposed by Dana Scott, permit empty domains by distinguishing between bound and free variable ranges using a super-domain, allowing empty structures in certain contexts while addressing these inconsistencies through modified axiomatizations.[25][27]Satisfaction relation
In first-order logic, the satisfaction relation determines whether a given structure satisfies a formula relative to a variable assignment. It is denoted , where is a structure, is a formula, and is a variable assignment that maps the free variables of to elements of the domain of . This relation provides the semantic foundation for evaluating the truth of formulas within specific interpretations.[19] The satisfaction relation is defined recursively, following the inductive structure of formulas. For an atomic formula , where is an -ary predicate symbol and are terms, holds if and only if belongs to the interpretation of in , with denoting the value of term under assignment . For negation, if and only if it is not the case that . For conjunction, if and only if and . For the universal quantifier, if and only if for every element in the domain of , , where is the assignment that agrees with except possibly at , which maps to . This recursive characterization ensures that satisfaction can be computed bottom-up from atomic subformulas to complex ones.[19] This framework originates from Alfred Tarski's foundational work on the concept of truth for formalized languages, introduced in his 1933 paper, which established a rigorous semantic theory for logical systems including first-order logic.[28] When is a closed formula, or sentence, with no free variables, its satisfaction in is independent of the variable assignment , so one simply writes . For instance, in the structure of the integers under addition as the group operation (with domain , binary function symbol interpreted as , and constant as 0), the sentence is satisfied, since for every integer in the domain, holds in the structure.[19]Validity and logical consequence
In first-order logic, a formula φ is valid, denoted ⊧ φ, if it is true in every structure for the language under every variable assignment.[29] This means that no matter how the non-logical symbols are interpreted in a domain, φ always evaluates to true, capturing the idea of logical necessity independent of specific models.[30] A formula φ is satisfiable if there exists at least one structure and variable assignment in which φ is true.[29] Equivalently, φ has a model, where a model is a structure satisfying φ.[30] The negation of satisfiability is unsatisfiability, where no structure satisfies φ, implying that ¬φ is valid.[29] Logical consequence relates sets of formulas to individual ones: a set Γ logically entails φ, denoted Γ ⊧ φ, if every structure satisfying all formulas in Γ also satisfies φ.[29] This defines semantic entailment, where the truth of φ is preserved in all models of Γ.[30] A set Γ is inconsistent if it is unsatisfiable, meaning Γ ⊧ ψ for every formula ψ, including contradictions.[29] Two formulas φ and ψ are logically equivalent if φ ↔ ψ is valid, so they agree in truth value across all structures and assignments.[29] This equivalence relation underpins many syntactic manipulations in logic. For example, the set {∀x P(x), ∃x ¬P(x)} is unsatisfiable because ∀x P(x) requires P to hold for every element in the domain, while ∃x ¬P(x) requires some element where P fails, yielding no possible model.[29]Theories and models
In first-order logic, a theory is a set of sentences in a first-order language that is deductively closed, meaning it contains all logical consequences of its members; such theories are often axiomatizable, generated as the closure under deduction of a set of axioms , where .[31][32] A model of a theory , or -structure , is any structure that satisfies every sentence in , denoted , or equivalently for all .[31] The theory of a structure , denoted , is the complete deductively closed set of all -sentences satisfied by . Two structures and are elementarily equivalent if they satisfy exactly the same sentences, i.e., ; this is a coarser relation than isomorphism, which requires a bijective structure-preserving map between the domains that preserves all relations and functions, implying elementary equivalence but not conversely, as non-isomorphic models can share the same theory.[31] An elementary embedding between structures and is an injective map that preserves satisfaction of all -formulas with parameters, meaning for any formula and tuple from , if and only if .[31] An elementary class is the class of all models of a fixed first-order theory , which is closed under elementary equivalence since any two models satisfy the same sentences in . A prominent example is Peano arithmetic (PA), a first-order theory in the language of arithmetic with symbols for successor, addition, and multiplication, axiomatized by the Peano axioms including induction schema; its models include the standard natural numbers but also non-standard models with infinite elements, all elementarily equivalent yet non-isomorphic.[31]Deductive systems
Hilbert-style systems
Hilbert-style systems, also known as axiomatic systems, provide a formal framework for deriving theorems in first-order logic using a finite set of axiom schemata and inference rules, emphasizing their applicability to a wide range of logical theories. These systems were developed in the tradition of David Hilbert's program for formalizing mathematics, extending propositional logic to handle quantifiers through specific axioms and rules that capture quantification principles. Unlike other deductive systems, Hilbert-style proofs proceed linearly from axioms via repeated application of rules, without local introduction or elimination operations for connectives.[33] The axioms in a standard Hilbert-style system for first-order logic without equality consist of two main categories. First, all propositional tautologies serve as axiom schemata, including instances such as , , , and , where , , and are any formulas built from atomic formulas using connectives. These ensure the propositional fragment is complete. Second, quantifier axioms handle universal and existential quantification: for any formula and term substitutable for the variable in , the universal instantiation axiom ; and for existential quantification, , where is a variable free for in (i.e., does not occur free in any part of depending on free occurrences of ). These axioms allow substitution of terms for bound variables while preserving logical structure.[33][34] The inference rules are minimal: modus ponens, which infers from and ; and universal generalization, which infers from , applicable without restrictions on the variable . These rules, combined with the axioms, enable the derivation of all logically valid formulas. A proof is a finite sequence of formulas where each entry is either an axiom instance or follows from prior entries by one of the rules.[33][34] To illustrate, consider deriving the valid distribution principle , assuming does not occur free in . The proof proceeds as follows (using propositional tautologies and rules; subscripts denote line numbers for clarity):- (quantifier axiom, with a fresh parameter for the antecedent ).
- (assumption).
- (modus ponens on 1 and 2).
- (propositional tautology: , with , , , specialized from line 3).
- (assumption).
- (universal instantiation axiom on 5).
- (modus ponens on 3 and 6).
- (propositional tautology, discharging the assumption in 5 via deduction meta-theorem, or directly via generalization on 7 under assumption 5).
- (propositional tautology on 4 and 8, discharging assumption 2).
Natural deduction
Natural deduction is a deductive system for first-order logic that formalizes proofs using inference rules designed to closely resemble everyday reasoning processes. Developed by Gerhard Gentzen in his seminal work Untersuchungen über das logische Schließen (published in two parts in 1934 and 1935), the system emphasizes introduction rules for building compound formulas and elimination rules for extracting information from them.[36] This approach contrasts with more axiomatic systems, such as Hilbert-style ones, by organizing derivations in a tree-like structure where assumptions are discharged as proofs progress.[37] The rules for propositional connectives form the foundation of the system. For conjunction (), the introduction rule (I) allows inferring from premises and , while the elimination rules (E) permit deriving either or from . For disjunction (), introduction (I) infers from either or alone, and elimination (E) derives from by cases: assuming to derive and assuming to derive , then discharging both assumptions. Implication () uses introduction (I), where assuming to derive yields upon discharging the assumption, and elimination (E), or modus ponens, derives from and . Negation () is handled via introduction (I), assuming to derive a contradiction and thus inferring , and elimination (E), rejecting if leads to contradiction. These rules ensure that proofs proceed intuitively, with each step justified by direct inference.[37] Quantifier rules extend the system to first-order logic, incorporating variable binding and substitution restrictions to avoid capture errors. For the universal quantifier (), introduction (I) requires deriving —where is a fresh variable not free in undischarged assumptions—then inferring ; this enforces generality over arbitrary domains. Elimination (E) substitutes any term (free for in ) into to obtain . For the existential quantifier (), introduction (I) infers from for any term , witnessing the existence. Elimination (E) assumes for a fresh variable (eigenvariable condition), derives (independent of ), and infers from , discharging the assumption; this isolates the existential witness. These rules, as formulated by Gentzen, support both intuitionistic and classical variants, with the latter adding rules like double negation elimination for full expressive power.[36][37] To illustrate, consider a derivation of the theorem , which demonstrates the interplay of quantifiers and implication. Begin by assuming (line 1). To derive the consequent, introduce an arbitrary for universal generalization. Assume (line 2). Apply E to the assumption in line 1: let be fresh, assume (line 3), then by I infer (line 4, since witnesses it). Discharge the subassumption to obtain from line 1 (line 5). Discharge via I to get (line 6). Since was arbitrary and no assumptions depend on it, apply I to infer (line 7). Finally, discharge the initial assumption via I to yield the theorem (line 8). This proof highlights how existential elimination provides a witness usable in subsequent steps without dependency issues.[37] A key metatheoretical property of natural deduction is normalization, where any valid proof can be transformed into a normal form free of "detours"—sequences where an introduction is immediately followed by the corresponding elimination. Gentzen outlined this reduction process in his original work, showing that normal proofs consist solely of introduction rules followed by eliminations, which simplifies analysis and proves the consistency of the system relative to its axioms.[36] Later refinements by Dag Prawitz in 1965 established strong normalization for intuitionistic natural deduction, ensuring termination of the reduction process. This feature underscores the system's suitability for automated proof search and theoretical investigations in proof theory.[37]Sequent calculus
Sequent calculus provides a formal framework for deriving logical consequences in first-order logic through structured inference rules applied to sequents of the form , where is a finite multiset of formulas representing assumptions (the antecedent) and is a finite multiset of formulas representing conclusions (the succedent), indicating that the formulas in jointly imply those in .[36] This representation allows proofs to be constructed as trees, with each node corresponding to a sequent and branches determined by the application of rules, facilitating the analysis of proof normalization and consistency.[38] The system operates via two main categories of rules: logical rules, which introduce or eliminate connectives and quantifiers, and structural rules, which manipulate the sequents without altering their logical content. Logical rules are divided into left rules (applied to formulas in the antecedent) and right rules (applied to formulas in the succedent). For instance, the universal quantifier left rule (L) states that from a sequent , one may infer for any term free for in , provided does not occur free in or ; this instantiates the universal quantifier with a specific term while preserving the implication.[36] Similar rules exist for other connectives, such as the implication right rule (R): from , infer . These rules ensure that derivations correspond to valid inferences in first-order logic.[38] Structural rules include weakening (W), which adds a formula to either side without changing provability: from , infer or ; contraction (C), which merges duplicate formulas on the left: from , infer ; and exchange (S), which permutes formulas within or to handle multisets. The cut rule (Cut) allows combining two sequents sharing a formula : from and , infer , enabling the elimination of intermediate formulas across proofs. These rules, particularly weakening and contraction, distinguish sequent calculus from natural deduction by explicitly managing resource usage in proofs.[36] Gerhard Gentzen introduced the foundational sequent calculi LK for classical logic and LJ for intuitionistic logic in his 1934–1935 work, where LK permits multiple formulas in the succedent while LJ restricts it to a single formula to capture intuitionistic principles.[36] In LK, the rules are symmetric for classical negation, whereas LJ adjusts right rules to enforce single-succedent structure, ensuring derivations align with intuitionistic semantics. Both systems extend to first-order logic by incorporating quantifier rules with eigenvalue conditions to avoid variable capture.[38] A simple example illustrates the use of these rules in LK: to derive the sequent (expressing the tautology that implies itself), start from the axiom (initial sequent where an atomic formula appears on both sides), apply R to obtain . For a more involved case assuming , derive only if follows, but consider deriving : from axiom , weaken to , then apply L (implication left: from via weakening and axiom, combined with the antecedent ) to yield the target sequent, demonstrating modus ponens. This tree structure highlights how rules build from atomic cases to complex implications.[38] Central to sequent calculus is Gentzen's cut-elimination theorem, which asserts that if a sequent is provable using the cut rule, it remains provable without it, resulting in cut-free proofs that are analytic—meaning every formula in the proof is a subformula of the end-sequent or its assumptions.[36] This theorem, proved via an inductive normalization procedure that reduces cut complexity, establishes the subformula property and underpins consistency proofs for first-order logic by eliminating non-constructive cuts.[38]Proof methods
Proof methods in first-order logic primarily involve algorithmic techniques for automated deduction, focusing on refutation procedures to establish unsatisfiability of negated formulas. These methods, such as semantic tableaux and resolution, transform logical proofs into systematic search problems, enabling computer implementation for theorem proving.[39] Semantic tableaux, also known as analytic tableaux, provide a tree-based method to test for unsatisfiability by exploring branches that represent possible truth assignments. Starting from a set of formulas including the negation of the conjecture, the procedure branches on connectives and quantifiers: for disjunctions, split into cases where one or the other disjunct holds; for negations, propagate opposite truth values; universal quantifiers instantiate with new terms, while existentials introduce Skolem functions or constants. A branch closes if it contains both a formula and its negation, indicating a contradiction; if all branches close, the original set is unsatisfiable, proving the conjecture. This method was independently developed by Evert W. Beth in 1955 and Jaakko Hintikka in the same year, and later refined by Raymond Smullyan in his 1968 book on first-order logic.[40] Resolution is a clausal refutation method that reduces first-order proofs to inferences between Horn clauses, emphasizing subsumption and unification for efficiency. Formulas are first converted to prenex normal form, then to clausal normal form by Skolemization (replacing existentials with functions) and distributing connectives to yield disjunctions of literals. The core resolution rule infers from two clauses and (where may involve variables) the resolvent , provided and are unifiable via substitution that matches terms. Unification resolves variable bindings algorithmically, ensuring most general instances. A empty clause derived from the negated conjecture's clauses signals unsatisfiability. Introduced by J. Alan Robinson in 1965, resolution forms the basis for many automated theorem provers due to its completeness in first-order logic.[41] Herbrand's theorem underpins these refutation methods by characterizing provability in terms of propositional satisfiability over ground instances from the Herbrand universe (terms built from function symbols). It states that a set of first-order sentences is unsatisfiable if and only if some finite set of its ground instances is propositionally unsatisfiable, allowing reduction to propositional logic via instantiation. This result, from Jacques Herbrand's 1930 doctoral thesis, justifies the focus on ground resolution and tableaux expansions in practice.[42] For example, consider proving , or equivalently, refuting under . The negation is , with clauses and (universal implicit). Instantiating yields , resolving with to the empty clause, a contradiction.[41] While efficient for propositional logic—reducible to SAT, solvable in practice by algorithms like DPLL—first-order proof search remains undecidable due to the halting problem equivalence, though heuristics like ordering and subsumption mitigate complexity in automated systems.[39]Equality
Logic without equality
First-order logic without equality, also known as equationaless first-order logic, modifies the standard syntax by excluding the equality predicate as a logical symbol. In this variant, the language consists of variables, constant symbols, function symbols, predicate symbols (other than equality), and logical connectives including quantifiers. Atomic formulas are formed solely by applying non-equality predicates to terms, such as , where terms are built from variables, constants, and function applications, without the form . Identities, if needed, must be expressed indirectly through other predicates or axioms within a specific theory, though this is not part of the core logic itself.[43] Semantically, structures for first-order logic without equality are interpretations comprising a non-empty domain, interpretations for function symbols as operations on the domain, and interpretations for predicate symbols as relations on the domain, but without a designated binary relation fixed to the identity on the domain. Satisfaction of formulas proceeds recursively as in standard first-order logic: an atomic formula holds in a structure under a variable assignment if the denotations of the terms lie in the relation interpreted by . This setup permits models where the equality relation, if introduced as an ordinary predicate, need not coincide with actual identity, allowing for non-standard interpretations.[44] A key consequence of omitting equality is that the logic cannot distinguish between elements that satisfy precisely the same atomic formulas; distinct domain elements may be indistinguishable if they participate identically in all relations and operations defined by the predicates and functions. For instance, in a model, two elements and could satisfy and for all predicates and , without the logic forcing . This leads to coarser models compared to those with equality, where the identity relation enforces uniqueness. Such indistinguishability affects proofs and model theory, as validity and consequence relations may hold in broader classes of structures.[43][44] An illustrative example arises in axiomatizations of set theory, where the sole primitive predicate is membership , without equality. Here, the logic cannot natively express that two sets are distinct solely based on differing members; instead, the theory must incorporate mechanisms to enforce separation of elements that share all membership properties, highlighting the need for careful construction to avoid collapsing distinct sets. In general, the expressiveness of first-order logic without equality is equivalent to that with equality, as the latter does not augment the class of definable properties, but the absence of a primitive identity complicates direct formulation of uniqueness or injectivity.[45][43] To partially simulate equality, congruence relations—equivalence relations compatible with the structure's functions and predicates—can be employed. A congruence identifies elements that behave identically under all operations and relations, effectively quotienting the domain to mimic identity within equivalence classes. This approach is useful in decision procedures, such as congruence closure algorithms, which efficiently check satisfiability of quantifier-free formulas by merging congruent terms. However, full recovery of equality's discriminatory power requires additional theoretical commitments beyond the bare logic.[44]Equality axioms
In first-order logic with equality, the equality symbol "=" is treated as a logical primitive, a binary predicate that must satisfy specific axioms to capture the notion of identity. These axioms ensure that equality behaves as an equivalence relation with substitutivity properties, allowing replacement of equals by equals in any context without altering truth values.[46] The fundamental axiom is reflexivity, which states that every object is equal to itself: This axiom guarantees that the equality relation holds identically for any element in the domain.[46][47] Complementing reflexivity are the substitution axioms, which form schemas parameterized by the function and predicate symbols in the language. For an n-ary function symbol , the axiom schema is: for each position . Similarly, for an n-ary predicate symbol , the schema is: for each . These schemas extend to all arities and ensure congruence: equal arguments yield equal results for functions and preserve truth for predicates. A more general substitution schema, applicable to arbitrary well-formed formulas where is free for in , is .[46][44] These axioms are integrated into deductive systems to handle equality proofs. In Hilbert-style systems, reflexivity is added as a specific axiom (often labeled A6), and the substitution schemas serve as additional axiom schemas (e.g., A7), alongside the standard propositional and quantifier axioms, with modus ponens and generalization as inference rules. Properties like symmetry () and transitivity () are then derivable theorems. In natural deduction systems, such as Fitch-style, reflexivity is an introduction rule allowing for any term , while substitution is an elimination rule: from and (with substitutable for ), infer .[46][47] For example, in the first-order theory of groups, equality axioms interact with group axioms like the existence of an identity element satisfying , where is the binary operation. Using substitution, one can derive by reflexivity and congruence on the operation, ensuring consistent manipulation of identities in proofs of group properties.[48][47] Collectively, these axioms force any model of the logic to interpret "=" as the actual identity relation on the domain, distinguishing it from mere indiscernibility and enabling "normal models" where distinct elements are distinguishable by formulas.[44][46]Interpreting equality
In first-order logic without a primitive equality symbol, equality can be interpreted using non-logical predicates via Leibniz's law, which characterizes two objects as equal if they share all properties expressible in the language. Formally, this is captured by the second-order condition if and only if , where ranges over all predicates; however, in a first-order language with a finite signature, this reduces to a first-order formula expressing that and satisfy exactly the same atomic relations with respect to all tuples of other elements.[49][50] This interpretation yields what is known as Leibniz equality, an equivalence relation definable by conjoining conditions for each predicate and arity in the language—for instance, for a binary predicate , including clauses like and permutations thereof. In theories where the non-logical symbols are sufficiently rich to distinguish all distinct elements in every model, this Leibniz equality coincides with the actual identity relation on the domain.[50][51] A concrete example occurs in the theory of dense linear orders, formulated in the language with a single binary predicate for the strict order. Here, equality is interpretable as the first-order formula , which holds precisely when and are the same element, as the axioms ensure totality and irreflexivity of . This definition aligns with the standard semantics, where models like the rationals satisfy the density and no-endpoints conditions, rendering the interpreted equality faithful to the identity.[50] In the theory of arithmetic, such as Peano arithmetic in the language with constants 0 and 1, binary functions and , equality can be interpreted as the relation congruent with respect to these operations: holds if for all , the terms and are interchangeable, and similarly for multiplication, formalized through the replacement properties in the axioms. This congruence interpretation ensures that equality behaves as the identity in models where the operations uniquely determine elements, as in the standard natural numbers.[50][51] Indiscernibility arises in structures where the interpreted equality acts as a congruence relation, meaning it preserves the non-logical symbols: if [x = y](/page/X&Y), then relations hold equivalently for and , and function applications yield congruent results. In model-theoretic terms, this corresponds to models where the Leibniz equality kernel is trivial, ensuring no distinct elements are swapped by automorphisms while respecting the structure's operations and relations.[50] However, such interpretations have limitations: in theories lacking sufficient non-logical symbols (e.g., empty signatures), no non-trivial first-order definition of equality is possible, as there are no atomic formulas to distinguish elements. Even in richer theories, ensuring the interpreted relation coincides exactly with the identity across all models often requires an infinite axiom schema, such as replacement axioms for every formula, to exclude indiscernible distinct elements; a finite axiomatization cannot guarantee this in general.[50]Metalogic
Completeness theorem
Gödel's completeness theorem, a foundational result in mathematical logic, asserts that in first-order logic, a formula is semantically valid—true in every interpretation—if and only if it is syntactically provable from the logical axioms using the inference rules (). This equivalence holds more generally for theories: a set of formulas semantically entails () if and only if is provable from (). The theorem establishes a perfect correspondence between the semantic and syntactic notions of consequence in first-order logic, ensuring that the deductive systems capture all valid inferences.[53] Proved by Kurt Gödel in his 1930 paper, the theorem's soundness direction () follows directly from the definitions of provability and truth in models, while the completeness direction () requires a non-trivial construction. Gödel's original proof used a method involving maximal consistent sets and canonical models, but a more accessible approach, known as the Henkin construction, was later developed by Leon Henkin in 1949. In this construction, starting from a consistent set of sentences , one iteratively expands into a maximally consistent theory by adding "witnesses" (new constants and sentences witnessing existential quantifiers, such as for a new constant ). The resulting theory is then used to define a term model where the interpretation of each term is itself, ensuring satisfaction of all sentences in the expanded set; this model satisfies the original , proving that consistency implies satisfiability.[54][53] A key corollary is that every consistent first-order theory admits a model, linking syntactic consistency (no proof of contradiction) to semantic existence (a structure making all axioms true). For example, Peano arithmetic, being consistent, has a model (such as the standard natural numbers), though non-standard models also exist due to other results. The theorem has implications for decidability: since provability is semi-decidable (one can search for proofs), completeness shows that the set of valid first-order formulas is recursively enumerable, providing a computational perspective on logical validity without resolving full decidability.[53][18]Undecidability
The Entscheidungsproblem, formulated by David Hilbert and Wilhelm Ackermann, asks whether there exists an algorithm that can determine, for any given sentence in first-order logic, whether it is valid—meaning true in every possible model—or whether it is satisfiable in some model. In 1936, Alonzo Church and Alan Turing independently provided negative solutions to this problem, demonstrating that first-order logic is undecidable: no general algorithm exists to decide the validity or satisfiability of arbitrary first-order sentences.[55][16] Church's proof relied on his work with λ-calculus, reducing the Entscheidungsproblem to the undecidability of whether two λ-expressions are equivalent. Turing's approach, using his newly introduced concept of computable numbers and Turing machines, reduced the Entscheidungsproblem to the halting problem: determining whether a Turing machine halts on a given input is undecidable, and this mirrors the non-computability of validity in first-order logic by encoding logical structures into machine computations. Both results established that the set of valid first-order sentences is not recursive, though it is recursively enumerable (one can search for a proof to confirm validity), but there is no algorithm to confirm invalidity in general.[55][16] This undecidability extends to specific first-order theories, particularly arithmetical ones. For instance, Peano arithmetic, a standard first-order theory of natural numbers with axioms for successor, addition, and multiplication, is undecidable: there is no algorithm to determine whether a given sentence in its language is provable from the axioms. This follows from Kurt Gödel's second incompleteness theorem (1931), which implies the existence of undecidable sentences within any consistent, sufficiently powerful axiomatizable theory like Peano arithmetic, combined with the recursive enumerability of its theorems via exhaustive proof enumeration. The theorems of Peano arithmetic form a recursively enumerable set, as proofs can be generated and checked mechanically, but the full set of valid sentences (true in the standard model) is not recursive due to these undecidable instances. A concrete example arises in Robinson arithmetic (often denoted Q), a finitely axiomatized fragment of Peano arithmetic that includes basic axioms for successor and addition but omits full induction. Robinson arithmetic is essentially undecidable, meaning any consistent extension that interprets the full structure of natural numbers (with multiplication) remains undecidable. For instance, the Gödel sentence constructed for Q, which asserts its own unprovability, is valid (true in the standard model) but neither provable nor refutable in Q, illustrating a sentence whose validity cannot be algorithmically decided within the theory. This undecidability holds even though Q is too weak to prove many simple arithmetic truths, such as the totality of addition.[56]Löwenheim–Skolem theorem
The Löwenheim–Skolem theorem is a fundamental result in model theory stating that if a first-order theory in a language of cardinality has an infinite model, then for every infinite cardinal , the theory has a model of cardinality .[57] This encompasses both the downward Löwenheim–Skolem theorem, which guarantees the existence of countable models for satisfiable theories in countable languages, and the upward version, which ensures models of arbitrarily large infinite cardinalities.[57] The theorem originated with Leopold Löwenheim's 1915 proof of the downward version, showing that any satisfiable first-order sentence in a countable language has a countable model.[57] Thoralf Skolem extended this in 1920 by proving the full theorem, including the upward direction, through a combinatorial argument that constructs models by selecting witnesses for existential quantifiers in a controlled manner. Modern proofs often rely on the Henkin construction, which builds a model by expanding the language with constants for each existential witness and applying the completeness theorem to obtain a consistent theory with the desired cardinality.[58] Alternatively, the upward Löwenheim–Skolem theorem can be proved using ultraproducts: given an infinite model of cardinality , one forms an ultraproduct over many copies with a suitable ultrafilter to yield an elementary extension of cardinality for . (Note: This is from a handbook, but assuming a URL; actually, for Chang-Keisler, it's a book, so perhaps use a reference.) A key implication of the theorem is the non-categoricity of first-order theories with infinite models: no such theory can specify a unique model up to isomorphism in any infinite cardinality, as the existence of models of varying sizes precludes uniqueness.[59] For instance, the first-order theory of dense linear orders without endpoints—axiomatized by the axioms of a strict total order plus density () and no endpoints ( and )—has non-isomorphic models of different cardinalities, such as the countable rationals and the uncountable reals .[60] The theorem also gives rise to Skolem's paradox, first noted by Skolem in 1922: a countable model of first-order set theory (such as ZFC) must contain elements interpreted as uncountable sets, like the power set of the natural numbers, yet the model's overall domain is countable from the external viewpoint.[61] Skolem resolved this by emphasizing that countability is not absolute but relative to the model's internal notion of bijection; what appears uncountable inside the model may be countable externally due to the model's non-standard interpretation.[61]Compactness theorem
The compactness theorem is a fundamental result in the model theory of first-order logic, stating that a set of first-order sentences is satisfiable if and only if every finite subset of is satisfiable.[62] This principle implies that satisfiability in first-order logic can be reduced to checking finite portions of any potentially infinite theory, highlighting the logic's finite character despite its ability to express infinite structures.[63] The theorem emerged in the 1930s as a consequence of Kurt Gödel's 1930 proof of the completeness theorem for first-order logic, which establishes that every consistent set of sentences has a model.[35] Earlier, a version of compactness was known for propositional logic, but Gödel's work extended it to the first-order setting by showing that if a theory is finitely satisfiable, a model exists, as any proof of inconsistency would be finite.[62] Alternative proofs include the model-theoretic approach using ultraproducts, introduced by Jerzy Łoś in 1955, which constructs a model from an ultrafilter on a family of finite models. Another proof employs Leon Henkin's 1949 construction, which builds a model by systematically extending maximally consistent sets of sentences, ensuring the whole theory is realized in a countable model. A classic example illustrates the theorem's power: consider the theory consisting of sentences asserting "there are at least distinct elements in the domain" for each natural number . Each finite subset is satisfiable in a finite model with elements, so by compactness, the entire theory has a model, which must be infinite.[64] This demonstrates how compactness guarantees the existence of infinite models from finite approximations. Applications of the compactness theorem extend beyond pure logic. In non-standard analysis, Abraham Robinson used it in 1966 to construct models of the real numbers augmented with infinitesimals, enabling rigorous infinitesimal calculus by extending the theory of real closed fields with sentences forcing "infinitesimal" elements. It also proves the existence of non-standard models of arithmetic, linking to the Löwenheim–Skolem theorem by ensuring models of various infinite cardinalities.[62]Expressiveness and limitations
Expressive power
First-order logic can define certain subsets of structures through formulas that specify properties of elements. In the structure of natural numbers equipped with the successor function , for instance, every finite subset is first-order definable by iterating the successor from the zero element a finite number of times.[19] Similarly, every cofinite subset is definable, as it consists of all elements except a finite definable set.[19] These definable sets capture basic arithmetic relations but are limited to ultimately periodic patterns in the successor structure.[65] Despite these capabilities, first-order logic faces significant expressive limitations, particularly in capturing infinitary or global properties. It cannot define finiteness, as any purported first-order axiomatization of finite structures would, by the compactness theorem, admit infinite models: if every finite subset of the axioms is satisfiable in a finite model, the entire set is satisfiable in some model, which must be infinite to satisfy arbitrarily large finite approximations.[66] Likewise, first-order logic cannot express well-ordering in the language of linear orders, since compactness allows for non-well-ordered models that satisfy any finite subset of well-ordering axioms, such as descending chain conditions of finite length.[67] It also fails to define compactness in topological structures, as the logical compactness theorem precludes axiomatizing properties that distinguish compact from non-compact spaces in first-order terms.[67] The Ehrenfeucht–Fraïssé games provide a precise method to quantify the expressive power of first-order logic by modeling the back-and-forth exploration of structures. In these games, two players, the Duplicator and the Spoiler, alternately select elements in two structures over a fixed number of rounds, with the Duplicator aiming to preserve atomic relations; a winning strategy for the Duplicator up to quantifier rank shows that the structures are indistinguishable by first-order sentences of quantifier depth at most .[68] This game-theoretic characterization reveals the local nature of first-order expressiveness, where global distinctions require higher quantifier ranks.[69] A concrete illustration of these limits is that first-order logic cannot distinguish finite from infinite models in certain theories, such as the theory of dense linear orders without endpoints; by the upward Löwenheim–Skolem theorem, infinite models exist alongside finite approximations, and compactness ensures no first-order sentence forces finiteness across all models.[67] In the hierarchy of logics, first-order logic sits below monadic second-order logic, which extends expressiveness by quantifying over unary predicates (sets of elements). While first-order logic cannot define graph connectivity—requiring paths between all pairs of vertices—monadic second-order logic can express it via existential quantification over edge sets forming a connected spanning subgraph.[70] This added power allows monadic second-order logic to capture regularity and parity properties that elude first-order formulas, establishing a strict expressive hierarchy.[71]Formalizing natural language
First-order logic excels at formalizing simple quantified statements in natural language, such as "Every dog barks," which translates directly to the formula , capturing universal quantification over individuals satisfying a property. This approach succeeds for basic categorical assertions, where predicates denote properties or relations, and quantifiers align with determiners like "every" or "some," enabling precise semantic evaluation in model-theoretic terms.[72] However, translating natural language into first-order logic encounters significant challenges due to linguistic features like tense, modality, anaphora, and plurals, which often require extensions beyond standard first-order structures. Tense introduces temporal dependencies, such as in "John walked," which demands additional temporal parameters or operators not native to first-order logic.[73] Modality, as in "John might walk," involves possible worlds semantics that first-order logic alone cannot fully accommodate without modal enrichments.[73] Anaphora poses issues with pronoun resolution, particularly in cases where references depend on prior discourse rather than strict variable binding.[74] Plurals complicate matters further, as expressions like "some dogs bark" can imply distributive readings (each dog barks) or collective ones (the group barks together), which first-order logic struggles to distinguish without auxiliary mechanisms.[74] A notable example of these difficulties is the ambiguity in donkey sentences, such as "Every farmer who owns a donkey beats it," where the pronoun "it" can receive a universal interpretation (the farmer beats every donkey owned) or an existential one (the farmer beats some donkey owned), defying straightforward first-order formalization due to scope constraints on indefinites and pronouns.[74] This ambiguity arises because first-order quantifiers cannot easily capture the dynamic binding required for anaphoric dependencies across clauses.[74] Montague grammar addresses some of these gaps by providing a formal semantic framework that bridges natural language and logical forms, using compositional rules to translate syntactic structures into intensional logic interpretations, though it highlights first-order logic's limitations in handling full natural language expressivity.[73] Another key limitation is first-order logic's inability to express generalized quantifiers common in natural language, such as "most," which requires comparing cardinalities (e.g., "Most students smoke" means the number of smoking students exceeds non-smoking ones), a property undefinable in first-order terms without higher machinery.[75] This stems from first-order logic's restriction to first-order definable sets, as shown by Lindström's theorem, preventing direct encoding of proportion-based determiners like "most" or "exactly half."[75]Comparison to other logics
First-order logic (FOL) extends propositional logic by incorporating predicates, functions, and quantifiers, allowing it to express relations and properties among objects that propositional logic cannot capture.[76] Propositional logic operates solely on atomic propositions and truth-functional connectives like negation, conjunction, and disjunction, treating sentences as indivisible units without internal structure, which limits it to analyzing validity based on truth values alone.[76] In contrast, FOL's universal (∀) and existential (∃) quantifiers enable statements about "all" or "some" individuals in a domain, such as ∀x ∃y (Parent(x, y) → HasChild(x)), expressing relational dependencies that propositional logic renders as mere propositional atoms without quantification.[76] Compared to higher-order logics, FOL restricts quantification to individual variables, avoiding the ability to quantify over predicates or sets of individuals, which both enhances its consistency relative to set-theoretic paradoxes and curtails its expressive power.[6] Higher-order logics, such as second-order logic, permit quantification over relations (e.g., ∀P ∃x P(x)), enabling the formulation of principles like mathematical induction that uniquely characterize structures like the natural numbers up to isomorphism, a feat impossible in FOL due to its limited scope.[6] For instance, second-order logic can define the property of well-ordering—a total order where every non-empty subset has a least element—using quantification over subsets, whereas FOL cannot express this concept, as it lacks the means to bind over collections of elements.[6] This restriction in FOL prevents paradoxes like Russell's but results in non-categorical theories, where models may vary in cardinality or structure, unlike the more definitive axiomatizations possible in higher-order systems.[6] Description logics (DLs) represent a decidable fragment of FOL tailored for knowledge representation and ontologies, trading some of FOL's expressive breadth for computational tractability in reasoning tasks.[77] While FOL supports arbitrary nesting of quantifiers, function symbols, and complex Boolean combinations, DLs focus on concept descriptions (unary predicates) and roles (binary relations) with restricted constructors like intersections, unions, and limited quantifiers (e.g., ∀R.C for "all R-successors are C"), making them less expressive overall but sufficient for modeling taxonomic hierarchies and inheritance.[77] Consequently, FOL can encode full relational structures and arbitrary first-order sentences, enabling broader applications in mathematics and formal verification, but at the cost of undecidability, whereas DLs ensure efficient automated inference for semantic web standards like OWL, though they falter on problems requiring deep nesting or numerical restrictions beyond basic cardinality.[77] Lindström's theorem establishes FOL as the maximal abstract logic satisfying both the compactness theorem—stating that a set of sentences has a model if every finite subset does—and the Löwenheim–Skolem theorem, which guarantees models of various cardinalities.[78] Specifically, any logic extending FOL that preserves these properties must be equivalent to FOL in expressive power, highlighting its unique balance of generality and desirable model-theoretic features among abstract logics.[78] This characterization, proven in 1969, underscores why extensions like those with generalized quantifiers or infinitary operators lose compactness or the Löwenheim–Skolem property, reinforcing FOL's foundational role despite its limitations relative to more powerful systems.Variations and extensions
Restricted and many-sorted logics
Restricted logics are fragments of first-order logic with syntactic limitations that simplify certain properties, such as decidability. Monadic first-order logic restricts predicates to unary (one-argument) relations, excluding higher-arity predicates and function symbols beyond constants.[79] This fragment was shown to be decidable by Löwenheim in 1915, meaning there exists an algorithm to determine the validity of any formula, unlike full first-order logic.[80] Equational logic further restricts the language to universal sentences involving only equations between terms, using equality as the sole predicate and no other connectives or quantifiers beyond universal ones.[81] As a proper fragment of first-order logic, it supports sound and complete proof systems based on term rewriting and congruence closure, facilitating applications in algebraic specifications.[81] Many-sorted first-order logic extends the standard syntax by incorporating a finite set of sorts, each representing a distinct domain of objects, along with typed variables, functions, and predicates that operate only within or between specified sorts.[82] For instance, in a language with sorts for individuals (e.g., people) and groups (e.g., teams), a predicate like "member_of" might have rank , taking an individual and a group as arguments.[82] Semantically, structures consist of non-empty domains for each sort, with interpretations respecting these type constraints, preserving the Tarski-style satisfaction relation from single-sorted logic.[82] A key feature is the conservative translation of many-sorted logic into single-sorted first-order logic, achieved by introducing unary predicates for each sort and relativizing quantifiers.[83] For a formula , where is a sort, the translation becomes , with denoting the sort predicate and the adjusted subformula; this embedding preserves satisfiability and validity.[83] Such reductions demonstrate that many-sorted logic has the same expressive power as single-sorted but with added structure.[84] An illustrative example is typed arithmetic, where sorts distinguish integers () from rationals (), with functions like addition defined within and division restricted to .[85] A formula might assert , preventing type mismatches like adding an integer to a rational directly.[85] The primary benefits include error prevention through type safety, which avoids ill-formed expressions, and enhanced efficiency in automated reasoning by pruning invalid search paths.[84] In programming languages, many-sorted logic underpins type systems in object-oriented paradigms, supporting inheritance and modular specifications, as seen in languages like EPOS where classes correspond to sorts.[86] This integration facilitates formal verification and knowledge representation in AI systems.[84]Infinitary logics
Infinitary logics extend first-order logic by permitting formulas of infinite length, thereby increasing expressive power while retaining certain desirable properties such as the existence of semantics and deduction systems under suitable set-theoretic assumptions. These logics are particularly useful in model theory for capturing properties that require infinitely many first-order axioms, such as the standard structure of the natural numbers or rationals. The syntax allows infinite conjunctions and disjunctions, but typically restricts quantifiers to finite lengths to maintain interpretability.[87] The paradigmatic example is , which extends the first-order language by allowing conjunctions and disjunctions of length less than (i.e., at most countable) while keeping quantifiers finite in length. More generally, for infinite cardinals and with , the logic permits conjunctions and disjunctions of cardinality less than and quantifier blocks (sequences of quantifiers) of length less than . These languages were introduced by Alfred Tarski and Dana Scott in the late 1950s, with significant developments by Richard Karp in the 1960s, who proved completeness results for . Semantics for these logics are defined over structures in a manner analogous to first-order logic, using Tarski-style satisfaction, but requiring the axiom of choice for uncountable cases.[87] A key property distinguishing these logics is their behavior with respect to compactness. The compactness theorem holds for , as established by Jon Barwise using admissible sets, meaning that a theory has a model if every countable subtheory does; this preserves the finite character of first-order entailment in a countable infinitary setting. However, compactness fails for stronger logics like , where infinite quantifier blocks allow expressing properties such as well-orderings of uncountable length that violate compactness. This limitation highlights the trade-off between expressiveness and logical virtues in infinitary extensions.[87] Infinitary logics enable precise characterizations of specific mathematical structures through infinite axioms. For instance, the rational numbers as an ordered field can be axiomatized uniquely up to isomorphism in by combining first-order axioms for ordered fields with a countable infinitary sentence asserting standard field operations on rationals. This sentence involves a countable conjunction over all pairs of natural numbers to enforce that sums and products of "standard" elements (built from 1 via successors and inverses) match the rational arithmetic, ensuring no non-rational elements satisfy the operations in a non-standard way. Such axiomatizations demonstrate how infinitary conjunctions compactly encode infinite families of first-order sentences.[87] Another important result in this framework is the generalization of Łoś's theorem to infinitary logics. In the context of , Łoś's theorem states that for an ultraproduct of structures taken with respect to a -complete ultrafilter, a formula is satisfied in the ultraproduct if and only if it is satisfied in "almost all" factor structures, where "almost all" is defined modulo the ultrafilter. This preserves elementary equivalence in the infinitary sense and extends the first-order version, facilitating constructions like saturated models in uncountable cardinalities. The theorem, proved using the standard Łoś argument adapted to infinitary syntax, is central to model-theoretic applications of ultraproducts in these logics.Non-classical and modal logics
Intuitionistic first-order logic extends the syntax of classical first-order logic with the same connectives and quantifiers but alters the underlying semantics to emphasize constructive proofs, rejecting the law of excluded middle () and double negation elimination (). This rejection stems from the intuitionistic view that truth requires explicit construction, applicable only in finite or decidable cases, as opposed to classical logic's acceptance of these principles for all statements. Heyting formalized intuitionistic logic in 1930, and Kleene provided a Hilbert-style axiomatization for the first-order version in 1952.[88] Kripke semantics provides a model-theoretic foundation for intuitionistic first-order logic using a partially ordered set of worlds (nodes) with a monotonic domain function that non-decreases along accessibility relations. In this framework, a world forces an atomic formula if it holds in that world, conjunction and universal quantification are forced monotonically, while disjunction and existential quantification require forcing in some accessible future world, and implication holds if whenever the antecedent is forced, the consequent is forced in all future worlds. This semantics validates intuitionistic theorems and refutes classical ones like the excluded middle, as demonstrated by Kripke in 1965.[88] Modal first-order logic augments classical first-order logic with unary modal operators (necessity) and (possibility, defined as ), interpreted over Kripke frames consisting of possible worlds connected by an accessibility relation. Semantics can employ fixed domains, where the quantifier domain remains constant across worlds, or varying (world-relative) domains, where objects exist contingently and may differ between accessible worlds, often incorporating a free logic with an existence predicate to handle non-denoting terms. In varying domain semantics, the Barcan formula () fails, allowing for the creation or destruction of objects across worlds.[89] A representative formula in modal first-order logic is , interpreted as "necessarily, every satisfies ", meaning that in every accessible world, the property holds for all objects in that world's domain. This extends classical quantification to modal contexts, enabling reasoning about necessity and possibility over predicates and individuals. Completeness holds for various systems, such as quantified K with the Barcan formula for fixed-domain models, relative to their respective semantics.[89] Temporal logics, such as Linear Temporal Logic (LTL), build on first-order logic by incorporating modal operators for linear time structures, like "globally" () for always and "eventually" () for sometime in the future. LTL extends propositional logic but translates directly into the two-variable fragment of first-order logic over the natural numbers with a successor relation, preserving expressiveness for properties like "every request is eventually granted" (). Introduced by Pnueli in 1977 for program verification, LTL's semantics align with first-order definability, though it lacks full first-order quantifiers over individuals.[90] Unlike classical first-order logic, which enjoys Gödel's completeness theorem linking provability to truth in all models, intuitionistic and modal variants achieve soundness and completeness only relative to their non-classical semantics, such as Kripke models, without recovering classical completeness for excluded middle-violating formulas.[88][89]Higher-order logics
Higher-order logics extend first-order logic by allowing quantification over predicates and functions, thereby increasing expressive power beyond what is possible in first-order systems. In second-order logic, the simplest such extension, variables range over subsets or relations of the domain, enabling formulas like ∀P φ where P is a predicate variable and φ is a formula possibly containing P. This allows the expression of properties that first-order logic cannot capture, such as the full induction principle for natural numbers.[6] Full higher-order logics go further by incorporating quantification over functions of arbitrary orders, including functions that take other functions as arguments, organized via a type system to avoid paradoxes like Russell's. Alonzo Church formalized this in his simple theory of types in 1940, assigning types to objects, predicates, and higher-level functions (e.g., type ι for individuals, o for propositions, and (σ → τ) for functions from type σ to τ), ensuring a hierarchy that supports lambda abstraction and application. The enhanced expressiveness of higher-order logics enables the definition of infinity and achieves categoricity for certain structures, unlike first-order logic which suffers from non-categoricity by Löwenheim–Skolem. For instance, second-order Peano arithmetic includes the induction axiom ∀X (X(0) ∧ ∀y (X(y) → X(y+1))) → ∀y X(y), where X is a second-order variable over subsets of natural numbers, guaranteeing a unique model up to isomorphism in standard semantics. Similarly, second-order axioms for the real numbers, including a completeness axiom quantifying over all Dedekind cuts, yield a categorical theory, uniquely determining the complete ordered field of reals.[6] Semantics for higher-order logics differ in their treatment of second-order quantifiers. Standard semantics interprets predicate variables over the full power set of the domain, providing maximal expressive power and enabling results like categoricity, but it lacks a complete proof theory relative to these models. In contrast, Henkin semantics restricts interpretations to general models where second-order variables range over a selected collection of subsets closed under the logic's comprehension axioms, ensuring completeness: a formula is provable if and only if true in all Henkin models.Applications
Automated theorem proving
Automated theorem proving (ATP) in first-order logic involves computational systems that attempt to establish the logical entailment of a conjecture from a set of axioms or premises, typically using refutation by showing the unsatisfiability of the negation of the conjecture conjoined with the premises.[91] Advances in this field trace back to the 1960s, when Martin Davis and Hilary Putnam developed a procedure for propositional logic that was extended to first-order logic through skolemization and Herbrand's theorem, providing a complete but computationally intensive method for checking satisfiability.[92] This laid the groundwork for more efficient techniques, particularly J.A. Robinson's introduction of resolution in 1965, which enabled practical automated deduction by reducing proofs to clausal form and using inference rules to derive contradictions.[93] Resolution-based provers form the core of modern first-order ATP systems, operating on clausal normal form where formulas are represented as sets of clauses (disjunctions of literals). Central to resolution is unification, an algorithm that finds substitutions to make two terms identical, allowing literals from different clauses to be matched during inference; Robinson's 1965 unification algorithm provided the efficient mechanism for this, enabling the resolution rule to resolve complementary literals after substitution.[94] To manage the combinatorial explosion of inferences, these provers employ ordering heuristics, such as literal selection strategies that prioritize resolving certain literals (e.g., negative ones) and term orderings like Knuth-Bendix ordering to discard redundant clauses, ensuring termination and efficiency in saturation-based search.[95] Prominent resolution-based provers include Vampire and E, both of which have dominated international competitions like the CADE ATP System Competition (CASC). Vampire, developed by Andrei Voronkov and Laura Kovács, implements an optimized superposition calculus with advanced indexing for literal selection and supports instantiation-based methods for handling quantifiers, achieving high performance on large-scale problems through heuristics like literal superpositions and forward/backward subsumption.[96] E, created by Stephan Schulz, uses a DISCOUNT (DIsjunctive Selection with CONjunctions of Terms) heuristic for literal ordering, combined with a saturation algorithm that dynamically adjusts strategies based on clause length and age, making it particularly effective for equational problems via its rewriting and subsumption mechanisms.[97] For reasoning with equality, which is ubiquitous in first-order logic, the superposition calculus extends resolution by incorporating paramodulation rules to handle equational literals; developed by Leo Bachmair and Harald Ganzinger in the early 1990s, it combines ordered resolution with simplification using rewrite rules, ensuring completeness under fair selection strategies while avoiding irrelevant inferences through constraints like literal maximality.[98] This calculus underpins both Vampire and E, where equality is treated as a binary predicate with axioms, and inferences are restricted to maximal positions to focus on non-redundant steps. To address fragments involving decidable theories like linear arithmetic alongside pure first-order reasoning, ATP systems integrate with satisfiability modulo theories (SMT) solvers such as Z3, which handles quantifiers through pattern-based instantiation and E-matching to instantiate universal quantifiers efficiently during search, allowing hybrid approaches where ground subproblems are delegated to SMT while first-order saturation continues on the remainder.[99] Performance of these systems is evaluated using the Thousands of Problems for Theorem Provers (TPTP) library, a standardized repository of approximately 25,800 first-order problems across domains like group theory and set theory (as of October 2025), providing benchmarks for unsatisfiability, satisfiability, and model finding; maintained by Geoff Sutcliffe, TPTP enables reproducible testing with tools like SystemOnTPTP for automated prover invocation and result analysis.[100] A representative example from the TPTP library is in the group theory domain (GRP), where provers like Vampire or E can demonstrate that the axioms of a group—such as associativity, identity, and inverses—combined with the commutativity axiom defining an abelian group, entail properties like the uniqueness of inverses or cancellation laws; for instance, starting from the abelian group axioms, a prover refutes the negation of commutativity to confirm its derivation, typically resolving in seconds via superposition inferences on equational clauses.[101]Formal methods and verification
First-order logic (FOL) plays a central role in formal methods for specifying and verifying the correctness of hardware and software systems, enabling precise mathematical descriptions of system behaviors and properties. In this domain, FOL is used to model system states, transitions, and invariants, allowing automated or semi-automated tools to check whether implementations satisfy high-level specifications, particularly in safety-critical applications like aerospace and automotive systems. By translating system models into FOL formulas, verifiers can detect errors exhaustively within bounded scopes or prove properties inductively, reducing reliance on testing alone.[102] In model checking, FOL facilitates the verification of temporal properties by reducing complex temporal logics to decidable FOL validity problems. For instance, the Computation Tree Logic (CTL*) fragment for liveness properties, which includes path quantifiers like "exists a path" (E) and "for all paths" (A), can be encoded into FOL to check infinite-state systems without iteration or abstraction. This reduction enables efficient validity checking using FOL solvers, as demonstrated in analyses of concurrent systems where temporal operators are translated into first-order predicates over paths and states. Similarly, first-order extensions of CTL allow model checking of systems with infinite data domains by verifying FOL-augmented temporal formulas against large state spaces.[103][104][105] Theorem provers leveraging FOL are widely applied in hardware and software verification to establish inductive invariants and functional correctness. The ACL2 system, based on a first-order logic of total recursive functions derived from Common Lisp, has been used industrially to verify microprocessors and cryptographic hardware, proving properties like equivalence between gate-level implementations and high-level specifications through interactive theorem proving. For software, tools like Isabelle support FOL embeddings within higher-order logic frameworks to verify program behaviors, such as type safety and termination in concurrent algorithms, by discharging first-order proof obligations generated from operational semantics. These provers enable rigorous certification of systems where partial correctness is insufficient, ensuring total behavior matches specifications.[102][106][107] The Alloy Analyzer employs relational FOL to model and analyze software designs, combining first-order predicates with relational operators for transitive closure and set cardinality to specify structural properties. In verification tasks, Alloy models systems as relations between sets (e.g., components and interfaces), then uses bounded SAT solving on translated FOL formulas to detect inconsistencies or counterexamples, such as deadlocks in protocols. This approach is particularly effective for lightweight modeling of database schemas or network topologies, where relational FOL captures multiplicity constraints absent in standard FOL.[108][109] A representative example of FOL in verification is the proof of sorting algorithms using loop invariants expressed as first-order predicates. For insertion sort, an invariant might state that the prefix of the array up to index i is sorted and contains all elements originally in that prefix, formalized as ∀j ≤ i, ∀k ≤ j, a ≤ a ∧ permutation(a[0..i], original[0..i]), where a is the array and permutation preserves multiset equality. Automated FOL theorem provers then discharge verification conditions for each loop iteration, confirming partial correctness and termination under bounded inputs. This method scales to hybrid sorts by combining invariants for merge steps.[110][111] IEEE standards incorporate FOL subsets to formalize specifications in domains like data modeling and arithmetic. The IEEE Std 1320.2-1998 standard outlines transformations of IDEF1X97 data models into equivalent FOL theories, enabling automated consistency checks for entity-relationship diagrams in information systems. Similarly, the IEEE 754-2008 floating-point standard has been given a many-sorted FOL semantics to verify arithmetic operations, supporting tool-based conformance testing for numerical computations in embedded systems. These subsets ensure decidability for practical verification while maintaining expressive power for industrial requirements.[112][113] Despite its strengths, FOL's undecidability poses challenges in verification, necessitating restrictions to decidable fragments like the Bernays-Schönfinkel-Ramsey (BSR) class, which limits formulas to quantifier prefixes ∃∀ without function symbols beyond equality. The BSR fragment admits complete decision procedures via instantiation and resolution, making it suitable for verifying separation logic properties in heap-manipulating programs, but it struggles with nested quantifiers common in full system models. Tools exploiting BSR, such as EPR solvers, achieve high efficiency on bounded verification tasks, yet extending beyond this class often requires heuristics or approximations to handle real-world complexity.[114][115][116]References
- https://www.[researchgate](/page/ResearchGate).net/publication/220297785_Definability_of_Leibniz_Equality
