Chapter 9

Problem Specification in Logical Languages

9.1. Equality

Equality is an extremely important1 predicate (relation), in particular, in mathematics, that has a meaning in every universe of discourse, which is not the case for other predicates (for example, if P(x, y) has the intended meaning “x loves y”, it would have no meaning if the universe of discourse was, say, ieq).

It seems natural to want to treat it using logics that we have already studied.

Imagine we have to prove the validity (or non-validity) of the equivalence:

equ

If propositional logic (PL) is used, using the names mentioned, we get ieq, which is obviously a non-valid formula, but our experience with = tells us that formula (*) is valid, and we want to classify it as such.

FOL would also fail (without any additional axioms) to capture the characteristics of equality.

Equality has particular properties that we must make explicit.

There are formulas such as:

equ

that are valid when R is replaced by x = y or by any other predicate Q(x, y).

But the validity of the formula

equ

depends on the semantics of =.

9.1.1. When is it used?

EXAMPLE 9.1.– There exists a unique element with property P:

i) ieq

or:

ii) ieq

(i) and (ii) are often abbreviated

equ

There are at least two objects with property P:

iii) ieq

There are at most two objects with property P:

iv) ieq

There are exactly two objects with property P:

v) ieq

It is clear that:

(iii) ieq

9.1.2. Some questions about equality

1) Why is equality needed?

2) What is equality?

3) How can we reason with equality?

9.1.3. Why is equality needed?

Since:

– everything is identical to itself and to nothing else.

– identifying a thing to itself is trivial and identifying it to something else is false.

Where does the need for and usefulness of equality come from?

From the fact that we allow different names for the same object.

(It is not the names that are identical, but the named objects).

9.1.4. What is equality?

Equality is an equivalence relation with the replacement or substitution property. To formalize the equality between two objects, Leibniz expressed (Leibniz’s law)2

equ

Leibniz’s law is sometimes presented as the conjunction of the two following laws (the first is the common law in mathematics):

equ

Substitution principle (indistinguishability of identity)

equ

Indiscernibility principle (identity of indiscernibles)

(Leibniz’s law is not a wff of FOL).

Axiomatization of equality:

equ

where image and image, respectively, denote u1,…,um and z1,…,zn (0 ≤ m, n) (Of course, here we assume that f and P are of arity m + n + 1).

Note that (4) and (5) are not wffs of FOL (which does not allow for the quantification of function or predicate symbols). Therefore, equality cannot be defined in FOL, and of course, it cannot be defined in PL either.

However equality can be treated in FOL.

When treating formulas that contain equalities in FOL, the latter can be axiomatized in this particular setting simply by noticing that in every wff of FOL, there are finitely many predicate and function symbols. Formulas (4) and (5) can be written for each of these symbols.

This means that we need to add:

ieq formulas,

where:

nf: number of functional symbols in the formula;

np: number of predicate symbols in the formula;

arfi: arity of function fi; and

arpj: arity of predicate pj.

REMARK 9.1.– Equality can be axiomatized with (1), (4), and (5) (see exercises 9.1 and 9.2).

EXAMPLE 9.2.– We want to reason on the set of clauses S below:

1) P(f(a), g(e))

2) ¬P(f(x), g(x))

3) f(a) = f(b)

4) b = c

5) e = c

We add the clauses:

(recall that: PQ d_arr.gif R⇔¬P ∨ ¬QR)

6) x = x

7) ¬(x = y) ∨ (y = x)

equ

Of course, we could have written equality as an ordinary predicate with the prefix notation: E(…,…), but we prefer the standard mathematical notation.

REMARK 9.2.– Substitution seems natural, in fact it is natural for extensional languages. This is not the case for non-extensional languages.

Consider the following sentence:

i) Michael knows that the sum of the first n odd numbers is 1 + 3 + 5 + … + (2 × n + 1).

The sentence:

ii) If Michael knows that the sum of the first n odd numbers is 1 + 3 + 5 + … + (2 × n +1), then Michael knows that the sum of the first n numbers is ieq

is trivially true (it is actually a tautology).

Furthermore,

iii) 1 + 3 + 5 + … + (2 × n + 1) = n2.

Using (iii) and substituting ieq by n2 in (ii) leads to:

iv) If Michael knows that the sum of the first n odd numbers is 1 + 3 + 5+ …+ (2 × n + 1), then Michael knows that the sum of the first n odd numbers is n2.

…and what used to be a tautology does not remain so, because Michael may not be aware of property (iii).

9.1.5. How to reason with equality?

It is possible to handle equality by resolution, by axiomatizing it (see the following section) or using the paramodulation rule (see definition 9.1).

The following example shows that it is sometimes possible not to bother about equality in the statement of some problems (here, a theorem). The way of proceeding is the way used in logic programming (see Chapter 6), where a key technique is the naming technique.

9.1.6. Specification without equality

EXAMPLE 9.3.– (a theorem in group theory, without =). We prove the following theorem (see also example 9.13) by resolution:

If in a group G we have: ∀x.x2 = x, then G is commutative.

The associativity of an operation o is expressed by:

equ

By naming as indicated by the braces, we can express the associativity of o using the predicate:

P(x, y, z): the composition of x and y yields z.

We thus express with clauses: x o v = w iff u o z = w

equ.gif

Identity will be denoted by the constant e and the inverse of an element x by i(x).

The conclusion of the theorem (i.e. commutativity):

equ

and its negation:

equ

after Skolemization, we obtain two clauses:

equ

Proving the theorem therefore boils down to deducing 2 from clauses (1) to (9) below:

equ

We shall use the hyperresolution rule without having defined it formally; it corresponds to applying several resolution steps in one single step.

equ

9.1.7. Axiomatization of equality

Once it has been axiomatized, equality is a predicate like any other predicate, and its definition can be incorporated by adding formulas to the problems that use it, and then using the method of semantic tableaux or of resolution. The goal is to extend these methods. Of course, here, extension means incorporating rules that take the properties of = into account into these methods.

9.1.8. Adding the definition of = and using the resolution method

EXAMPLE 9.4.– We give a linear refutation by resolution, for the set of clauses S of example 9.2:

equ

REMARK 9.3.– Equality is not handled by Prolog, in which it is possible to use the predicate eq that can be evaluated (see exercise 6.10).

To convince oneself that the predicate does not correspond to equality, it suffices to use the program (aa, bb, and cc denote constants):

equ

and to ask the question:

equ

The answer will be “false”, which does not correspond to the answer we would get with the usual notion of equality (that was formally defined in section 9.1.4).

REMARK 9.4.- Reasoning automatically with equality can be very difficult. If one is interested in reasoning only on finite domains, problems can often be formulated in such a way to avoid its occurrence, as shown in the following example.

EXAMPLE 9.5.- We assume that there is a set of candidates to a set of available jobs, and we want to express that there cannot be two candidates who get the same job.

The wff of FOL with equality (FOLE or FOL=) correctly formalizes the statement of the problem.

equ

where R(x, y) means: job y is given to candidate x.

Once the number of candidates has been fixed, say Alice (a), Bob (b), Carrie (c), and Daniel (d), we can express the statement (*) (with the objective of not having to handle equality) with the six (i.e. ieq) following clauses:

equ.gif

9.1.9. By adding specialized rules to the method of semantic tableaux

The following assertions are implicitly accepted in general, but deserve to be restated:

– names (constants or terms without variables) denote an object that exists. This assumption is necessary to be able to adopt the (quite natural!) point of view admitting that aa (i.e. ¬(a = a)) is contradictory;

– function symbols denote total functions, i.e. if f is an arbitrary function symbol and a is a constant, then f(a) = b, where b is a constant denoting an object that exists, as recalled above.

equ:

If a branch B contains ieq, where ieq is an n-tuple of closed terms: put a x in B.

equ:

For every constant (or term denoting a constant) and every closed formula, use substitution (axioms 4 and 5 in the axiomatization of equality).

REMARK 9.5.– To avoid strategies that would artificially introduce non-termination, we will require that the closed formulas produced by substitution do not already occur in the branch (the same remark as for universal quantifiers).

Do we need to add rules that handle symmetry and transitivity?

If it is possible to prove the validity of these axioms using ieq and ieq, then we will have answered “no” to the question and we will be done with the extension of the method of semantic tableaux incorporating equality3.

EXERCISE 9.1.– (symmetry of =). Prove, using the method of semantic tableaux extended with ieq and ieq, the validity of:

equ.gif

EXERCISE 9.2.– (transitivity of =). Use the method of semantic tableaux extended with ieq and ieq to prove the validity of:

equ.gif.

We can therefore extend the method of semantic tableaux with ieq and ieq, and it can be applied to FOLE (FOL=).

We easily obtain the procedure to do so (the added lines are preceded by =).

EXERCISE 9.3.– Use the method of semantic tableaux with equality to prove the assertion of example 9.1, i.e. (iii) ∧ (iv)⇔ (v).

9.1.10. By adding specialized rules to resolution

9.1.10.1. Paramodulation and demodulation

These rules were introduced to handle reasoning on clauses that contain literals involving equality.

We first study the paramodulation rule. It permits us in one step to combine the following operations:

– instantiation: replacement of variables by terms;

– replacement of equals by equals.

For example, if we have the two clauses (1) and (2) below:

1) f(x) = g(a) % recall: for all x

2) f(b) = c

from (1) we may deduce:

3) f(b)= g(a)

and, using (3) and replacing equals by equals in (2), we obtain:

2) g(a) = c

equ

Figure 9.1. Procedure (FOL=)

Figure 9.1

DEFINITION 9.1.– (paramodulation rule). We note:

L[t]u: term t occurs at position u in literal (or term) L.

L[t]: term t occurs at an unspecified position in literal (or term) L.

L[u ← t]: the literal (or term) obtained by replacing the term occurring at position u by t.

Consider two clauses C and D:

C: s = t V C1

D: L V D1

where:

L: a literal (in particular, an equality or the negation of an equality).

C1, D1: clauses.

If L[r]u and r ie302_04 s admit a solution image, then the clause

equ

is a paramodulant of C in D.

EXAMPLE 9.6.– ieq

equ

A paramodulant of C in D is the clause:

equ

EXAMPLE9.7.– Prove, using the paramodulation and resolution rules, that the set containing the three clauses below is E-unsatisfiable (i.e. if the predicate =, denoted here in infix mode as usual, represents equality).

equ

REMARK9.6.– (reflexivity must not be forgotten). Although it is not necessary in this example, when reasoning with equality, it is necessary to add the clause:

equ

in order not to lose refutational completeness.

Otherwise, it is impossible to prove by resolution and paramodulation that the set of clauses {aa} is contradictory.

If we add x = x, then, by resolution, we obtain image with {x ← a}.

EXAMPLE 9.8.– Prove, using the paramodulation and resolution rules, that the set consisting of the four clauses below is E-unsatisfiable (i.e. S is unsatisfiable when = is interpreted as the usual equality, see section 9.1.4).

equ

Demodulation or rewriting or reduction uses equalities to replace terms by “simpler” terms, we thus need complexity measures, and if, for example, we consider brackets on the right as simpler, we orient the equality (x + y) + z = x + (y + z) as (x + y) + zx + (y + z).

The goal is to keep information in its simplest form, if possible a canonical form. For example, a + 0 → a. This, thus, corresponds to algebraic simplification (symbolic computation).

EXAMPLE 9.9.– a) When considering the unit clause:

equ

oriented into:

equ

the clause:

equ

is demodulated into

P(g(a), b) and removed.

b) When considering the unit clause:

x + 0 = x

oriented into:

x + 0 → x

the clause:

P((a + 0) + b, c)

is demodulated into

P(a + b, c) and removed.

DEFINITION 9.2.– (demodulation rule). We write:

L[t]u: term t occurs at position u in literal (or term) L.

L[u ← t]: is the literal (or term) obtained by replacing the term at position u by t.

Consider the two clauses C (unit, with equality as a predicate) and D:

C: s = t the demodulator

D: L V D1

where:

L: literal (in particular, an equality or the negation of an equality).

D1: a clause.

If L[r]u and there exists a substitution σ such that σs = r (matching instead of unification),

then the clause

σ(L[u ← t] V D1) that replaces D

was obtained by demodulating D with C.

EXAMPLE 9.10.– (is demodulation complete?). The answer is no, as shown in the following example:

equ

S is E-unsatisfiable, but a natural complexity measure would orient the equalities f(c) → a; f(c) → b and it would be impossible to derive a contradiction.

EXAMPLE 9.11.– (what if = occurs in non-unit clauses?). The E-unsatisfiable set of clauses (1) to (4) below shows that restricting the usage of = to its occurrences in unit clauses is too strong a requirement (meaning that unsatisfiable sets of clauses are not detected as so, and completeness is lost).

equ

S is E-unsatisfiable, a result that is easily proved by resolution, by axiomatizing equality with the technique that was already presented. We add:

equ

and we obtain:

equ

EXAMPLE 9.12.– (demodulation: a canonical procedure?). The answer is no. Consider the clause:

(*) Q(f(f(a, b),c))

and the set of demodulators:

1) f(a, b) → d

2) f(b, c) → e

3) f(f(x, y), z) → f(x, f(y, z))

By using (1), (*) can be demodulated into:

Figure 9.2. Paramodulation versus demodulation

Figure 9.2

i) Q(f(d, c))

By using (3), (*) can be demodulated into:

Q(f(a, f(b, c)))

and (2) into:

ii) Q(f(a, e))

(i) and (ii) are two equivalent clauses, but one cannot be reduced to the other by demodulation.

Figure 9.2 summarizes the differences between demodulation and paramodulation.

EXAMPLE 9.13.– (a theorem in group theory). If in a group G, ∀x.x2 = e, then G is commutative.

A human would probably give a proof similar to the following (of course, o denotes the operation in G):

equ

Another human proof (using another strategy) could be:

equ

hence ((1) and (2))

equ

To give a proof by paramodulation, demodulation, and resolution, the group axioms (which are implicit in the proof above) need to be written in clausal form, and the conclusion must be negated:

equ

Paramodulation of (5) into (6):

equ

We obtain (after renaming the variables):

equ

Paramodulation of (6) into (5):

equ

equ

we obtain:

equ

Demodulation with (1):

equ

We obtain (after renaming the variables):

equ

Paramodulation of (9) into (10):

equ

The paramodulant is:

equ

Demodulation with (2):

equ

We obtain (after renaming the variables):

equ

Paramodulation of (11) into (10):

equ

The paramodulant is:

equ

We obtain (after renaming the variables):

equ

Resolution equ

13)image.

9.2. Constraints

The notion of constraint is very natural and appears in many different situations.

Compared with the other notions that have been studied, it is best related to those of logical consequence and subsumption. For example, a theorem that holds for groups is more general (i.e. is valid for more objects) than a theorem that holds for Abelian groups that have the additional property of being commutative. If a theorem holds with less constraints on its hypotheses, then obviously (monotony, see exercise 3.13 c), it also holds with more of them (subsumption)4.

The premises of the theorem can be viewed as constraints and the conclusion as the solution of the constraints (the conclusion holds under the constraints of the premises). Every model of the premises (and maybe more) is specified by the formula in the conclusion (equivalent to the logical consequence).

You have already been confronted many times with this notion in a concrete way, for example, in the problem of coloring a graph with the constraint that this must be done with three colors and that two nodes connected by an edge must not have the same color (see example 9.19).

A constraint is a condition to satisfy. The domains (i.e. the sets of possible values for the variables) give their names to the types of constraints. The most studied ones are arithmetic constraints, Boolean constraints, constraints on strings, constraints on trees ((dis-) equations on terms), and constraints on finite domains.

The main problems that arise are:

– satisfiability (does there exist a solution?);

– equivalence/implication between constraints;

– simplification;

– optimization.

DEFINITION 9.3.– A wff ieq of FOL of the form:

equ

(or a set image

with ieq predicate symbol

ieq is called a constraint.

Var(ieq) = V

Given a domain (set) D, the problem of finding a substitution:

equ

enabling us to evaluate ieq to true is called the problem of constraint solving.

The projection of a constraint C on a set of variables ieq is a constraint CP with Varimage, such that:

– if σ is a solution of C, then σ is a solution of CP ;

– if domimage and σR solution of CP, then there exists an extension of σR to Var(C) that is a solution of C.

The definition of a projection simply means: “we only deal with the subset of constraints containing some given variables of the problem”.

The procedure PLC specifies the abstract interpreter that permits us to handle clauses with constraints. We give a few examples on using constraints in a logic programming language (Prolog 3).

EXAMPLE 9.14.– (logical connectives). Assuming that we do not have Boolean constraints (although we do), we want to define the usual logical connectives (see section 3.1) as arithmetic operations, using arithmetic constraints, and encoding T by 1 and F by 0:

equ

Figure 9.3. Abstract interpreter for PL language with constraints

Figure 9.3

equ

Of course, could have been written:

implies (X,Y,Z)→ {Z=1 - X + X × Y, 0 ⇐ X ⇐ 1, 0 ⇐ Y ⇐ 1} by either transforming the constraint or directly using the equivalence (X d_arr.gif Y) ⇔ (¬XY).

EXAMPLE 9.15.– (pigeons and rabbits). An example that is frequently given to illustrate constraints is the following.

Determine the X number of pigeons and the Y number of rabbits such that together, they consist of 12 heads and 34 legs.

There is no need for a program, we ask the question:

equ

the answer is:

equ

EXAMPLE 9.16.– (at the restaurant). This program is probably the most famous program that can be found among the examples of Prolog programs in the literature.

A person who must not eat more than a given number of calories during meals wants to come up with the different menus that consist of, say, less than 10 calories. A program that enables us to get all the menus is the following:

equ

By asking the question:

light-meal(e, p,d)

The person will know what menus are possible with 10 or less calories per meal.

EXAMPLE 9.17.– (magic squares). We want to arrange the numbers 1 to 9 in a square in such a way that each row, column, and the two diagonals, all sum to the same constant.

We note:

equ

The program is empty and we ask the question:

(enum(X)

(enum(X) enables us to enumerate the integer values of X that satisfy the constraint):

equ

equ

EXAMPLE 9.18.– (the n-queens problem). The well-known n-queens problem consists in placing n queens on an n x n chessboard in such a way that no two queens attack each other. This problem is trivial to program. See also exercise 9.4.

We choose n=4.

The program contains no clause.

In the question, Li and Ci denote the line and column in which queen i is placed (1 ≤ in).. For example, the first solution corresponds to:

equ

% enumerate the solutions

enum(L1) enum(C1) enum(L2) enum(C2) enum(L3) enum(C3) enum(L4)

enum(C4)

% CONSTRAINTS: we begin by the size of the chessboard:

equ

% not on the same line or the same column:

equ

% not on the same diagonals:

equ

% not on the same / diagonals:

equ

% THE SOLUTIONS:

equ

equ

EXERCISE 9.4.– Express the n-queens problem in PL, without using #. Compare with example 9.18.

EXAMPLE 9.19.– (map coloring). The problem consists in coloring all the regions of the map below with three distinct colors, in such a way that no two regions with a common border are colored with the same color.

image

equ

EXAMPLE 9.20.– We want to compute the minimum M of an expression E in a fragment of the plane.

equ

equ

EXAMPLE 9.21.– (non-linear constraints?). Sometimes, they can be handled. The Pythagorean theorem is one such example.

equ

In the constraints, we allowed triangles with collinear sides. To eliminate them, it would suffice to add 1⇐ X, 1⇐ Y in the constraint to obtain the non-degenerate triangles (those marked with (*)) as solutions.

EXAMPLE 9.22.– (syntactic analysis). Grammar rules:

equ

The program:

equ

EXAMPLE 9.23.– (scalar product).

equ

where <> denotes a tuple, i.e. a tree whose root is labelled by <>.

equ

EXAMPLE 9.24.– (palindrome on strings). pal(<>) →;

equ

EXAMPLE 9.25.– (reverse on strings). List y is the reverse of list x if their concatenation is a palindrome:

(uses the following property: the length of the list resulting from the concatenation of a list and its reverse is always an even number)

reverse(x, y) → pal(u) {u=x.y, x::m, y::n, m=n};

x::m means: “the length of string x is m”.

EXAMPLE 9.26.– (in a database). (Example given by K. Marriott and J. Stuckey)

A firm wants to reward the faithful employees (defined as those who have stayed at least 10 years in the firm). The part of the database involved with this problem is the following:

equ

Nb: in general, when there are variables we are not interested in (such as Z, U, V, W in the question), we have the possibility of replacing them by _ so as not to choose names for them.

equ

REMARK 9.7.– The substitution {N=0, M=ss(K), K=ss(K)} in the answer to question 2 in the table, corresponds to the generation of an infinite, rational tree (no test for cycles in the unification algorithm, see exercise 4.1).

9.3. Second Order Logic (SOL): a few notions

During the 19th Century and up to the 1910s, in the formal systems used by logicians-mathematicians (Frege, Zermelo, etc.), the usage of higher-order quantifiers (for example, on sets) was common. Formulas and proofs of infinite lengths were also permitted.

It is only during the 1920s (in particular, thanks to Skolem and Hilbert) that FOL started being particularly important.

Using higher-order seems natural because we may wonder “why should we limit the expressive power of the logic we are using?”, i.e. the nature of the objects that can be quantified.

Figure 2.1

The answer is clear when we take into account the properties of the logic under consideration, other than its expressive power, e.g. existence of denumerable models, semi-decidability, compactness, and completeness, which are useful, in particular, for its automation.

FOL enables us to express many things, in particular, in mathematics, and it has “nice” properties, but some common concepts such as infinite sets, finite sets, well-ordered sets, continuous functions, etc. cannot be expressed in FOL.

SOL (and more generally so-called higher-order logics) enables us to express these concepts and has (have) another characteristic which is that it (they) can greatly reduce the length of proofs of a lower order (for infinitely many formulas).

The notion of expressivity or expressive power corresponds to the models that the formulas of the logic under consideration a to characterize in an exclusive way (meaning some models and they alone).

Characteristic: explicit quantification on predicates and functions.

Advantage: greater expressive power.

Disadvantage: we lose some of the interesting properties of FOL: Löwenheim-Skolem, compactness, and completeness.

We give a few examples that show its usefulness.

EXAMPLE 9.27.– Leibniz’s law (see section 9.1).

EXAMPLE 9.28.– (see also example 9.28).

The induction axiom, intensional version:

equ

The induction axiom, extensional version:

equ

EXAMPLE 9.29.– S is a well-ordered set (meaning that every non-empty subset has a least element):

equ

This property is expressed in weak SOL with successor, which is decidable with a non-elementary complexity, meaning that for any decision algorithm and integer k, there exist formulas of length n such that the decision requires

equ.gif

EXAMPLE 9.30.– (torsion group). This example is often used to show the limits of the expressive power of FOL.

An Abelian group G is a torsion group iff every a rev G has a finite order, i.e. ieq (eG denotes the identity in G).

It can also be defined as follows:

ieq denotes the set of subsets of G.)

Or, using an infinitary logic (i.e. that allows formulas of infinite length):

equ.gif.

EXAMPLE 9.31.– (finite set). We first show that the property of being finite (finiteness) cannot be expressed by a set of wffs of FOL whose models would exclusively be finite sets (obviously of any arbitrary cardinality).

To prove this impossibility, we prove that if such a set of wffs of FOL existed, then it would also admit infinite models.

Assume that Σ, a set of wffs of FOL, has finite models of arbitrary cardinalities.

Consider the formulas of FOL that specify that there exist at least n (distinct) elements (see also theorem 9.1):

equ

where the conjunction contains n(n – 1)/2 disequations.

We define the set ieq.

It is clear that the set ieq is a subset of image and is satisfiable (as Σ admits models of all cardinalities and ieq has a model of cardinality at least p).

This property holds for all p, hence, as every finite subset of image is satisfiable, by the compactness theorem for FOL (see theorem 5.8), the infinite set image also admits a model. This model is infinite (See also the proof of theorem 9.1.).

However, a model of a set of formulas is a model of all its formulas; hence, the infinite model of image is an infinite model of Σ. Therefore, Σ cannot exclusively characterize finite sets.

However, it is possible to express finiteness in SOL. According to Dedekind’s definition, a set is finite iff there is no bijection from this set onto one of its proper subsets. In other words, E is finite iff every injective function E → E is onto (this is not the case, e.g. for ieq, with f:ieqieq and f(x) → 2 × x).).

We propose three translations.

The first translation:

equ

The second translation (there are only quantifications on predicate variables):

equ

with:

equ

The third translation, “the set whose members have property P is finite” (see also exercise (5.1 n)):

equ

EXAMPLE 9.32.– (infinite set). Dedekind’s definition is sometimes presented for infinite sets.

A set E is infinite iff there exists an injective function with domain E, whose codomain is a proper subset of E:

equ

EXAMPLE 9.33.– (infinite set-2). A set is infinite iff it is the domain of a total, transitive, and irreflexive relation:

equ

EXAMPLE 9.34.– Sometimes, the pigeonhole principle is formalized by the formula:

equ

where ieq denotes the infinite subsets of ieq

and ieq the following subset of ieq: {0, 1,..., k − 1}

Graphically, this principle can be represented by:

image

EXAMPLE 9.35.– In natural language, Victor Hugo had all the qualities of a great writer:

equ

X(y): y has quality X.

G(y): y is a great writer.

9.3.1. Syntax and semantics

For the sake of readability, we only present what needs to be added to FOL.

9.3.1.1. Vocabulary

– Predicate variables ieq

– Function variables ieq

(in FOL, we only have variables denoting individuals)

DIGRESSION 9.1.– (variables 3)5. In this context too, variables can be replaced by other symbols (syntactic objects) and do not denote quantities that vary (as in mathematics and physics).

9.3.1.2. Syntax

– Atomic formulas can be constructed using predicate and function variables.

– If ieq is a wff, then ieq are also wffs.

9.3.1.3. Semantics

Consider a structure ieq and an interpretation ieq:

– the interpretation assigns to ieq a function ieq in ieq;

– the interpretation assigns to ieq a relation ieq in ieq;

ieq iff for all ni-ary functions f in ieq;

ieq iff there exists an ni-ary function f in ieq such that ieq

ieq iff for all ni-ary relations R in ieq;

ieq iff there exists an ni-ary relation R in ieq, such that ieq.

The compactness theorem (see theorem 5.8) no longer holds in SOL:

THEOREM 9.1.– (non-compactness of SOL). There exists an unsatisfiable set of wffs in SOL only containing finite subsets that are satisfiable.

PROOF.– Given n rev ieq (n ≥ 2), consider the formula corresponding to the proposition there exists at least n objects:

equ

where the conjunction contains n(n - 1)/2 inequalities.

It is clear from the intended interpretation that each ieqn is satisfiable in models with universes D of cardinalities at least n (in particular, imagen is satisfiable in infinite universes) and unsatisfiable in universes D with card(D) < n.

Consider the set:

equ

S is not finitely satisfiable. Indeed, assume S is finitely satisfiable. Consider a universe Df such that card(Df) = n, in which S is satisfied, i.e. that all the formulas in S are satisfied. But there are infinitely many formulas in S that are falsified in Df: all the formulas ieq for j ≥ 1. Contradiction.

We now consider the set ieq

where ieq is defined in example 9.33, Snc is clearly unsatisfiable.

Every finite subset of Snc is satisfiable, because every {¬image, image2, image3,..., imagen}

(n rev ieq) and {imagei,... imagej} (i, j rev ieq) admit finite models (it is not contradictory to admit finite models and not to admit any infinite model).

The set Snc therefore proves the theorem.

EXAMPLE 9.36.– Specify that a graph is three-colorable, i.e. that we can color all the nodes of the graph with three colors in such a way that two nodes connected by an edge are not colored the same way.

equ

ieq node x has color i

A(x, y): there is an edge between nodes x and y.

EXERCISE 9.5.– (Skolemization and equivalence) (see section 5.5.1.1.).

Prove the equivalence:

equ

where F[x, y] denotes a wff of FOL only containing variables in {x, y} and f a function symbol that does not occur in F[x, y].

EXERCISE 9.6.– Give models of the following formulas:

equ


1 A philosopher of logic (W.V.O. Quine) wrote “There is still no entity, no set, nothing without an identity”.

2 Some authors have noted that it can be simplified: ieq.

3 Of course, once the properties of symmetry and transitivity have been proved, they can be used as if they were axioms.

4 Kolmogorov’s probability theory is also monotonic, in the sense that if B is a consequence of A, then prob(A) ≤ prob(B).

5 See also digressions 3.3 and 5.2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.222.185