Agda implementation (WIP)