This chapter describes what you can do from inside the goals buffer, providing support for these features exists for your proof assistant. As of Proof General 3.0, it only exists for LEGO. If you would like to see subterm activation support for Proof General in another proof assistant, please petition the developers of that proof assistant to provide it!
When you are developing a proof, the input focus (Emacs cursor) is usually on the script buffer. Therefore Proof General binds mouse buttons for commands in the goals buffer, to avoid the need to move the cursor between buffers.
The mouse bindings are these:
pg-goals-button-action
proof-undo-and-delete-last-successful-command
pg-goals-yank-subterm
Where button2 indicates the middle mouse button, and button3 indicates the right hand mouse button.
The idea is that you can automatically construct parts of a proof by clicking. Using the middle mouse button asks the proof assistant to try to do a step in the proof, based on where you click. If you don't like the command which was inserted into the script, you can use the control key with the middle button to undo the step, and delete it from your script.
Note that proof-by-pointing may construct several commands in one go. These are sent back to the proof assistant altogether and appear as a single step in the proof script. However, if the proof is later replayed (without using PBP), the proof-by-pointing constructions will be considered as separate proof commands, as usual.
The event is used to find the smallest subterm around a point. A position code for the subterm is sent to the proof assistant, to ask it to construct an appropriate proof command. The command which is constructed will be inserted at the end of the locked region in the proof script buffer, and immediately sent back to the proof assistant. If it succeeds, the locked region will be extended to cover the proof-by-pointing command, just as for any proof command the user types by hand.
Proof-by-pointing uses markup describing the term structure of the concrete syntax output by the proof assistant. This markup is useful in itself: it allows you to explore the structure of a term using the mouse (the smallest subexpression that the mouse is over is highlighted), and easily copy subterms from the output to a proof script.
The right-hand mouse button provides this convenient way to copy
subterms from the goals buffer, using the function
pg-goals-yank-subterm
.
The event is used to find the smallest subterm around a point. The
subterm is copied to the kill-ring
, and immediately yanked (copied)
into the current buffer at the current cursor position.
In case the current buffer is the goals buffer itself, the yank is not performed. Then the subterm can be retrieved later by an explicit yank.
Go to the first, previous, next, last section, table of contents.