brew install opam
brew install proof-general --with-emacs=/usr/local/bin/emacs
(This should be the executable of Emacs. You can confirm by executing 'which emacs' in a terminal window.)apt-get install m4 opam emacs proofgeneral
In a shell:
opam init && eval `opam config env`
opam repo add coq-released https://coq.inria.fr/opam/released
opam update && opam upgrade && opam install coq coq-mathcomp-ssreflect
The next step is to get an IDE for Coq working. Two of them exist:
In a shell:
opam install coqide
You should then be able to start the CoqIDE program, a GUI for Coq, by running:
coqide &
To set up your emacs Coq environment, edit emacs's config file. This file is usually called .emacs
in your home directory (or the directory where you installed Cygwin), or in a subdirectory called .emacs.d
(with various possibly names such as init.el
).
For Aquamacs, the file is probably called Preferences.el
, to be found in an appropriate directory.
This file might be empty or might not exist, in which case you can just create it. I suggest you then add the following code to that file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Load Melpa package managers (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) ;; You might already have this line ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; CUA (this is to have the standard keystrokes for cut/copy/paste) (custom-set-variables '(cua-mode t nil (cua-base))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Cursor (this is to have a cursor instead of a block) (add-to-list 'default-frame-alist '(cursor-type . bar)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Opam ;; Add opam emacs directory to the load-path (setq opam-share "OPAM_PATH") (add-to-list 'load-path (concat opam-share "/emacs/site-lisp")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Proof General (load-file "PG_PATH/generic/proof-site.el")where
OPAM_PATH
is the path that is given as the output of the shell commandopam config var share
PG_PATH
is the home path of Proof General (just check that generic/proof-site.el
exists).
For instance, for a version of Proof General installed via one of Ubuntu's package managers, this path is/usr/share/emacs/site-lisp/proofgeneral
PG-master
subdirectory of wherever you unzipped the archive.
Install emacs from https://www.gnu.org/software/emacs/download.html.
Then add Proof General by downloading and decompressing
https://github.com/ProofGeneral/PG/archive/master.zip.
Then edit emacs's config file, usually called .emacs
.
This file might be empty or might not exist, in which case you can just create it.
I suggest you then add the following code to that file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Load Melpa package managers (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) ;; You might already have this line ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; CUA (this is to have the standard keystrokes for cut/copy/paste) (custom-set-variables '(cua-mode t nil (cua-base))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Cursor (this is to have a cursor instead of a block) (add-to-list 'default-frame-alist '(cursor-type . bar)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Proof General (load-file "PG_PATH/generic/proof-site.el")where
PG_PATH
is the home path of Proof General (just check that generic/proof-site.el
exists).
For instance, for a version of Proof General installed via one of Ubuntu's package managers, this path is/usr/share/emacs/site-lisp/proofgeneral
PG-master
subdirectory of wherever you unzipped the archive.