如何证明每个列表xs都符合以下条件:
undefined ++ xs = undefined
答案 0 :(得分:7)
没有太多要证明的。只有一条规则(无法解释或分解为更小的规则)case
语句尝试将undefined
与构造函数匹配,导致undefined
。一旦接受此规则,我们就可以观察
undefined ++ ys
= { by definition of ++ }
case undefined of
[] -> ys
x:xs -> x : (xs ++ ys)
= { case that matches undefined against a constructor }
undefined