Clausal Language (ver. 5.81.16, by P.J. Voda, J. Komara, J. Kluka)
Chapter. Numeric Programs.
|
|
Section. Definitions of Predicates.
|
|
Subsection. Explicit Definitions of Predicates.
|
|
[CL] Bounded formulas. Examples:
-
atomic formulas:
,
,
-
propositional connectives:
,
,
,
,
,
, and
,
-
bounded quantifiers:
,
,
, and
.
|
|
[CL] Explicit definitions of predicates with bounded formulas. Examples:
|
|
-predicates.
-predicates are defined by bounded formulas in the language of first-order arithmetic
(decimal constants, addition, multiplication, comparision predicates).
|
|
Square. Show that the predicate
is a
-predicate.
|
|
Sum of two squares. Find a
-definition of the predicate
which holds if
is the sum of two squares.
|
|
|
|
Divisibility. Find a
-definition of the divisibility predicate.
|
|
Primes. Show that the predicate
holding of prime numbers is a
-predicate.
|
|
Powers of two. Show that the predicate
is a
-predicate.
|
|
Powers of four. Show that the predicate
is a
-predicate.
|
|
Powers of a prime. Show that there is a binary
-predicate
such that
|
|
|
|
Powers of primes. Show that the predicate
is a
-predicate.
|
|
|
|
Subsection. Recursive Definitions of Predicates.
|
|
Exercise. Find a primitive recursive definition of the characteristic
function
of the predicate
based on the property
Do not use default clauses!
|
|
Exercise. Transform the above function definition to a clausal definition
of the predicate
.
Hint. Recall that we have
|
|
Exercise. Find a primitive recursive definition of the characteristic
function
of the predicate
which is based on the property
Do not use default clauses!
|
|
Exercise. Transform the above function definition to a clausal definition
of the predicate
.
|
|
Heap used: 346336 free: 133870252
Time used: 0:0:0:9