ϵ">]>
Literature.
[1] J. Komara. Declarative Programming. Downloadable lecture notes available through the web page of the course.
[2] J. Kľuka. Lecture Notes from Introduction to Declarative Programming.
[3] J. Komara and P. J. Voda. Metamathematics of Computer Programming. 2001.
Summation. The following component contains a primitive recursive definition of the summation function .
Remark. Note that the definition is a special case of regular recursive clausal definition with monadic discrimination.
Fibonacci sequence. Find a course of values recursive definition of the function which computes the -th element of the Fibonacci sequence.
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 clausal definition to a predicate clausal definition.
Hint. Recall that we have