Miscellaneous Agda code.