Beruflich Dokumente
Kultur Dokumente
2012)
The solutions must be handed in directly before (very latest: at the beginning of ) the exercise
course on Wednesday, 06.06.2012, 11:45, in lecture hall AH 2. Alternatively you can drop your solutions into a box which is located right next to Prof. Giesl's oce (until the exercise course starts).
Please write the names and immatriculation numbers of all (two) students on your solution. Also
Exercise 1 (Composition):
(2 points)
Let D1 , D2 , and D3 be domains with complete orders 1 , 2 , 3 , respectively. Let f : D1 D2 and g : D2 D3 be continuous functions. Show that the composition g f : D1 D3 is also continuous.
(2 + 4 = 6 points)
is monotonic. You should not make use of the fact that sum is computable and hence also monotonic. Instead you should prove monotonicity of sum directly.
b) sum
is continuous. You should not make use of the fact that sum is computable and hence also continous. Instead you should prove continuity of sum directly. Hints: It is probably a good idea to use Lemma 2.1.11 and Theorem 2.1.15 in your proof.
(1 + 1 + 2 + 3 = 7 points)
times :: (Int,Int) -> Int times = \(x,y) -> if x <= 0 then 0 else y + times (x-1,y)
The semantics fact of fact is the least xpoint of f_fact (where for all x 0 we dene x! = 1):
fact (x) = x!, if x Z , otherwise
(a) Give the Haskell denitions for the higher-order functions f_three, f_inf, and f_times corresponding to three, inf, and times. (b) Give the semantics f_three , f_inf , and f_times of the functions f_three, f_inf, and f_times.
n (c) What does the function n f () compute for n N, f {f_three, f_inf, f_times}? Here, f () denotes n applications of f to the undened function .
(d) Give all xpoints of the semantic functions f_three , f_inf , and f_times from (b). Which ones are the least xpoints?