some old uncommited changes
make this portable to older versions of Agda
Merge branch 'master' of https://github.com/zsparks/pi-dual