Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Try doing some basic maths questions in the Lean Theorem Prover. Functions, real numbers, equivalence relations and groups. Click on README.md and then on "Open in CoCalc with one click".
License: APACHE
Hole commands
Both VS Code and emacs support integration for 'hole commands'.
In VS Code, if you enter {! !}
, a small light bulb symbol will appear, and clicking on it gives a drop down menu of available hole commands. Running one of these will replace the {! !}
with whatever text that hole command provides.
In emacs, you can do something similar with C-c SPC
.
Many of these commands are available whenever tactic.core
is imported. Commands that require additional imports are noted below. All should be available with import tactic
.
eqn_stub
Invoking hole command Equations Stub
("Generate a list of equations for a recursive definition") in
produces:
A similar result can be obtained by invoking Equations Stub
on the following:
match_stub
invoking hole command Match Stub
("Generate a list of equations for a match
expression") in
produces:
instance_stub
Invoking the hole command Instance Stub
("Generate a skeleton for the structure under construction") on
produces
tidy
(Requires import tactic.tidy
.)
Invoking the hole command tidy
("Use tidy
to complete the goal") runs the tactic of the same name, replacing the hole with the tactic script tidy
produces.
library_search
(Requires import tactic.suggest
.)
Invoking the hole command library_search
("Use library_search
to complete the goal") calls the tactic library_search
to produce a proof term with the type of the hole.
Running it on
produces
lint
(Requires import tactic.lint
.)
Invoking the hole command lint
("Find common mistakes in current file") will print text that indicates mistakes made in the file above the command. It is equivalent to copying and pasting the output of #lint
. On large files, it may take some time before the output appears.
list_constructors
When the type of the hole is an inductive type, invoking list_constructors
("Show the list of constructors of the expected type") will produce a list of all the constructors of that inductive type.
When used in the following hole:
the command will produce:
and will display: