More on totality
Move Idris code into its own files to verify correctness