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
#23,215 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.