## Question 4 [10 marks]
Recall the definition of the
“ProofLayout*
type constructor:
Copyright By PowCoder代写 加微信 powcoder
infixr o :=: – the fixity and priority of the operator
data ProofLayout a = QED |
a :=: ProofLayout a deriving Show
Consider the definitions:
**’haskell
= 1+length xs
map f (xixs)
=+x:map f xs
Give a value
that proves the thßoren:
“: a -> b (length = length . (map f))
**Hintx* Use structural induction over lists.
proof4 :: (a
-> ProofLayout Int
= undefined
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com