First Order Languages: Example 2.1
First Order Languages: Example 2.1
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.
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 ) ) .
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 - -
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 , ... .
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.
- 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
, 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 ) .
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 ,
consists of:
1- A universe: a non-empty set U.
2- An element in U to each constant c i .
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
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 .
- 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 ,
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
- 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
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.
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
Definition 2.5.
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 ) ) .
- 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
- 36 -