Program transformation concerns the derivation of an efficient program by applying correctness-preserving manipulations to a source program. Transformation is a lengthy process, and it is important to keep user interaction to a manageable level by automating the transformation steps. In this thesis I present an automated technique for transforming a program by changing the data types in that program to ones which are more appropriate for the task. Programs are constructed by proving synthesis theorems in the proofs-as-programs paradigm. Programs are transformed by modifying their synthesis theorems and relating the modified theorem to the original. Proof transformation allows more powerful transformations than program transform...