This preview shows page 1. Sign up to view the full content.
Unformatted text preview: member(e, [ ]) = False {mem.[ ]} member(e, (x: xs)) = ((x == e) \/ member(e, xs)) {mem.:} That is, member(e, xs) is true if the value e occurs as an element of the sequence xs, and false if it doesn't. Prove that your function maximum, from the previous problem, has the following property: member(x, xs) > ((maximum xs) >= x) Problem 4: Assume that concat satisfies the equations (concat).: and (concat).[ ] from the lectures. Prove that if there are a fi n (concat xss) = ( foldr (++) [ ] xss) Problem 5: Use the "member" predicate to define a predicate that expresses the notion that if xs is a sequence with length n ( t h Problem 6: Prove that the preservation property of "++" is true, regardless of the number of elements in its lefthand operand. Problem 7: Prove the theorem about the concat function (the big ++) that was stated in the lectures....
View
Full
Document
 Spring '08
 RexPage

Click to edit the document details