-- Mathlib/Topology/Algebra/Module/FiniteDimension.lean
theorem LinearMap.continuous_of_nonzero_on_open (l : E →ₗ[𝕜] 𝕜) (s : Set E) (hs₁ : IsOpen s)
    (hs₂ : s.Nonempty) (hs₃ : ∀ x ∈ s, l x ≠ 0) : Continuous l

Proof state:
case intro
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
⊢ False

Tactic:
have : x ∈ interior (LinearMap.ker l : Set E)ᶜ := by
  rw [mem_interior_iff_mem_nhds]
  exact mem_of_superset (hs₁.mem_nhds hx) hs₃

Result:
case intro
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
this : x ∈ interior (↑(ker l))ᶜ
⊢ False

Proof state:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
⊢ x ∈ interior (↑(ker l))ᶜ

Tactic:
rw [mem_interior_iff_mem_nhds]

Result:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
⊢ (↑(ker l))ᶜ ∈ 𝓝 x

Proof state:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
⊢ (↑(ker l))ᶜ ∈ 𝓝 x

Tactic:
exact mem_of_superset (hs₁.mem_nhds hx) hs₃

Result:
no goals

Proof state:
case intro
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
this : x ∈ interior (↑(ker l))ᶜ
⊢ False

Tactic:
rwa [hl.interior_compl] at this

Result:
no goals

Proof state:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₂ : s.Nonempty
hs₃ : ∀ x ∈ s, l x ≠ 0
⊢ Continuous ⇑l

Tactic:
refine l.continuous_of_isClosed_ker (l.isClosed_or_dense_ker.resolve_right fun hl => ?_)

Result:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₂ : s.Nonempty
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
⊢ False

Proof state:
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₂ : s.Nonempty
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
⊢ False

Tactic:
rcases hs₂ with ⟨x, hx⟩

Result:
case intro
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : IsTopologicalAddGroup E
inst✝ : ContinuousSMul 𝕜 E
l : E →ₗ[𝕜] 𝕜
s : Set E
hs₁ : IsOpen s
hs₃ : ∀ x ∈ s, l x ≠ 0
hl : Dense ↑(ker l)
x : E
hx : x ∈ s
⊢ False