l3lab/ntp-mathlib huggingface dataset:
theorem hasMFDerivAt_snd (x : M × M') :
    HasMFDerivAt (I.prod I') I' Prod.snd x
      (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) := by
  refine' ⟨continuous_snd.continuousAt, _⟩
  have :
    ∀ᶠ y in 𝓝[range (I.prod I')] extChartAt (I.prod I') x x,
      (extChartAt I' x.2 ∘ Prod.snd ∘ (extChartAt (I.prod I') x).symm) y = y.2 := by
    /- porting note: was
    apply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin (I.prod I') x)
    mfld_set_tac
    -/
    filter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy
    rw [extChartAt_prod] at hy
    exact (extChartAt I' x.2).right_inv hy.2
  

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
x : M × M'
this :
  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,
    (↑(extChartAt I' x.2) ∘ Prod.snd ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.2
⊢ HasFDerivWithinAt (writtenInExtChartAt (ModelWithCorners.prod I I') I' x Prod.snd)
    (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(ModelWithCorners.prod I I'))
    (↑(extChartAt (ModelWithCorners.prod I I') x) x)

Next tactic:
apply HasFDerivWithinAt.congr_of_eventuallyEq hasFDerivWithinAt_snd this
theorem hasMFDerivAt_snd (x : M × M') :
    HasMFDerivAt (I.prod I') I' Prod.snd x
      (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) := by
  refine' ⟨continuous_snd.continuousAt, _⟩
  have :
    ∀ᶠ y in 𝓝[range (I.prod I')] extChartAt (I.prod I') x x,
      (extChartAt I' x.2 ∘ Prod.snd ∘ (extChartAt (I.prod I') x).symm) y = y.2 := by
    /- porting note: was
    apply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin (I.prod I') x)
    mfld_set_tac
    -/
    filter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy
    rw [extChartAt_prod] at hy
    exact (extChartAt I' x.2).right_inv hy.2
  apply HasFDerivWithinAt.congr_of_eventuallyEq hasFDerivWithinAt_snd this
  -- porting note: the next line was `simp 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
x : M × M'
this :
  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,
    (↑(extChartAt I' x.2) ∘ Prod.snd ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.2
⊢ (↑(extChartAt I' x.2) ∘ Prod.snd ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod I I') x)))
      (↑(extChartAt (ModelWithCorners.prod I I') x) x) =
    (↑(extChartAt (ModelWithCorners.prod I I') x) x).2

Next tactic:
exact (extChartAt I' x.2).right_inv <| (extChartAt I' x.2).map_source (mem_extChartAt_source _ _)
theorem mfderivWithin_snd {s : Set (M × M')} {x : M × M'}
    (hxs : UniqueMDiffWithinAt (I.prod I') s x) :
    mfderivWithin (I.prod I') I' Prod.snd s x =
      ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2) :=
  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
s : Set (M × M')
x : M × M'
hxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x
⊢ mfderivWithin (ModelWithCorners.prod I I') I' Prod.snd s x =
    ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)

Next tactic:
rw [MDifferentiable.mfderivWithin (mdifferentiableAt_snd I I') hxs]
theorem mfderivWithin_snd {s : Set (M × M')} {x : M × M'}
    (hxs : UniqueMDiffWithinAt (I.prod I') s x) :
    mfderivWithin (I.prod I') I' Prod.snd s x =
      ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2) :=
  by rw [MDifferentiable.mfderivWithin (mdifferentiableAt_snd I I') hxs]; 

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
s : Set (M × M')
x : M × M'
hxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x
⊢ mfderiv (ModelWithCorners.prod I I') I' Prod.snd x =
    ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)

Next tactic:
exact mfderiv_snd I I'
@[simp, mfld_simps]
theorem tangentMap_prod_snd {p : TangentBundle (I.prod I') (M × M')} :
    tangentMap (I.prod I') I' Prod.snd p = ⟨p.proj.2, p.2.2⟩ := by
  -- porting note: `rfl` wasn't needed
  

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
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
⊢ tangentMap (ModelWithCorners.prod I I') I' Prod.snd p = { proj := p.proj.2, snd := p.snd.2 }

Next tactic:
simp [tangentMap]
@[simp, mfld_simps]
theorem tangentMap_prod_snd {p : TangentBundle (I.prod I') (M × M')} :
    tangentMap (I.prod I') I' Prod.snd p = ⟨p.proj.2, p.2.2⟩ := by
  -- porting note: `rfl` wasn't needed
  simp [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
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
⊢ (ContinuousLinearMap.snd 𝕜 (TangentSpace I p.proj.1) (TangentSpace I' p.proj.2)) p.snd = p.snd.2

Next tactic:
rfl
theorem tangentMapWithin_prod_snd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
    (hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
    tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := 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
s : Set (M × M')
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
hs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj
⊢ tangentMapWithin (ModelWithCorners.prod I I') I' Prod.snd s p = { proj := p.proj.2, snd := p.snd.2 }

Next tactic:
simp only [tangentMapWithin]
theorem tangentMapWithin_prod_snd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
    (hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
    tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := by
  simp only [tangentMapWithin]
  

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
s : Set (M × M')
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
hs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj
⊢ { proj := p.proj.2, snd := (mfderivWithin (ModelWithCorners.prod I I') I' Prod.snd s p.proj) p.snd } =
    { proj := p.proj.2, snd := p.snd.2 }

Next tactic:
rw [mfderivWithin_snd]
theorem tangentMapWithin_prod_snd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
    (hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
    tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := by
  simp only [tangentMapWithin]
  rw [mfderivWithin_snd]
  · 

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
s : Set (M × M')
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
hs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj
⊢ { proj := p.proj.2, snd := (ContinuousLinearMap.snd 𝕜 (TangentSpace I p.proj.1) (TangentSpace I' p.proj.2)) p.snd } =
    { proj := p.proj.2, snd := p.snd.2 }

Next tactic:
rcases p with ⟨⟩
theorem tangentMapWithin_prod_snd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
    (hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
    tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := by
  simp only [tangentMapWithin]
  rw [mfderivWithin_snd]
  · rcases p with ⟨⟩; 

Proof state:
case mk
𝕜 : 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
s : Set (M × M')
proj✝ : M × M'
snd✝ : TangentSpace (ModelWithCorners.prod I I') proj✝
hs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s { proj := proj✝, snd := snd✝ }.proj
⊢ { proj := { proj := proj✝, snd := snd✝ }.proj.2,
      snd :=
        (ContinuousLinearMap.snd 𝕜 (TangentSpace I { proj := proj✝, snd := snd✝ }.proj.1)
            (TangentSpace I' { proj := proj✝, snd := snd✝ }.proj.2))
          { proj := proj✝, snd := snd✝ }.snd } =
    { proj := { proj := proj✝, snd := snd✝ }.proj.2, snd := { proj := proj✝, snd := snd✝ }.snd.2 }

Next tactic:
rfl
theorem tangentMapWithin_prod_snd {s : Set (M × M')} {p : TangentBundle (I.prod I') (M × M')}
    (hs : UniqueMDiffWithinAt (I.prod I') s p.proj) :
    tangentMapWithin (I.prod I') I' Prod.snd s p = ⟨p.proj.2, p.2.2⟩ := by
  simp only [tangentMapWithin]
  rw [mfderivWithin_snd]
  · rcases p with ⟨⟩; rfl
  · 

Proof state:
case hxs
𝕜 : 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
s : Set (M × M')
p : TangentBundle (ModelWithCorners.prod I I') (M × M')
hs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj
⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj

Next tactic:
exact hs
theorem MDifferentiableAt.mfderiv_prod {f : M → M'} {g : M → M''} {x : M}
    (hf : MDifferentiableAt I I' f x) (hg : MDifferentiableAt I I'' g x) :
    mfderiv I (I'.prod I'') (fun x => (f x, g x)) x =
      (mfderiv I I' f x).prod (mfderiv I I'' g x) := 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
f : M → M'
g : M → M''
x : M
hf : MDifferentiableAt I I' f x
hg : MDifferentiableAt I I'' g x
⊢ mfderiv I (ModelWithCorners.prod I' I'') (fun x => (f x, g x)) x =
    ContinuousLinearMap.prod (mfderiv I I' f x) (mfderiv I I'' g x)

Next tactic:
classical
  simp_rw [mfderiv, if_pos (hf.prod_mk hg), if_pos hf, if_pos hg]
  exact hf.2.fderivWithin_prod hg.2 (I.unique_diff _ (mem_range_self _))
theorem MDifferentiableAt.mfderiv_prod {f : M → M'} {g : M → M''} {x : M}
    (hf : MDifferentiableAt I I' f x) (hg : MDifferentiableAt I I'' g x) :
    mfderiv I (I'.prod I'') (fun x => (f x, g x)) x =
      (mfderiv I I' f x).prod (mfderiv I I'' g x) := by
  classical
  

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
f : M → M'
g : M → M''
x : M
hf : MDifferentiableAt I I' f x
hg : MDifferentiableAt I I'' g x
⊢ mfderiv I (ModelWithCorners.prod I' I'') (fun x => (f x, g x)) x =
    ContinuousLinearMap.prod (mfderiv I I' f x) (mfderiv I I'' g x)

Next tactic:
simp_rw [mfderiv, if_pos (hf.prod_mk hg), if_pos hf, if_pos hg]
theorem MDifferentiableAt.mfderiv_prod {f : M → M'} {g : M → M''} {x : M}
    (hf : MDifferentiableAt I I' f x) (hg : MDifferentiableAt I I'' g x) :
    mfderiv I (I'.prod I'') (fun x => (f x, g x)) x =
      (mfderiv I I' f x).prod (mfderiv I I'' g x) := by
  classical
  simp_rw [mfderiv, if_pos (hf.prod_mk hg), if_pos hf, if_pos hg]
  

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
f : M → M'
g : M → M''
x : M
hf : MDifferentiableAt I I' f x
hg : MDifferentiableAt I I'' g x
⊢ fderivWithin 𝕜 (writtenInExtChartAt I (ModelWithCorners.prod I' I'') x fun x => (f x, g x)) (range ↑I)
      (↑(extChartAt I x) x) =
    ContinuousLinearMap.prod (fderivWithin 𝕜 (writtenInExtChartAt I I' x f) (range ↑I) (↑(extChartAt I x) x))
      (fderivWithin 𝕜 (writtenInExtChartAt I I'' x g) (range ↑I) (↑(extChartAt I x) x))

Next tactic:
exact hf.2.fderivWithin_prod hg.2 (I.unique_diff _ (mem_range_self _))
theorem mfderiv_prod_left {x₀ : M} {y₀ : M'} :
    mfderiv I (I.prod I') (fun x => (x, y₀)) x₀ =
      ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀) := 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 x₀ : M
y₀ : M'
⊢ mfderiv I (ModelWithCorners.prod I I') (fun x => (x, y₀)) x₀ =
    ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)

Next tactic:
refine' ((mdifferentiableAt_id I).mfderiv_prod (mdifferentiableAt_const I I')).trans _
theorem mfderiv_prod_left {x₀ : M} {y₀ : M'} :
    mfderiv I (I.prod I') (fun x => (x, y₀)) x₀ =
      ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀) := by
  refine' ((mdifferentiableAt_id I).mfderiv_prod (mdifferentiableAt_const I I')).trans _
  

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 x₀ : M
y₀ : M'
⊢ ContinuousLinearMap.prod (mfderiv I I id x₀) (mfderiv I I' (fun x => y₀) x₀) =
    ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)

Next tactic:
rw [mfderiv_id, mfderiv_const, ContinuousLinearMap.inl]