0% found this document useful (0 votes)
13 views11 pages

First Order Languages: Example 2.1

Chapter II discusses first-order languages, breaking statements into objects and properties, and introduces logical symbols and specific language examples such as number theory, set theory, and group theory. It defines well-formed formulas (wffs), free variables, sentences, structures, and logical truths, providing various examples and exercises to illustrate these concepts. The chapter emphasizes the importance of first-order logic in formalizing mathematical languages and their interpretations.

Uploaded by

AMGAD SALAMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

First Order Languages: Example 2.1

Chapter II discusses first-order languages, breaking statements into objects and properties, and introduces logical symbols and specific language examples such as number theory, set theory, and group theory. It defines well-formed formulas (wffs), free variables, sentences, structures, and logical truths, providing various examples and exercises to illustrate these concepts. The chapter emphasizes the importance of first-order logic in formalizing mathematical languages and their interpretations.

Uploaded by

AMGAD SALAMA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Chapter II

First Order Languages

First-order logic language (Predicate Calculus) reflects more than


something of the structure of the statement. It breaks the statement into two
components: objects and properties (character).

Example 2.1.
- All birds fly. Object: bird-property: fly.
- Every man respects his parents. Object: man – property respect
( x , y ) , where x is a man y is a parent.

First-order logic is an essential for discussing other languages, in


which: there are common to all of them,
1- Logical symbols:  , ,   (connectives)
,  (quantifiers)
 equality.
2- language specific symbols:
i- constant symbols.
ii- relation symbols.

Informal examples of specific languages:

1- A Language for Number Theory:


Syntax Semantics
Constant symbols a, b 0, 1
Function symbols f, g , 

Relation symbols R 

- 26 -
Let  ( x ) be the formula.
1-  ( x )   y  z ( g ( y , z )  x  y  x  z  x ) , which can be
translated as" "x is a prime number".
2-  ( x )    f ( z , z )  x is translated as:
"x is an even number".
3-  x  y x  y  0 "for all x there exists such that x  y  0 ".
4- "there exists infinitely many prime numbers" is translated as
x  y ( R ( x , y )  ( y ) ) .

2- A Language of Set Theory:


Syntax Semantics
Constant symbols - -
Function symbols - -
Relation symbols R 

(Note that, we can use the set  as a constant symbols). So, R ( x , y )


stands for x  y .

Examples 2.2.
- Let  ( x )  "x is an empty set"
  ( x )   y (  R ( , x ) ) .
- "there is only one empty set".
-  x  y ( ( x )   ( y )  x  y ) .
-  ( x , y )  "x  y "
 z (R (x , x )  R (x , y )) .

- 27 -
3- A language for Group Theory:
Syntax Semantics
Constant symbols A e
f1  binary
Function symbols
f2 1 r-ary function
Relation symbols - -

To define a language more formally with


Constant symbols a1, a2 , ...

Function symbols f 1, f 2 , ...

Relation symbols R1 , R 2 , ...

we apply the following steps:

Step 1: Define the set of terms, denoted by I ( A , P ) , as: A is the set of all
constant symbol and all variables symbols x 1 , x 2 , ... .

P, the set of all operations {  f : f is a function symbol}.

Example 2.3.
1- In the language for number theory, terms appear like:
a , b , x 1 , x 2 , ..., f ( x 1, x 2 ), g ( a, x i ), ..., f ( g ( x j , a ), x 1 )

f ( b , b )  2 while g ( b , b )  1 .

x 2  3 y has an expression f ( g ( x , x ), f ( f ( y , y ), y ) ) .
2- The terms of language of set theory is the set I ( A , P ) , where no
operations, and no function symbols. Therefore P is empty, and
I ( A , P )  A , variables.

Step 2: Defining our wffs again as I ( A , P ) 

- 28 -
i- The set of atomic formulas
{ R ( t1, t 2 , ..., t k ) : R is a k-ary relation symbol and t1 , t 2 , ..., t k ) : R

is a k-ary relation symbol and t1 , t 2 , ..., t k are terms,  } .

ii- The set wffs is I (atomic formulas, { , ,  ,  , V ,  } where

, x , y
 :  : .
x  y 

Examples 2.4.
Of wffs in the language if number theory:
 x [( x  y )  R (f ( x , y )]
 x R ( a, x ) .

An important syntactic notion is "the free variab", tge variable that is


not quantified.

The set of free variables of wff   F (  ) - is defined by induction on


the construction of the set of wffs as:
i- If  is atomic, then F ()  all variables occurring in  . [ F ( f (b, b ) 
g ( x , f ( b , y ) ) )  { x , y }] .
ii- F ( 1   2 )  F ( 1  2 )  F ( 1   2 )  F ( 1 )  F (  2 ) .

iii- F (   )  F (  ) .
iv- F (  x  )  F (  )  { x } .
v- F (  z  )  F (  )  { x } .

Examples 2.5.
1-  x  y x  y  0 is a wff with no free variables.
2-  z x  y , wff with x and y are free variables.

- 29 -
Remark 2.1.
A variable x can occur both free and bound in a formula, e.g.
( x  y   x  y x  y  0) .

Definition 2.1.
A sentence is a formula with no free variables.
For example, in number theory,  x R ( x , x ) is a sentence.

Definition 2.2.
A structure (an interpretation) for a syntactical language with:
Constant c1, c 2 , ..., c n ,

Function f 1, f 2 , ..., f n ,

Relation R1, R 2 , ..., R n ,

consists of:
1- A universe: a non-empty set U.
2- An element in U to each constant c i .

3- A mapping for each n-ary function f i ; f i : U k  U .

4- A mapping for each n-ary relation R i ; R i : U k  {T , F } .

Example 2.6.
Number theory language/
Syntax Semantics
Constant: a, b U N
, .

Function: f,g f (x , y )  x  y
g (x , y )  x y

Relation: R R ( x 1, x 2 )  x 1  x 2

- 30 -
The formula    x (  ( x  b )  R ( ( f ( x , x ), g ( x , x ) ) is a true

sentence, 2 x  x 2 for all x  1 .

The formula    x  y f ( x , y )  f ( y , x ) is a true, where


f ( x , y ) is a term t1 , f ( y , x ) is a term t 2 and t1  t 2 is a relation.

R ( f ( x , x ), g ( x , x ) ) has an interpretation 2 x  x 2 which is true


or false according to the value of the free variable x in N.

Definition 2.3.
An assignment function s : V  U extends to a unique function
s : T  U as follows:
i- t T , a variable, s ( t )  s ( t ) .

ii- t T is a constant  s ( t )  t u .
iii- t  f i ( t1, t 2 , ..., t k ) T 

s ( t )  f iu ( s ( t1 ), s ( t 2 ), ..., s ( t k ) ) .

Example 2.7.
Let t  : f ( f ( x , x ), y ) and
s : V  U , where
x 2
y 5.
U
 s (t )  f ( s ( f ( x , x ), s ( y ) )
U U
f (f ( s ( x ), s ( x ) ), s ( y ) )
U
f (2  : , 5)  4  5  9 .

Now, for the well formed formula, we have:

- 31 -
i-   R ( t1, t 2 , ..., t n )

s (  )  ( s ( t1 ), s ( t 2 ), ..., s ( t n ) )  R U .
ii-   (   )  s (  )  T iff s ( )  F .
iii-   (   ) we apply a truth table for s ( ) and s ( ) . The same
as ,  .
iv- Given    x i ( ) , then

 s ( x ) if xi  x
for d U , s id ( x )  
 d if xi  x ,

and in this case, s (  )  T if and only if, for all d U , we have

s id ( )  T .

Example 2.8.
In a language for graph theory, let constants to be out vertices, with
no functions and two binary relations R and P; where R ( u , v ) is interpreted
as: there is an edge from vertex in to vertex v. P (u , v ) if interpreted as u is
connected to v by same directed path. So, for U  { a , b , c , d , e , f } and the
following graph

a b c d e f

Then R ( u , v )  T if and only if


( u , v )  {( a, b ), ( b , c ), ( c , d ), ( d , b ), ( e , f ), ( f , f )}
and P (u , v )  T if and only if
(u , v )  {( a, b ), ( b , c ), (c , d ), ( d , b ), ( e , f ), ( f , f ), ( d , b ),( d , c ),
( a, c ), (a, d ), ( d , d )} .

- 32 -
Lemma 2.1.
Let  be a well formed formula in some language, and M a structure
for L, then for every assignments s1, s 2 to the universe of M if, for every

variables x that occurs free in  s1 ( x )  s 2 ( x ) , then M   iff M   .


s1 s2

(By M   we mean M satisfies  with s, s (  )  T in M).


s

Corollary 2.1.
If  is a sentence (no free variables in  , then for any s1, s 2 ,

M   iff M   .
s1 s2

Proof:
By generalized induction on the structure of  . (exercise)

Definition 2.4.
 is a logical truth if for every structure for the language of  , and
every assignment s to that structure M   .
s

Example 2.9.
   x Q ( x )  Q ( y ) is a logical truth, Q is one-place relation
symbol. I  is not logical truth.

Let  x Q ( x ) be truth and Q ( y ) be false in M. Then M   x Q ( x ) iff


s

and only if d U
M
s dx (Q ( x ) )  Q ( d ) holds for all d, contradiction to the assumption
M F
that Q ( y ) .

- 33 -
Example 2.10.
1   y  x R ( x , y )   x  y R ( x , y )
is a logical truth, while
2  x  y R ( x , y )  y x R (x , y )
is not for let the structure M  ( N ;  ) .  2 interpreted as if for every natural

number x, there is a natural number y such that x  y (y here is x itself), then


there exists a natural number y which is equal to each element x.

Definition 2.5.

 logical implies  if for every M, s that make every member of

 gets true, M   .
s

Lemma 2.2.
For every  , ,  ,
  { }   iff   {   } .
Corollary 2.2.
y x R ( x , y )  x y R (x , y ) .

- 34 -
Exercises

1- Show that there are no wff of length 2, 3, or 6, but that any other +ve
length in possible,
2- Let  be a wff, let c be the no. of places at which binary connective
symbol s ( ,  , ,  ) occur in  . Let s be the number of places a
which sentence symbols occur in  . Show that, using the induction
principle, s  c  1 .
3- Suppose that  is a wff not containing the negation symbol  .
a- Show that the length of  (i.e. the number of symbols in the
string) is odd.
b- Show that more than a quarter of the symbols are sentence
symbols.
4- Show that if  is a proper initial segment of the wff (   ), then the
number of left brackets in  is greater than the number of right
brackets.
5- Show that neither of the following two formulas logically implies the
other:
i- (A  (B C ) .
ii- ( ( A  ( B  C ) )  ( (  A )  ( (  B )  (  C ) ) ) .
6- Is ( ( ( p  Q )  P )  P ) a tautology?
7- (a) Determine whether or not ( ( P  Q )  (Q  P ) ) is a tautology ?
(b) Determine whether or not ( ( p  Q )  R ) logically implies
( ( P  R )  (Q  R ) ) .

8- Show that  ,    iff    iff   (   ) .

9- Show that the set { , ,  } is not adequate.


10- Translate into logic language:

- 35 -
i- Non of my frients are perfect.
ii- Some of my friends are not perfect.
11- Let  ( x ) be the formula:
 ( x  1)   y (  z ( x  y z )  ( y  x )  ( y  1) )
(a) Determine the free variable in  .
(b) If we have the structure M   N ; 0, 1, ,   . Determine

s : V  N such that M   .
s

12- Show that  p ( x )   x q ( x ) is not logically equivalent to


 x ( p (x ) q ( x )) .

- 36 -

You might also like