l3lab/ntp-mathlib huggingface dataset:
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    

Proof state:
case left
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
⊢ ContinuousOn (↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)))
    (OpenEmbedding.toPartialHomeomorph e h).toPartialEquiv.target

Next tactic:
exact (h.toPartialHomeomorph e).continuousOn_symm
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · 

Proof state:
case right
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
⊢ ∀ (x : H) (y : M),
    ContDiffOn 𝕜 n
      (↑(extChartAt I y) ∘
        ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ∘ ↑(PartialEquiv.symm (extChartAt I x)))
      ((extChartAt I x).target ∩
        ↑(PartialEquiv.symm (extChartAt I x)) ⁻¹'
          (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I y).source))

Next tactic:
intros z hz
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    

Proof state:
case right
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z : H
hz : M
⊢ ContDiffOn 𝕜 n
    (↑(extChartAt I hz) ∘
      ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ∘ ↑(PartialEquiv.symm (extChartAt I z)))
    ((extChartAt I z).target ∩
      ↑(PartialEquiv.symm (extChartAt I z)) ⁻¹'
        (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz).source))

Next tactic:
apply contDiffOn_id.congr
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    apply contDiffOn_id.congr
    

Proof state:
case right
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z : H
hz : M
⊢ ∀
    x ∈
      (extChartAt I z).target ∩
        ↑(PartialEquiv.symm (extChartAt I z)) ⁻¹'
          (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz).source),
    (↑(extChartAt I hz) ∘
          ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ∘ ↑(PartialEquiv.symm (extChartAt I z)))
        x =
      id x

Next tactic:
intros z hz
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    apply contDiffOn_id.congr
    intros z hz
    -- factorise into the chart `e` and the model `id`
    

Proof state:
case right
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z✝ : H
hz✝ : M
z : E
hz :
  z ∈
    (extChartAt I z✝).target ∩
      ↑(PartialEquiv.symm (extChartAt I z✝)) ⁻¹'
        (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz✝).source)
⊢ (↑(extChartAt I hz✝) ∘
        ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ∘ ↑(PartialEquiv.symm (extChartAt I z✝)))
      z =
    id z

Next tactic:
simp only [mfld_simps]
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    apply contDiffOn_id.congr
    intros z hz
    -- factorise into the chart `e` and the model `id`
    simp only [mfld_simps]
    

Proof state:
case right
𝕜 : 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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z✝ : H
hz✝ : M
z : E
hz :
  z ∈
    (extChartAt I z✝).target ∩
      ↑(PartialEquiv.symm (extChartAt I z✝)) ⁻¹'
        (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz✝).source)
⊢ ↑I (e (↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) (↑(ModelWithCorners.symm I) z))) = z

Next tactic:
have : I.symm z ∈ range e := by
      rw [ModelWithCorners.symm, ← mem_preimage]
      exact hz.2.1
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    apply contDiffOn_id.congr
    intros z hz
    -- factorise into the chart `e` and the model `id`
    simp only [mfld_simps]
    have : I.symm z ∈ range e := 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''
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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z✝ : H
hz✝ : M
z : E
hz :
  z ∈
    (extChartAt I z✝).target ∩
      ↑(PartialEquiv.symm (extChartAt I z✝)) ⁻¹'
        (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz✝).source)
⊢ ↑(ModelWithCorners.symm I) z ∈ range e

Next tactic:
rw [ModelWithCorners.symm, ← mem_preimage]
/-- If the `ChartedSpace` structure on a manifold `M` is given by an open embedding `e : M → H`,
then the inverse of `e` is smooth. -/
lemma contMDiffOn_openEmbedding_symm :
    haveI := h.singletonChartedSpace; ContMDiffOn I I
      n (OpenEmbedding.toPartialHomeomorph e h).symm (range e) := by
  haveI := h.singleton_smoothManifoldWithCorners I
  rw [@contMDiffOn_iff _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h.singletonChartedSpace]
  constructor
  · rw [← h.toPartialHomeomorph_target]
    exact (h.toPartialHomeomorph e).continuousOn_symm
  · intros z hz
    -- show the function is actually the identity on the range of I ∘ e
    apply contDiffOn_id.congr
    intros z hz
    -- factorise into the chart `e` and the model `id`
    simp only [mfld_simps]
    have : I.symm z ∈ range e := by
      rw [ModelWithCorners.symm, ← mem_preimage]
      

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✝ : ℕ∞
inst✝¹ : Nonempty M
e : M → H
h : OpenEmbedding e
inst✝ : Nonempty M'
e' : M' → H'
h' : OpenEmbedding e'
n : WithTop ℕ
this : SmoothManifoldWithCorners I M
z✝ : H
hz✝ : M
z : E
hz :
  z ∈
    (extChartAt I z✝).target ∩
      ↑(PartialEquiv.symm (extChartAt I z✝)) ⁻¹'
        (range e ∩ ↑(PartialHomeomorph.symm (OpenEmbedding.toPartialHomeomorph e h)) ⁻¹' (extChartAt I hz✝).source)
⊢ z ∈ ↑(PartialEquiv.symm I.toPartialEquiv) ⁻¹' range e

Next tactic:
exact hz.2.1