Skip to content

[Merged by Bors] - feat(Analysis/Calculus/DSlope): add eq_smul_dslope_of_zero and iterated version#37923

Closed
e-271828 wants to merge 6 commits intoleanprover-community:masterfrom
e-271828:add_dslope_iterate_lemmas
Closed

[Merged by Bors] - feat(Analysis/Calculus/DSlope): add eq_smul_dslope_of_zero and iterated version#37923
e-271828 wants to merge 6 commits intoleanprover-community:masterfrom
e-271828:add_dslope_iterate_lemmas

Conversation

@e-271828
Copy link
Copy Markdown
Contributor

@e-271828 e-271828 commented Apr 11, 2026

This PR adds two fundamental algebraic identities connecting a function with its dslope when the base point is a root:

  • eq_smul_dslope_of_zero: f b = (b - a) • dslope f a b when f a = 0.
  • eq_pow_smul_iterate_dslope_of_zero: The iterated version f b = (b - a) ^ n • (Function.swap dslope a)^[n] f b when the first n-1 iterated dslopes vanish at a.

These lemmas are essential for factoring out removable singularities locally.
This PR was assisted by LLMs (Aristotle and Gemini).


Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Apr 11, 2026
@github-actions
Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2026

PR summary 14ec76b5f0

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ pow_sub_smul_iterate_dslope_of_zero
+ sub_smul_dslope_of_zero

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 scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-analysis Analysis (normed *, calculus) label Apr 11, 2026
Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
Apply suggestion from wwylele to simplify proof using sub_smul_dslope

Co-authored-by: Weiyi Wang <wwylele@gmail.com>
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these seem a bit niche. Why do you want them? (sorry, this is in the PR description)

Also, given some weird things I noticed, and your username, I have to ask: are you a bot? Is this PR LLM-generated? If so, it should be marked with that tag and disclosed in the PR description.

Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
@j-loreaux j-loreaux added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 14, 2026
@e-271828
Copy link
Copy Markdown
Contributor Author

@j-loreaux
Thank you very much for your thorough review and excellent suggestions!

To answer your question: No, I am not a bot, but I am a human developer using LLMs (specifically Harmonic's Aristotle and Google's Gemini) to assist me in formalizing these theorems. I apologize for not disclosing this initially and for accidentally leaving a Japanese comment in the code. I have updated the PR description to mention the LLM assistance. Could you please add the llm-generated tag to this PR?

I completely agree with all your code suggestions. The grind tactic compression is beautiful, and removing the redundant variables makes perfect sense. I will also turn the equalities around as per Mathlib conventions and rename the lemmas accordingly.

I will apply these changes to my local branch and push the updates shortly. Thank you again for your guidance!

Copy link
Copy Markdown
Collaborator

@wwylele wwylele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the code regress? If you are blindly asking LLM to update the code without understanding it, this is wasting reviewers' time

Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
Copy link
Copy Markdown
Collaborator

@wwylele wwylele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, this has also regressed

Comment thread Mathlib/Analysis/Calculus/DSlope.lean Outdated
@e-271828
Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 18, 2026
@j-loreaux j-loreaux added the LLM-generated PRs with substantial input from LLMs - review accordingly label Apr 23, 2026
Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@mathlib-triage mathlib-triage Bot added the ready-to-merge This PR has been sent to bors. label Apr 23, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Apr 23, 2026
…ated version (#37923)

This PR adds two fundamental algebraic identities connecting a function with its `dslope` when the base point is a root:

* `eq_smul_dslope_of_zero`: `f b = (b - a) • dslope f a b` when `f a = 0`.
* `eq_pow_smul_iterate_dslope_of_zero`: The iterated version `f b = (b - a) ^ n • (Function.swap dslope a)^[n] f b` when the first `n-1` iterated dslopes vanish at `a`.

These lemmas are essential for factoring out removable singularities locally.
This PR was assisted by LLMs (Aristotle and Gemini).

Co-authored-by: e-271828 <f_s@har.bbiq.jp>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 23, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Analysis/Calculus/DSlope): add eq_smul_dslope_of_zero and iterated version [Merged by Bors] - feat(Analysis/Calculus/DSlope): add eq_smul_dslope_of_zero and iterated version Apr 23, 2026
@mathlib-bors mathlib-bors Bot closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM-generated PRs with substantial input from LLMs - review accordingly new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants