This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 298
feat(tactic/compute_degree + test/compute_degree): a tactic for computing nat_degree
s of polynomials
#14040
Closed
Conversation
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
mathlib-dependent-issues-bot
added
the
blocked-by-other-PR
This PR depends on another PR which is still in the queue. A bot manages this label via PR comment.
label
May 9, 2022
adomani
added
the
modifies-tactic-syntax
This PR adds a new interactive tactic or modifies the syntax of an existing tactic.
label
May 9, 2022
Closed
1 task
adomani
added
t-meta
Tactics, attributes or user commands
awaiting-review
The author would like community review of the PR
labels
May 9, 2022
eric-wieser
reviewed
May 11, 2022
eric-wieser
reviewed
May 11, 2022
eric-wieser
reviewed
May 11, 2022
eric-wieser
reviewed
May 11, 2022
Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
@eric-wieser
Overall, the main issue left for me is that of the speed of the tactic: it seems quite slow, but I do not know how to speed it up. |
joelriou
pushed a commit
that referenced
this pull request
Jul 23, 2022
… for proving `f.(nat_)degree ≤ d` (#14762) This PR is a prequel to #14040. It introduces a simpler step than the actual computation of the degree. This step is used by the "main" tactic `compute_degree` defined in #14040. To help the reviewing process, I split this PR from the other one. For a very small sample of some golfing that could be done with this tactic, see [this diff](https://github.com/leanprover-community/mathlib/compare/adomani_compute_degree_le..adomani_compute_degree_le_golf), from #14776.
1 task
bors bot
pushed a commit
that referenced
this pull request
Nov 10, 2022
…ands (#13483) This PR introduces a tactic for moving summands of an expression. Individual terms can be named, also using pattern-matching, and moved to the beginning or to the end of the sum. #14228 shows a sample of golfing and usage of `move_add`, and the [diff](aa_sort...adomani_move_add_random_golf) between them. #14618 contains the doc-string update to `ac_change`: I moved it to a separate PR to save CI cycles. See `compute_degree` in #14040 for a related tactic to compute `degree`s and `nat_degree`s of polynomials that uses `move_add`. ~~A future PR may add support for sorting also factors of a product, though this may happen after the switch to Lean4.~~ Co-authored-by: Arthur Paulino <arthurleonardo.ap@gmail.com>
mathlib-dependent-issues-bot
removed
the
blocked-by-other-PR
This PR depends on another PR which is still in the queue. A bot manages this label via PR comment.
label
Nov 10, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
modifies-tactic-syntax
This PR adds a new interactive tactic or modifies the syntax of an existing tactic.
t-meta
Tactics, attributes or user commands
too-late
This PR was ready too late for inclusion in mathlib3
WIP
Work in progress
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
compute_degree
tries to solve a goal of the formf.nat_degree = d
orf.degree = d
, whered : ℕ
andf
satisfies:
f
is a sum of expression of the formC a * X ^ n, C a * X, C a, X ^ n, X, monomial n a, monomial n a * monomial m b
,n
inmonomial n a
are closed terms of typeℕ
,X ^ n
and is the unique term of its degree (repetitions areallowed in terms of smaller degree).
If the given degree does not match what the tactic computes, the tactic suggests the degree it
computed.
The tactic also reports when it is used with non-closed natural numbers as exponents.
There is a further tactic
compute_degree_le
, closing goals of the formf.nat_degree ≤ d
, with similar, but slightly less stringent restrictions inf
. Currently,compute_degree_le
does not supportdegree
, onlynat_degree
.Zulip
f.(nat_)degree ≤ d
#14762 for the implementation ofcompute_degree_le
move_add