l3lab/ntp-mathlib huggingface dataset:
theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) :
    MDifferentiableAt I I e.symm x := by
  refine' ⟨(e.continuousOn_symm x hx).continuousAt (IsOpen.mem_nhds e.open_target hx), _⟩
  have mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by
    simp only [hx, mfld_simps]
  have : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I :=
    HasGroupoid.compatible h (chart_mem_atlas H _)
  have A :
    ContDiffOn 𝕜 ∞ (I ∘ e.symm.trans (chartAt H (e.symm x)) ∘ I.symm)
      (I.symm ⁻¹' (e.symm.trans (chartAt H (e.symm x))).source ∩ range I) :=
    this.1
  have B := A.differentiableOn le_top (I x) mem
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x✝ : M
e : PartialHomeomorph M H
h : e ∈ atlas H M
x : H
hx : x ∈ e.target
mem :
  ↑I x ∈
    ↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I
this : PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I
A :
  ContDiffOn 𝕜 ⊤
    (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I)
B :
  DifferentiableWithinAt 𝕜
    (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I)
    (↑I x)
⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(PartialHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)

Next tactic:
simp only [mfld_simps] at B
theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) :
    MDifferentiableAt I I e.symm x := by
  refine' ⟨(e.continuousOn_symm x hx).continuousAt (IsOpen.mem_nhds e.open_target hx), _⟩
  have mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by
    simp only [hx, mfld_simps]
  have : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I :=
    HasGroupoid.compatible h (chart_mem_atlas H _)
  have A :
    ContDiffOn 𝕜 ∞ (I ∘ e.symm.trans (chartAt H (e.symm x)) ∘ I.symm)
      (I.symm ⁻¹' (e.symm.trans (chartAt H (e.symm x))).source ∩ range I) :=
    this.1
  have B := A.differentiableOn le_top (I x) mem
  simp only [mfld_simps] at B
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x✝ : M
e : PartialHomeomorph M H
h : e ∈ atlas H M
x : H
hx : x ∈ e.target
mem :
  ↑I x ∈
    ↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I
this : PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I
A :
  ContDiffOn 𝕜 ⊤
    (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I)
B :
  DifferentiableWithinAt 𝕜
    (↑I ∘ (↑(chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩
        ↑(ModelWithCorners.symm I) ⁻¹'
          (↑(PartialHomeomorph.symm e) ⁻¹' (chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source) ∩
      range ↑I)
    (↑I x)
⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(PartialHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)

Next tactic:
rw [inter_comm, differentiableWithinAt_inter] at B
theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) :
    MDifferentiableAt I I e.symm x := by
  refine' ⟨(e.continuousOn_symm x hx).continuousAt (IsOpen.mem_nhds e.open_target hx), _⟩
  have mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by
    simp only [hx, mfld_simps]
  have : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I :=
    HasGroupoid.compatible h (chart_mem_atlas H _)
  have A :
    ContDiffOn 𝕜 ∞ (I ∘ e.symm.trans (chartAt H (e.symm x)) ∘ I.symm)
      (I.symm ⁻¹' (e.symm.trans (chartAt H (e.symm x))).source ∩ range I) :=
    this.1
  have B := A.differentiableOn le_top (I x) mem
  simp only [mfld_simps] at B
  rw [inter_comm, differentiableWithinAt_inter] at B
  · 

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x✝ : M
e : PartialHomeomorph M H
h : e ∈ atlas H M
x : H
hx : x ∈ e.target
mem :
  ↑I x ∈
    ↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I
this : PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I
A :
  ContDiffOn 𝕜 ⊤
    (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I)
B :
  DifferentiableWithinAt 𝕜
    (↑I ∘ (↑(chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))
    (range ↑I) (↑I x)
⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(PartialHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)

Next tactic:
simpa only [mfld_simps]
theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) :
    MDifferentiableAt I I e.symm x := by
  refine' ⟨(e.continuousOn_symm x hx).continuousAt (IsOpen.mem_nhds e.open_target hx), _⟩
  have mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by
    simp only [hx, mfld_simps]
  have : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I :=
    HasGroupoid.compatible h (chart_mem_atlas H _)
  have A :
    ContDiffOn 𝕜 ∞ (I ∘ e.symm.trans (chartAt H (e.symm x)) ∘ I.symm)
      (I.symm ⁻¹' (e.symm.trans (chartAt H (e.symm x))).source ∩ range I) :=
    this.1
  have B := A.differentiableOn le_top (I x) mem
  simp only [mfld_simps] at B
  rw [inter_comm, differentiableWithinAt_inter] at B
  · simpa only [mfld_simps]
  · 

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x✝ : M
e : PartialHomeomorph M H
h : e ∈ atlas H M
x : H
hx : x ∈ e.target
mem :
  ↑I x ∈
    ↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I
this : PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I
A :
  ContDiffOn 𝕜 ⊤
    (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹'
        (PartialHomeomorph.symm e ≫ₕ chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source ∩
      range ↑I)
B :
  DifferentiableWithinAt 𝕜
    (↑I ∘ (↑(chartAt H (↑(PartialHomeomorph.symm e) x)) ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))
    (range ↑I ∩
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩
        ↑(ModelWithCorners.symm I) ⁻¹'
          (↑(PartialHomeomorph.symm e) ⁻¹' (chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source)))
    (↑I x)
⊢ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩
      ↑(ModelWithCorners.symm I) ⁻¹'
        (↑(PartialHomeomorph.symm e) ⁻¹' (chartAt H (↑(PartialHomeomorph.symm e) x)).toPartialEquiv.source) ∈
    𝓝 (↑I x)

Next tactic:
apply IsOpen.mem_nhds ((PartialHomeomorph.open_source _).preimage I.continuous_symm) mem.1
/-- The derivative of the chart at a base point is the chart of the tangent bundle, composed with
the identification between the tangent bundle of the model space and the product space. -/
theorem tangentMap_chart {p q : TangentBundle I M} (h : q.1 ∈ (chartAt H p.1).source) :
    tangentMap I I (chartAt H p.1) q =
      (TotalSpace.toProd _ _).symm
        ((chartAt (ModelProd H E) p : TangentBundle I M → ModelProd H E) q) := by
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p q : TangentBundle I M
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.source
⊢ tangentMap I I (↑(chartAt H p.proj)) q = (TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)

Next tactic:
dsimp [tangentMap]
/-- The derivative of the chart at a base point is the chart of the tangent bundle, composed with
the identification between the tangent bundle of the model space and the product space. -/
theorem tangentMap_chart {p q : TangentBundle I M} (h : q.1 ∈ (chartAt H p.1).source) :
    tangentMap I I (chartAt H p.1) q =
      (TotalSpace.toProd _ _).symm
        ((chartAt (ModelProd H E) p : TangentBundle I M → ModelProd H E) q) := by
  dsimp [tangentMap]
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p q : TangentBundle I M
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.source
⊢ { proj := ↑(chartAt H p.proj) q.proj, snd := (mfderiv I I (↑(chartAt H p.proj)) q.proj) q.snd } =
    (TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)

Next tactic:
rw [MDifferentiableAt.mfderiv]
/-- The derivative of the chart at a base point is the chart of the tangent bundle, composed with
the identification between the tangent bundle of the model space and the product space. -/
theorem tangentMap_chart {p q : TangentBundle I M} (h : q.1 ∈ (chartAt H p.1).source) :
    tangentMap I I (chartAt H p.1) q =
      (TotalSpace.toProd _ _).symm
        ((chartAt (ModelProd H E) p : TangentBundle I M → ModelProd H E) q) := by
  dsimp [tangentMap]
  rw [MDifferentiableAt.mfderiv]
  · 

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p q : TangentBundle I M
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.source
⊢ { proj := ↑(chartAt H p.proj) q.proj,
      snd :=
        (fderivWithin 𝕜 (writtenInExtChartAt I I q.proj ↑(chartAt H p.proj)) (range ↑I) (↑(extChartAt I q.proj) q.proj))
          q.snd } =
    (TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)

Next tactic:
rfl
/-- The derivative of the chart at a base point is the chart of the tangent bundle, composed with
the identification between the tangent bundle of the model space and the product space. -/
theorem tangentMap_chart {p q : TangentBundle I M} (h : q.1 ∈ (chartAt H p.1).source) :
    tangentMap I I (chartAt H p.1) q =
      (TotalSpace.toProd _ _).symm
        ((chartAt (ModelProd H E) p : TangentBundle I M → ModelProd H E) q) := by
  dsimp [tangentMap]
  rw [MDifferentiableAt.mfderiv]
  · rfl
  · 

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p q : TangentBundle I M
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.source
⊢ MDifferentiableAt I I (↑(chartAt H p.proj)) q.proj

Next tactic:
exact mdifferentiableAt_atlas _ (chart_mem_atlas _ _) h
/-- The derivative of the inverse of the chart at a base point is the inverse of the chart of the
tangent bundle, composed with the identification between the tangent bundle of the model space and
the product space. -/
theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
    (h : q.1 ∈ (chartAt H p.1).target) :
    tangentMap I I (chartAt H p.1).symm q =
      (chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q) := by
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p : TangentBundle I M
q : TangentBundle I H
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.target
⊢ tangentMap I I (↑(PartialHomeomorph.symm (chartAt H p.proj))) q =
    ↑(PartialHomeomorph.symm (chartAt (ModelProd H E) p)) ((TotalSpace.toProd H E) q)

Next tactic:
dsimp only [tangentMap]
/-- The derivative of the inverse of the chart at a base point is the inverse of the chart of the
tangent bundle, composed with the identification between the tangent bundle of the model space and
the product space. -/
theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
    (h : q.1 ∈ (chartAt H p.1).target) :
    tangentMap I I (chartAt H p.1).symm q =
      (chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q) := by
  dsimp only [tangentMap]
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p : TangentBundle I M
q : TangentBundle I H
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.target
⊢ { proj := ↑(PartialHomeomorph.symm (chartAt H p.proj)) q.proj,
      snd := (mfderiv I I (↑(PartialHomeomorph.symm (chartAt H p.proj))) q.proj) q.snd } =
    ↑(PartialHomeomorph.symm (chartAt (ModelProd H E) p)) ((TotalSpace.toProd H E) q)

Next tactic:
rw [MDifferentiableAt.mfderiv (mdifferentiableAt_atlas_symm _ (chart_mem_atlas _ _) h)]
/-- The derivative of the inverse of the chart at a base point is the inverse of the chart of the
tangent bundle, composed with the identification between the tangent bundle of the model space and
the product space. -/
theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
    (h : q.1 ∈ (chartAt H p.1).target) :
    tangentMap I I (chartAt H p.1).symm q =
      (chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q) := by
  dsimp only [tangentMap]
  rw [MDifferentiableAt.mfderiv (mdifferentiableAt_atlas_symm _ (chart_mem_atlas _ _) h)]
  

Proof state:
𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
inst✝ : SmoothManifoldWithCorners I'' M''
s : Set M
x : M
e : PartialHomeomorph M H
p : TangentBundle I M
q : TangentBundle I H
h : q.proj ∈ (chartAt H p.proj).toPartialEquiv.target
⊢ { proj := ↑(PartialHomeomorph.symm (chartAt H p.proj)) q.proj,
      snd :=
        (fderivWithin 𝕜 (writtenInExtChartAt I I q.proj ↑(PartialHomeomorph.symm (chartAt H p.proj))) (range ↑I)
            (↑(extChartAt I q.proj) q.proj))
          q.snd } =
    ↑(PartialHomeomorph.symm (chartAt (ModelProd H E) p)) ((TotalSpace.toProd H E) q)

Next tactic:
simp only [ContinuousLinearMap.coe_coe, TangentBundle.chartAt, h, tangentBundleCore,
    mfld_simps, (· ∘ ·)]