Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bare-bones documentation to pass the lint test
- Loading branch information
Yann Leray
committed
Sep 14, 2023
1 parent
aaf6060
commit a0bfcb1
Showing
7 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _rewrite_rules: | ||
|
||
User-defined rewrite rules | ||
========================== | ||
|
||
.. warning:: | ||
|
||
The status of rewrite rules is highly experimental. | ||
|
||
In particular, conversion checking through bytecode or native code | ||
compilation currently does not understand rewrite rules. | ||
|
||
|
||
Declaring symbols | ||
----------------- | ||
|
||
Rewrite rules operate on symbols, which are their own kind of constants. | ||
|
||
.. cmd:: {| Symbol | Symbols } {| {+ ( @assumpt ) } | @assumpt } | ||
:name: Symbol; Symbols | ||
|
||
Symbols are declared in the same way as axioms, using the keyword ``Symbol``. | ||
|
||
.. coqtop:: all | ||
|
||
Symbol pplus : nat -> nat -> nat. | ||
Notation "a ++ b" := (pplus a b). | ||
|
||
Declaring rules | ||
--------------- | ||
|
||
.. cmd:: Rewrite {| Rule | Rules } @ident := @rewrite_rule {* with @rewrite_rule } | ||
:name: Rewrite; Rule; Rules | ||
|
||
Rewrite rules are declared in blocks, which bear a name. | ||
|
||
.. prodn:: | ||
rewrite_rule ::= @constr ==> @constr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters