[ << ] [ >> ] [Top] [Contents] [Index] [ ? ]

A. Obtaining and Installing

Proof General has its own home page hosted at GitHub. Visit this page for the latest news!


A.1 Obtaining Proof General

You can obtain Proof General from the URL

 
https://github.com/ProofGeneral/PG.

The distribution is available in the master branch of the repository. Tagged versions of the sources may be redistributed by third party packagers in other forms.

The sources includes the generic elisp code, and code for Coq, EasyCrypt, and other provers. Also included are installation instructions (reproduced in brief below) and this documentation.


A.2 Installing Proof General from sources

Remove old versions of Proof General, then download and install the new release from GitHub:

 
$ git clone https://github.com/ProofGeneral/PG ~/.emacs.d/lisp/PG
$ cd ~/.emacs.d/lisp/PG
$ make

Then add the following to your ‘.emacs’:

 
;; Open .v files with Proof General's Coq mode
(load "~/.emacs.d/lisp/PG/generic/proof-site")

If Proof General complains about a version mismatch, make sure that the shell’s emacs is indeed your usual Emacs. If not, run the Makefile again with an explicit path to Emacs. On macOS in particular you’ll probably need something like

 
make clean; make EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs

A.3 Setting the names of binaries

The load command you have added will load ‘proof-site’ which sets the Emacs load path for Proof General and add auto-loads and modes for the supported assistants.

The default names for proof assistant binaries may work on your system. If not, you will need to set the appropriate variables. The easiest way to do this (and most other customization of Proof General) is via the Customize mechanism, see the menu item:

 
  Proof-General -> Advanced -> Customize -> Name of Assistant -> Prog Name

The Proof-General menu is available from script buffers after Proof General is loaded. To load it manually, type

 
  M-x load-library RET proof RET

If you do not want to use customize, simply add a line like this:

 
  (setq coq-prog-name "/usr/bin/coqtop")

to your ‘.emacs’ file. For more advice on how to customize the coq-prog-name variable, see section Using file variables, Remark 2.


A.4 Notes for syssies

Here are some more notes for installing Proof General in more complex ways. Only attempt things in this section if you really understand what you’re doing!


Byte compilation

Compilation of the Emacs lisp files improves efficiency but can sometimes cause compatibility problems, especially if you use more than one version of Emacs with the same .elc files.

If you discover problems using the byte-compiled .elc files which aren’t present using the source .el files, please report them to us.

You can compile Proof General by typing make in the directory where you installed it. It may be necessary to do this if you use a different version of Emacs.


Site-wide installation

If you are installing Proof General site-wide, you can put the components in the standard directories of the filesystem if you prefer, providing the variables in ‘proof-site.el’ are adjusted accordingly (see Proof General site configuration in Adapting Proof General for more details). Make sure that the ‘generic/’ and assistant-specific elisp files are kept in subdirectories (‘coq/’, ‘phox/’, ‘easycrypt/’, ...) of proof-home-directory so that the autoload directory calculations are correct.

To prevent every user needing to edit their own ‘.emacs’ files, you can put the load-file command to load ‘proof-site.el’ into ‘site-start.el’ or similar. Consult the Emacs documentation for more details if you don’t know where to find this file.


Removing support for unwanted provers

You cannot run more than one instance of Proof General at a time: so if you’re using Coq, visiting an ‘.ec’ file will not load EasyCrypt Proof General, and the buffer remains in fundamental mode. If there are some assistants supported that you never want to use, you can adjust the variable proof-assistants in ‘proof-site.el’ to remove the extra autoloads. This is advisable in case the extensions clash with other Emacs modes, for example Verilog mode for ‘.v’ files clashes with Coq mode.

See Proof General site configuration in Adapting Proof General, for more details of how to adjust the proof-assistants setting.

Instead of altering proof-assistants, a simple way to disable support for some prover is to delete the relevant directories from the PG installation. For example, to remove support for Coq, delete the ‘coq’ directory in the Proof General home directory.


[ << ] [ >> ] [Top] [Contents] [Index] [ ? ]

This document was generated on March 27, 2024 using texi2html 1.82.