ϵ">]>
Literature.
[1] J. Komara and P. J. Voda. Metamathematics of Computer Programming. 2001.
[2] J. Kľuka. Lecture Notes from Introduction to Declarative Programming Summer 2010/11.
Filling an array. Define the function such that
Hint. Define first an auxiliary function satisfying the following invariant:
Binary search. Find an efficient implementation of the array membership predicate for ordered arrays. That is, define the predicate such that
Hint. Define first an auxiliary predicate such that
Note that the condition of regularity follows from
The Dutch national flag problem. Let
Define the function such that
Hint. Define first an auxiliary function such that