chore(Tactic): rewrite reduce_mod_char tactic docstring#37929
chore(Tactic): rewrite reduce_mod_char tactic docstring#37929Vierkantor wants to merge 2 commits intoleanprover-community:masterfrom
reduce_mod_char tactic docstring#37929Conversation
This PR rewrites the docstrings for the `reduce_mod_char` tactic, to consistently match the official style guide, to make sure they are complete while not getting too long.
PR summary 062adc5c07Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
| /-- | ||
| The tactic `reduce_mod_char` looks for numeric expressions in characteristic `p` | ||
| and reduces these to lie between `0` and `p`. | ||
| `reduce_mod_char` rewrites the main goal by looking for numeric subexpressions in characteristic `p` |
There was a problem hiding this comment.
I prefer "expressions" over "subexpressions". I don't think the "sub" really adds anything useful. (Though it seems that later in the original version, they do use "subexpression")
And more generally, I like the original phrasing of this sentence.
| hypothesis in the context. (Limitations of the typeclass system mean the tactic can't search for a | ||
| `CharP R n` instance if `n` is not yet known; use | ||
| `have : CharP R n := inferInstance; reduce_mod_char!` as a workaround.) |
| and reducing these to lie between `0` and `p`. | ||
|
|
||
| For example: | ||
| The expressions are found by pattern matching on their inferred type, unless expensive mode is |
There was a problem hiding this comment.
This went from "uses the type of the subexpression" to "by pattern matching on their inferred type". The latter includes metaprogramming jargon like "pattern matching" and "inferred type", which I think makes the doc-strings harder to read for new users.
This PR rewrites the docstrings for the
reduce_mod_chartactic, to consistently match the official style guide, to make sure they are complete while not getting too long.