Theorem: Complex.norm_eventually_eq_of_mdifferentiableAt_of_isLocalMax
File: Mathlib/Geometry/Manifold/Complex.lean

Proof steps:
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
tactic: set e := extChartAt I c
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
tactic: have hI : range I = univ := ModelWithCorners.Boundaryless.range_eq_univ
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
tactic: have H₁ : 𝓝[range I] (e c) = 𝓝 (e c) := by rw [hI, nhdsWithin_univ]
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
tactic: have H₂ : map e.symm (𝓝 (e c)) = 𝓝 c := by
    rw [← map_extChartAt_symm_nhdsWithin_range I c, H₁]
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
⊢ ∀ᶠ (y : M) in 𝓝 c, ‖f y‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑e.symm a)‖ = ‖f c‖
tactic: rw [← H₂, eventually_map]
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hd : ∀ᶠ (z : M) in 𝓝 c, MDifferentiableAt I 𝓘(ℂ, F) f z
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑e.symm a)‖ = ‖f c‖
state_after: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
hd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑e.symm) y
⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑e.symm a)‖ = ‖f c‖
tactic: replace hd : ∀ᶠ y in 𝓝 (e c), DifferentiableAt ℂ (f ∘ e.symm) y := by
    have : e.target ∈ 𝓝 (e c) := H₁ ▸ extChartAt_target_mem_nhdsWithin I c
    filter_upwards [this, Tendsto.eventually H₂.le hd] with y hyt hy₂
    have hys : e.symm y ∈ (chartAt H c).source := by
      rw [← extChartAt_source I c]
      exact (extChartAt I c).map_target hyt
    have hfy : f (e.symm y) ∈ (chartAt F (0 : F)).source := mem_univ _
    rw [mdifferentiableAt_iff_of_mem_source hys hfy, hI, differentiableWithinAt_univ,
      e.right_inv hyt] at hy₂
    exact hy₂.2
state_before: E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
hd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑e.symm) y
⊢ ∀ᶠ (a : E) in 𝓝 (↑e c), ‖f (↑e.symm a)‖ = ‖f c‖
state_after: case h.e'_2.h.h.e'_3.h.e'_3
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
hd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑e.symm) y
x✝ : E
⊢ f c = (f ∘ ↑e.symm) (↑e c)

E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace ℂ E
F : Type u_2
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℂ F
H : Type u_3
inst✝⁵ : TopologicalSpace H
I : ModelWithCorners ℂ E H
inst✝⁴ : I.Boundaryless
M : Type u_4
inst✝³ : TopologicalSpace M
inst✝² : CompactSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SmoothManifoldWithCorners I M
f : M → F
c : M
hc : IsLocalMax (norm ∘ f) c
e : PartialEquiv M E := extChartAt I c
hI : range ↑I = univ
H₁ : 𝓝[range ↑I] ↑e c = 𝓝 (↑e c)
H₂ : map (↑e.symm) (𝓝 (↑e c)) = 𝓝 c
hd : ∀ᶠ (y : E) in 𝓝 (↑e c), DifferentiableAt ℂ (f ∘ ↑e.symm) y
⊢ IsLocalMax (norm ∘ f ∘ ↑e.symm) (↑e c)
tactic: convert norm_eventually_eq_of_isLocalMax hd _