Invoking Proof General
Interactively developing proofs using qrhl-tool is done using Proof General. There are several ways to invoke ProofGeneral with qRHL-support.
Invocation script
You can use the invocation script in the qrhl-tool installation directory.
Steps:
- Make sure emacsis in the path. (Runningemacsin the shell should start emacs.)
- Run proofgeneral.shorproofgeneral.sh filename.qrhlin the qrhl-tool installation directory. (On Windows:proofgeneral.ps1)
- Open files with extension .qrhlto edit proofs.
Note:
- You can add the command-line parameter -qto disable loading of your.emacsfile (Emacs configuration file) if needed. (E.g., if your Emacs configuration loads a conflicting version of ProofGeneral.)
Pros:
- No additional installation necessary.
Cons:
- A fresh Emacs instance will be used, you might not like this depending on your preferences.
- Potential conflicts between your existing Emacs configuration (in the .emacsfile). Use the-qoption to deactivate loading your.emacsfile (and thus any preexisting configuration).
Install Proof General via MELPA
The official distribution of Proof General contains support for qrhl-tool. You can simply install the most current version via MELPA. See the Proof General installation instructions. (Other distributions of Proof General may not be up-to-date enough.)
Pros:
- Automatic installation
- Your usual Emacs configuration is used.
- Quite up-to-date. (Only beaten by the repository version or the Proof General included in the development snapshot of qrhl-tool.)
Cons:
- Needs to be separately installed (as compared to the invocation script).
Configure Emacs to use the contributed Proof General
You can configure Emacs to use the Proof General version that comes with qrhl-tool.
Steps:
- Edit your Emacs configuration file (~/.emacson Linux/Mac, for Windows see here).
- Add the line (require 'proof-site "QRHL_TOOL/proofgeneral/proof-general")to that file. HereQRHL_TOOLshould be replaced by the path to the qrhl-tool installation directory.
- Run emacsnormally.
- Open files with extension .qrhlto edit proofs.
Pros:
- Your usual Emacs configuration is used.
Cons:
- Manual configuration.
- If your system already has Proof General installed, it is not obvious which version Emacs will use.
Optional extra step:
- In Emacs, do C-0 M-x byte-recompile-directoryand pass the directoryQRHL_TOOL/proofgeneralwhen asked. This speeds up loading. Needed only once. Repeat when updatingqrhl-tool.
Repository version of the qRHL-supporting Proof General
Similar to the previous solution, only with the most up-to-date version of the qRHL-support.
Steps:
- Clone/download the git repository https://github.com/dominique-unruh/proofgeneral/tree/qrhl-tool. (Important: make sure to check out theqrhl-toolbranch.)
- Edit your Emacs configuration file (~/.emacson Linux/Mac, for Windows see here).
- Add the line (require 'proof-site "PROOFGENERAL/generic/proof-site")to that file. HerePROOFGENERALshould be replaced by the path to the checked-out repository.
- Run emacsnormally.
- Open files with extension .qrhlto edit proofs.
Pros:
- Your usual Emacs configuration is used.
- Newest possible version of the qRHL-support in Proof General.
Cons:
- Manual configuration.
- If your system already has Proof General installed, it is not obvious which version Emacs will use.
Optional extra step:
- In Emacs, do C-0 M-x byte-recompile-directoryand pass the directoryPROOFGENERALwhen asked. This speeds up loading. Needed only once. Repeat when updatingqrhl-tool.