Getting Started
For the fourth class, we are going to take a look at proof objects by way of an exercise in Agda. Agda is a great proof assistant for looking at proof objects because it's deliberately minimalistic when it comes to automation.
It is because of this minimalism that, to write proofs in Agda, you really have to understand how proof objects work. And in my experience, having a strong grasp of proof objects makes it much easier to build proof automation of all kinds---from the traditional proof automation we'll see next week, all the way to the neural networks we'll see in later classes. This is why we're starting in Agda and building up from there.
Installation can be finicky, so please install the artifact before class using the instructions below. If you have any trouble, please post your questions in this thread. You can also drop any installation tips you have in that thread.
Installation Instructions
- Install Agda from source using cabal or stack by following these instructions. This took me 20 minutes on Ubuntu, with most of that time waiting for Agda 2.6.2.1 to compile.
- Set up agda-mode for Emacs using these instructions on the same page. This took me a few seconds on Ubuntu, after I resolved some path issues by creating symlinks to the agda and agda-mode binaries from /usr/bin.
- You are now done setting up Agda. You do not need the standard library for this artifact. (You can install it if you want, but we won't be using it.)
- To test your Agda setup, download this copy of the hello world file from the instructions.
- Next, compile the hello world file in Emacs using these instructions. The first time you do this, you will be asked for a backend---type GHC and press enter.
- Next, run the resulting compiled hello-world file (without the .agda extension). This should print "Hello world!"
- Download this file---we will hack on this in class! An HTML version is here if you'd like to browse it online.
If installation fails, and the class forums are no help, do not panic; we will try to match you with someone in class for whom installation worked.
You can find the exercise we will do together in class below.