[Merged by Bors] - feat: add (m)differentiableAt_of_(m)fderiv_injective#35284
[Merged by Bors] - feat: add (m)differentiableAt_of_(m)fderiv_injective#35284grunweg wants to merge 5 commits intoleanprover-community:masterfrom
Conversation
This lemma generalises differentiableAt_of_isInvertible_fderiv.
PR summary 4aa0616ac5Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| · exact (differentiable_of_subsingleton x).differentiableWithinAt | ||
| · by_contra h' | ||
| rw [fderivWithin_zero_of_not_differentiableWithinAt h'] at hf | ||
| exact h { allEq a b := hf rfl } |
There was a problem hiding this comment.
Is it worth extracting a lemma "if a constant function to X is injective, then Subsingleton X"? (It is used twice.)
There was a problem hiding this comment.
Yes I think so. Furthermore how about we add the following higher up:
@[nontriviality]
theorem differentiableWithinAt_of_subsingleton [Subsingleton E] :
DifferentiableWithinAt 𝕜 f s x :=
(differentiable_of_subsingleton x).differentiableWithinAt(actually several existing lemmas above could do with the @[nontriviality] decorator)
and then:
@[simp] lemma not_injective_const {α β : Type*} [Nontrivial α] {b : β} :
¬ Injective (fun _ : α ↦ b) := by
rw [not_injective_iff]
obtain ⟨a₁, a₂, h⟩ := exists_pair_ne α
use a₁, a₂(in the right file)
so that the proof here can become:
nontriviality E
contrapose! hf
rw [fderivWithin_zero_of_not_differentiableWithinAt hf]
exact not_injective_const -- Disappointing that `simp` cannot fire here but let's live with it|
@ocfnash I have an easy differential geometry PR to review - would you like to take a look in the coming days? Thanks! |
| · exact (differentiable_of_subsingleton x).differentiableWithinAt | ||
| · by_contra h' | ||
| rw [fderivWithin_zero_of_not_differentiableWithinAt h'] at hf | ||
| exact h { allEq a b := hf rfl } |
There was a problem hiding this comment.
Yes I think so. Furthermore how about we add the following higher up:
@[nontriviality]
theorem differentiableWithinAt_of_subsingleton [Subsingleton E] :
DifferentiableWithinAt 𝕜 f s x :=
(differentiable_of_subsingleton x).differentiableWithinAt(actually several existing lemmas above could do with the @[nontriviality] decorator)
and then:
@[simp] lemma not_injective_const {α β : Type*} [Nontrivial α] {b : β} :
¬ Injective (fun _ : α ↦ b) := by
rw [not_injective_iff]
obtain ⟨a₁, a₂, h⟩ := exists_pair_ne α
use a₁, a₂(in the right file)
so that the proof here can become:
nontriviality E
contrapose! hf
rw [fderivWithin_zero_of_not_differentiableWithinAt hf]
exact not_injective_const -- Disappointing that `simp` cannot fire here but let's live with it|
✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with |
|
Great suggestions, all addressed - let's hope CI likes these changes (on the train, so I prefer avoiding a full rebuild locally). |
|
bors merge |
and versions for `(m)fderivWithin` versions. This generalises the existing lemmas `(m)differentiableAt_of_isInvertible_(m)fderiv` and friends. Extracted from #35078; from the path to immersions, embeddings and submanifolds.
|
Pull request successfully merged into master. Build succeeded:
|
…unity#35284) and versions for `(m)fderivWithin` versions. This generalises the existing lemmas `(m)differentiableAt_of_isInvertible_(m)fderiv` and friends. Extracted from leanprover-community#35078; from the path to immersions, embeddings and submanifolds.
and versions for
(m)fderivWithinversions. This generalises the existing lemmas(m)differentiableAt_of_isInvertible_(m)fderivand friends.Extracted from #35078; from the path to immersions, embeddings and submanifolds.