/-- One can reformulate smoothness on a set as continuity on this set, and smoothness in any
extended chart. -/
theorem contMDiffOn_iff :
    ContMDiffOn I I' n f s ↔
      ContinuousOn f s ∧
        ∀ (x : M) (y : M'),
          ContDiffOn 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm)
            ((extChartAt I x).target ∩
              (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source)) := by
  constructor
  · intro h
    refine' ⟨fun x hx => (h x hx).1, fun x y z hz => _⟩
    simp only [mfld_simps] at hz
    let w := (extChartAt I x).symm z
    have : w ∈ s := by simp only [hz, mfld_simps]
    specialize h w this
    have w1 : w ∈ (chartAt H x).source := by simp only [hz, mfld_simps]
    have w2 : f w ∈ (chartAt H' y).source := by simp only [hz, mfld_simps]
    convert ((contMDiffWithinAt_iff_of_mem_source w1 w2).mp h).2.mono _
    · simp only [hz, mfld_simps]
    · mfld_set_tac
  · rintro ⟨hcont, hdiff⟩ x hx
    refine' (contDiffWithinAt_localInvariantProp I I' n).liftPropWithinAt_iff.mpr _
    refine' ⟨hcont x hx, _⟩
    dsimp [ContDiffWithinAtProp]
    

Proof state:
case mpr.intro
𝕜 : 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 : ℕ∞
hcont : ContinuousOn f s
hdiff :
  ∀ (x : M) (y : M'),
    ContDiffOn 𝕜 n (↑(extChartAt I' y) ∘ f ∘ ↑(PartialEquiv.symm (extChartAt I x)))
      ((extChartAt I x).target ∩ ↑(PartialEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source))
x : M
hx : x ∈ s
⊢ ContDiffWithinAt 𝕜 n
    (↑I' ∘ (↑(chartAt H' (f x)) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H x))) ∘ ↑(ModelWithCorners.symm I))
    (↑(ModelWithCorners.symm I) ⁻¹' (chartAt H x).toPartialEquiv.target ∩
        (↑(ModelWithCorners.symm I) ⁻¹' (↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' s) ∩
          ↑(ModelWithCorners.symm I) ⁻¹'
            (↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' (f ⁻¹' (chartAt H' (f x)).toPartialEquiv.source))) ∩
      range ↑I)
    (↑I (↑(chartAt H x) x))

Next tactic:
convert hdiff x (f x) (extChartAt I x x) (by simp only [hx, mfld_simps]) using 1