refactor(Analysis/Calculus/Gradient): ungate inner_gradient lemmas#39203
Open
FordUniver wants to merge 1 commit into
Open
refactor(Analysis/Calculus/Gradient): ungate inner_gradient lemmas#39203FordUniver wants to merge 1 commit into
FordUniver wants to merge 1 commit into
Conversation
The four `inner_gradient[Within]_[left|right]` lemmas in `Mathlib/Analysis/Calculus/Gradient/Basic.lean` required differentiability hypotheses (`DifferentiableAt`, `DifferentiableWithinAt`, plus `UniqueDiffWithinAt` for the `Within` versions). These were never necessary: `gradient` is *defined* via the Riesz isomorphism from `fderiv`, so the identification `⟪∇ f x, y⟫ = fderiv 𝕜 f x y` holds unconditionally — both sides are zero when `f` is not differentiable. Removes the hypotheses and rewrites the proofs to go through `toDual_apply_apply` and `LinearIsometryEquiv.apply_symm_apply` directly. No call-site updates needed (no current mathlib callers pass the now-redundant arguments).
PR summary d59f7b3264Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removes superfluous differentiability hypotheses (plus
UniqueDiffWithinAtfor theWithinversions) from the fourinner_gradient[Within]_[left|right]lemmas:gradientis defined as(toDual 𝕜 F).symm (fderiv 𝕜 f x), so⟪∇ f x, y⟫ = fderiv 𝕜 f x yholds unconditionally since both sides are zero whenfis not differentiable atx.Genuinely unsure about this one because the only call I currently have in my code itself has the differentiability hypothesis. But including unused (or unnecessary) assumptions seems not intentional? My best guess is that the hypotheses were included by analogy with
HasGradientAt.fderiv_apply, which genuinely needs them. This PR drops the hypotheses and rewrites the proofs through the isomorphism directly; no existing mathlib callers pass the now-redundant arguments.