I have made an emacs file trial_agda.agda
with the following code:
module trial_agda where
data π : Set where
zero : π
suc : π β π
data _even : π β Set where
ZERO : zero even
STEP : β x β x even β suc (suc x) even
_+_ : π β π β π
(zero + n) = n
(suc n) + nβ² = suc (n + nβ²)
In http://learnyouanagda.liamoc.net/pages/proofs.html, the author writes:
Now weβll prove in Agda that four is even. Type the following into an emacs buffer, and type C-c C-l:
-- \_1 to type β
proofβ : suc (suc (suc (suc zero))) even
proofβ = ?
I typed C-c C-n
and then copied and pasted the above code. I received the error Error: First load the file.
What has gone wrong?
It is required to add the code to the same emacs file, underneath the code defining the module and the types, etc.
This was not specified in the book.