ϵ">]>
Literature.
[1] J. Komara. Specification and Verification of Programs. Downloadable lecture notes available through the web page of the course.
[2] J. Komara and P. J. Voda. Metamathematics of Computer Programming. 2001.
Chapter. Programs Operating on Lists.
Section. Operations on Lists.
###
Map. Given the function f (x) , define the function Mapf (x) such that
Verify your implementation!
##
List modification. Define the function x [i≔a] such that
Zip and unzip. Define the functions Zip (x,y) and Unzip (z) such that
and
Verify your implementations!
Take and drop. Define the functions Take (n,x) and Drop (n,x) such that
Interval. Define the function [m .. n) such that
Exercise. Prove
List minimum. Define the function Minl (x) such that
List maximum. Define the function Maxl (x) such that
Deleting elements from lists. Define the function Delall (a,x) such that
Filter. Given the predicate A , define the function FilterA (x) such that
Multiplicity. Define the function #a (x) such that
Remark. The x =* y is the characteristic function of the binary equality predicate x=y and it is defined in the module Maux*.
List union. Define the function ⋃x such that