l3lab/ntp-mathlib huggingface dataset:
/-- If a bounded linear map is a bijection, then its inverse is also a bounded linear map. -/
@[continuity]
theorem continuous_symm (e : E ≃ₗ[𝕜] F) (h : Continuous e) : Continuous e.symm := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
e : E ≃ₗ[𝕜] F
h : Continuous ⇑e
⊢ Continuous ⇑(symm e)

Next tactic:
rw [continuous_def]
/-- If a bounded linear map is a bijection, then its inverse is also a bounded linear map. -/
@[continuity]
theorem continuous_symm (e : E ≃ₗ[𝕜] F) (h : Continuous e) : Continuous e.symm := by
  rw [continuous_def]
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
e : E ≃ₗ[𝕜] F
h : Continuous ⇑e
⊢ ∀ (s : Set E), IsOpen s → IsOpen (⇑(symm e) ⁻¹' s)

Next tactic:
intro s hs
/-- If a bounded linear map is a bijection, then its inverse is also a bounded linear map. -/
@[continuity]
theorem continuous_symm (e : E ≃ₗ[𝕜] F) (h : Continuous e) : Continuous e.symm := by
  rw [continuous_def]
  intro s hs
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
e : E ≃ₗ[𝕜] F
h : Continuous ⇑e
s : Set E
hs : IsOpen s
⊢ IsOpen (⇑(symm e) ⁻¹' s)

Next tactic:
rw [← e.image_eq_preimage]
/-- If a bounded linear map is a bijection, then its inverse is also a bounded linear map. -/
@[continuity]
theorem continuous_symm (e : E ≃ₗ[𝕜] F) (h : Continuous e) : Continuous e.symm := by
  rw [continuous_def]
  intro s hs
  rw [← e.image_eq_preimage]
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
e : E ≃ₗ[𝕜] F
h : Continuous ⇑e
s : Set E
hs : IsOpen s
⊢ IsOpen (⇑e '' s)

Next tactic:
rw [← e.coe_coe] at h ⊢
/-- If a bounded linear map is a bijection, then its inverse is also a bounded linear map. -/
@[continuity]
theorem continuous_symm (e : E ≃ₗ[𝕜] F) (h : Continuous e) : Continuous e.symm := by
  rw [continuous_def]
  intro s hs
  rw [← e.image_eq_preimage]
  rw [← e.coe_coe] at h ⊢
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
e : E ≃ₗ[𝕜] F
h : Continuous ⇑↑e
s : Set E
hs : IsOpen s
⊢ IsOpen (⇑↑e '' s)

Next tactic:
exact ContinuousLinearMap.isOpenMap (𝕜 := 𝕜) ⟨↑e, h⟩ e.surjective s hs
/-- Convert a bijective continuous linear map `f : E →L[𝕜] F` from a Banach space to a normed space
to a continuous linear equivalence. -/
noncomputable def ofBijective (f : E →L[𝕜] F) (hinj : ker f = ⊥) (hsurj : LinearMap.range f = ⊤) :
    E ≃L[𝕜] F :=
  (LinearEquiv.ofBijective ↑f
        ⟨LinearMap.ker_eq_bot.mp hinj,
          LinearMap.range_eq_top.mp hsurj⟩).toContinuousLinearEquivOfContinuous
    -- Porting note: added `by convert`
    (by 

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hinj : LinearMap.ker f = ⊥
hsurj : LinearMap.range f = ⊤
⊢ Continuous ⇑(LinearEquiv.ofBijective ↑f (_ : Injective ⇑↑f ∧ Surjective ⇑↑f))

Next tactic:
convert f.continuous
theorem coe_ofBijective (f : E →L[𝕜] F) (hinj : ker f = ⊥) (hsurj : LinearMap.range f = ⊤) :
    ↑(ofBijective f hinj hsurj) = f := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hinj : LinearMap.ker f = ⊥
hsurj : LinearMap.range f = ⊤
⊢ ↑(ofBijective f hinj hsurj) = f

Next tactic:
ext
theorem coe_ofBijective (f : E →L[𝕜] F) (hinj : ker f = ⊥) (hsurj : LinearMap.range f = ⊤) :
    ↑(ofBijective f hinj hsurj) = f := by
  ext
  

Proof state:
case h
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
hinj : LinearMap.ker f = ⊥
hsurj : LinearMap.range f = ⊤
x✝ : E
⊢ ↑(ofBijective f hinj hsurj) x✝ = f x✝

Next tactic:
rfl
/-- Intermediate definition used to show
`ContinuousLinearMap.closed_complemented_range_of_isCompl_of_ker_eq_bot`.

This is `f.coprod G.subtypeL` as a `ContinuousLinearEquiv`. -/
noncomputable def coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) : (E × G) ≃L[𝕜] F :=
  ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
    (by
      

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ LinearMap.ker (coprod f (Submodule.subtypeL G)) = ⊥

Next tactic:
rw [ker_coprod_of_disjoint_range]
/-- Intermediate definition used to show
`ContinuousLinearMap.closed_complemented_range_of_isCompl_of_ker_eq_bot`.

This is `f.coprod G.subtypeL` as a `ContinuousLinearEquiv`. -/
noncomputable def coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) : (E × G) ≃L[𝕜] F :=
  ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
    (by
      rw [ker_coprod_of_disjoint_range]
      · 

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ Submodule.prod (LinearMap.ker f) (LinearMap.ker (Submodule.subtypeL G)) = ⊥

Next tactic:
rw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]
/-- Intermediate definition used to show
`ContinuousLinearMap.closed_complemented_range_of_isCompl_of_ker_eq_bot`.

This is `f.coprod G.subtypeL` as a `ContinuousLinearEquiv`. -/
noncomputable def coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) : (E × G) ≃L[𝕜] F :=
  ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
    (by
      rw [ker_coprod_of_disjoint_range]
      · rw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]
      · 

Proof state:
case hd
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ Disjoint (LinearMap.range f) (LinearMap.range (Submodule.subtypeL G))

Next tactic:
rw [Submodule.range_subtypeL]
/-- Intermediate definition used to show
`ContinuousLinearMap.closed_complemented_range_of_isCompl_of_ker_eq_bot`.

This is `f.coprod G.subtypeL` as a `ContinuousLinearEquiv`. -/
noncomputable def coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) : (E × G) ≃L[𝕜] F :=
  ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
    (by
      rw [ker_coprod_of_disjoint_range]
      · rw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]
      · rw [Submodule.range_subtypeL]
        

Proof state:
case hd
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ Disjoint (LinearMap.range f) G

Next tactic:
exact h.disjoint
/-- Intermediate definition used to show
`ContinuousLinearMap.closed_complemented_range_of_isCompl_of_ker_eq_bot`.

This is `f.coprod G.subtypeL` as a `ContinuousLinearEquiv`. -/
noncomputable def coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) : (E × G) ≃L[𝕜] F :=
  ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
    (by
      rw [ker_coprod_of_disjoint_range]
      · rw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]
      · rw [Submodule.range_subtypeL]
        exact h.disjoint)
    -- Porting note: was `simp only`
    (by 

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ LinearMap.range (coprod f (Submodule.subtypeL G)) = ⊤

Next tactic:
rw [range_coprod, Submodule.range_subtypeL, h.sup_eq_top]
theorem range_eq_map_coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) :
    LinearMap.range f =
      ((⊤ : Submodule 𝕜 E).prod (⊥ : Submodule 𝕜 G)).map
        (f.coprodSubtypeLEquivOfIsCompl h hker : E × G →ₗ[𝕜] F) := by
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ LinearMap.range f = Submodule.map (↑↑(coprodSubtypeLEquivOfIsCompl f h hker)) (Submodule.prod ⊤ ⊥)

Next tactic:
rw [coprodSubtypeLEquivOfIsCompl, ContinuousLinearEquiv.coe_ofBijective,
    coe_coprod, LinearMap.coprod_map_prod, Submodule.map_bot, sup_bot_eq, Submodule.map_top]
theorem range_eq_map_coprodSubtypeLEquivOfIsCompl (f : E →L[𝕜] F) {G : Submodule 𝕜 F}
    (h : IsCompl (LinearMap.range f) G) [CompleteSpace G] (hker : ker f = ⊥) :
    LinearMap.range f =
      ((⊤ : Submodule 𝕜 E).prod (⊥ : Submodule 𝕜 G)).map
        (f.coprodSubtypeLEquivOfIsCompl h hker : E × G →ₗ[𝕜] F) := by
  rw [coprodSubtypeLEquivOfIsCompl, ContinuousLinearEquiv.coe_ofBijective,
    coe_coprod, LinearMap.coprod_map_prod, Submodule.map_bot, sup_bot_eq, Submodule.map_top]
  

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝² : CompleteSpace F
inst✝¹ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
inst✝ : CompleteSpace ↥G
hker : LinearMap.ker f = ⊥
⊢ LinearMap.range f = LinearMap.range ↑f

Next tactic:
rfl
theorem closed_complemented_range_of_isCompl_of_ker_eq_bot (f : E →L[𝕜] F) (G : Submodule 𝕜 F)
    (h : IsCompl (LinearMap.range f) G) (hG : IsClosed (G : Set F)) (hker : ker f = ⊥) :
    IsClosed (LinearMap.range f : Set F) := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
hG : IsClosed ↑G
hker : LinearMap.ker f = ⊥
⊢ IsClosed ↑(LinearMap.range f)

Next tactic:
haveI : CompleteSpace G := hG.completeSpace_coe
theorem closed_complemented_range_of_isCompl_of_ker_eq_bot (f : E →L[𝕜] F) (G : Submodule 𝕜 F)
    (h : IsCompl (LinearMap.range f) G) (hG : IsClosed (G : Set F)) (hker : ker f = ⊥) :
    IsClosed (LinearMap.range f : Set F) := by
  haveI : CompleteSpace G := hG.completeSpace_coe
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
hG : IsClosed ↑G
hker : LinearMap.ker f = ⊥
this : CompleteSpace ↥G
⊢ IsClosed ↑(LinearMap.range f)

Next tactic:
let g := coprodSubtypeLEquivOfIsCompl f h hker
theorem closed_complemented_range_of_isCompl_of_ker_eq_bot (f : E →L[𝕜] F) (G : Submodule 𝕜 F)
    (h : IsCompl (LinearMap.range f) G) (hG : IsClosed (G : Set F)) (hker : ker f = ⊥) :
    IsClosed (LinearMap.range f : Set F) := by
  haveI : CompleteSpace G := hG.completeSpace_coe
  let g := coprodSubtypeLEquivOfIsCompl f h hker
  -- Porting note: was `rw [congr_arg coe ...]`
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
hG : IsClosed ↑G
hker : LinearMap.ker f = ⊥
this : CompleteSpace ↥G
g : (E × ↥G) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker
⊢ IsClosed ↑(LinearMap.range f)

Next tactic:
rw [range_eq_map_coprodSubtypeLEquivOfIsCompl f h hker]
theorem closed_complemented_range_of_isCompl_of_ker_eq_bot (f : E →L[𝕜] F) (G : Submodule 𝕜 F)
    (h : IsCompl (LinearMap.range f) G) (hG : IsClosed (G : Set F)) (hker : ker f = ⊥) :
    IsClosed (LinearMap.range f : Set F) := by
  haveI : CompleteSpace G := hG.completeSpace_coe
  let g := coprodSubtypeLEquivOfIsCompl f h hker
  -- Porting note: was `rw [congr_arg coe ...]`
  rw [range_eq_map_coprodSubtypeLEquivOfIsCompl f h hker]
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
hG : IsClosed ↑G
hker : LinearMap.ker f = ⊥
this : CompleteSpace ↥G
g : (E × ↥G) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker
⊢ IsClosed ↑(Submodule.map (↑↑(coprodSubtypeLEquivOfIsCompl f h hker)) (Submodule.prod ⊤ ⊥))

Next tactic:
apply g.toHomeomorph.isClosed_image.2
theorem closed_complemented_range_of_isCompl_of_ker_eq_bot (f : E →L[𝕜] F) (G : Submodule 𝕜 F)
    (h : IsCompl (LinearMap.range f) G) (hG : IsClosed (G : Set F)) (hker : ker f = ⊥) :
    IsClosed (LinearMap.range f : Set F) := by
  haveI : CompleteSpace G := hG.completeSpace_coe
  let g := coprodSubtypeLEquivOfIsCompl f h hker
  -- Porting note: was `rw [congr_arg coe ...]`
  rw [range_eq_map_coprodSubtypeLEquivOfIsCompl f h hker]
  apply g.toHomeomorph.isClosed_image.2
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f✝ : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
f : E →L[𝕜] F
G : Submodule 𝕜 F
h : IsCompl (LinearMap.range f) G
hG : IsClosed ↑G
hker : LinearMap.ker f = ⊥
this : CompleteSpace ↥G
g : (E × ↥G) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker
⊢ IsClosed ↑(Submodule.prod ⊤ ⊥)

Next tactic:
exact isClosed_univ.prod isClosed_singleton
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
⊢ Continuous ⇑g

Next tactic:
letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
this : CompleteSpace ↥(graph g) := completeSpace_coe_iff_isComplete.mpr (IsClosed.isComplete hg)
⊢ Continuous ⇑g

Next tactic:
let φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
  let φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
this : CompleteSpace ↥(graph g) := completeSpace_coe_iff_isComplete.mpr (IsClosed.isComplete hg)
φ₀ : E →ₗ[𝕜] E × F := prod id g
⊢ Continuous ⇑g

Next tactic:
have : Function.LeftInverse Prod.fst φ₀ := fun x => rfl
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
  let φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g
  have : Function.LeftInverse Prod.fst φ₀ := fun x => rfl
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
this✝ : CompleteSpace ↥(graph g) := completeSpace_coe_iff_isComplete.mpr (IsClosed.isComplete hg)
φ₀ : E →ₗ[𝕜] E × F := prod id g
this : LeftInverse Prod.fst ⇑φ₀
⊢ Continuous ⇑g

Next tactic:
let φ : E ≃ₗ[𝕜] g.graph :=
    (LinearEquiv.ofLeftInverse this).trans (LinearEquiv.ofEq _ _ g.graph_eq_range_prod.symm)
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
  let φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g
  have : Function.LeftInverse Prod.fst φ₀ := fun x => rfl
  let φ : E ≃ₗ[𝕜] g.graph :=
    (LinearEquiv.ofLeftInverse this).trans (LinearEquiv.ofEq _ _ g.graph_eq_range_prod.symm)
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
this✝ : CompleteSpace ↥(graph g) := completeSpace_coe_iff_isComplete.mpr (IsClosed.isComplete hg)
φ₀ : E →ₗ[𝕜] E × F := prod id g
this : LeftInverse Prod.fst ⇑φ₀
φ : E ≃ₗ[𝕜] ↥(graph g) :=
  LinearEquiv.ofLeftInverse this ≪≫ₗ LinearEquiv.ofEq (range φ₀) (graph g) (_ : range (prod id g) = graph g)
⊢ Continuous ⇑g

Next tactic:
let ψ : g.graph ≃L[𝕜] E :=
    φ.symm.toContinuousLinearEquivOfContinuous continuous_subtype_val.fst
/-- The **closed graph theorem** : a linear map between two Banach spaces whose graph is closed
is continuous. -/
theorem LinearMap.continuous_of_isClosed_graph (hg : IsClosed (g.graph : Set <| E × F)) :
    Continuous g := by
  letI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete
  let φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g
  have : Function.LeftInverse Prod.fst φ₀ := fun x => rfl
  let φ : E ≃ₗ[𝕜] g.graph :=
    (LinearEquiv.ofLeftInverse this).trans (LinearEquiv.ofEq _ _ g.graph_eq_range_prod.symm)
  let ψ : g.graph ≃L[𝕜] E :=
    φ.symm.toContinuousLinearEquivOfContinuous continuous_subtype_val.fst
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : IsClosed ↑(graph g)
this✝ : CompleteSpace ↥(graph g) := completeSpace_coe_iff_isComplete.mpr (IsClosed.isComplete hg)
φ₀ : E →ₗ[𝕜] E × F := prod id g
this : LeftInverse Prod.fst ⇑φ₀
φ : E ≃ₗ[𝕜] ↥(graph g) :=
  LinearEquiv.ofLeftInverse this ≪≫ₗ LinearEquiv.ofEq (range φ₀) (graph g) (_ : range (prod id g) = graph g)
ψ : ↥(graph g) ≃L[𝕜] E :=
  LinearEquiv.toContinuousLinearEquivOfContinuous (LinearEquiv.symm φ) (_ : Continuous fun a => (↑a).1)
⊢ Continuous ⇑g

Next tactic:
exact (continuous_subtype_val.comp ψ.symm.continuous).snd
/-- A useful form of the **closed graph theorem** : let `f` be a linear map between two Banach
spaces. To show that `f` is continuous, it suffices to show that for any convergent sequence
`uₙ ⟶ x`, if `f(uₙ) ⟶ y` then `y = f(x)`. -/
theorem LinearMap.continuous_of_seq_closed_graph
    (hg : ∀ (u : ℕ → E) (x y), Tendsto u atTop (𝓝 x) → Tendsto (g ∘ u) atTop (𝓝 y) → y = g x) :
    Continuous g := by
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (⇑g ∘ u) atTop (𝓝 y) → y = g x
⊢ Continuous ⇑g

Next tactic:
refine' g.continuous_of_isClosed_graph (IsSeqClosed.isClosed _)
/-- A useful form of the **closed graph theorem** : let `f` be a linear map between two Banach
spaces. To show that `f` is continuous, it suffices to show that for any convergent sequence
`uₙ ⟶ x`, if `f(uₙ) ⟶ y` then `y = f(x)`. -/
theorem LinearMap.continuous_of_seq_closed_graph
    (hg : ∀ (u : ℕ → E) (x y), Tendsto u atTop (𝓝 x) → Tendsto (g ∘ u) atTop (𝓝 y) → y = g x) :
    Continuous g := by
  refine' g.continuous_of_isClosed_graph (IsSeqClosed.isClosed _)
  

Proof state:
𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
f : E →L[𝕜] F
inst✝¹ : CompleteSpace F
inst✝ : CompleteSpace E
g : E →ₗ[𝕜] F
hg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (⇑g ∘ u) atTop (𝓝 y) → y = g x
⊢ IsSeqClosed ↑(graph g)

Next tactic:
rintro φ ⟨x, y⟩ hφg hφ