-- Mathlib/Geometry/Manifold/VectorField.lean
/-- The pullback of a differentiable vector field by a `C^n` function with `2 ≤ n` is
differentiable. Version within a set at a point. -/
protected lemma _root_.MDifferentiableWithinAt.mpullbackWithin_vectorField_inter
    (hV : MDifferentiableWithinAt I' I'.tangent
      (fun (y : M') ↦ (V y : TangentBundle I' M')) t (f x₀))
    (hf : ContMDiffWithinAt I I' n f s x₀) (hf' : (mfderivWithin I I' f s x₀).IsInvertible)
    (hx₀ : x₀ ∈ s) (hs : UniqueMDiffOn I s) (hmn : 2 ≤ n) :
    MDifferentiableWithinAt I I.tangent
      (fun (y : M) ↦ (mpullbackWithin I I' f V s y : TangentBundle I M)) (s ∩ f ⁻¹' t) x₀

Proof state:
case h
𝕜 : Type u_1
inst✝¹³ : NontriviallyNormedField 𝕜
H : Type u_2
inst✝¹² : TopologicalSpace H
E : Type u_3
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝⁹ : TopologicalSpace M
inst✝⁸ : ChartedSpace H M
H' : Type u_5
inst✝⁷ : TopologicalSpace H'
E' : Type u_6
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : NormedSpace 𝕜 E'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁴ : TopologicalSpace M'
inst✝³ : ChartedSpace H' M'
f : M → M'
s : Set M
x₀ : M
V : (x : M') → TangentSpace I' x
n : WithTop ℕ∞
t : Set M'
inst✝² : IsManifold I 2 M
inst✝¹ : IsManifold I' 2 M'
inst✝ : CompleteSpace E
hV : MDifferentiableWithinAt I' I'.tangent (fun y => { proj := y, snd := V y }) t (f x₀)
hf : ContMDiffWithinAt I I' n f s x₀
hf' : (mfderivWithin I I' f s x₀).IsInvertible
hx₀ : x₀ ∈ s
hs : UniqueMDiffOn I s
hmn : 2 ≤ n
b₁ : M → M' := f
b₂ : M → M := _root_.id
v : (x : M) → TangentSpace I' (f x) := V ∘ f
ϕ : (x : M) → TangentSpace I' (f x) →L[𝕜] TangentSpace I x := fun x => (mfderivWithin I I' f s x).inverse
hv : MDifferentiableWithinAt I I'.tangent (fun x => { proj := f x, snd := v x }) (s ∩ f ⁻¹' t) x₀
this✝ :
  MDifferentiableWithinAt I 𝓘(𝕜, E →L[𝕜] E')
    (fun x => inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x (f x₀) (f x) (mfderivWithin I I' f s x)) s x₀
this :
  MDifferentiableWithinAt I 𝓘(𝕜, E' →L[𝕜] E)
    (inverse ∘ fun x =>
      inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x (f x₀) (f x) (mfderivWithin I I' f s x))
    s x₀
A : (trivializationAt E (TangentSpace I) x₀).baseSet ∈ 𝓝[s] x₀
B : f ⁻¹' (trivializationAt E' (TangentSpace I') (f x₀)).baseSet ∈ 𝓝[s] x₀
x : M
hx : x ∈ (trivializationAt E (TangentSpace I) x₀).baseSet
h'x : x ∈ f ⁻¹' (trivializationAt E' (TangentSpace I') (f x₀)).baseSet
⊢ (↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E (TangentSpace I) (b₂ x₀)) (b₂ x) hx)).comp
      ((ϕ x).comp
        ↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E' (TangentSpace I') (b₁ x₀)) (b₁ x) h'x).symm) =
    ((↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E' (TangentSpace I') (f x₀)) (f x) h'x)).comp
        ((mfderivWithin I I' f s x).comp
          ↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E (TangentSpace I) x₀) x hx).symm)).inverse

Tactic:
simp only [inverse_equiv_comp, inverse_comp_equiv, ContinuousLinearEquiv.symm_symm, ϕ]

Result:
case h
𝕜 : Type u_1
inst✝¹³ : NontriviallyNormedField 𝕜
H : Type u_2
inst✝¹² : TopologicalSpace H
E : Type u_3
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝⁹ : TopologicalSpace M
inst✝⁸ : ChartedSpace H M
H' : Type u_5
inst✝⁷ : TopologicalSpace H'
E' : Type u_6
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : NormedSpace 𝕜 E'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁴ : TopologicalSpace M'
inst✝³ : ChartedSpace H' M'
f : M → M'
s : Set M
x₀ : M
V : (x : M') → TangentSpace I' x
n : WithTop ℕ∞
t : Set M'
inst✝² : IsManifold I 2 M
inst✝¹ : IsManifold I' 2 M'
inst✝ : CompleteSpace E
hV : MDifferentiableWithinAt I' I'.tangent (fun y => { proj := y, snd := V y }) t (f x₀)
hf : ContMDiffWithinAt I I' n f s x₀
hf' : (mfderivWithin I I' f s x₀).IsInvertible
hx₀ : x₀ ∈ s
hs : UniqueMDiffOn I s
hmn : 2 ≤ n
b₁ : M → M' := f
b₂ : M → M := _root_.id
v : (x : M) → TangentSpace I' (f x) := V ∘ f
ϕ : (x : M) → TangentSpace I' (f x) →L[𝕜] TangentSpace I x := fun x => (mfderivWithin I I' f s x).inverse
hv : MDifferentiableWithinAt I I'.tangent (fun x => { proj := f x, snd := v x }) (s ∩ f ⁻¹' t) x₀
this✝ :
  MDifferentiableWithinAt I 𝓘(𝕜, E →L[𝕜] E')
    (fun x => inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x (f x₀) (f x) (mfderivWithin I I' f s x)) s x₀
this :
  MDifferentiableWithinAt I 𝓘(𝕜, E' →L[𝕜] E)
    (inverse ∘ fun x =>
      inCoordinates E (TangentSpace I) E' (TangentSpace I') x₀ x (f x₀) (f x) (mfderivWithin I I' f s x))
    s x₀
A : (trivializationAt E (TangentSpace I) x₀).baseSet ∈ 𝓝[s] x₀
B : f ⁻¹' (trivializationAt E' (TangentSpace I') (f x₀)).baseSet ∈ 𝓝[s] x₀
x : M
hx : x ∈ (trivializationAt E (TangentSpace I) x₀).baseSet
h'x : x ∈ f ⁻¹' (trivializationAt E' (TangentSpace I') (f x₀)).baseSet
⊢ (↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E (TangentSpace I) (b₂ x₀)) (b₂ x) hx)).comp
      ((mfderivWithin I I' f s x).inverse.comp
        ↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E' (TangentSpace I') (b₁ x₀)) (b₁ x) h'x).symm) =
    ((↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E (TangentSpace I) x₀) x hx)).comp
          (mfderivWithin I I' f s x).inverse).comp
      ↑(Trivialization.continuousLinearEquivAt 𝕜 (trivializationAt E' (TangentSpace I') (f x₀)) (f x) h'x).symm