l3lab/ntp-mathlib huggingface dataset:
/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₂` actually extends the original functors `C ⥤ D`. -/
@[simps!]
def functorExtension₂CompWhiskeringLeftToKaroubiIso :
    functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D) :=
  NatIso.ofComponents
    (fun F => NatIso.ofComponents
      (fun X =>
        { hom := { f := 𝟙 _ }
          inv := { f := 𝟙 _ } })
      (by 

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.81479, u_1} C
inst✝¹ : Category.{?u.81483, u_2} D
inst✝ : Category.{?u.81487, u_3} E
F : C ⥤ D
⊢ ∀ {X Y : C} (f : X ⟶ Y),
    ((functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj F).map f ≫
        ((fun X =>
              Iso.mk
                (Hom.mk
                  (𝟙
                    (((functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj F).obj
                        X).X))
                (Hom.mk (𝟙 ((((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).obj F).obj X).X)))
            Y).hom =
      ((fun X =>
              Iso.mk
                (Hom.mk
                  (𝟙
                    (((functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj F).obj
                        X).X))
                (Hom.mk (𝟙 ((((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).obj F).obj X).X)))
            X).hom ≫
        (((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).obj F).map f

Next tactic:
aesop_cat
/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₂` actually extends the original functors `C ⥤ D`. -/
@[simps!]
def functorExtension₂CompWhiskeringLeftToKaroubiIso :
    functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D) :=
  NatIso.ofComponents
    (fun F => NatIso.ofComponents
      (fun X =>
        { hom := { f := 𝟙 _ }
          inv := { f := 𝟙 _ } })
      (by aesop_cat))
    (by 

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.81479, u_1} C
inst✝¹ : Category.{?u.81483, u_2} D
inst✝ : Category.{?u.81487, u_3} E
⊢ ∀ {X Y : C ⥤ D} (f : X ⟶ Y),
    (functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).map f ≫
        ((fun F =>
              NatIso.ofComponents fun X =>
                Iso.mk
                  (Hom.mk
                    (𝟙
                      (((functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj
                              F).obj
                          X).X))
                  (Hom.mk (𝟙 ((((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).obj F).obj X).X)))
            Y).hom =
      ((fun F =>
              NatIso.ofComponents fun X =>
                Iso.mk
                  (Hom.mk
                    (𝟙
                      (((functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj
                              F).obj
                          X).X))
                  (Hom.mk (𝟙 ((((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).obj F).obj X).X)))
            X).hom ≫
        ((whiskeringRight C D (Karoubi D)).obj (toKaroubi D)).map f

Next tactic:
aesop_cat
noncomputable instance : IsEquivalence (functorExtension₂ C D) := by
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.130911, u_1} C
inst✝² : Category.{?u.130915, u_2} D
inst✝¹ : Category.{?u.130919, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence (functorExtension₂ C D)

Next tactic:
rw [← karoubiUniversal₂_functor_eq]
noncomputable instance : IsEquivalence (functorExtension₂ C D) := by
  rw [← karoubiUniversal₂_functor_eq]
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.130911, u_1} C
inst✝² : Category.{?u.130915, u_2} D
inst✝¹ : Category.{?u.130919, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence (karoubiUniversal₂ C D).functor

Next tactic:
infer_instance
noncomputable instance : IsEquivalence (functorExtension C D) := by
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.135931, u_1} C
inst✝² : Category.{?u.135935, u_2} D
inst✝¹ : Category.{?u.135939, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence (functorExtension C D)

Next tactic:
rw [← karoubiUniversal_functor_eq]
noncomputable instance : IsEquivalence (functorExtension C D) := by
  rw [← karoubiUniversal_functor_eq]
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.135931, u_1} C
inst✝² : Category.{?u.135935, u_2} D
inst✝¹ : Category.{?u.135939, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence (karoubiUniversal C D).functor

Next tactic:
infer_instance
lemma isEquivalence_whiskeringLeft_obj_toKaroubi_aux :
    ((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C) ⋙
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D) ⋙
        (whiskeringRight C (Karoubi D) D).obj (Functor.inv (toKaroubi D))) =
      (karoubiUniversal C D).inverse := by
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.136489, u_3} E
inst✝ : IsIdempotentComplete D
⊢ (whiskeringLeft C (Karoubi C) D).obj (toKaroubi C) ⋙
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D) ⋙
        (whiskeringRight C (Karoubi D) D).obj (Functor.inv (toKaroubi D)) =
    (karoubiUniversal C D).inverse

Next tactic:
rfl
noncomputable instance : IsEquivalence ((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)) :=
  IsEquivalence.cancelCompRight _
  ((whiskeringRight C _ _).obj (toKaroubi D) ⋙ (whiskeringRight C _ _).obj (toKaroubi D).inv)
  (IsEquivalence.ofEquivalence <| (toKaroubi D).asEquivalence.congrRight.trans
    (toKaroubi D).asEquivalence.symm.congrRight)
  (by
    

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.138405, u_1} C
inst✝² : Category.{?u.138409, u_2} D
inst✝¹ : Category.{?u.138413, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence
    ((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C) ⋙
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D) ⋙
        (whiskeringRight C (Karoubi D) D).obj (Functor.inv (toKaroubi D)))

Next tactic:
rw [isEquivalence_whiskeringLeft_obj_toKaroubi_aux]
noncomputable instance : IsEquivalence ((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)) :=
  IsEquivalence.cancelCompRight _
  ((whiskeringRight C _ _).obj (toKaroubi D) ⋙ (whiskeringRight C _ _).obj (toKaroubi D).inv)
  (IsEquivalence.ofEquivalence <| (toKaroubi D).asEquivalence.congrRight.trans
    (toKaroubi D).asEquivalence.symm.congrRight)
  (by
    rw [isEquivalence_whiskeringLeft_obj_toKaroubi_aux]
    

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{?u.138405, u_1} C
inst✝² : Category.{?u.138409, u_2} D
inst✝¹ : Category.{?u.138413, u_3} E
inst✝ : IsIdempotentComplete D
⊢ IsEquivalence (karoubiUniversal C D).inverse

Next tactic:
infer_instance
theorem whiskeringLeft_obj_preimage_app {F G : Karoubi C ⥤ D}
    (τ : toKaroubi _ ⋙ F ⟶ toKaroubi _ ⋙ G) (P : Karoubi C) :
    (((whiskeringLeft _ _ _).obj (toKaroubi _)).preimage τ).app P =
      F.map P.decompId_i ≫ τ.app P.X ≫ G.map P.decompId_p := by
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.142153, u_3} E
inst✝ : IsIdempotentComplete D
F G : Karoubi C ⥤ D
τ : toKaroubi C ⋙ F ⟶ toKaroubi C ⋙ G
P : Karoubi C
⊢ (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app P =
    F.map (decompId_i P) ≫ τ.app P.X ≫ G.map (decompId_p P)

Next tactic:
rw [natTrans_eq]
theorem whiskeringLeft_obj_preimage_app {F G : Karoubi C ⥤ D}
    (τ : toKaroubi _ ⋙ F ⟶ toKaroubi _ ⋙ G) (P : Karoubi C) :
    (((whiskeringLeft _ _ _).obj (toKaroubi _)).preimage τ).app P =
      F.map P.decompId_i ≫ τ.app P.X ≫ G.map P.decompId_p := by
  rw [natTrans_eq]
  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.142153, u_3} E
inst✝ : IsIdempotentComplete D
F G : Karoubi C ⥤ D
τ : toKaroubi C ⋙ F ⟶ toKaroubi C ⋙ G
P : Karoubi C
⊢ F.map (decompId_i P) ≫
      (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app (Karoubi.mk P.X (𝟙 P.X)) ≫
        G.map (decompId_p P) =
    F.map (decompId_i P) ≫ τ.app P.X ≫ G.map (decompId_p P)

Next tactic:
congr 2
theorem whiskeringLeft_obj_preimage_app {F G : Karoubi C ⥤ D}
    (τ : toKaroubi _ ⋙ F ⟶ toKaroubi _ ⋙ G) (P : Karoubi C) :
    (((whiskeringLeft _ _ _).obj (toKaroubi _)).preimage τ).app P =
      F.map P.decompId_i ≫ τ.app P.X ≫ G.map P.decompId_p := by
  rw [natTrans_eq]
  congr 2
  

Proof state:
case e_a.e_a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.142153, u_3} E
inst✝ : IsIdempotentComplete D
F G : Karoubi C ⥤ D
τ : toKaroubi C ⋙ F ⟶ toKaroubi C ⋙ G
P : Karoubi C
⊢ (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app (Karoubi.mk P.X (𝟙 P.X)) = τ.app P.X

Next tactic:
rw [← congr_app (((whiskeringLeft _ _ _).obj (toKaroubi _)).image_preimage τ) P.X]
theorem whiskeringLeft_obj_preimage_app {F G : Karoubi C ⥤ D}
    (τ : toKaroubi _ ⋙ F ⟶ toKaroubi _ ⋙ G) (P : Karoubi C) :
    (((whiskeringLeft _ _ _).obj (toKaroubi _)).preimage τ).app P =
      F.map P.decompId_i ≫ τ.app P.X ≫ G.map P.decompId_p := by
  rw [natTrans_eq]
  congr 2
  rw [← congr_app (((whiskeringLeft _ _ _).obj (toKaroubi _)).image_preimage τ) P.X]
  

Proof state:
case e_a.e_a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.142153, u_3} E
inst✝ : IsIdempotentComplete D
F G : Karoubi C ⥤ D
τ : toKaroubi C ⋙ F ⟶ toKaroubi C ⋙ G
P : Karoubi C
⊢ (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app (Karoubi.mk P.X (𝟙 P.X)) =
    (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).map
          (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ)).app
      P.X

Next tactic:
dsimp
theorem whiskeringLeft_obj_preimage_app {F G : Karoubi C ⥤ D}
    (τ : toKaroubi _ ⋙ F ⟶ toKaroubi _ ⋙ G) (P : Karoubi C) :
    (((whiskeringLeft _ _ _).obj (toKaroubi _)).preimage τ).app P =
      F.map P.decompId_i ≫ τ.app P.X ≫ G.map P.decompId_p := by
  rw [natTrans_eq]
  congr 2
  rw [← congr_app (((whiskeringLeft _ _ _).obj (toKaroubi _)).image_preimage τ) P.X]
  dsimp
  

Proof state:
case e_a.e_a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝³ : Category.{u_4, u_1} C
inst✝² : Category.{u_5, u_2} D
inst✝¹ : Category.{?u.142153, u_3} E
inst✝ : IsIdempotentComplete D
F G : Karoubi C ⥤ D
τ : toKaroubi C ⋙ F ⟶ toKaroubi C ⋙ G
P : Karoubi C
⊢ (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app (Karoubi.mk P.X (𝟙 P.X)) =
    (((whiskeringLeft C (Karoubi C) D).obj (toKaroubi C)).preimage τ).app ((toKaroubi C).obj P.X)

Next tactic:
congr
/-- Every point is either an interior or a boundary point. -/
lemma isInteriorPoint_or_isBoundaryPoint (x : M) : I.IsInteriorPoint x ∨ I.IsBoundaryPoint x := 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
x : M
⊢ IsInteriorPoint I x ∨ IsBoundaryPoint I x

Next tactic:
by_cases h : extChartAt I x x ∈ interior (range I)
/-- Every point is either an interior or a boundary point. -/
lemma isInteriorPoint_or_isBoundaryPoint (x : M) : I.IsInteriorPoint x ∨ I.IsBoundaryPoint x := by
  by_cases h : extChartAt I x x ∈ interior (range I)
  · 

Proof state:
case pos
𝕜 : 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
x : M
h : ↑(extChartAt I x) x ∈ interior (range ↑I)
⊢ IsInteriorPoint I x ∨ IsBoundaryPoint I x

Next tactic:
exact Or.inl h
/-- Every point is either an interior or a boundary point. -/
lemma isInteriorPoint_or_isBoundaryPoint (x : M) : I.IsInteriorPoint x ∨ I.IsBoundaryPoint x := by
  by_cases h : extChartAt I x x ∈ interior (range I)
  · exact Or.inl h
  · 

Proof state:
case neg
𝕜 : 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
x : M
h : ↑(extChartAt I x) x ∉ interior (range ↑I)
⊢ IsInteriorPoint I x ∨ IsBoundaryPoint I x

Next tactic:
right
/-- Every point is either an interior or a boundary point. -/
lemma isInteriorPoint_or_isBoundaryPoint (x : M) : I.IsInteriorPoint x ∨ I.IsBoundaryPoint x := by
  by_cases h : extChartAt I x x ∈ interior (range I)
  · exact Or.inl h
  · right -- Otherwise, we have a boundary point.
    

Proof state:
case neg.h
𝕜 : 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
x : M
h : ↑(extChartAt I x) x ∉ interior (range ↑I)
⊢ IsBoundaryPoint I x

Next tactic:
rw [I.isBoundaryPoint_iff, ← closure_diff_interior, I.closed_range.closure_eq]
/-- Every point is either an interior or a boundary point. -/
lemma isInteriorPoint_or_isBoundaryPoint (x : M) : I.IsInteriorPoint x ∨ I.IsBoundaryPoint x := by
  by_cases h : extChartAt I x x ∈ interior (range I)
  · exact Or.inl h
  · right -- Otherwise, we have a boundary point.
    rw [I.isBoundaryPoint_iff, ← closure_diff_interior, I.closed_range.closure_eq]
    

Proof state:
case neg.h
𝕜 : 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
x : M
h : ↑(extChartAt I x) x ∉ interior (range ↑I)
⊢ ↑(extChartAt I x) x ∈ range ↑I \ interior (range ↑I)

Next tactic:
exact ⟨mem_range_self _, h⟩
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := 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
⊢ Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)

Next tactic:
by_contra h
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := by
  by_contra h
  -- Choose some x in the intersection of interior and boundary.
  

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 : ¬Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)
⊢ False

Next tactic:
choose x hx using not_disjoint_iff.mp h
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := by
  by_contra h
  -- Choose some x in the intersection of interior and boundary.
  choose x hx using not_disjoint_iff.mp 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 : ¬Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)
x : M
hx : x ∈ ModelWithCorners.interior I M ∧ x ∈ ModelWithCorners.boundary I M
⊢ False

Next tactic:
rcases hx with ⟨h1, h2⟩
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := by
  by_contra h
  -- Choose some x in the intersection of interior and boundary.
  choose x hx using not_disjoint_iff.mp h
  rcases hx with ⟨h1, h2⟩
  

Proof state:
case 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
h : ¬Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)
x : M
h1 : x ∈ ModelWithCorners.interior I M
h2 : x ∈ ModelWithCorners.boundary I M
⊢ False

Next tactic:
show (extChartAt I x) x ∈ (∅ : Set E)
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := by
  by_contra h
  -- Choose some x in the intersection of interior and boundary.
  choose x hx using not_disjoint_iff.mp h
  rcases hx with ⟨h1, h2⟩
  show (extChartAt I x) x ∈ (∅ : Set E)
  

Proof state:
case 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
h : ¬Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)
x : M
h1 : x ∈ ModelWithCorners.interior I M
h2 : x ∈ ModelWithCorners.boundary I M
⊢ ↑(extChartAt I x) x ∈ ∅

Next tactic:
rw [← disjoint_iff_inter_eq_empty.mp (disjoint_interior_frontier (s := range I))]
/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M) := by
  by_contra h
  -- Choose some x in the intersection of interior and boundary.
  choose x hx using not_disjoint_iff.mp h
  rcases hx with ⟨h1, h2⟩
  show (extChartAt I x) x ∈ (∅ : Set E)
  rw [← disjoint_iff_inter_eq_empty.mp (disjoint_interior_frontier (s := range I))]
  

Proof state:
case 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
h : ¬Disjoint (ModelWithCorners.interior I M) (ModelWithCorners.boundary I M)
x : M
h1 : x ∈ ModelWithCorners.interior I M
h2 : x ∈ ModelWithCorners.boundary I M
⊢ ↑(extChartAt I x) x ∈ interior (range ↑I) ∩ frontier (range ↑I)

Next tactic:
exact ⟨h1, h2⟩
/-- The boundary is the complement of the interior. -/
lemma boundary_eq_complement_interior : I.boundary M = (I.interior M)ᶜ := 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
⊢ ModelWithCorners.boundary I M = (ModelWithCorners.interior I M)ᶜ

Next tactic:
apply (compl_unique ?_ I.interior_union_boundary_eq_univ).symm
/-- The boundary is the complement of the interior. -/
lemma boundary_eq_complement_interior : I.boundary M = (I.interior M)ᶜ := by
  apply (compl_unique ?_ I.interior_union_boundary_eq_univ).symm
  

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
⊢ ModelWithCorners.interior I M ⊓ ModelWithCorners.boundary I M = ⊥

Next tactic:
exact disjoint_iff_inter_eq_empty.mp (I.disjoint_interior_boundary)
lemma _root_.range_mem_nhds_isInteriorPoint {x : M} (h : I.IsInteriorPoint x) :
    range I ∈ nhds (extChartAt I x x) := 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
x : M
h : IsInteriorPoint I x
⊢ range ↑I ∈ nhds (↑(extChartAt I x) x)

Next tactic:
rw [mem_nhds_iff]
lemma _root_.range_mem_nhds_isInteriorPoint {x : M} (h : I.IsInteriorPoint x) :
    range I ∈ nhds (extChartAt I x x) := by
  rw [mem_nhds_iff]
  

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
x : M
h : IsInteriorPoint I x
⊢ ∃ t ⊆ range ↑I, IsOpen t ∧ ↑(extChartAt I x) x ∈ t

Next tactic:
exact ⟨interior (range I), interior_subset, isOpen_interior, h⟩
/-- If `I` is boundaryless, every point of `M` is an interior point. -/
lemma isInteriorPoint {x : M} : I.IsInteriorPoint x := 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✝ : Boundaryless I
x : M
⊢ IsInteriorPoint I x

Next tactic:
let r := ((chartAt H x).isOpen_extend_target I).interior_eq
/-- If `I` is boundaryless, every point of `M` is an interior point. -/
lemma isInteriorPoint {x : M} : I.IsInteriorPoint x := by
  let r := ((chartAt H x).isOpen_extend_target I).interior_eq
  

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✝ : Boundaryless I
x : M
r : interior (PartialHomeomorph.extend (chartAt H x) I).target = (PartialHomeomorph.extend (chartAt H x) I).target :=
  IsOpen.interior_eq (PartialHomeomorph.isOpen_extend_target (chartAt H x) I)
⊢ IsInteriorPoint I x

Next tactic:
have : extChartAt I x = (chartAt H x).extend I := rfl
/-- If `I` is boundaryless, every point of `M` is an interior point. -/
lemma isInteriorPoint {x : M} : I.IsInteriorPoint x := by
  let r := ((chartAt H x).isOpen_extend_target I).interior_eq
  have : extChartAt I x = (chartAt H x).extend I := rfl
  

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✝ : Boundaryless I
x : M
r : interior (PartialHomeomorph.extend (chartAt H x) I).target = (PartialHomeomorph.extend (chartAt H x) I).target :=
  IsOpen.interior_eq (PartialHomeomorph.isOpen_extend_target (chartAt H x) I)
this : extChartAt I x = PartialHomeomorph.extend (chartAt H x) I
⊢ IsInteriorPoint I x

Next tactic:
rw [← this] at r
/-- If `I` is boundaryless, every point of `M` is an interior point. -/
lemma isInteriorPoint {x : M} : I.IsInteriorPoint x := by
  let r := ((chartAt H x).isOpen_extend_target I).interior_eq
  have : extChartAt I x = (chartAt H x).extend I := rfl
  rw [← this] at r
  

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✝ : Boundaryless I
x : M
r : interior (extChartAt I x).target = (extChartAt I x).target
this : extChartAt I x = PartialHomeomorph.extend (chartAt H x) I
⊢ IsInteriorPoint I x

Next tactic:
rw [ModelWithCorners.isInteriorPoint_iff, r]