Skip to content

Commit

Permalink
chore: fix some names (#4564)
Browse files Browse the repository at this point in the history
* Protect `HasFTaylorSeriesUpToOn.fderivWithin`,
  `IsBoundedBilinearMap.fderiv`, and
  `IsBoundedBilinearMap.fderivWithin`.

* Rename
  - `isBoundedBilinearMapSmul` -> `isBoundedBilinearMap_smul`;
  - `isBoundedBilinearMapMul` -> `isBoundedBilinearMap_mul`;
  - `isBoundedBilinearMapComp` -> `isBoundedBilinearMap_comp`;
  - `isBoundedBilinearMapSmulRight` -> `isBoundedBilinearMap_smulRight`;
  - `isBoundedBilinearMapCompMultilinear` -> `isBoundedBilinearMap_compMultilinear`;
  - `ContinuousLinearMap.mulLeftRightIsBoundedBilinear` -> `ContinuousLinearMap.mulLeftRight_isBoundedBilinear`;
  - `nhdsWithin_eq_nhds_within'` -> `nhdsWithin_eq_nhdsWithin'`;
  - `ContinuousWithinAt.preimage_mem_nhds_within'` -> `ContinuousWithinAt.preimage_mem_nhdsWithin'`.



Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
  • Loading branch information
3 people committed Jun 2, 2023
1 parent cdbd878 commit bac5670
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/ContDiffDef.lean
Expand Up @@ -187,7 +187,7 @@ derivative of `p m` for `m < n`, and is continuous for `m ≤ n`. This is a pred
structure HasFTaylorSeriesUpToOn (n : ℕ∞) (f : E → F) (p : E → FormalMultilinearSeries 𝕜 E F)
(s : Set E) : Prop where
zero_eq : ∀ x ∈ s, (p x 0).uncurry0 = f x
fderivWithin : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x ∈ s,
protected fderivWithin : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x ∈ s,
HasFDerivWithinAt (p · m) (p x m.succ).curryLeft s x
cont : ∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (p · m) s
#align has_ftaylor_series_up_to_on HasFTaylorSeriesUpToOn
Expand Down
14 changes: 6 additions & 8 deletions Mathlib/Analysis/Calculus/ExtendDeriv.lean
Expand Up @@ -133,10 +133,9 @@ theorem has_deriv_at_interval_left_endpoint_of_tendsto_deriv {s : Set ℝ} {e :
exact (f_diff.continuousOn y this).mono ts
have t_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e)) := by
simp only [deriv_fderiv.symm]
exact
Tendsto.comp
(isBoundedBilinearMapSmulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt
(tendsto_nhdsWithin_mono_left Ioo_subset_Ioi_self f_lim')
exact Tendsto.comp
(isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt
(tendsto_nhdsWithin_mono_left Ioo_subset_Ioi_self f_lim')
-- now we can apply `has_fderiv_at_boundary_of_differentiable`
have : HasDerivWithinAt f e (Icc a b) a := by
rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]
Expand Down Expand Up @@ -169,10 +168,9 @@ theorem has_deriv_at_interval_right_endpoint_of_tendsto_deriv {s : Set ℝ} {e :
exact (f_diff.continuousOn y this).mono ts
have t_diff' : Tendsto (fun x => fderiv ℝ f x) (𝓝[t] a) (𝓝 (smulRight 1 e)) := by
simp only [deriv_fderiv.symm]
exact
Tendsto.comp
(isBoundedBilinearMapSmulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt
(tendsto_nhdsWithin_mono_left Ioo_subset_Iio_self f_lim')
exact Tendsto.comp
(isBoundedBilinearMap_smulRight : IsBoundedBilinearMap ℝ _).continuous_right.continuousAt
(tendsto_nhdsWithin_mono_left Ioo_subset_Iio_self f_lim')
-- now we can apply `has_fderiv_at_boundary_of_differentiable`
have : HasDerivWithinAt f e (Icc b a) a := by
rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean
Expand Up @@ -104,12 +104,12 @@ theorem IsBoundedBilinearMap.differentiableWithinAt (h : IsBoundedBilinearMap
(h.differentiableAt p).differentiableWithinAt
#align is_bounded_bilinear_map.differentiable_within_at IsBoundedBilinearMap.differentiableWithinAt

theorem IsBoundedBilinearMap.fderiv (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
protected theorem IsBoundedBilinearMap.fderiv (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
fderiv 𝕜 b p = h.deriv p :=
HasFDerivAt.fderiv (h.hasFDerivAt p)
#align is_bounded_bilinear_map.fderiv IsBoundedBilinearMap.fderiv

theorem IsBoundedBilinearMap.fderivWithin (h : IsBoundedBilinearMap 𝕜 b) (p : E × F)
protected theorem IsBoundedBilinearMap.fderivWithin (h : IsBoundedBilinearMap 𝕜 b) (p : E × F)
(hxs : UniqueDiffWithinAt 𝕜 u p) : fderivWithin 𝕜 b u p = h.deriv p := by
rw [DifferentiableAt.fderivWithin (h.differentiableAt p) hxs]
exact h.fderiv p
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Analysis/Calculus/FDeriv/Mul.lean
Expand Up @@ -65,20 +65,20 @@ variable {H : Type _} [NormedAddCommGroup H] [NormedSpace 𝕜 H] {c : E → G
theorem HasStrictFDerivAt.clm_comp (hc : HasStrictFDerivAt c c' x) (hd : HasStrictFDerivAt d d' x) :
HasStrictFDerivAt (fun y => (c y).comp (d y))
((compL 𝕜 F G H (c x)).comp d' + ((compL 𝕜 F G H).flip (d x)).comp c') x :=
(isBoundedBilinearMapComp.hasStrictFDerivAt (c x, d x)).comp x <| hc.prod hd
(isBoundedBilinearMap_comp.hasStrictFDerivAt (c x, d x)).comp x <| hc.prod hd
#align has_strict_fderiv_at.clm_comp HasStrictFDerivAt.clm_comp

theorem HasFDerivWithinAt.clm_comp (hc : HasFDerivWithinAt c c' s x)
(hd : HasFDerivWithinAt d d' s x) :
HasFDerivWithinAt (fun y => (c y).comp (d y))
((compL 𝕜 F G H (c x)).comp d' + ((compL 𝕜 F G H).flip (d x)).comp c') s x :=
(isBoundedBilinearMapComp.hasFDerivAt (c x, d x)).comp_hasFDerivWithinAt x <| hc.prod hd
(isBoundedBilinearMap_comp.hasFDerivAt (c x, d x)).comp_hasFDerivWithinAt x <| hc.prod hd
#align has_fderiv_within_at.clm_comp HasFDerivWithinAt.clm_comp

theorem HasFDerivAt.clm_comp (hc : HasFDerivAt c c' x) (hd : HasFDerivAt d d' x) :
HasFDerivAt (fun y => (c y).comp (d y))
((compL 𝕜 F G H (c x)).comp d' + ((compL 𝕜 F G H).flip (d x)).comp c') x :=
(isBoundedBilinearMapComp.hasFDerivAt (c x, d x)).comp x <| hc.prod hd
(isBoundedBilinearMap_comp.hasFDerivAt (c x, d x)).comp x <| hc.prod hd
#align has_fderiv_at.clm_comp HasFDerivAt.clm_comp

theorem DifferentiableWithinAt.clm_comp (hc : DifferentiableWithinAt 𝕜 c s x)
Expand Down Expand Up @@ -183,17 +183,17 @@ variable {c : E → 𝕜'} {c' : E →L[𝕜] 𝕜'}

theorem HasStrictFDerivAt.smul (hc : HasStrictFDerivAt c c' x) (hf : HasStrictFDerivAt f f' x) :
HasStrictFDerivAt (fun y => c y • f y) (c x • f' + c'.smulRight (f x)) x :=
(isBoundedBilinearMapSmul.hasStrictFDerivAt (c x, f x)).comp x <| hc.prod hf
(isBoundedBilinearMap_smul.hasStrictFDerivAt (c x, f x)).comp x <| hc.prod hf
#align has_strict_fderiv_at.smul HasStrictFDerivAt.smul

theorem HasFDerivWithinAt.smul (hc : HasFDerivWithinAt c c' s x) (hf : HasFDerivWithinAt f f' s x) :
HasFDerivWithinAt (fun y => c y • f y) (c x • f' + c'.smulRight (f x)) s x :=
(isBoundedBilinearMapSmul.hasFDerivAt (c x, f x)).comp_hasFDerivWithinAt x <| hc.prod hf
(isBoundedBilinearMap_smul.hasFDerivAt (c x, f x)).comp_hasFDerivWithinAt x <| hc.prod hf
#align has_fderiv_within_at.smul HasFDerivWithinAt.smul

theorem HasFDerivAt.smul (hc : HasFDerivAt c c' x) (hf : HasFDerivAt f f' x) :
HasFDerivAt (fun y => c y • f y) (c x • f' + c'.smulRight (f x)) x :=
(isBoundedBilinearMapSmul.hasFDerivAt (c x, f x)).comp x <| hc.prod hf
(isBoundedBilinearMap_smul.hasFDerivAt (c x, f x)).comp x <| hc.prod hf
#align has_fderiv_at.smul HasFDerivAt.smul

theorem DifferentiableWithinAt.smul (hc : DifferentiableWithinAt 𝕜 c s x)
Expand Down
35 changes: 17 additions & 18 deletions Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
Expand Up @@ -438,30 +438,30 @@ theorem IsBoundedBilinearMap.isBoundedLinearMap_right (h : IsBoundedBilinearMap
(h.toContinuousLinearMap x).isBoundedLinearMap
#align is_bounded_bilinear_map.is_bounded_linear_map_right IsBoundedBilinearMap.isBoundedLinearMap_right

theorem isBoundedBilinearMapSmul {𝕜' : Type _} [NormedField 𝕜'] [NormedAlgebra 𝕜 𝕜'] {E : Type _}
theorem isBoundedBilinearMap_smul {𝕜' : Type _} [NormedField 𝕜'] [NormedAlgebra 𝕜 𝕜'] {E : Type _}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] [NormedSpace 𝕜' E] [IsScalarTower 𝕜 𝕜' E] :
IsBoundedBilinearMap 𝕜 fun p : 𝕜' × E => p.1 • p.2 :=
(lsmul 𝕜 𝕜' : 𝕜' →L[𝕜] E →L[𝕜] E).isBoundedBilinearMap
#align is_bounded_bilinear_map_smul isBoundedBilinearMapSmul
#align is_bounded_bilinear_map_smul isBoundedBilinearMap_smul

theorem isBoundedBilinearMapMul : IsBoundedBilinearMap 𝕜 fun p : 𝕜 × 𝕜 => p.1 * p.2 := by
theorem isBoundedBilinearMap_mul : IsBoundedBilinearMap 𝕜 fun p : 𝕜 × 𝕜 => p.1 * p.2 := by
simp_rw [← smul_eq_mul]
exact isBoundedBilinearMapSmul
#align is_bounded_bilinear_map_mul isBoundedBilinearMapMul
exact isBoundedBilinearMap_smul
#align is_bounded_bilinear_map_mul isBoundedBilinearMap_mul

theorem isBoundedBilinearMapComp :
theorem isBoundedBilinearMap_comp :
IsBoundedBilinearMap 𝕜 fun p : (F →L[𝕜] G) × (E →L[𝕜] F) => p.1.comp p.2 :=
(compL 𝕜 E F G).isBoundedBilinearMap
#align is_bounded_bilinear_map_comp isBoundedBilinearMapComp
#align is_bounded_bilinear_map_comp isBoundedBilinearMap_comp

theorem ContinuousLinearMap.isBoundedLinearMap_comp_left (g : F →L[𝕜] G) :
IsBoundedLinearMap 𝕜 fun f : E →L[𝕜] F => ContinuousLinearMap.comp g f :=
isBoundedBilinearMapComp.isBoundedLinearMap_right _
isBoundedBilinearMap_comp.isBoundedLinearMap_right _
#align continuous_linear_map.is_bounded_linear_map_comp_left ContinuousLinearMap.isBoundedLinearMap_comp_left

theorem ContinuousLinearMap.isBoundedLinearMap_comp_right (f : E →L[𝕜] F) :
IsBoundedLinearMap 𝕜 fun g : F →L[𝕜] G => ContinuousLinearMap.comp g f :=
isBoundedBilinearMapComp.isBoundedLinearMap_left _
isBoundedBilinearMap_comp.isBoundedLinearMap_left _
#align continuous_linear_map.is_bounded_linear_map_comp_right ContinuousLinearMap.isBoundedLinearMap_comp_right

theorem isBoundedBilinearMapApply : IsBoundedBilinearMap 𝕜 fun p : (E →L[𝕜] F) × E => p.1 p.2 :=
Expand All @@ -471,26 +471,26 @@ theorem isBoundedBilinearMapApply : IsBoundedBilinearMap 𝕜 fun p : (E →L[
/-- The function `ContinuousLinearMap.smulRight`, associating to a continuous linear map
`f : E → 𝕜` and a scalar `c : F` the tensor product `f ⊗ c` as a continuous linear map from `E` to
`F`, is a bounded bilinear map. -/
theorem isBoundedBilinearMapSmulRight :
theorem isBoundedBilinearMap_smulRight :
IsBoundedBilinearMap 𝕜 fun p =>
(ContinuousLinearMap.smulRight : (E →L[𝕜] 𝕜) → F → E →L[𝕜] F) p.1 p.2 :=
(smulRightL 𝕜 E F).isBoundedBilinearMap
#align is_bounded_bilinear_map_smul_right isBoundedBilinearMapSmulRight
#align is_bounded_bilinear_map_smul_right isBoundedBilinearMap_smulRight

/-- The composition of a continuous linear map with a continuous multilinear map is a bounded
bilinear operation. -/
theorem isBoundedBilinearMapCompMultilinear {ι : Type _} {E : ι → Type _} [Fintype ι]
theorem isBoundedBilinearMap_compMultilinear {ι : Type _} {E : ι → Type _} [Fintype ι]
[∀ i, NormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] :
IsBoundedBilinearMap 𝕜 fun p : (F →L[𝕜] G) × ContinuousMultilinearMap 𝕜 E F =>
p.1.compContinuousMultilinearMap p.2 :=
(compContinuousMultilinearMapL 𝕜 E F G).isBoundedBilinearMap
#align is_bounded_bilinear_map_comp_multilinear isBoundedBilinearMapCompMultilinear
#align is_bounded_bilinear_map_comp_multilinear isBoundedBilinearMap_compMultilinear

/-- Definition of the derivative of a bilinear map `f`, given at a point `p` by
`q ↦ f(p.1, q.2) + f(q.1, p.2)` as in the standard formula for the derivative of a product.
We define this function here as a linear map `E × F →ₗ[𝕜] G`, then `IsBoundedBilinearMap.deriv`
strengthens it to a continuous linear map `E × F →L[𝕜] G`.
``. -/
-/
def IsBoundedBilinearMap.linearDeriv (h : IsBoundedBilinearMap 𝕜 f) (p : E × F) : E × F →ₗ[𝕜] G :=
(h.toContinuousLinearMap.deriv₂ p).toLinearMap
#align is_bounded_bilinear_map.linear_deriv IsBoundedBilinearMap.linearDeriv
Expand All @@ -512,11 +512,11 @@ variable (𝕜)

/-- The function `ContinuousLinearMap.mulLeftRight : 𝕜' × 𝕜' → (𝕜' →L[𝕜] 𝕜')` is a bounded
bilinear map. -/
theorem ContinuousLinearMap.mulLeftRightIsBoundedBilinear (𝕜' : Type _) [NormedRing 𝕜']
theorem ContinuousLinearMap.mulLeftRight_isBoundedBilinear (𝕜' : Type _) [NormedRing 𝕜']
[NormedAlgebra 𝕜 𝕜'] :
IsBoundedBilinearMap 𝕜 fun p : 𝕜' × 𝕜' => ContinuousLinearMap.mulLeftRight 𝕜 𝕜' p.1 p.2 :=
(ContinuousLinearMap.mulLeftRight 𝕜 𝕜').isBoundedBilinearMap
#align continuous_linear_map.mul_left_right_is_bounded_bilinear ContinuousLinearMap.mulLeftRightIsBoundedBilinear
#align continuous_linear_map.mul_left_right_is_bounded_bilinear ContinuousLinearMap.mulLeftRight_isBoundedBilinear

variable {𝕜}

Expand Down Expand Up @@ -551,12 +551,11 @@ In this section we establish that the set of continuous linear equivalences betw
spaces is an open subset of the space of linear maps between them.
-/


protected theorem isOpen [CompleteSpace E] : IsOpen (range ((↑) : (E ≃L[𝕜] F) → E →L[𝕜] F)) := by
rw [isOpen_iff_mem_nhds, forall_range_iff]
refine' fun e => IsOpen.mem_nhds _ (mem_range_self _)
let O : (E →L[𝕜] F) → E →L[𝕜] E := fun f => (e.symm : F →L[𝕜] E).comp f
have h_O : Continuous O := isBoundedBilinearMapComp.continuous_right
have h_O : Continuous O := isBoundedBilinearMap_comp.continuous_right
convert show IsOpen (O ⁻¹' { x | IsUnit x }) from Units.isOpen.preimage h_O using 1
ext f'
constructor
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Topology/ContinuousOn.lean
Expand Up @@ -208,9 +208,9 @@ theorem nhdsWithin_le_nhds {a : α} {s : Set α} : 𝓝[s] a ≤ 𝓝 a := by
exact univ_mem
#align nhds_within_le_nhds nhdsWithin_le_nhds

theorem nhdsWithin_eq_nhds_within' {a : α} {s t u : Set α} (hs : s ∈ 𝓝 a) (h₂ : t ∩ s = u ∩ s) :
theorem nhdsWithin_eq_nhdsWithin' {a : α} {s t u : Set α} (hs : s ∈ 𝓝 a) (h₂ : t ∩ s = u ∩ s) :
𝓝[t] a = 𝓝[u] a := by rw [nhdsWithin_restrict' t hs, nhdsWithin_restrict' u hs, h₂]
#align nhds_within_eq_nhds_within' nhdsWithin_eq_nhds_within'
#align nhds_within_eq_nhds_within' nhdsWithin_eq_nhdsWithin'

theorem nhdsWithin_eq_nhdsWithin {a : α} {s t u : Set α} (h₀ : a ∈ s) (h₁ : IsOpen s)
(h₂ : t ∩ s = u ∩ s) : 𝓝[t] a = 𝓝[u] a := by
Expand Down Expand Up @@ -947,10 +947,10 @@ theorem Function.LeftInverse.map_nhds_eq {f : α → β} {g : β → α} {x : β
(h.leftInvOn univ).map_nhdsWithin_eq (h x) (by rwa [image_univ]) hg.continuousWithinAt
#align function.left_inverse.map_nhds_eq Function.LeftInverse.map_nhds_eq

theorem ContinuousWithinAt.preimage_mem_nhds_within' {f : α → β} {x : α} {s : Set α} {t : Set β}
theorem ContinuousWithinAt.preimage_mem_nhdsWithin' {f : α → β} {x : α} {s : Set α} {t : Set β}
(h : ContinuousWithinAt f s x) (ht : t ∈ 𝓝[f '' s] f x) : f ⁻¹' t ∈ 𝓝[s] x :=
h.tendsto_nhdsWithin (mapsTo_image _ _) ht
#align continuous_within_at.preimage_mem_nhds_within' ContinuousWithinAt.preimage_mem_nhds_within'
#align continuous_within_at.preimage_mem_nhds_within' ContinuousWithinAt.preimage_mem_nhdsWithin'

theorem Filter.EventuallyEq.congr_continuousWithinAt {f g : α → β} {s : Set α} {x : α}
(h : f =ᶠ[𝓝[s] x] g) (hx : f x = g x) : ContinuousWithinAt f s x ↔ ContinuousWithinAt g s x :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/UniformSpace/UniformConvergence.lean
Expand Up @@ -717,7 +717,7 @@ theorem TendstoLocallyUniformlyOn.comp [TopologicalSpace γ] {t : Set γ}
intro u hu x hx
rcases h u hu (g x) (hg hx) with ⟨a, ha, H⟩
have : g ⁻¹' a ∈ 𝓝[t] x :=
(cg x hx).preimage_mem_nhds_within' (nhdsWithin_mono (g x) hg.image_subset ha)
(cg x hx).preimage_mem_nhdsWithin' (nhdsWithin_mono (g x) hg.image_subset ha)
exact ⟨g ⁻¹' a, this, H.mono fun n hn y hy => hn _ hy⟩
#align tendsto_locally_uniformly_on.comp TendstoLocallyUniformlyOn.comp

Expand Down

0 comments on commit bac5670

Please sign in to comment.