leanprover-community / leanprover-community/mathlib4
The simplifier fails to prove the derivative equality of a linear polynomial function whose coefficient is written before the variable
Open
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
See the example code:
import Mathlib
-- works
example (x : ℝ) : deriv (fun x ↦ x * 2 + 1) x = 2 := by
simp
-- fails
example (x : ℝ) : deriv (fun x ↦ 2 * x + 1) x = 2 := by
simp
-- fails
example (x : ℝ) : deriv (fun x ↦ 2 * x) x = 2 * 1 := by
simp
-- fails
example (x : ℝ) : deriv (fun x ↦ 2 * x ^ 1) x = 2 * (1 * x ^ 0) := by
simp
-- works
example (x : ℝ) : deriv (fun x ↦ 2 * x ^ 2) x = 2 * (2 * x ^ 1) := by
simp
-- works
example (x : ℝ) : deriv (fun x ↦ 2 * x ^ 3) x = 2 * (3 * x ^ 2) := by
simp
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failing and passing examples using deriv and simp in the issue body, then inspect the simplification rules involved in derivative expressions and multiplication order. The work is done when the coefficient-before-variable examples simplify to the stated equalities without regressing the existing polynomial cases.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100