l3lab/ntp-mathlib huggingface dataset:
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    

Proof state:
case mp
𝕜 : 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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
he : e ∈ analyticGroupoid I
this :
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)
⊢ AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)

Next tactic:
exact this
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    exact this
  · 

Proof state:
case mpr
𝕜 : 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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
⊢ AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.source) ∧
      AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.target) →
    e ∈ analyticGroupoid I

Next tactic:
intro he
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    exact this
  · intro he
    

Proof state:
case mpr
𝕜 : 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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
he :
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.source) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.target)
⊢ e ∈ analyticGroupoid I

Next tactic:
apply And.intro
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    exact this
  · intro he
    apply And.intro
    all_goals 

Proof state:
case mpr.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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
he :
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.source) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I '' e.target)
⊢ e ∈ (contDiffGroupoid ⊤ I).members

Next tactic:
apply mem_groupoid_of_pregroupoid.mpr
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    exact this
  · intro he
    apply And.intro
    all_goals apply mem_groupoid_of_pregroupoid.mpr; simp only [I.image_eq, I.range_eq_univ,
      interior_univ, subset_univ, and_true] at he ⊢
    · 

Proof state:
case mpr.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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
he :
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)
⊢ ContDiffOn 𝕜 ⊤ (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)

Next tactic:
exact ⟨he.left.contDiffOn, he.right.contDiffOn⟩
/-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the local homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) := by
  apply Iff.intro
  · intro he
    have := mem_groupoid_of_pregroupoid.mp he.right
    simp only [I.image_eq, I.range_eq_univ, interior_univ, subset_univ, and_true] at this ⊢
    exact this
  · intro he
    apply And.intro
    all_goals apply mem_groupoid_of_pregroupoid.mpr; simp only [I.image_eq, I.range_eq_univ,
      interior_univ, subset_univ, and_true] at he ⊢
    · exact ⟨he.left.contDiffOn, he.right.contDiffOn⟩
    · 

Proof state:
case mpr.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✝¹ : CompleteSpace E
inst✝ : ModelWithCorners.Boundaryless I
e : PartialHomeomorph H H
he :
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)
⊢ AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' e.source ∩ univ) ∧
    AnalyticOn 𝕜 (↑I ∘ ↑(PartialHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))
      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ univ)

Next tactic:
exact he
theorem smoothManifoldWithCorners_of_contDiffOn {𝕜 : Type*} [NontriviallyNormedField 𝕜]
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    (h : ∀ e e' : PartialHomeomorph M H, e ∈ atlas H M → e' ∈ atlas H M →
      ContDiffOn 𝕜 ⊤ (I ∘ e.symm ≫ₕ e' ∘ I.symm) (I.symm ⁻¹' (e.symm ≫ₕ e').source ∩ range I)) :
    SmoothManifoldWithCorners I M where
  compatible := 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
h :
  ∀ (e e' : PartialHomeomorph M H),
    e ∈ atlas H M →
      e' ∈ atlas H M →
        ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ e') ∘ ↑(ModelWithCorners.symm I))
          (↑(ModelWithCorners.symm I) ⁻¹' (PartialHomeomorph.symm e ≫ₕ e').toPartialEquiv.source ∩ range ↑I)
⊢ ∀ {e e' : PartialHomeomorph M H},
    e ∈ atlas H M → e' ∈ atlas H M → PartialHomeomorph.symm e ≫ₕ e' ∈ contDiffGroupoid ⊤ I

Next tactic:
haveI : HasGroupoid M (contDiffGroupoid ∞ I) := hasGroupoid_of_pregroupoid _ (h _ _)
theorem smoothManifoldWithCorners_of_contDiffOn {𝕜 : Type*} [NontriviallyNormedField 𝕜]
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    (h : ∀ e e' : PartialHomeomorph M H, e ∈ atlas H M → e' ∈ atlas H M →
      ContDiffOn 𝕜 ⊤ (I ∘ e.symm ≫ₕ e' ∘ I.symm) (I.symm ⁻¹' (e.symm ≫ₕ e').source ∩ range I)) :
    SmoothManifoldWithCorners I M where
  compatible := by
    haveI : HasGroupoid M (contDiffGroupoid ∞ I) := hasGroupoid_of_pregroupoid _ (h _ _)
    

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
h :
  ∀ (e e' : PartialHomeomorph M H),
    e ∈ atlas H M →
      e' ∈ atlas H M →
        ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(PartialHomeomorph.symm e ≫ₕ e') ∘ ↑(ModelWithCorners.symm I))
          (↑(ModelWithCorners.symm I) ⁻¹' (PartialHomeomorph.symm e ≫ₕ e').toPartialEquiv.source ∩ range ↑I)
this : HasGroupoid M (contDiffGroupoid ⊤ I)
⊢ ∀ {e e' : PartialHomeomorph M H},
    e ∈ atlas H M → e' ∈ atlas H M → PartialHomeomorph.symm e ≫ₕ e' ∈ contDiffGroupoid ⊤ I

Next tactic:
apply StructureGroupoid.compatible
/-- The product of two smooth manifolds with corners is naturally a smooth manifold with corners. -/
instance prod {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
    [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
    {I' : ModelWithCorners 𝕜 E' H'} (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] (M' : Type*) [TopologicalSpace M'] [ChartedSpace H' M']
    [SmoothManifoldWithCorners I' M'] : SmoothManifoldWithCorners (I.prod I') (M × M') where
  compatible := 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✝
𝕜 : Type u_5
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
E' : Type u_7
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H : Type u_8
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
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
M' : Type u_11
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : SmoothManifoldWithCorners I' M'
⊢ ∀ {e e' : PartialHomeomorph (M × M') (ModelProd H H')},
    e ∈ atlas (ModelProd H H') (M × M') →
      e' ∈ atlas (ModelProd H H') (M × M') →
        PartialHomeomorph.symm e ≫ₕ e' ∈ contDiffGroupoid ⊤ (ModelWithCorners.prod I I')

Next tactic:
rintro f g ⟨f1, f2, hf1, hf2, rfl⟩ ⟨g1, g2, hg1, hg2, rfl⟩
/-- The product of two smooth manifolds with corners is naturally a smooth manifold with corners. -/
instance prod {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
    [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
    {I' : ModelWithCorners 𝕜 E' H'} (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] (M' : Type*) [TopologicalSpace M'] [ChartedSpace H' M']
    [SmoothManifoldWithCorners I' M'] : SmoothManifoldWithCorners (I.prod I') (M × M') where
  compatible := by
    rintro f g ⟨f1, f2, hf1, hf2, rfl⟩ ⟨g1, g2, hg1, hg2, rfl⟩
    

Proof state:
case intro.intro.intro.intro.intro.intro.intro.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✝
𝕜 : Type u_5
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
E' : Type u_7
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H : Type u_8
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
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
M' : Type u_11
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : SmoothManifoldWithCorners I' M'
f1 : PartialHomeomorph M H
f2 : PartialHomeomorph M' H'
hf1 : f1 ∈ atlas H M
hf2 : f2 ∈ atlas H' M'
g1 : PartialHomeomorph M H
g2 : PartialHomeomorph M' H'
hg1 : g1 ∈ atlas H M
hg2 : g2 ∈ atlas H' M'
⊢ PartialHomeomorph.symm (PartialHomeomorph.prod f1 f2) ≫ₕ PartialHomeomorph.prod g1 g2 ∈
    contDiffGroupoid ⊤ (ModelWithCorners.prod I I')

Next tactic:
rw [PartialHomeomorph.prod_symm, PartialHomeomorph.prod_trans]
/-- The product of two smooth manifolds with corners is naturally a smooth manifold with corners. -/
instance prod {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
    [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
    {I' : ModelWithCorners 𝕜 E' H'} (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] (M' : Type*) [TopologicalSpace M'] [ChartedSpace H' M']
    [SmoothManifoldWithCorners I' M'] : SmoothManifoldWithCorners (I.prod I') (M × M') where
  compatible := by
    rintro f g ⟨f1, f2, hf1, hf2, rfl⟩ ⟨g1, g2, hg1, hg2, rfl⟩
    rw [PartialHomeomorph.prod_symm, PartialHomeomorph.prod_trans]
    

Proof state:
case intro.intro.intro.intro.intro.intro.intro.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✝
𝕜 : Type u_5
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
E' : Type u_7
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H : Type u_8
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
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
M' : Type u_11
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : SmoothManifoldWithCorners I' M'
f1 : PartialHomeomorph M H
f2 : PartialHomeomorph M' H'
hf1 : f1 ∈ atlas H M
hf2 : f2 ∈ atlas H' M'
g1 : PartialHomeomorph M H
g2 : PartialHomeomorph M' H'
hg1 : g1 ∈ atlas H M
hg2 : g2 ∈ atlas H' M'
⊢ PartialHomeomorph.prod (PartialHomeomorph.symm f1 ≫ₕ g1) (PartialHomeomorph.symm f2 ≫ₕ g2) ∈
    contDiffGroupoid ⊤ (ModelWithCorners.prod I I')

Next tactic:
have h1 := (contDiffGroupoid ⊤ I).compatible hf1 hg1
/-- The product of two smooth manifolds with corners is naturally a smooth manifold with corners. -/
instance prod {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
    [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
    {I' : ModelWithCorners 𝕜 E' H'} (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] (M' : Type*) [TopologicalSpace M'] [ChartedSpace H' M']
    [SmoothManifoldWithCorners I' M'] : SmoothManifoldWithCorners (I.prod I') (M × M') where
  compatible := by
    rintro f g ⟨f1, f2, hf1, hf2, rfl⟩ ⟨g1, g2, hg1, hg2, rfl⟩
    rw [PartialHomeomorph.prod_symm, PartialHomeomorph.prod_trans]
    have h1 := (contDiffGroupoid ⊤ I).compatible hf1 hg1
    

Proof state:
case intro.intro.intro.intro.intro.intro.intro.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✝
𝕜 : Type u_5
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
E' : Type u_7
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H : Type u_8
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
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
M' : Type u_11
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : SmoothManifoldWithCorners I' M'
f1 : PartialHomeomorph M H
f2 : PartialHomeomorph M' H'
hf1 : f1 ∈ atlas H M
hf2 : f2 ∈ atlas H' M'
g1 : PartialHomeomorph M H
g2 : PartialHomeomorph M' H'
hg1 : g1 ∈ atlas H M
hg2 : g2 ∈ atlas H' M'
h1 : PartialHomeomorph.symm f1 ≫ₕ g1 ∈ contDiffGroupoid ⊤ I
⊢ PartialHomeomorph.prod (PartialHomeomorph.symm f1 ≫ₕ g1) (PartialHomeomorph.symm f2 ≫ₕ g2) ∈
    contDiffGroupoid ⊤ (ModelWithCorners.prod I I')

Next tactic:
have h2 := (contDiffGroupoid ⊤ I').compatible hf2 hg2
/-- The product of two smooth manifolds with corners is naturally a smooth manifold with corners. -/
instance prod {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
    [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H : Type*}
    [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {H' : Type*} [TopologicalSpace H']
    {I' : ModelWithCorners 𝕜 E' H'} (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] (M' : Type*) [TopologicalSpace M'] [ChartedSpace H' M']
    [SmoothManifoldWithCorners I' M'] : SmoothManifoldWithCorners (I.prod I') (M × M') where
  compatible := by
    rintro f g ⟨f1, f2, hf1, hf2, rfl⟩ ⟨g1, g2, hg1, hg2, rfl⟩
    rw [PartialHomeomorph.prod_symm, PartialHomeomorph.prod_trans]
    have h1 := (contDiffGroupoid ⊤ I).compatible hf1 hg1
    have h2 := (contDiffGroupoid ⊤ I').compatible hf2 hg2
    

Proof state:
case intro.intro.intro.intro.intro.intro.intro.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✝
𝕜 : Type u_5
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
E' : Type u_7
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H : Type u_8
inst✝⁷ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
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
M' : Type u_11
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : SmoothManifoldWithCorners I' M'
f1 : PartialHomeomorph M H
f2 : PartialHomeomorph M' H'
hf1 : f1 ∈ atlas H M
hf2 : f2 ∈ atlas H' M'
g1 : PartialHomeomorph M H
g2 : PartialHomeomorph M' H'
hg1 : g1 ∈ atlas H M
hg2 : g2 ∈ atlas H' M'
h1 : PartialHomeomorph.symm f1 ≫ₕ g1 ∈ contDiffGroupoid ⊤ I
h2 : PartialHomeomorph.symm f2 ≫ₕ g2 ∈ contDiffGroupoid ⊤ I'
⊢ PartialHomeomorph.prod (PartialHomeomorph.symm f1 ≫ₕ g1) (PartialHomeomorph.symm f2 ≫ₕ g2) ∈
    contDiffGroupoid ⊤ (ModelWithCorners.prod I I')

Next tactic:
exact contDiffGroupoid_prod h1 h2
theorem OpenEmbedding.singleton_smoothManifoldWithCorners {𝕜 : Type*} [NontriviallyNormedField 𝕜]
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [Nonempty M] {f : M → H}
    (h : OpenEmbedding f) :
    @SmoothManifoldWithCorners 𝕜 _ E _ _ H _ I M _ h.singletonChartedSpace :=
  (h.toPartialHomeomorph f).singleton_smoothManifoldWithCorners I (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✝ : Nonempty M
f : M → H
h : OpenEmbedding f
⊢ (toPartialHomeomorph f h).toPartialEquiv.source = univ

Next tactic:
simp
theorem extend_source : (f.extend I).source = f.source := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
⊢ (extend f I).source = f.source

Next tactic:
rw [extend, PartialEquiv.trans_source, I.source_eq, preimage_univ, inter_univ]
theorem isOpen_extend_source : IsOpen (f.extend I).source := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
⊢ IsOpen (extend f I).source

Next tactic:
rw [extend_source]
theorem isOpen_extend_source : IsOpen (f.extend I).source := by
  rw [extend_source]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
⊢ IsOpen f.source

Next tactic:
exact f.open_source