First-Order Logic: Syntax and Semantics, Study notes of Reasoning

An introduction to first-order logic, focusing on its syntax and semantics. It covers the extension of propositional logic through quantification, the formation of formulas, the concept of free and bound variables, and the definition of valuations and truth sets. The document also explains the differences between boolean and first-order valuations.

Typology: Study notes

Pre 2010

Uploaded on 08/30/2009

koofers-user-g19
koofers-user-g19 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Applied Logic Lecture 15: First-Order Logic
CS 4860 Spring 2009 Tuesday, March 10, 2009
First-Order Logic is the calculus one usually has in mind when using the word “logic”. It is expres-
sive enough for all of mathematics, except for those concepts that rely on a notion of construction
or computation. However, dealing with more advanced concepts is often somewhat awkward and
researchers often design specialized logics for that reason.
Our account of first-order logic will be similar to the one of propositional logic. We will present
The syntax, or the formal language of first-order logic, that is symbols, formulas, sub-formulas,
formation trees, substitution, etc.
The semantics of first-order logic
Proof systems for first-order logic, such as the axioms, rules, and proof strategies of the first-
order tableau method and refinement logic
The meta-mathematics of first-order logic, which established the relation between the semantics
and a proof system
In many ways, the account of first-order logic is a straightforward extension of propositional logic.
One must, however, be aware that there are subtle differences.
15.1 Syntax
The syntax of first-order logic is essentially an extension of propositional logic by quantification
and . Propositional variables are replaced by n-ary predicate symbols (P,Q,R) which may be
instantiated with either variables (x,y,z, ...) or parameters (a,b, ...). Here is a summary of the
most important concepts.
1. Atomic formulas are expressions of the form P c1..cnwhere Pis an n-ary predicate symbol and
the ciare variables or parameters.
Note that many accounts of first-order logic use terms built from variables and function symbols
instead of parameters. This makes the formal details a bit more complex.
2. Formulas are built from atomic formulas using logical connectives and quantifiers.
Every atomic formula is a formula.
If Aand Bare formulas and xis a variable then (A),A,AB,AB,AB,(x)A, and
(x)Aare formulas.
3. Pure formulas are formulas without parameters.
4. The degree d(A)of a formula Ais the number of logical connectives and quantifiers in A.
5. The scope of a quantifier is the smallest formula that follows the quantifier.
In (x)P x Qx the scope of (x)is just P x, while Qx is outside the scope of the quantifier. To
include Qx in the scope of (x)one has to add parentheses: (x)(P x Qx).
Note that the conventions about the scope of quantifiers differ in the literature.
1
pf3
pf4

Partial preview of the text

Download First-Order Logic: Syntax and Semantics and more Study notes Reasoning in PDF only on Docsity!

Applied Logic Lecture 15: First-Order Logic CS 4860 Spring 2009 Tuesday, March 10, 2009

First-Order Logic is the calculus one usually has in mind when using the word “logic”. It is expres- sive enough for all of mathematics, except for those concepts that rely on a notion of construction or computation. However, dealing with more advanced concepts is often somewhat awkward and researchers often design specialized logics for that reason. Our account of first-order logic will be similar to the one of propositional logic. We will present

  • The syntax , or the formal language of first-order logic, that is symbols, formulas, sub-formulas, formation trees, substitution, etc.
  • The semantics of first-order logic
  • Proof systems for first-order logic, such as the axioms, rules, and proof strategies of the first- order tableau method and refinement logic
  • The meta-mathematics of first-order logic, which established the relation between the semantics and a proof system In many ways, the account of first-order logic is a straightforward extension of propositional logic. One must, however, be aware that there are subtle differences.

15.1 Syntax

The syntax of first-order logic is essentially an extension of propositional logic by quantification ∀ and ∃. Propositional variables are replaced by n-ary predicate symbols (P , Q, R) which may be instantiated with either variables (x, y, z, ...) or parameters (a, b, ...). Here is a summary of the most important concepts.

  1. Atomic formulas are expressions of the form P c 1 ..cn where P is an n-ary predicate symbol and the ci are variables or parameters. Note that many accounts of first-order logic use terms built from variables and function symbols instead of parameters. This makes the formal details a bit more complex.
  2. Formulas are built from atomic formulas using logical connectives and quantifiers.

Every atomic formula is a formula. If A and B are formulas and x is a variable then (A), ∼A, A ∧ B, A ∨ B, A⊃B, (∀x)A, and (∃x)A are formulas.

  1. Pure formulas are formulas without parameters.
  2. The degree d(A) of a formula A is the number of logical connectives and quantifiers in A.
  3. The scope of a quantifier is the smallest formula that follows the quantifier.

In (∀x)P x ∨ Qx the scope of (∀x) is just P x, while Qx is outside the scope of the quantifier. To include Qx in the scope of (∀x) one has to add parentheses: (∀x)(P x ∨ Qx). Note that the conventions about the scope of quantifiers differ in the literature.

  1. Free and bound variables are defined similarly to Second-Order Propositional Logic A variable x occurs bound in A if it occurs in the scope of a quantifier. Any other occurrence of x in A is free.
  2. Closed formulas (or sentences) are formulas without free variables. This is the default from now on.
  3. Substitution : A|x a (or A[a/x]) is the result of replacing every free occurrence of the variable x in A by the parameter a. The technical definition is similar to the one for P 2. However, since the term being substituted for x does not contain variables, capture cannot occur.
  4. Subformulas are defined similar to propositional logic. The only modification is that for any parameter a the formula A|x a is an immediate subformula of (∀x)A and (∃x)A.
  5. The formation tree of a formula F is a representation of all subformulas of A in tree format.

That is, the root of the tree is F. The sucessor of a formula of the form ∼A is A. The successors of A ∧ B, A ∨ B, A⊃B are A and B. The successors of (∀x)A and (∃x)A are A|x ai for all parameters ai. Note that quantifiers usually have infinitely many successors. Atomic formulas have no successors.

15.2 Semantics

The semantics of first-order logic, like the one of propositional logic and P 2 , is based on a concept of valuations. In propositional logic, it was sufficient to assign values to all propositional vari- ables and then extend the evaluation from atoms to formulas in a canonical fashion. In P 2 , the semantics of quantified formulas was defined in terms of the values of all immediate subformulas: v[(∀p)A] = (v|p f )[A] ∧B (v|p t )[A]. In first-order logic, we will proceed in the same way. However, since we don’t have propositional variables anymore, we have to explain the meaning of atomic formulas first.

The standard approach is to interpret parameters by elements of some universe U and n-ary pred- icates by subsets of U n. A closed formula P a 1 ..an then expresses the fact that the interpretations ki ∈^ U of the ai, taken together as n-tuple (k 1 , .., kn), form an element of the interpretation of P.

Smullyan’s approach is similar to the above idea but avoids set theory altogether. Instead, he introduces U -formulas , where the elements of the universe U are used as parameters and defines first-order valuations as canonical extensions of boolean valuations on the set EU^ of all closed U-formulas. The semantics of arbitrary formulas is then defined by a mapping ϕ from the set of parameters into U.

An atomic sentence P a 1 ..an is true under I if (ϕ(a 1 ), ..ϕ(an)) ∈^ ι(P ). In this manner, every inter- pretation induces an atomic valuation v 0 (together with ϕ) and vice versa and from now on we will use whatever notion is more convenient.

A formula A is called satisfiable if it is true under at least one interpretation I (i.e. under at least one universe U, one mapping ϕ, and one interpretation of the predicate symbols). I is also called a model of A. A is valid if A is true under every interpretation. These notions can be extended to sets of formula sin a canonical fashion.

It should be noted that there is a fine distinction between boolean valuations and first-order val- uations. Boolean valuations can only analyze the propositional structure of formulas. They can- not evaluate quantified formulas and therefore have to treat them like propositional variables. In contrast to that first-order valuations can analyze the internals of quantified formulas and extract information that is unaccessible to boolean valuations.

For instance, a boolean valuations would interpret the logical structure of the formula (∀x)(P x ∧ Qx)⊃(∀x)P x as P Q⊃P , which is obviously not a tautology. In contrast to that, every first-order valuation would go into the details of (∀x)(P x ∧ Qx) and (∀x)P x and evaluate to true. Thus the formula is valid, but not a tautology.

For the same reason, the formula (∀x)(P x ∧ Qx) ∧ (∃x)(∼P x) is truth-functionally satisfiable but not first-order satisfiable, since there is no first-order valuation (with a non-empty universe) that can make it true.

First-order valuations provide a more specific analysis than boolean valuations can give. They agree on quantifier-free formulas, however (Exercise!), and in that sense first-order logic is a canonical extension of propositional logic.