First-order Logic, in a strict sense, is a class of Formal Systems.
A first-order logic, by definition of a formal system, is made of
I.e., we speak of a specialization of Formal Systems, encompassing a First-order Language (specialization of Formal Language) and a respective Deductive System, that is capable of expressing first-order logic.
The Deductive System and a subset of the Language are (conventionally) fixed across all first-order logics. This leaves possible variations between first-order logics to be within language, namely the signature.
The fixed definitions are what define the class (are what make “first-order” logic “first-order”).
Characteristically, first-order logic is Propositional Logic extended with:
Note that there is no definitive/authoritative specification on the “conventionally fixed” parts of first-order logics. Nevertheless, we hereafter discuss what the more-or-less universally accepted ideas.
Recall what an alphabet, , is in a Grammar.
For a first-order language, we further subdivide into :
This division facilitates the separation of semantics from syntax (formation rules).
These have constant, assumed, meaning (across all interpretations).
Part of Syntax
The exact contents of is up to the author, although conventionally it contains:
(
, )
– parenthesis, for precedence grouping.
, ,
, etc. – other delimiting/grouping markersAn equality symbol, e.g., , is sometimes also included, or otherwise defined to be a nonlogical predicate.
Here, a frequent difference across authors is the usage of alternative symbols, especially for the logical connectives and true and false constants. E.g., for , for , for , for , for .
These are meaningless placeholders until assigned to by interpretations.
Part of Semantics
The author of the language defines , two sets 1:
“Constants”, should they be distinguished, are nullary functions. Similarly,
Propositions (from propositional logic) are nullary predicates.
Some texts speak of Relations instead of Predicates.
They are isomorphic; there is a bijection between the two forms.2
The same could also be said for Predicates and Functions.
Behaviorally, predicates are functions whose codomain is precisely (and functions are predicates of (+1)-arity3).
But, functions and predicates face different syntactical rules, and are hence segregated.
Note that contains only “symbols” in the sense of representations of objects with unspecified meaning/behavior.
This is unlike , whose contents do have their meaning/behavior specified.
To relate back to Formal Grammar, a first-order language , where , has
As the signature is the only “variable” part between first-order languages, some consider it equivalent to / definitive of a first-order language.
Here we restate the fixed grammar of first-order languages.
Everything discussed so far is only to establish the syntax of first-order languages.
Syntax allows the construction and manipulation of formulas without concern for what any of the nonlogical symbols represent.
Terms are (inductively defined as) any
Atomic Formulas / atomic statements are any
(sentential) Formulas / statements are any
Relating back to Formal Language, for any that is a sentential formula, .
If we consider the “datatypes”, from computer science, of the above,
Terms are of Any type;
(Atomic) formulas are of boolean.
Every (sub-)formula is implicitly parenthesized.
For the final bullet point above, a . or : may be added as per or to more explicitly delimit the quantification clause from the sub-formula.
In actual writing, to reduce parenthesis, there is a conventional precedence for the logical connectives such that parenthesis may be omitted as long as unique readability is maintained. In descending precedence:
Observe that “Term”, “Atomic Formula”, and “Formula” are Nonterminal Symbols, while the actual formula produced are comprised on Terminal Symbols only.
See a formal representation in BNF on Wikipedia
It is otherwise too much work (and not exactly useful) to write up the formation rules in a first-order language. (Although this self-definition would be cool?)
A variable is bound if it is quantified, and free otherwise.
Within a larger formula, a variable is unbound if it is free somewhere, and bound if bound everywhere.
A variable is quantified when it is used with a quantifier, e.g., binds in the scope of , but is free in (assuming does appear), and is therefore unbound in .
I.e., bound variables are not “inputs”; they are not symbols to be assigned values during interpretation (like proposition letters). They are implicit and cannot be assigned to.
Imagine quantifiers as a
for-each
loop, e.g.,for (item : list){...}
. Then,item
is bound . (And as such you wouldn’t redefine it, since the loop “manages” it “automatically”.)
A formula with no (free) variables is a sentence.
Specifically, we are discussing Tarskian semantics.
A language does not encode any semantics within itself.
Therefore, to perform any semantic treatment of a formula, we must interpret it.
An interpretation assigns a denotation to each nonlogical symbol and is a pair :
A “first-order” structure or an -structure (where is a first-order langauge) is a structure for a first-order language.
I.e., the structure provides interpretation specifically for (the symbols in) .
An -structure is a pair 5:
Assignability (of a structure to a formula) is a retrospective assertion of whether the structure is for the language the formula is in.
Aka. (variable) assignment.
A valuation in an -structure is a mapping
such that by applying to every free variable in a formula, we obtain a sentence.
Then, the evaluation of a formula is defined inductively.
For an evaluator function ; ; ; ; etc.,
where the omitted definitions (for ) are 1. those from Propositional Logic, 2. the rules for the first-order quantifiers, which are described as axioms below.
So, a formula can only be evaluated under a specified valuation in a specified structure (unless it is a tautology or contradiction, or a sentence – forms with no free variables that need valuations).
Valuation Update
Aka. assignment function modification
The idea is that we “update” a with a (overriding) rule to specifically map a variable to a value .
I’ve seen two (three) notations for this:
or , and
In any case, the mechanism is self-explanatory:
Satisfiable = could evaluate true
Valid = cannot evaluate false
“ evaluates true (under ) in ”
“ is valid in structure ”
where is a valuation for . (and is assignable to )
“ is valid”
where is a structure assignable to
“ is satisfiable in ”
“ is satisfiable”
“A is valid” “ is unsatisfiable”;
“ is satisfiable” “ is invalid”.
Rules of Inferences are syntactical transformations, and as such operate only on symbols in (and may be performed irrespective to / without any interpretations).
A nice list is on Wikipedia. Note that most of the rules listed are not “primitive” and can be derived from the 2 axioms below (plus Modus Ponens from propositional logic).
(For our scope) Axioms and Rules of Inference are isomorphic.
Note that in first-order logic, all variables are symbolic denotations of objects to serve as arguments to functions and predicates.
In second-order logic, and variables may denote predicates (and as such quantification over predicates is possible).
We may write axioms for first-order logic using second-order logic (where the axioms are more precisely called axiom schemata).
The minimal set of axiom schemata for first-order logic are those of propositional logic, plus the following two:
where is a Formula in which (exists and) is free, and . See below for the square bracket syntax.
I.e.,
If A is true for everything assigned to x, then we may assign anything to x and A will still be true.
If A is ever true, then there must exist something that when assigned to x makes A true
means formula with all (unbound) instances of variable replaced by term . I.e., a refactoring.
Note this is not a semantic valuation, but a syntactic rewriting.
should not contain variable symbols already in as that might cause variable shadowing and corrupt the formula.
For denoting syntactic equivalence between two formulas,
I.e., and are equivalent (syntactically) iff they are equivalent (semantically) under all interpretations.
Common (derived) rules of inference stated as equivalences:
Some notable non-equivalences:
Prenex Normal Form (PNF) is a normal form where all quantifiers are gathered at the outermost scope for a formula.
I.e., when a formula has a two-part structure of a prefix of all quantification clauses followed by a quantifier-free sub-formula matrix.
Every formula has a PNF.
PNF is useful in (automated) theorem proving.
Standard PNF conversion strategy:
Step 3 is necessary since all scopes will be “voided / made global” when the quantifiers are moved to the outermost grouping.
See Common Equivalences above for strategies to achieve each step.
technically there’s also a 3rd element in this tuple, , that is simply a mapping that gives the arity of each function symbol or relation symbol – . ↩︎
intuitively, a relation is the set of all inputs that make a predicate true.
Formally, the equivalent relation of a predicate is ↩︎
Every -ary function is a -ary predicate. For a function , we can define an equivalent predicate where for any given and , ↩︎
if contains an equality relation ↩︎
Also written , where instead of we explicitly have the sets of functions and predicates. ↩︎
So, under an interpretation with the Domain of Discourse , means “for every element , …” and means "for at least one element ".
In a textual writing context, is often implicitly inferred. ↩︎