l3lab/ntp-mathlib huggingface dataset:
protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
    extChartAt (IB.prod 𝓘(𝕜, F)) x =
      (trivializationAt F E x.proj).toPartialEquiv ≫
        (extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
  simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
  simp only [PartialEquiv.trans_assoc, mfld_simps]
  -- porting note: should not be needed
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ (trivializationAt F E x.proj).toPartialHomeomorph.toPartialEquiv ≫
      PartialEquiv.prod (chartAt HB x.proj).toPartialEquiv (PartialEquiv.refl F) ≫
        PartialEquiv.prod IB.toPartialEquiv (PartialEquiv.refl F) =
    (trivializationAt F E x.proj).toPartialHomeomorph.toPartialEquiv ≫
      PartialEquiv.prod ((chartAt HB x.proj).toPartialEquiv ≫ IB.toPartialEquiv) (PartialEquiv.refl F)

Next tactic:
rw [PartialEquiv.prod_trans, PartialEquiv.refl_trans]
protected theorem FiberBundle.extChartAt_target (x : TotalSpace F E) :
    (extChartAt (IB.prod 𝓘(𝕜, F)) x).target =
      ((extChartAt IB x.proj).target ∩
        (extChartAt IB x.proj).symm ⁻¹' (trivializationAt F E x.proj).baseSet) ×ˢ univ := by
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ (extChartAt (ModelWithCorners.prod IB 𝓘(𝕜, F)) x).target =
    ((extChartAt IB x.proj).target ∩
        ↑(PartialEquiv.symm (extChartAt IB x.proj)) ⁻¹' (trivializationAt F E x.proj).baseSet) ×ˢ
      univ

Next tactic:
rw [FiberBundle.extChartAt, PartialEquiv.trans_target, Trivialization.target_eq, inter_prod]
protected theorem FiberBundle.extChartAt_target (x : TotalSpace F E) :
    (extChartAt (IB.prod 𝓘(𝕜, F)) x).target =
      ((extChartAt IB x.proj).target ∩
        (extChartAt IB x.proj).symm ⁻¹' (trivializationAt F E x.proj).baseSet) ×ˢ univ := by
  rw [FiberBundle.extChartAt, PartialEquiv.trans_target, Trivialization.target_eq, inter_prod]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ (PartialEquiv.prod (extChartAt IB x.proj) (PartialEquiv.refl F)).target ∩
      ↑(PartialEquiv.symm (PartialEquiv.prod (extChartAt IB x.proj) (PartialEquiv.refl F))) ⁻¹'
        (trivializationAt F E x.proj).baseSet ×ˢ univ =
    (extChartAt IB x.proj).target ×ˢ univ ∩
      (↑(PartialEquiv.symm (extChartAt IB x.proj)) ⁻¹' (trivializationAt F E x.proj).baseSet) ×ˢ univ

Next tactic:
rfl
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
⊢ ContMDiffWithinAt IM (ModelWithCorners.prod IB 𝓘(𝕜, F)) n f s x₀ ↔
    ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x => (↑(trivializationAt F E (f x₀).proj) (f x)).2) s x₀

Next tactic:
simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
⊢ ContinuousWithinAt f s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, EB × F) n (↑(extChartAt (ModelWithCorners.prod IB 𝓘(𝕜, F)) (f x₀)) ∘ f) s x₀ ↔
    (ContinuousWithinAt (fun x => (f x).proj) s x₀ ∧
        ContMDiffWithinAt IM 𝓘(𝕜, EB) n (↑(extChartAt IB (f x₀).proj) ∘ fun x => (f x).proj) s x₀) ∧
      ContinuousWithinAt (fun x => (↑(trivializationAt F E (f x₀).proj) (f x)).2) s x₀ ∧
        ContMDiffWithinAt IM 𝓘(𝕜, F) n
          (↑(extChartAt 𝓘(𝕜, F) (↑(trivializationAt F E (f x₀).proj) (f x₀)).2) ∘ fun x =>
            (↑(trivializationAt F E (f x₀).proj) (f x)).2)
          s x₀

Next tactic:
rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
⊢ ContinuousWithinAt f s x₀ →
    (ContMDiffWithinAt IM 𝓘(𝕜, EB × F) n (↑(extChartAt (ModelWithCorners.prod IB 𝓘(𝕜, F)) (f x₀)) ∘ f) s x₀ ↔
      ContMDiffWithinAt IM 𝓘(𝕜, EB) n (↑(extChartAt IB (f x₀).proj) ∘ fun x => (f x).proj) s x₀ ∧
        ContMDiffWithinAt IM 𝓘(𝕜, F) n
          (↑(extChartAt 𝓘(𝕜, F) (↑(trivializationAt F E (f x₀).proj) (f x₀)).2) ∘ fun x =>
            (↑(trivializationAt F E (f x₀).proj) (f x)).2)
          s x₀)

Next tactic:
intro hf
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
⊢ ContMDiffWithinAt IM 𝓘(𝕜, EB × F) n (↑(extChartAt (ModelWithCorners.prod IB 𝓘(𝕜, F)) (f x₀)) ∘ f) s x₀ ↔
    ContMDiffWithinAt IM 𝓘(𝕜, EB) n (↑(extChartAt IB (f x₀).proj) ∘ fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n
        (↑(extChartAt 𝓘(𝕜, F) (↑(trivializationAt F E (f x₀).proj) (f x₀)).2) ∘ fun x =>
          (↑(trivializationAt F E (f x₀).proj) (f x)).2)
        s x₀

Next tactic:
simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
⊢ ContMDiffWithinAt IM (ModelWithCorners.prod 𝓘(𝕜, EB) 𝓘(𝕜, F)) n
      (fun x =>
        (↑(extChartAt IB (f x₀).proj) (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).1,
          (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).2))
      s x₀ ↔
    ContMDiffWithinAt IM 𝓘(𝕜, EB) n (fun x => ↑(extChartAt IB (f x₀).proj) (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x => (↑(trivializationAt F E (f x₀).proj) (f x)).2) s x₀

Next tactic:
refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
  refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
⊢ ContMDiffWithinAt IM 𝓘(𝕜, EB) n
      (Prod.fst ∘ fun x =>
        (↑(extChartAt IB (f x₀).proj) (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).1,
          (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).2))
      s x₀ ↔
    ContMDiffWithinAt IM 𝓘(𝕜, EB) n (fun x => ↑(extChartAt IB (f x₀).proj) (f x).proj) s x₀

Next tactic:
have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
      ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
  refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
  have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
      ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀
⊢ ContMDiffWithinAt IM 𝓘(𝕜, EB) n
      (Prod.fst ∘ fun x =>
        (↑(extChartAt IB (f x₀).proj) (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).1,
          (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).2))
      s x₀ ↔
    ContMDiffWithinAt IM 𝓘(𝕜, EB) n (fun x => ↑(extChartAt IB (f x₀).proj) (f x).proj) s x₀

Next tactic:
refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
  refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
  have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
      ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
  refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
  · 

Proof state:
case refine_1
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀
x : M
hx : x ∈ (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet
⊢ (Prod.fst ∘ fun x =>
        (↑(extChartAt IB (f x₀).proj) (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).1,
          (↑(trivializationAt F E (f x₀).proj).toPartialHomeomorph.toPartialEquiv (f x)).2))
      x =
    (fun x => ↑(extChartAt IB (f x₀).proj) (f x).proj) x

Next tactic:
simp_rw [Function.comp, PartialHomeomorph.coe_coe, Trivialization.coe_coe]
/-- Characterization of C^n functions into a smooth vector bundle. -/
theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by
  simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
  rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
  intro hf
  simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
    PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe, extChartAt_self_apply,
    modelWithCornersSelf_coe, id_def]
  refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
  have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
    ((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
      ((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
  refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
  · simp_rw [Function.comp, PartialHomeomorph.coe_coe, Trivialization.coe_coe]
    

Proof state:
case refine_1
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
f : M → TotalSpace F E
s : Set M
x₀ : M
hf : ContinuousWithinAt f s x₀
h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀
x : M
hx : x ∈ (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet
⊢ ↑(extChartAt IB (f x₀).proj) (↑(trivializationAt F E (f x₀).proj) (f x)).1 = ↑(extChartAt IB (f x₀).proj) (f x).proj

Next tactic:
rw [Trivialization.coe_fst']