Appendix: mathematical interlude