diff options
| author | Kazuhiko Sakaguchi | 2020-06-20 20:45:15 +0900 |
|---|---|---|
| committer | Kazuhiko Sakaguchi | 2020-06-20 21:58:49 +0900 |
| commit | 8095d7d14cea6937346b960063d90cbb159612df (patch) | |
| tree | 609ea84add5d5fca94882e104872b2970749fc57 /doc | |
| parent | 43dba0d74b6cc39eea149c2908291e9108d21e71 (diff) | |
Add a pre-hook mechanism for the `zify` tactic
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/changelog/04-tactics/12552-zify-pre-hook.rst | 4 | ||||
| -rw-r--r-- | doc/sphinx/addendum/micromega.rst | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/changelog/04-tactics/12552-zify-pre-hook.rst b/doc/changelog/04-tactics/12552-zify-pre-hook.rst new file mode 100644 index 0000000000..975c917b19 --- /dev/null +++ b/doc/changelog/04-tactics/12552-zify-pre-hook.rst @@ -0,0 +1,4 @@ +- **Added:** + Thhe :tacn:`zify` tactic can now be extended by redefining the `zify_pre_hook` + tactic. (`#12552 <https://github.com/coq/coq/pull/12552>`_, + by Kazuhiko Sakaguchi). diff --git a/doc/sphinx/addendum/micromega.rst b/doc/sphinx/addendum/micromega.rst index c4947e6b3a..c01e6a5aa6 100644 --- a/doc/sphinx/addendum/micromega.rst +++ b/doc/sphinx/addendum/micromega.rst @@ -278,7 +278,8 @@ obtain :math:`-1`. By Theorem :ref:`Psatz <psatz_thm>`, the goal is valid. This tactic is internally called by :tacn:`lia` to support additional types e.g., :g:`nat`, :g:`positive` and :g:`N`. By requiring the module ``ZifyBool``, the boolean type :g:`bool` and some comparison operators are also supported. - :tacn:`zify` can also be extended by rebinding the tactic `Zify.zify_post_hook` that is run immediately after :tacn:`zify`. + :tacn:`zify` can also be extended by rebinding the tactics `Zify.zify_pre_hook` and `Zify.zify_post_hook` that are + respectively run in the first and the last steps of :tacn:`zify`. + To support :g:`Z.div` and :g:`Z.modulo`: ``Ltac Zify.zify_post_hook ::= Z.div_mod_to_equations``. + To support :g:`Z.quot` and :g:`Z.rem`: ``Ltac Zify.zify_post_hook ::= Z.quot_rem_to_equations``. |
