First of all, I would like to express my gratitude towards Olivier Danvy for his invaluable guidance over the last six months along with his ability to see the potential of my abilities, even when I could not. His knowledge and good humor were a vital part in the process. I am also grateful to Ole Østerby for generously sharing his expertise about Horner's method and abstract algebra. Throughout, Markus Wüstenberg has been a wonderful office mate. I also want to thank the designers and developers of the Coq proof assistant, Proof General, Emacs, and L A T E X: these tools have been instrumental here. Coq, in particular, makes it possible for computer scientists to actually do mathematics, as unexpected as that may be. This dissertation is the punch line of six enriching years as student and also as employee in the Department of Computer Science at Aarhus University. It is also the punch line of an upbringing for which I am grateful to my family. Last but not least, I want to thank Sofie for her loving support and our many technical discussions.