<s>
First-order	O
logic	O
—	O
also	O
known	O
as	O
predicate	B-Algorithm
logic	O
,	O
quantificational	O
logic	O
,	O
and	O
first-order	O
predicate	B-Application
calculus	I-Application
—	O
is	O
a	O
collection	O
of	O
formal	O
systems	O
used	O
in	O
mathematics	O
,	O
philosophy	O
,	O
linguistics	O
,	O
and	O
computer	B-General_Concept
science	I-General_Concept
.	O
</s>
<s>
First-order	O
logic	O
uses	O
quantified	B-Language
variables	I-Language
over	O
non-logical	O
objects	O
,	O
and	O
allows	O
the	O
use	O
of	O
sentences	O
that	O
contain	O
variables	O
,	O
so	O
that	O
rather	O
than	O
propositions	O
such	O
as	O
"	O
Socrates	O
is	O
a	O
man	O
"	O
,	O
one	O
can	O
have	O
expressions	O
in	O
the	O
form	O
"	O
there	B-Algorithm
exists	I-Algorithm
x	O
such	O
that	O
x	O
is	O
Socrates	O
and	O
x	O
is	O
a	O
man	O
"	O
,	O
where	O
"	O
there	B-Algorithm
exists	I-Algorithm
"	O
is	O
a	O
quantifier	B-Language
,	O
while	O
x	O
is	O
a	O
variable	O
.	O
</s>
<s>
This	O
distinguishes	O
it	O
from	O
propositional	O
logic	O
,	O
which	O
does	O
not	O
use	O
quantifiers	B-Language
or	O
relations	B-Algorithm
;	O
in	O
this	O
sense	O
,	O
propositional	O
logic	O
is	O
the	O
foundation	O
of	O
first-order	O
logic	O
.	O
</s>
<s>
A	O
theory	O
about	O
a	O
topic	O
,	O
such	O
as	O
set	O
theory	O
,	O
a	O
theory	O
for	O
groups	O
,	O
or	O
a	O
formal	O
theory	O
of	O
arithmetic	O
,	O
is	O
usually	O
a	O
first-order	O
logic	O
together	O
with	O
a	O
specified	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
(	O
over	O
which	O
the	O
quantified	B-Language
variables	I-Language
range	O
)	O
,	O
finitely	O
many	O
functions	O
from	O
that	O
domain	O
to	O
itself	O
,	O
finitely	O
many	O
predicates	B-Algorithm
defined	O
on	O
that	O
domain	O
,	O
and	O
a	O
set	O
of	O
axioms	B-Algorithm
believed	O
to	O
hold	O
about	O
them	O
.	O
</s>
<s>
The	O
adjective	O
"	O
first-order	O
"	O
distinguishes	O
first-order	O
logic	O
from	O
higher-order	B-Algorithm
logic	I-Algorithm
,	O
in	O
which	O
there	O
are	O
predicates	B-Algorithm
having	O
predicates	B-Algorithm
or	O
functions	O
as	O
arguments	O
,	O
or	O
in	O
which	O
quantification	B-Language
over	O
predicates	B-Algorithm
or	O
functions	O
,	O
or	O
both	O
,	O
are	O
permitted	O
.	O
</s>
<s>
In	O
first-order	O
theories	O
,	O
predicates	B-Algorithm
are	O
often	O
associated	O
with	O
sets	O
.	O
</s>
<s>
In	O
interpreted	O
higher-order	O
theories	O
,	O
predicates	B-Algorithm
may	O
be	O
interpreted	O
as	O
sets	O
of	O
sets	O
.	O
</s>
<s>
Although	O
the	O
logical	O
consequence	O
relation	B-Algorithm
is	O
only	O
semidecidable	O
,	O
much	O
progress	O
has	O
been	O
made	O
in	O
automated	B-Application
theorem	I-Application
proving	I-Application
in	O
first-order	O
logic	O
.	O
</s>
<s>
First-order	O
logic	O
is	O
the	O
standard	O
for	O
the	O
formalization	O
of	O
mathematics	O
into	O
axioms	B-Algorithm
,	O
and	O
is	O
studied	O
in	O
the	O
foundations	O
of	O
mathematics	O
.	O
</s>
<s>
Axiom	B-Algorithm
systems	O
that	O
do	O
fully	O
describe	O
these	O
two	O
structures	O
(	O
that	O
is	O
,	O
categorical	O
axiom	B-Algorithm
systems	O
)	O
can	O
be	O
obtained	O
in	O
stronger	O
logics	O
such	O
as	O
second-order	O
logic	O
.	O
</s>
<s>
While	O
propositional	O
logic	O
deals	O
with	O
simple	O
declarative	O
propositions	O
,	O
first-order	O
logic	O
additionally	O
covers	O
predicates	B-Algorithm
and	O
quantification	B-Language
.	O
</s>
<s>
A	O
predicate	B-Algorithm
takes	O
an	O
entity	O
or	O
entities	O
in	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
and	O
evaluates	O
to	O
true	O
or	O
false	O
.	O
</s>
<s>
The	O
predicate	B-Algorithm
"	O
is	O
a	O
philosopher	O
"	O
occurs	O
in	O
both	O
sentences	O
,	O
which	O
have	O
a	O
common	O
structure	O
of	O
"	O
a	O
is	O
a	O
philosopher	O
"	O
.	O
</s>
<s>
While	O
first-order	O
logic	O
allows	O
for	O
the	O
use	O
of	O
predicates	B-Algorithm
,	O
such	O
as	O
"	O
is	O
a	O
philosopher	O
"	O
in	O
this	O
example	O
,	O
propositional	O
logic	O
does	O
not	O
.	O
</s>
<s>
Relationships	O
between	O
predicates	B-Algorithm
can	O
be	O
stated	O
using	O
logical	O
connectives	O
.	O
</s>
<s>
The	O
truth	O
of	O
this	O
formula	O
depends	O
on	O
which	O
object	O
is	O
denoted	O
by	O
a	O
,	O
and	O
on	O
the	O
interpretations	O
of	O
the	O
predicates	B-Algorithm
"	O
is	O
a	O
philosopher	O
"	O
and	O
"	O
is	O
a	O
scholar	O
"	O
.	O
</s>
<s>
Quantifiers	B-Language
can	O
be	O
applied	O
to	O
variables	O
in	O
a	O
formula	O
.	O
</s>
<s>
The	O
universal	O
quantifier	B-Language
"	O
for	O
every	O
"	O
in	O
this	O
sentence	O
expresses	O
the	O
idea	O
that	O
the	O
claim	O
"	O
if	O
a	O
is	O
a	O
philosopher	O
,	O
then	O
a	O
is	O
a	O
scholar	O
"	O
holds	O
for	O
all	O
choices	O
of	O
a	O
.	O
</s>
<s>
The	O
negation	O
of	O
the	O
sentence	O
"	O
For	O
every	O
a	O
,	O
if	O
a	O
is	O
a	O
philosopher	O
,	O
then	O
a	O
is	O
a	O
scholar	O
"	O
is	O
logically	O
equivalent	O
to	O
the	O
sentence	O
"	O
There	B-Algorithm
exists	I-Algorithm
a	O
such	O
that	O
a	O
is	O
a	O
philosopher	O
and	O
a	O
is	O
not	O
a	O
scholar	O
"	O
.	O
</s>
<s>
The	O
existential	B-Algorithm
quantifier	I-Algorithm
"	O
there	B-Algorithm
exists	I-Algorithm
"	O
expresses	O
the	O
idea	O
that	O
the	O
claim	O
"	O
a	O
is	O
a	O
philosopher	O
and	O
a	O
is	O
not	O
a	O
scholar	O
"	O
holds	O
for	O
some	O
choice	O
of	O
a	O
.	O
</s>
<s>
The	O
predicates	B-Algorithm
"	O
is	O
a	O
philosopher	O
"	O
and	O
"	O
is	O
a	O
scholar	O
"	O
each	O
take	O
a	O
single	O
variable	O
.	O
</s>
<s>
In	O
general	O
,	O
predicates	B-Algorithm
can	O
take	O
several	O
variables	O
.	O
</s>
<s>
In	O
the	O
first-order	O
sentence	O
"	O
Socrates	O
is	O
the	O
teacher	O
of	O
Plato	O
"	O
,	O
the	O
predicate	B-Algorithm
"	O
is	O
the	O
teacher	O
of	O
"	O
takes	O
two	O
variables	O
.	O
</s>
<s>
An	O
interpretation	O
(	O
or	O
model	O
)	O
of	O
a	O
first-order	O
formula	O
specifies	O
what	O
each	O
predicate	B-Algorithm
means	O
,	O
and	O
the	O
entities	O
that	O
can	O
instantiate	O
the	O
variables	O
.	O
</s>
<s>
These	O
entities	O
form	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
or	O
universe	O
,	O
which	O
is	O
usually	O
required	O
to	O
be	O
a	O
nonempty	O
set	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
an	O
interpretation	O
with	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
consisting	O
of	O
all	O
human	O
beings	O
and	O
the	O
predicate	B-Algorithm
"	O
is	O
a	O
philosopher	O
"	O
understood	O
as	O
"	O
was	O
the	O
author	O
of	O
the	O
Republic	O
"	O
,	O
the	O
sentence	O
"	O
There	B-Algorithm
exists	I-Algorithm
a	O
such	O
that	O
a	O
is	O
a	O
philosopher	O
"	O
is	O
seen	O
as	O
being	O
true	O
,	O
as	O
witnessed	O
by	O
Plato	O
.	O
</s>
<s>
The	O
syntax	B-Application
determines	O
which	O
finite	O
sequences	O
of	O
symbols	O
are	O
well-formed	O
expressions	O
in	O
first-order	O
logic	O
,	O
while	O
the	O
semantics	B-Application
determines	O
the	O
meanings	O
behind	O
these	O
expressions	O
.	O
</s>
<s>
However	O
,	O
a	O
non-logical	O
predicate	B-Algorithm
symbol	O
such	O
as	O
Phil(x )	O
could	O
be	O
interpreted	O
to	O
mean	O
"	O
x	O
is	O
a	O
philosopher	O
"	O
,	O
"	O
x	O
is	O
a	O
man	O
named	O
Philip	O
"	O
,	O
or	O
any	O
other	O
unary	O
predicate	B-Algorithm
depending	O
on	O
the	O
interpretation	O
at	O
hand	O
.	O
</s>
<s>
Either	O
one	O
of	O
the	O
quantifiers	B-Language
along	O
with	O
negation	O
,	O
conjunction	O
(	O
or	O
disjunction	O
)	O
,	O
variables	O
,	O
brackets	O
,	O
and	O
equality	O
suffices	O
.	O
</s>
<s>
Without	O
any	O
such	O
logical	O
operators	O
of	O
valence	O
0	O
,	O
these	O
two	O
constants	O
can	O
only	O
be	O
expressed	O
using	O
quantifiers	B-Language
.	O
</s>
<s>
Non-logical	O
symbols	O
represent	O
predicates	B-Algorithm
(	O
relations	B-Algorithm
)	O
,	O
functions	O
and	O
constants	O
.	O
</s>
<s>
For	O
every	O
integer	O
n≥0	O
,	O
there	O
is	O
a	O
collection	O
of	O
n-ary	O
,	O
or	O
n-place	O
,	O
predicate	B-Algorithm
symbols	I-Algorithm
.	O
</s>
<s>
Because	O
they	O
represent	O
relations	B-Algorithm
between	O
n	O
elements	O
,	O
they	O
are	O
also	O
called	O
relation	B-Algorithm
symbols	I-Algorithm
.	O
</s>
<s>
When	O
the	O
arity	O
of	O
a	O
predicate	B-Algorithm
symbol	I-Algorithm
or	O
function	O
symbol	O
is	O
clear	O
from	O
context	O
,	O
the	O
superscript	O
n	O
is	O
often	O
omitted	O
.	O
</s>
<s>
Signatures	O
concern	O
syntax	B-Application
rather	O
than	O
semantics	B-Application
.	O
</s>
<s>
A	O
predicate	B-Algorithm
symbol	I-Algorithm
(	O
or	O
relation	B-Algorithm
symbol	I-Algorithm
)	O
with	O
some	O
valence	O
(	O
or	O
arity	O
,	O
number	O
of	O
arguments	O
)	O
greater	O
than	O
or	O
equal	O
to	O
0	O
.	O
</s>
<s>
In	O
P(x )	O
,	O
P	O
is	O
a	O
predicate	B-Algorithm
symbol	I-Algorithm
of	O
valence	O
1	O
.	O
</s>
<s>
In	O
Q(x,y )	O
,	O
Q	O
is	O
a	O
predicate	B-Algorithm
symbol	I-Algorithm
of	O
valence	O
2	O
.	O
</s>
<s>
Relations	B-Algorithm
of	O
valence	O
0	O
can	O
be	O
identified	O
with	O
propositional	O
variables	O
,	O
which	O
can	O
stand	O
for	O
any	O
statement	O
.	O
</s>
<s>
|	O
"	O
∃	B-Algorithm
"	O
<variable> <formula>	O
The	O
above	O
context-free	O
grammar	O
in	O
Backus-Naur	O
form	O
defines	O
the	O
language	O
of	O
syntactically	O
valid	O
first-order	O
formulas	O
with	O
function	O
symbols	O
and	O
predicate	B-Algorithm
symbols	I-Algorithm
up	O
to	O
arity	O
3	O
.	O
</s>
<s>
For	O
example	O
,	O
no	O
expression	O
involving	O
a	O
predicate	B-Algorithm
symbol	I-Algorithm
is	O
a	O
term	O
.	O
</s>
<s>
Predicate	B-Algorithm
symbols	I-Algorithm
.	O
</s>
<s>
If	O
P	O
is	O
an	O
n-ary	O
predicate	B-Algorithm
symbol	I-Algorithm
and	O
t1	O
,	O
...	O
,	O
tn	O
are	O
terms	O
then	O
P( t1	O
,...,	O
tn	O
)	O
is	O
a	O
formula	O
.	O
</s>
<s>
Quantifiers	B-Language
.	O
</s>
<s>
If	O
is	O
a	O
formula	O
and	O
x	O
is	O
a	O
variable	O
,	O
then	O
(	O
for	O
all	O
x	O
,	O
holds	O
)	O
and	O
(	O
there	B-Algorithm
exists	I-Algorithm
x	O
such	O
that	O
)	O
are	O
formulas	O
.	O
</s>
<s>
The	O
formulas	O
obtained	O
from	O
the	O
first	O
two	O
rules	O
are	O
said	O
to	O
be	O
atomic	B-Algorithm
formulas	I-Algorithm
.	O
</s>
<s>
is	O
a	O
formula	O
,	O
if	O
f	O
is	O
a	O
unary	O
function	O
symbol	O
,	O
P	O
a	O
unary	O
predicate	B-Algorithm
symbol	I-Algorithm
,	O
and	O
Q	O
a	O
ternary	O
predicate	B-Algorithm
symbol	I-Algorithm
.	O
</s>
<s>
The	O
role	O
of	O
the	O
parentheses	O
in	O
the	O
definition	O
is	O
to	O
ensure	O
that	O
any	O
formula	O
can	O
only	O
be	O
obtained	O
in	O
one	O
way	O
—	O
by	O
following	O
the	O
inductive	O
definition	O
(	O
i.e.	O
,	O
there	B-Algorithm
is	I-Algorithm
a	I-Algorithm
unique	I-Algorithm
parse	O
tree	O
for	O
each	O
formula	O
)	O
.	O
</s>
<s>
This	O
is	O
because	O
both	O
predicates	B-Algorithm
and	O
functions	O
can	O
only	O
accept	O
terms	O
as	O
parameters	O
,	O
but	O
the	O
first	O
parameter	O
is	O
a	O
formula	O
.	O
</s>
<s>
In	O
some	O
fields	O
,	O
it	O
is	O
common	O
to	O
use	O
infix	O
notation	O
for	O
binary	O
relations	B-Algorithm
and	O
functions	O
,	O
instead	O
of	O
the	O
prefix	O
notation	O
defined	O
above	O
.	O
</s>
<s>
Atomic	B-Algorithm
formulas	I-Algorithm
If	O
φ	O
is	O
an	O
atomic	B-Algorithm
formula	I-Algorithm
,	O
then	O
x	O
occurs	O
free	O
in	O
φ	O
if	O
and	O
only	O
if	O
x	O
occurs	O
in	O
φ	O
.	O
</s>
<s>
Moreover	O
,	O
there	O
are	O
no	O
bound	O
variables	O
in	O
any	O
atomic	B-Algorithm
formula	I-Algorithm
.	O
</s>
<s>
Quantifiers	B-Language
x	O
occurs	O
free	O
in	O
,	O
if	O
and	O
only	O
if	O
x	O
occurs	O
free	O
in	O
φ	O
and	O
x	O
is	O
a	O
different	O
symbol	O
from	O
y	O
.	O
</s>
<s>
In	O
mathematics	O
,	O
the	O
language	O
of	O
ordered	O
abelian	O
groups	O
has	O
one	O
constant	O
symbol	O
0	O
,	O
one	O
unary	O
function	O
symbol	O
−	O
,	O
one	O
binary	O
function	O
symbol	O
+	O
,	O
and	O
one	O
binary	O
relation	B-Algorithm
symbol	I-Algorithm
≤	O
.	O
</s>
<s>
The	O
expressions	O
+( x	O
,	O
y	O
)	O
=	O
0	O
and	O
≤( +( x	O
,	O
+( y	O
,	O
−( z	O
)	O
)	O
)	O
,	O
+( x	O
,	O
y	O
)	O
)	O
are	O
atomic	B-Algorithm
formulas	I-Algorithm
.	O
</s>
<s>
The	O
axioms	B-Algorithm
for	O
ordered	O
abelian	O
groups	O
can	O
be	O
expressed	O
as	O
a	O
set	O
of	O
sentences	O
in	O
the	O
language	O
.	O
</s>
<s>
An	O
interpretation	O
of	O
a	O
first-order	O
language	O
assigns	O
a	O
denotation	O
to	O
each	O
non-logical	O
symbol	O
(	O
predicate	B-Algorithm
symbol	I-Algorithm
,	O
function	O
symbol	O
,	O
or	O
constant	O
symbol	O
)	O
in	O
that	O
language	O
.	O
</s>
<s>
It	O
also	O
determines	O
a	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
that	O
specifies	O
the	O
range	O
of	O
the	O
quantifiers	B-Language
.	O
</s>
<s>
The	O
result	O
is	O
that	O
each	O
term	O
is	O
assigned	O
an	O
object	O
that	O
it	O
represents	O
,	O
each	O
predicate	B-Algorithm
is	O
assigned	O
a	O
property	O
of	O
objects	O
,	O
and	O
each	O
sentence	O
is	O
assigned	O
a	O
truth	O
value	O
.	O
</s>
<s>
In	O
this	O
way	O
,	O
an	O
interpretation	O
provides	O
semantic	O
meaning	O
to	O
the	O
terms	O
,	O
predicates	B-Algorithm
,	O
and	O
formulas	O
of	O
the	O
language	O
.	O
</s>
<s>
The	O
study	O
of	O
the	O
interpretations	O
of	O
formal	O
languages	O
is	O
called	O
formal	O
semantics	B-Application
.	O
</s>
<s>
What	O
follows	O
is	O
a	O
description	O
of	O
the	O
standard	O
or	O
Tarskian	O
semantics	B-Application
for	O
first-order	O
logic	O
.	O
</s>
<s>
(	O
It	O
is	O
also	O
possible	O
to	O
define	O
game	O
semantics	B-Application
for	O
first-order	O
logic	O
,	O
but	O
aside	O
from	O
requiring	O
the	O
axiom	B-Algorithm
of	O
choice	O
,	O
game	O
semantics	B-Application
agree	O
with	O
Tarskian	O
semantics	B-Application
for	O
first-order	O
logic	O
,	O
so	O
game	O
semantics	B-Application
will	O
not	O
be	O
elaborated	O
herein	O
.	O
)	O
</s>
<s>
The	O
structure	O
consists	O
of	O
a	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
D	O
and	O
an	O
interpretation	O
function	O
mapping	O
non-logical	O
symbols	O
to	O
predicates	B-Algorithm
,	O
functions	O
,	O
and	O
constants	O
.	O
</s>
<s>
The	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
D	O
is	O
a	O
nonempty	O
set	O
of	O
"	O
objects	O
"	O
of	O
some	O
kind	O
.	O
</s>
<s>
Intuitively	O
,	O
given	O
an	O
interpretation	O
,	O
a	O
first-order	O
formula	O
becomes	O
a	O
statement	O
about	O
these	O
objects	O
;	O
for	O
example	O
,	O
states	O
the	O
existence	O
of	O
some	O
object	O
in	O
D	O
for	O
which	O
the	O
predicate	B-Algorithm
P	O
is	O
true	O
(	O
or	O
,	O
more	O
precisely	O
,	O
for	O
which	O
the	O
predicate	B-Algorithm
assigned	O
to	O
the	O
predicate	B-Algorithm
symbol	I-Algorithm
P	O
by	O
the	O
interpretation	O
is	O
true	O
)	O
.	O
</s>
<s>
The	O
interpretation	O
of	O
an	O
n-ary	O
function	O
symbol	O
is	O
a	O
function	O
from	O
Dn	O
to	O
D	O
.	O
For	O
example	O
,	O
if	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
is	O
the	O
set	O
of	O
integers	O
,	O
a	O
function	O
symbol	O
f	O
of	O
arity	O
2	O
can	O
be	O
interpreted	O
as	O
the	O
function	O
that	O
gives	O
the	O
sum	O
of	O
its	O
arguments	O
.	O
</s>
<s>
The	O
interpretation	O
of	O
a	O
constant	O
symbol	O
(	O
a	O
function	O
symbol	O
of	O
arity	O
0	O
)	O
is	O
a	O
function	O
from	O
D0	O
(	O
a	O
set	O
whose	O
only	O
member	O
is	O
the	O
empty	O
tuple	B-Application
)	O
to	O
D	O
,	O
which	O
can	O
be	O
simply	O
identified	O
with	O
an	O
object	O
in	O
D	O
.	O
For	O
example	O
,	O
an	O
interpretation	O
may	O
assign	O
the	O
value	O
to	O
the	O
constant	O
symbol	O
.	O
</s>
<s>
The	O
interpretation	O
of	O
an	O
n-ary	O
predicate	B-Algorithm
symbol	I-Algorithm
is	O
a	O
set	O
of	O
n-tuples	O
of	O
elements	O
of	O
D	O
,	O
giving	O
the	O
arguments	O
for	O
which	O
the	O
predicate	B-Algorithm
is	O
true	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
interpretation	O
of	O
a	O
binary	O
predicate	B-Algorithm
symbol	I-Algorithm
P	O
may	O
be	O
the	O
set	O
of	O
pairs	O
of	O
integers	O
such	O
that	O
the	O
first	O
one	O
is	O
less	O
than	O
the	O
second	O
.	O
</s>
<s>
According	O
to	O
this	O
interpretation	O
,	O
the	O
predicate	B-Algorithm
P	O
would	O
be	O
true	O
if	O
its	O
first	O
argument	O
is	O
less	O
than	O
its	O
second	O
argument	O
.	O
</s>
<s>
Equivalently	O
,	O
predicate	B-Algorithm
symbols	I-Algorithm
may	O
be	O
assigned	O
boolean-valued	O
functions	O
from	O
Dn	O
to	O
.	O
</s>
<s>
A	O
formula	O
evaluates	O
to	O
true	O
or	O
false	O
given	O
an	O
interpretation	O
and	O
a	O
variable	O
assignment	O
μ	O
that	O
associates	O
an	O
element	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
with	O
each	O
variable	O
.	O
</s>
<s>
First	O
,	O
the	O
variable	O
assignment	O
μ	O
can	O
be	O
extended	O
to	O
all	O
terms	O
of	O
the	O
language	O
,	O
with	O
the	O
result	O
that	O
each	O
term	O
maps	O
to	O
a	O
single	O
element	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
.	O
</s>
<s>
Given	O
terms	O
that	O
have	O
been	O
evaluated	O
to	O
elements	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
,	O
and	O
a	O
n-ary	O
function	O
symbol	O
f	O
,	O
the	O
term	O
evaluates	O
to	O
.	O
</s>
<s>
Atomic	B-Algorithm
formulas	I-Algorithm
(	O
1	O
)	O
.	O
</s>
<s>
Atomic	B-Algorithm
formulas	I-Algorithm
(	O
2	O
)	O
.	O
</s>
<s>
A	O
formula	O
is	O
assigned	O
true	O
if	O
and	O
evaluate	O
to	O
the	O
same	O
object	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
(	O
see	O
the	O
section	O
on	O
equality	O
below	O
)	O
.	O
</s>
<s>
Existential	B-Algorithm
quantifiers	I-Algorithm
.	O
</s>
<s>
A	O
formula	O
is	O
true	O
according	O
to	O
M	O
and	O
if	O
there	B-Algorithm
exists	I-Algorithm
an	O
evaluation	O
of	O
the	O
variables	O
that	O
only	O
differs	O
from	O
regarding	O
the	O
evaluation	O
of	O
x	O
and	O
such	O
that	O
φ	O
is	O
true	O
according	O
to	O
the	O
interpretation	O
M	O
and	O
the	O
variable	O
assignment	O
.	O
</s>
<s>
Universal	O
quantifiers	B-Language
.	O
</s>
<s>
Instead	O
,	O
given	O
an	O
interpretation	O
M	O
,	O
one	O
first	O
adds	O
to	O
the	O
signature	O
a	O
collection	O
of	O
constant	O
symbols	O
,	O
one	O
for	O
each	O
element	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
in	O
M	O
;	O
say	O
that	O
for	O
each	O
d	O
in	O
the	O
domain	O
the	O
constant	O
symbol	O
cd	O
is	O
fixed	O
.	O
</s>
<s>
Existential	B-Algorithm
quantifiers	I-Algorithm
(	O
alternate	O
)	O
.	O
</s>
<s>
A	O
formula	O
is	O
true	O
according	O
to	O
M	O
if	O
there	O
is	O
some	O
d	O
in	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
such	O
that	O
holds	O
.	O
</s>
<s>
Universal	O
quantifiers	B-Language
(	O
alternate	O
)	O
.	O
</s>
<s>
A	O
formula	O
is	O
true	O
according	O
to	O
M	O
if	O
,	O
for	O
every	O
d	O
in	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
,	O
is	O
true	O
according	O
to	O
M	O
.	O
</s>
<s>
The	O
most	O
common	O
convention	O
is	O
that	O
a	O
formula	O
φ	O
with	O
free	O
variables	O
,	O
...	O
,	O
is	O
said	O
to	O
be	O
satisfied	O
by	O
an	O
interpretation	O
if	O
the	O
formula	O
φ	O
remains	O
true	O
regardless	O
which	O
individuals	O
from	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
are	O
assigned	O
to	O
its	O
free	O
variables	O
,	O
...	O
,	O
.	O
</s>
<s>
An	O
alternate	O
approach	O
to	O
the	O
semantics	B-Application
of	O
first-order	O
logic	O
proceeds	O
via	O
abstract	O
algebra	O
.	O
</s>
<s>
There	O
are	O
three	O
ways	O
of	O
eliminating	O
quantified	B-Language
variables	I-Language
from	O
first-order	O
logic	O
that	O
do	O
not	O
involve	O
replacing	O
quantifiers	B-Language
with	O
other	O
variable	O
binding	O
term	O
operators	O
:	O
</s>
<s>
Predicate	B-Algorithm
functor	O
logic	O
,	O
mainly	O
due	O
to	O
Willard	O
Quine	O
.	O
</s>
<s>
Tarski	O
and	O
Givant	O
(	O
1987	O
)	O
showed	O
that	O
the	O
fragment	O
of	O
first-order	O
logic	O
that	O
has	O
no	O
atomic	O
sentence	O
lying	O
in	O
the	O
scope	O
of	O
more	O
than	O
three	O
quantifiers	B-Language
has	O
the	O
same	O
expressive	O
power	O
as	O
relation	B-Algorithm
algebra	O
.	O
</s>
<s>
They	O
also	O
prove	O
that	O
first-order	O
logic	O
with	O
a	O
primitive	O
ordered	O
pair	O
is	O
equivalent	O
to	O
a	O
relation	B-Algorithm
algebra	O
with	O
two	O
ordered	O
pair	O
projection	O
functions	O
.	O
</s>
<s>
A	O
first-order	O
theory	O
of	O
a	O
particular	O
signature	O
is	O
a	O
set	O
of	O
axioms	B-Algorithm
,	O
which	O
are	O
sentences	O
consisting	O
of	O
symbols	O
from	O
that	O
signature	O
.	O
</s>
<s>
The	O
set	O
of	O
axioms	B-Algorithm
is	O
often	O
finite	O
or	O
recursively	O
enumerable	O
,	O
in	O
which	O
case	O
the	O
theory	O
is	O
called	O
effective	O
.	O
</s>
<s>
Some	O
authors	O
require	O
theories	O
to	O
also	O
include	O
all	O
logical	O
consequences	O
of	O
the	O
axioms	B-Algorithm
.	O
</s>
<s>
The	O
axioms	B-Algorithm
are	O
considered	O
to	O
hold	O
within	O
the	O
theory	O
and	O
from	O
them	O
other	O
sentences	O
that	O
hold	O
within	O
the	O
theory	O
can	O
be	O
derived	O
.	O
</s>
<s>
A	O
theory	O
is	O
consistent	B-General_Concept
if	O
it	O
is	O
not	O
possible	O
to	O
prove	O
a	O
contradiction	O
from	O
the	O
axioms	B-Algorithm
of	O
the	O
theory	O
.	O
</s>
<s>
A	O
theory	O
is	O
complete	O
if	O
,	O
for	O
every	O
formula	O
in	O
its	O
signature	O
,	O
either	O
that	O
formula	O
or	O
its	O
negation	O
is	O
a	O
logical	O
consequence	O
of	O
the	O
axioms	B-Algorithm
of	O
the	O
theory	O
.	O
</s>
<s>
Gödel	O
's	O
incompleteness	O
theorem	O
shows	O
that	O
effective	O
first-order	O
theories	O
that	O
include	O
a	O
sufficient	O
portion	O
of	O
the	O
theory	O
of	O
the	O
natural	O
numbers	O
can	O
never	O
be	O
both	O
consistent	B-General_Concept
and	O
complete	O
.	O
</s>
<s>
The	O
definition	O
above	O
requires	O
that	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
of	O
any	O
interpretation	O
must	O
be	O
nonempty	O
.	O
</s>
<s>
Many	O
common	O
rules	O
of	O
inference	O
are	O
only	O
valid	O
when	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
is	O
required	O
to	O
be	O
nonempty	O
.	O
</s>
<s>
This	O
rule	O
,	O
which	O
is	O
used	O
to	O
put	O
formulas	O
into	O
prenex	B-Application
normal	I-Application
form	I-Application
,	O
is	O
sound	O
in	O
nonempty	O
domains	O
,	O
but	O
unsound	O
if	O
the	O
empty	O
domain	O
is	O
permitted	O
.	O
</s>
<s>
This	O
truth	O
definition	O
requires	O
that	O
one	O
must	O
select	O
a	O
variable	O
assignment	O
function	O
( μ	O
above	O
)	O
before	O
truth	O
values	O
for	O
even	O
atomic	B-Algorithm
formulas	I-Algorithm
can	O
be	O
defined	O
.	O
</s>
<s>
A	O
deduction	O
in	O
a	O
Hilbert-style	O
deductive	O
system	O
is	O
a	O
list	O
of	O
formulas	O
,	O
each	O
of	O
which	O
is	O
a	O
logical	O
axiom	B-Algorithm
,	O
a	O
hypothesis	O
that	O
has	O
been	O
assumed	O
for	O
the	O
derivation	O
at	O
hand	O
,	O
or	O
follows	O
from	O
previous	O
formulas	O
via	O
a	O
rule	O
of	O
inference	O
.	O
</s>
<s>
The	O
logical	O
axioms	B-Algorithm
consist	O
of	O
several	O
axiom	B-Algorithm
schemas	O
of	O
logically	O
valid	O
formulas	O
;	O
these	O
encompass	O
a	O
significant	O
amount	O
of	O
propositional	O
logic	O
.	O
</s>
<s>
The	O
rules	O
of	O
inference	O
enable	O
the	O
manipulation	O
of	O
quantifiers	B-Language
.	O
</s>
<s>
Typical	O
Hilbert-style	O
systems	O
have	O
a	O
small	O
number	O
of	O
rules	O
of	O
inference	O
,	O
along	O
with	O
several	O
infinite	O
schemas	O
of	O
logical	O
axioms	B-Algorithm
.	O
</s>
<s>
It	O
is	O
common	O
to	O
have	O
only	O
modus	O
ponens	O
and	O
universal	B-Algorithm
generalization	I-Algorithm
as	O
rules	O
of	O
inference	O
.	O
</s>
<s>
However	O
,	O
natural	O
deduction	O
systems	O
have	O
no	O
logical	O
axioms	B-Algorithm
;	O
they	O
compensate	O
by	O
adding	O
additional	O
rules	O
of	O
inference	O
that	O
can	O
be	O
used	O
to	O
manipulate	O
the	O
logical	O
connectives	O
in	O
formulas	O
in	O
the	O
proof	O
.	O
</s>
<s>
Resolution	O
is	O
commonly	O
used	O
in	O
automated	B-Application
theorem	I-Application
proving	I-Application
.	O
</s>
<s>
The	O
resolution	O
method	O
works	O
only	O
with	O
formulas	O
that	O
are	O
disjunctions	O
of	O
atomic	B-Algorithm
formulas	I-Algorithm
;	O
arbitrary	O
formulas	O
must	O
first	O
be	O
converted	O
to	O
this	O
form	O
through	O
Skolemization	B-Application
.	O
</s>
<s>
These	O
identities	O
allow	O
for	O
rearranging	O
formulas	O
by	O
moving	O
quantifiers	B-Language
across	O
other	O
connectives	O
,	O
and	O
are	O
useful	O
for	O
putting	O
formulas	O
in	O
prenex	B-Application
normal	I-Application
form	I-Application
.	O
</s>
<s>
The	O
most	O
common	O
convention	O
,	O
known	O
as	O
first-order	O
logic	O
with	O
equality	O
,	O
includes	O
the	O
equality	O
symbol	O
as	O
a	O
primitive	O
logical	O
symbol	O
which	O
is	O
always	O
interpreted	O
as	O
the	O
real	O
equality	O
relation	B-Algorithm
between	O
members	O
of	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
,	O
such	O
that	O
the	O
"	O
two	O
"	O
given	O
members	O
are	O
the	O
same	O
member	O
.	O
</s>
<s>
This	O
approach	O
also	O
adds	O
certain	O
axioms	B-Algorithm
about	O
equality	O
to	O
the	O
deductive	O
system	O
employed	O
.	O
</s>
<s>
These	O
equality	O
axioms	B-Algorithm
are	O
:	O
</s>
<s>
These	O
are	O
axiom	B-Algorithm
schemas	O
,	O
each	O
of	O
which	O
specifies	O
an	O
infinite	O
set	O
of	O
axioms	B-Algorithm
.	O
</s>
<s>
Many	O
other	O
properties	O
of	O
equality	O
are	O
consequences	O
of	O
the	O
axioms	B-Algorithm
above	O
,	O
for	O
example	O
:	O
</s>
<s>
An	O
alternate	O
approach	O
considers	O
the	O
equality	O
relation	B-Algorithm
to	O
be	O
a	O
non-logical	O
symbol	O
.	O
</s>
<s>
If	O
an	O
equality	O
relation	B-Algorithm
is	O
included	O
in	O
the	O
signature	O
,	O
the	O
axioms	B-Algorithm
of	O
equality	O
must	O
now	O
be	O
added	O
to	O
the	O
theories	O
under	O
consideration	O
,	O
if	O
desired	O
,	O
instead	O
of	O
being	O
considered	O
rules	O
of	O
logic	O
.	O
</s>
<s>
That	O
is	O
,	O
the	O
equality	O
relation	B-Algorithm
may	O
now	O
be	O
interpreted	O
by	O
an	O
arbitrary	O
equivalence	O
relation	B-Algorithm
on	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
that	O
is	O
congruent	O
with	O
respect	O
to	O
the	O
functions	O
and	O
relations	B-Algorithm
of	O
the	O
interpretation	O
.	O
</s>
<s>
First-order	O
logic	O
without	O
equality	O
is	O
often	O
employed	O
in	O
the	O
context	O
of	O
second-order	O
arithmetic	O
and	O
other	O
higher-order	O
theories	O
of	O
arithmetic	O
,	O
where	O
the	O
equality	O
relation	B-Algorithm
between	O
sets	O
of	O
natural	O
numbers	O
is	O
usually	O
omitted	O
.	O
</s>
<s>
The	O
theory	O
may	O
not	O
have	O
all	O
instances	O
of	O
the	O
above	O
schemas	O
as	O
axioms	B-Algorithm
,	O
but	O
rather	O
as	O
derivable	O
theorems	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
theories	O
with	O
no	O
function	O
symbols	O
and	O
a	O
finite	O
number	O
of	O
relations	B-Algorithm
,	O
it	O
is	O
possible	O
to	O
define	O
equality	O
in	O
terms	O
of	O
the	O
relations	B-Algorithm
,	O
by	O
defining	O
the	O
two	O
terms	O
s	O
and	O
t	O
to	O
be	O
equal	O
if	O
any	O
relation	B-Algorithm
is	O
unchanged	O
by	O
changing	O
s	O
to	O
t	O
in	O
any	O
argument	O
.	O
</s>
<s>
In	O
the	O
theory	O
of	O
partial	O
orders	O
with	O
one	O
relation	B-Algorithm
symbol	I-Algorithm
≤	O
,	O
one	O
could	O
define	O
s	O
=	O
t	O
to	O
be	O
an	O
abbreviation	O
for	O
s	O
≤	O
t	O
∧	O
t	O
≤	O
s	O
.	O
</s>
<s>
In	O
set	O
theory	O
with	O
one	O
relation	B-Algorithm
∈	O
,	O
one	O
may	O
define	O
s	O
=	O
t	O
to	O
be	O
an	O
abbreviation	O
for	O
.	O
</s>
<s>
This	O
definition	O
of	O
equality	O
then	O
automatically	O
satisfies	O
the	O
axioms	B-Algorithm
for	O
equality	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
one	O
should	O
replace	O
the	O
usual	O
axiom	B-Algorithm
of	O
extensionality	O
,	O
which	O
can	O
be	O
stated	O
as	O
,	O
with	O
an	O
alternative	O
formulation	O
,	O
which	O
says	O
that	O
if	O
sets	O
x	O
and	O
y	O
have	O
the	O
same	O
elements	O
,	O
then	O
they	O
also	O
belong	O
to	O
the	O
same	O
sets	O
.	O
</s>
<s>
One	O
motivation	O
for	O
the	O
use	O
of	O
first-order	O
logic	O
,	O
rather	O
than	O
higher-order	B-Algorithm
logic	I-Algorithm
,	O
is	O
that	O
first-order	O
logic	O
has	O
many	O
metalogical	O
properties	O
that	O
stronger	O
logics	O
do	O
not	O
have	O
.	O
</s>
<s>
Gödel	O
's	O
completeness	O
theorem	O
,	O
proved	O
by	O
Kurt	O
Gödel	O
in	O
1929	O
,	O
establishes	O
that	O
there	O
are	O
sound	O
,	O
complete	O
,	O
effective	O
deductive	O
systems	O
for	O
first-order	O
logic	O
,	O
and	O
thus	O
the	O
first-order	O
logical	O
consequence	O
relation	B-Algorithm
is	O
captured	O
by	O
finite	O
provability	O
.	O
</s>
<s>
Naively	O
,	O
the	O
statement	O
that	O
a	O
formula	O
φ	O
logically	O
implies	O
a	O
formula	O
ψ	O
depends	O
on	O
every	O
model	O
of	O
φ	O
;	O
these	O
models	O
will	O
in	O
general	O
be	O
of	O
arbitrarily	O
large	O
cardinality	B-Application
,	O
and	O
so	O
logical	O
consequence	O
cannot	O
be	O
effectively	O
verified	O
by	O
checking	O
every	O
model	O
.	O
</s>
<s>
Unlike	O
propositional	O
logic	O
,	O
first-order	O
logic	O
is	O
undecidable	O
(	O
although	O
semidecidable	O
)	O
,	O
provided	O
that	O
the	O
language	O
has	O
at	O
least	O
one	O
predicate	B-Algorithm
of	O
arity	O
at	O
least	O
2	O
(	O
other	O
than	O
equality	O
)	O
.	O
</s>
<s>
There	O
are	O
systems	O
weaker	O
than	O
full	O
first-order	O
logic	O
for	O
which	O
the	O
logical	O
consequence	O
relation	B-Algorithm
is	O
decidable	O
.	O
</s>
<s>
These	O
include	O
propositional	O
logic	O
and	O
monadic	B-Application
predicate	I-Application
logic	I-Application
,	O
which	O
is	O
first-order	O
logic	O
restricted	O
to	O
unary	O
predicate	B-Algorithm
symbols	I-Algorithm
and	O
no	O
function	O
symbols	O
.	O
</s>
<s>
The	O
Bernays	B-Algorithm
–	I-Algorithm
Schönfinkel	I-Algorithm
class	I-Algorithm
of	O
first-order	O
formulas	O
is	O
also	O
decidable	O
.	O
</s>
<s>
Decidable	O
subsets	O
of	O
first-order	O
logic	O
are	O
also	O
studied	O
in	O
the	O
framework	O
of	O
description	B-Language
logics	I-Language
.	O
</s>
<s>
The	O
Löwenheim	O
–	O
Skolem	O
theorem	O
shows	O
that	O
if	O
a	O
first-order	O
theory	O
of	O
cardinality	B-Application
λ	O
has	O
an	O
infinite	O
model	O
,	O
then	O
it	O
has	O
models	O
of	O
every	O
infinite	O
cardinality	B-Application
greater	O
than	O
or	O
equal	O
to	O
λ	O
.	O
</s>
<s>
That	O
is	O
,	O
there	O
is	O
no	O
first-order	O
formula	O
φ(x )	O
such	O
that	O
an	O
arbitrary	O
structure	O
M	O
satisfies	O
φ	O
if	O
and	O
only	O
if	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
of	O
M	O
is	O
countable	O
(	O
or	O
,	O
in	O
the	O
second	O
case	O
,	O
uncountable	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
is	O
no	O
first-order	O
theory	O
whose	O
only	O
model	O
is	O
the	O
real	O
line	O
:	O
any	O
first-order	O
theory	O
with	O
an	O
infinite	O
model	O
also	O
has	O
a	O
model	O
of	O
cardinality	B-Application
larger	O
than	O
the	O
continuum	O
.	O
</s>
<s>
This	O
implies	O
that	O
if	O
a	O
formula	O
is	O
a	O
logical	O
consequence	O
of	O
an	O
infinite	O
set	O
of	O
first-order	O
axioms	B-Algorithm
,	O
then	O
it	O
is	O
a	O
logical	O
consequence	O
of	O
some	O
finite	O
number	O
of	O
those	O
axioms	B-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
many	O
situations	O
can	O
be	O
modeled	O
as	O
a	O
directed	O
graph	O
of	O
states	O
(	O
nodes	O
)	O
and	O
connections	O
(	O
directed	O
edges	O
)	O
.	O
</s>
<s>
However	O
,	O
the	O
compactness	O
theorem	O
can	O
be	O
used	O
to	O
show	O
that	O
connected	O
graphs	O
are	O
not	O
an	O
elementary	O
class	O
in	O
first-order	O
logic	O
,	O
and	O
there	O
is	O
no	O
formula	O
φ(x,y )	O
of	O
first-order	O
logic	O
,	O
in	O
the	O
logic	O
of	O
graphs	O
,	O
that	O
expresses	O
the	O
idea	O
that	O
there	O
is	O
a	O
path	O
from	O
x	O
to	O
y	O
.	O
Connectedness	O
can	O
be	O
expressed	O
in	O
second-order	O
logic	O
,	O
however	O
,	O
but	O
not	O
with	O
only	O
existential	O
set	B-Language
quantifiers	I-Language
,	O
as	O
also	O
enjoys	O
compactness	O
.	O
</s>
<s>
A	O
logical	O
system	O
satisfying	O
Lindström	O
's	O
definition	O
that	O
has	O
a	O
semidecidable	O
logical	O
consequence	O
relation	B-Algorithm
and	O
satisfies	O
the	O
Löwenheim	O
–	O
Skolem	O
theorem	O
must	O
be	O
equivalent	O
to	O
first-order	O
logic	O
.	O
</s>
<s>
Although	O
first-order	O
logic	O
is	O
sufficient	O
for	O
formalizing	O
much	O
of	O
mathematics	O
,	O
and	O
is	O
commonly	O
used	O
in	O
computer	B-General_Concept
science	I-General_Concept
and	O
other	O
fields	O
,	O
it	O
has	O
certain	O
limitations	O
.	O
</s>
<s>
This	O
has	O
led	O
to	O
the	O
study	O
of	O
interesting	O
decidable	O
fragments	O
,	O
such	O
as	O
C2	O
:	O
first-order	O
logic	O
with	O
two	O
variables	O
and	O
the	O
counting	B-Algorithm
quantifiers	I-Algorithm
and	O
.	O
</s>
<s>
The	O
Löwenheim	O
–	O
Skolem	O
theorem	O
shows	O
that	O
if	O
a	O
first-order	O
theory	O
has	O
any	O
infinite	O
model	O
,	O
then	O
it	O
has	O
infinite	O
models	O
of	O
every	O
cardinality	B-Application
.	O
</s>
<s>
Many	O
extensions	O
of	O
first-order	O
logic	O
,	O
including	O
infinitary	O
logics	O
and	O
higher-order	B-Algorithm
logics	I-Algorithm
,	O
are	O
more	O
expressive	O
in	O
the	O
sense	O
that	O
they	O
do	O
permit	O
categorical	O
axiomatizations	O
of	O
the	O
natural	O
numbers	O
or	O
real	O
numbers	O
.	O
</s>
<s>
First-order	O
logic	O
is	O
able	O
to	O
formalize	O
many	O
simple	O
quantifier	B-Language
constructions	O
in	O
natural	O
language	O
,	O
such	O
as	O
"	O
every	O
person	O
who	O
lives	O
in	O
Perth	O
lives	O
in	O
Australia	O
"	O
.	O
</s>
<s>
"	O
Any	O
logical	O
system	O
which	O
is	O
appropriate	O
as	O
an	O
instrument	O
for	O
the	O
analysis	O
of	O
natural	O
language	O
needs	O
a	O
much	O
richer	O
structure	O
than	O
first-order	O
predicate	B-Algorithm
logic	O
"	O
.	O
</s>
<s>
Example	O
requires	O
a	O
quantifier	B-Language
over	O
predicates	B-Algorithm
,	O
which	O
cannot	O
be	O
implemented	O
in	O
single-sorted	O
first-order	O
logic	O
:	O
.	O
</s>
<s>
Quantification	B-Language
over	O
properties	O
Santa	O
Claus	O
has	O
all	O
the	O
attributes	O
of	O
a	O
sadist	O
.	O
</s>
<s>
Example	O
requires	O
quantifiers	B-Language
over	O
predicates	B-Algorithm
,	O
which	O
cannot	O
be	O
implemented	O
in	O
single-sorted	O
first-order	O
logic	O
:	O
.	O
</s>
<s>
Predicate	B-Algorithm
adverbial	O
John	O
is	O
walking	O
quickly	O
.	O
</s>
<s>
Example	O
cannot	O
be	O
analysed	O
as	O
;	O
predicate	B-Algorithm
adverbials	O
are	O
not	O
the	O
same	O
kind	O
of	O
thing	O
as	O
second-order	O
predicates	B-Algorithm
such	O
as	O
colour	O
.	O
</s>
<s>
Example	O
cannot	O
be	O
analysed	O
as	O
;	O
predicate	B-Algorithm
adjectives	O
are	O
not	O
the	O
same	O
kind	O
of	O
thing	O
as	O
second-order	O
predicates	B-Algorithm
such	O
as	O
colour	O
.	O
</s>
<s>
Predicate	B-Algorithm
adverbial	O
modifier	O
John	O
is	O
walking	O
very	O
quickly	O
.	O
</s>
<s>
The	O
preposition	O
"	O
next	O
to	O
"	O
when	O
applied	O
to	O
"	O
John	O
"	O
results	O
in	O
the	O
predicate	B-Algorithm
adverbial	O
"	O
next	O
to	O
John	O
"	O
.	O
</s>
<s>
Some	O
of	O
these	O
are	O
inessential	O
in	O
the	O
sense	O
that	O
they	O
merely	O
change	O
notation	O
without	O
affecting	O
the	O
semantics	B-Application
.	O
</s>
<s>
Others	O
change	O
the	O
expressive	O
power	O
more	O
significantly	O
,	O
by	O
extending	O
the	O
semantics	B-Application
through	O
additional	O
quantifiers	B-Language
or	O
other	O
new	O
logical	O
symbols	O
.	O
</s>
<s>
Because	O
can	O
be	O
expressed	O
as	O
,	O
and	O
can	O
be	O
expressed	O
as	O
,	O
either	O
of	O
the	O
two	O
quantifiers	B-Language
and	O
can	O
be	O
dropped	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
entirely	O
avoid	O
function	O
symbols	O
and	O
constant	O
symbols	O
,	O
rewriting	O
them	O
via	O
predicate	B-Algorithm
symbols	I-Algorithm
in	O
an	O
appropriate	O
way	O
.	O
</s>
<s>
For	O
example	O
,	O
instead	O
of	O
using	O
a	O
constant	O
symbol	O
one	O
may	O
use	O
a	O
predicate	B-Algorithm
(	O
interpreted	O
as	O
)	O
,	O
and	O
replace	O
every	O
predicate	B-Algorithm
such	O
as	O
with	O
.	O
</s>
<s>
A	O
function	O
such	O
as	O
will	O
similarly	O
be	O
replaced	O
by	O
a	O
predicate	B-Algorithm
interpreted	O
as	O
.	O
</s>
<s>
This	O
change	O
requires	O
adding	O
additional	O
axioms	B-Algorithm
to	O
the	O
theory	O
at	O
hand	O
,	O
so	O
that	O
interpretations	O
of	O
the	O
predicate	B-Algorithm
symbols	I-Algorithm
used	O
have	O
the	O
correct	O
semantics	B-Application
.	O
</s>
<s>
Restrictions	O
such	O
as	O
these	O
are	O
useful	O
as	O
a	O
technique	O
to	O
reduce	O
the	O
number	O
of	O
inference	O
rules	O
or	O
axiom	B-Algorithm
schemas	O
in	O
deductive	O
systems	O
,	O
which	O
leads	O
to	O
shorter	O
proofs	O
of	O
metalogical	O
results	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
restrict	O
the	O
arities	O
of	O
function	O
symbols	O
and	O
predicate	B-Algorithm
symbols	I-Algorithm
,	O
in	O
sufficiently	O
expressive	O
theories	O
.	O
</s>
<s>
One	O
can	O
in	O
principle	O
dispense	O
entirely	O
with	O
functions	O
of	O
arity	O
greater	O
than	O
2	O
and	O
predicates	B-Algorithm
of	O
arity	O
greater	O
than	O
1	O
in	O
theories	O
that	O
include	O
a	O
pairing	O
function	O
.	O
</s>
<s>
It	O
is	O
also	O
sufficient	O
to	O
have	O
two	O
predicate	B-Algorithm
symbols	I-Algorithm
of	O
arity	O
2	O
that	O
define	O
projection	O
functions	O
from	O
an	O
ordered	O
pair	O
to	O
its	O
components	O
.	O
</s>
<s>
In	O
either	O
case	O
it	O
is	O
necessary	O
that	O
the	O
natural	O
axioms	B-Algorithm
for	O
a	O
pairing	O
function	O
and	O
its	O
projections	O
are	O
satisfied	O
.	O
</s>
<s>
Ordinary	O
first-order	O
interpretations	O
have	O
a	O
single	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
over	O
which	O
all	O
quantifiers	B-Language
range	O
.	O
</s>
<s>
One	O
introduces	O
into	O
the	O
single-sorted	O
theory	O
a	O
unary	O
predicate	B-Algorithm
symbol	I-Algorithm
for	O
each	O
sort	O
in	O
the	O
many-sorted	O
theory	O
,	O
and	O
adds	O
an	O
axiom	B-Algorithm
saying	O
that	O
these	O
unary	O
predicates	B-Algorithm
partition	O
the	O
domain	B-Algorithm
of	I-Algorithm
discourse	I-Algorithm
.	O
</s>
<s>
One	O
can	O
quantify	O
over	O
each	O
sort	O
by	O
using	O
the	O
corresponding	O
predicate	B-Algorithm
symbol	I-Algorithm
to	O
limit	O
the	O
range	O
of	O
quantification	B-Language
.	O
</s>
<s>
Additional	O
quantifiers	B-Language
can	O
be	O
added	O
to	O
first-order	O
logic	O
.	O
</s>
<s>
This	O
notation	O
,	O
called	O
uniqueness	O
quantification	B-Language
,	O
may	O
be	O
taken	O
to	O
abbreviate	O
a	O
formula	O
such	O
as	O
.	O
</s>
<s>
First-order	O
logic	O
with	O
extra	O
quantifiers	B-Language
has	O
new	O
quantifiers	B-Language
Qx	O
,...,	O
with	O
meanings	O
such	O
as	O
"	O
there	O
are	O
many	O
x	O
such	O
that	O
...	O
"	O
.	O
</s>
<s>
Also	O
see	O
branching	B-Algorithm
quantifiers	I-Algorithm
and	O
the	O
plural	B-Algorithm
quantifiers	I-Algorithm
of	O
George	O
Boolos	O
and	O
others	O
.	O
</s>
<s>
Bounded	O
quantifiers	B-Language
are	O
often	O
used	O
in	O
the	O
study	O
of	O
set	O
theory	O
or	O
arithmetic	O
.	O
</s>
<s>
For	O
example	O
,	O
one	O
may	O
allow	O
a	O
conjunction	O
or	O
disjunction	O
of	O
infinitely	O
many	O
formulas	O
,	O
or	O
quantification	B-Language
over	O
infinitely	O
many	O
variables	O
.	O
</s>
<s>
Infinitely	O
long	O
sentences	O
arise	O
in	O
areas	O
of	O
mathematics	O
including	O
topology	B-Architecture
and	O
model	O
theory	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
also	O
possible	O
to	O
admit	O
generalized	O
signatures	O
in	O
which	O
function	O
and	O
relation	B-Algorithm
symbols	I-Algorithm
are	O
allowed	O
to	O
have	O
infinite	O
arities	O
,	O
or	O
in	O
which	O
quantifiers	B-Language
can	O
bind	O
infinitely	O
many	O
variables	O
.	O
</s>
<s>
The	O
set	O
of	O
free	O
variables	O
in	O
a	O
formula	O
of	O
Lκω	O
can	O
have	O
any	O
cardinality	B-Application
strictly	O
less	O
than	O
κ	O
,	O
yet	O
only	O
finitely	O
many	O
of	O
them	O
can	O
be	O
in	O
the	O
scope	O
of	O
any	O
quantifier	B-Language
when	O
a	O
formula	O
appears	O
as	O
a	O
subformula	O
of	O
another	O
.	O
</s>
<s>
In	O
other	O
infinitary	O
logics	O
,	O
a	O
subformula	O
may	O
be	O
in	O
the	O
scope	O
of	O
infinitely	O
many	O
quantifiers	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Lκ∞	O
,	O
a	O
single	O
universal	O
or	O
existential	B-Algorithm
quantifier	I-Algorithm
may	O
bind	O
arbitrarily	O
many	O
variables	O
simultaneously	O
.	O
</s>
<s>
Similarly	O
,	O
the	O
logic	O
Lκλ	O
permits	O
simultaneous	O
quantification	B-Language
over	O
fewer	O
than	O
λ	O
variables	O
,	O
as	O
well	O
as	O
conjunctions	O
and	O
disjunctions	O
of	O
size	O
less	O
than	O
κ	O
.	O
</s>
<s>
With	O
standard	O
first-order	O
logic	O
we	O
have	O
a	O
single	O
domain	O
and	O
each	O
predicate	B-Algorithm
is	O
assigned	O
one	O
extension	O
.	O
</s>
<s>
With	O
first-order	O
modal	O
logic	O
we	O
have	O
a	O
domain	O
function	O
that	O
assigns	O
each	O
possible	O
world	O
its	O
own	O
domain	O
,	O
so	O
that	O
each	O
predicate	B-Algorithm
gets	O
an	O
extension	O
only	O
relative	O
to	O
these	O
possible	O
worlds	O
.	O
</s>
<s>
First-order	B-General_Concept
fuzzy	I-General_Concept
logics	I-General_Concept
are	O
first-order	O
extensions	O
of	O
propositional	O
fuzzy	O
logics	O
rather	O
than	O
classical	O
propositional	O
calculus	O
.	O
</s>
<s>
The	O
characteristic	O
feature	O
of	O
first-order	O
logic	O
is	O
that	O
individuals	O
can	O
be	O
quantified	O
,	O
but	O
not	O
predicates	B-Algorithm
.	O
</s>
<s>
Second-order	O
logic	O
extends	O
first-order	O
logic	O
by	O
adding	O
the	O
latter	O
type	O
of	O
quantification	B-Language
.	O
</s>
<s>
Other	O
higher-order	B-Algorithm
logics	I-Algorithm
allow	O
quantification	B-Language
over	O
even	O
higher	O
types	O
than	O
second-order	O
logic	O
permits	O
.	O
</s>
<s>
These	O
higher	O
types	O
include	O
relations	B-Algorithm
between	O
relations	B-Algorithm
,	O
functions	O
from	O
relations	B-Algorithm
to	O
relations	B-Algorithm
between	O
relations	B-Algorithm
,	O
and	O
other	O
higher-type	O
objects	O
.	O
</s>
<s>
Unlike	O
first-order	O
logic	O
,	O
for	O
which	O
only	O
one	O
semantics	B-Application
is	O
studied	O
,	O
there	O
are	O
several	O
possible	O
semantics	B-Application
for	O
second-order	O
logic	O
.	O
</s>
<s>
The	O
most	O
commonly	O
employed	O
semantics	B-Application
for	O
second-order	O
and	O
higher-order	B-Algorithm
logic	I-Algorithm
is	O
known	O
as	O
full	O
semantics	B-Application
.	O
</s>
<s>
The	O
combination	O
of	O
additional	O
quantifiers	B-Language
and	O
the	O
full	O
semantics	B-Application
for	O
these	O
quantifiers	B-Language
makes	O
higher-order	B-Algorithm
logic	I-Algorithm
stronger	O
than	O
first-order	O
logic	O
.	O
</s>
<s>
In	O
particular	O
,	O
the	O
(	O
semantic	O
)	O
logical	O
consequence	O
relation	B-Algorithm
for	O
second-order	O
and	O
higher-order	B-Algorithm
logic	I-Algorithm
is	O
not	O
semidecidable	O
;	O
there	O
is	O
no	O
effective	O
deduction	O
system	O
for	O
second-order	O
logic	O
that	O
is	O
sound	O
and	O
complete	O
under	O
full	O
semantics	B-Application
.	O
</s>
<s>
Second-order	O
logic	O
with	O
full	O
semantics	B-Application
is	O
more	O
expressive	O
than	O
first-order	O
logic	O
.	O
</s>
<s>
For	O
example	O
,	O
it	O
is	O
possible	O
to	O
create	O
axiom	B-Algorithm
systems	O
in	O
second-order	O
logic	O
that	O
uniquely	O
characterize	O
the	O
natural	O
numbers	O
and	O
the	O
real	O
line	O
.	O
</s>
<s>
The	O
cost	O
of	O
this	O
expressiveness	O
is	O
that	O
second-order	O
and	O
higher-order	B-Algorithm
logics	I-Algorithm
have	O
fewer	O
attractive	O
metalogical	O
properties	O
than	O
first-order	O
logic	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Löwenheim	O
–	O
Skolem	O
theorem	O
and	O
compactness	O
theorem	O
of	O
first-order	O
logic	O
become	O
false	O
when	O
generalized	O
to	O
higher-order	B-Algorithm
logics	I-Algorithm
with	O
full	O
semantics	B-Application
.	O
</s>
<s>
Automated	B-Application
theorem	I-Application
proving	I-Application
refers	O
to	O
the	O
development	O
of	O
computer	O
programs	O
that	O
search	O
and	O
find	O
derivations	O
(	O
formal	O
proofs	O
)	O
of	O
mathematical	O
theorems	O
.	O
</s>
<s>
Finding	O
derivations	O
is	O
a	O
difficult	O
task	O
because	O
the	O
search	B-Application
space	I-Application
can	O
be	O
very	O
large	O
;	O
an	O
exhaustive	O
search	O
of	O
every	O
possible	O
derivation	O
is	O
theoretically	O
possible	O
but	O
computationally	O
infeasible	O
for	O
many	O
systems	O
of	O
interest	O
in	O
mathematics	O
.	O
</s>
<s>
Thus	O
complicated	O
heuristic	B-Algorithm
functions	I-Algorithm
are	O
developed	O
to	O
attempt	O
to	O
find	O
a	O
derivation	O
in	O
less	O
time	O
than	O
a	O
blind	O
search	O
.	O
</s>
<s>
The	O
related	O
area	O
of	O
automated	B-Application
proof	I-Application
verification	O
uses	O
computer	O
programs	O
to	O
check	O
that	O
human-created	O
proofs	O
are	O
correct	O
.	O
</s>
<s>
Unlike	O
complicated	O
automated	B-Application
theorem	I-Application
provers	I-Application
,	O
verification	O
systems	O
may	O
be	O
small	O
enough	O
that	O
their	O
correctness	O
can	O
be	O
checked	O
both	O
by	O
hand	O
and	O
through	O
automated	O
software	O
verification	O
.	O
</s>
<s>
Some	O
proof	O
verifiers	O
,	O
such	O
as	O
Metamath	B-Application
,	O
insist	O
on	O
having	O
a	O
complete	O
derivation	O
as	O
input	O
.	O
</s>
<s>
Others	O
,	O
such	O
as	O
Mizar	B-Language
and	O
Isabelle	B-Application
,	O
take	O
a	O
well-formatted	O
proof	O
sketch	O
(	O
which	O
may	O
still	O
be	O
very	O
long	O
and	O
detailed	O
)	O
and	O
fill	O
in	O
the	O
missing	O
pieces	O
by	O
doing	O
simple	O
proof	O
searches	O
or	O
applying	O
known	O
decision	O
procedures	O
:	O
the	O
resulting	O
derivation	O
is	O
then	O
verified	O
by	O
a	O
small	O
core	O
"	O
kernel	O
"	O
.	O
</s>
<s>
Automated	B-Application
theorem	I-Application
provers	I-Application
are	O
also	O
used	O
to	O
implement	O
formal	O
verification	O
in	O
computer	B-General_Concept
science	I-General_Concept
.	O
</s>
<s>
In	O
this	O
setting	O
,	O
theorem	O
provers	O
are	O
used	O
to	O
verify	O
the	O
correctness	O
of	O
programs	O
and	O
of	O
hardware	O
such	O
as	O
processors	B-Device
with	O
respect	O
to	O
a	O
formal	B-Application
specification	I-Application
.	O
</s>
<s>
For	O
the	O
problem	O
of	O
model	B-Application
checking	I-Application
,	O
efficient	O
algorithms	O
are	O
known	O
to	O
decide	O
whether	O
an	O
input	O
finite	O
structure	O
satisfies	O
a	O
first-order	O
formula	O
,	O
in	O
addition	O
to	O
computational	O
complexity	O
bounds	O
:	O
see	O
.	O
</s>
