theorem contMDiffWithinAt_iff_source_of_mem_maximalAtlas (he : e ∈ maximalAtlas I M)
    (hx : x ∈ e.source) :
    ContMDiffWithinAt I I' n f s x ↔
      ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ (e.extend I).symm) ((e.extend I).symm ⁻¹' s ∩ range I)
        (e.extend I x) := by
  have h2x := hx; rw [← e.extend_source I] at h2x
  simp_rw [ContMDiffWithinAt,
    (contDiffWithinAt_localInvariantProp I I' n).liftPropWithinAt_indep_chart_source he hx,
    StructureGroupoid.liftPropWithinAt_self_source,
    e.extend_symm_continuousWithinAt_comp_right_iff, contDiffWithinAtProp_self_source,
    ContDiffWithinAtProp, Function.comp, e.left_inv hx, (e.extend I).left_inv h2x]
  

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''
F : Type u_11
inst✝¹⁹ : NormedAddCommGroup F
inst✝¹⁸ : NormedSpace 𝕜 F
G : Type u_12
inst✝¹⁷ : TopologicalSpace G
J : ModelWithCorners 𝕜 F G
N : Type u_13
inst✝¹⁶ : TopologicalSpace N
inst✝¹⁵ : ChartedSpace G N
inst✝¹⁴ : SmoothManifoldWithCorners J N
F' : Type u_14
inst✝¹³ : NormedAddCommGroup F'
inst✝¹² : NormedSpace 𝕜 F'
G' : Type u_15
inst✝¹¹ : TopologicalSpace G'
J' : ModelWithCorners 𝕜 F' G'
N' : Type u_16
inst✝¹⁰ : TopologicalSpace N'
inst✝⁹ : ChartedSpace G' N'
inst✝⁸ : SmoothManifoldWithCorners J' N'
F₁ : Type u_17
inst✝⁷ : NormedAddCommGroup F₁
inst✝⁶ : NormedSpace 𝕜 F₁
F₂ : Type u_18
inst✝⁵ : NormedAddCommGroup F₂
inst✝⁴ : NormedSpace 𝕜 F₂
F₃ : Type u_19
inst✝³ : NormedAddCommGroup F₃
inst✝² : NormedSpace 𝕜 F₃
F₄ : Type u_20
inst✝¹ : NormedAddCommGroup F₄
inst✝ : NormedSpace 𝕜 F₄
e : PartialHomeomorph M H
e' : PartialHomeomorph M' H'
f f₁ : M → M'
s s₁ t : Set M
x : M
m n : ℕ∞
he : e ∈ maximalAtlas I M
hx : x ∈ e.source
h2x : x ∈ (PartialHomeomorph.extend e I).source
⊢ ContinuousWithinAt (fun x => f (↑(PartialHomeomorph.symm e) x)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x) ∧
      ContDiffWithinAt 𝕜 n
        (fun x_1 => ↑I' (↑(chartAt H' (f x)) (f (↑(PartialHomeomorph.symm e) (↑(ModelWithCorners.symm I) x_1)))))
        (↑(ModelWithCorners.symm I) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x)) ↔
    ContinuousWithinAt (fun x => f (↑(PartialHomeomorph.symm e) x)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x) ∧
      ContDiffWithinAt 𝕜 n
        (fun x_1 => ↑I' (↑(chartAt H' (f x)) (f (↑(PartialEquiv.symm (PartialHomeomorph.extend e I)) x_1))))
        (↑(PartialEquiv.symm (PartialHomeomorph.extend e I)) ⁻¹' s ∩ range ↑I) (↑(PartialHomeomorph.extend e I) x)

Next tactic:
rfl