Theorem: Submodule.eq_top_of_nonempty_interior'
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: rcases hs with ⟨y, hy⟩
state_before: R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
hs : Set.Nonempty (interior ↑s)
⊢ s = ⊤

tactic: refine' Submodule.eq_top_iff'.2 fun x => _
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : y ∈ interior ↑s
⊢ s = ⊤

tactic: rw [mem_interior_iff_mem_nhds] at hy
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : y ∈ interior ↑s
x : M
⊢ x ∈ s

tactic: have : Tendsto (fun c : R => y + c • x) (𝓝[{ x : R | IsUnit x }] 0) (𝓝 (y + (0 : R) • x)) :=
  tendsto_const_nhds.add ((tendsto_nhdsWithin_of_tendsto_nhds tendsto_id).smul tendsto_const_nhds)
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : ↑s ∈ 𝓝 y
x : M
⊢ x ∈ s

tactic: rw [zero_smul, add_zero] at this
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : ↑s ∈ 𝓝 y
x : M
this : Tendsto (fun c => y + c • x) (𝓝[{x | IsUnit x}] 0) (𝓝 (y + 0 • x))
⊢ x ∈ s

tactic: obtain ⟨_, hu : y + _ • _ ∈ s, u, rfl⟩ :=
  nonempty_of_mem (inter_mem (Filter.mem_map.1 (this hy)) self_mem_nhdsWithin)
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : ↑s ∈ 𝓝 y
x : M
this : Tendsto (fun c => y + c • x) (𝓝[{x | IsUnit x}] 0) (𝓝 y)
⊢ x ∈ s

tactic: have hy' : y ∈ ↑s := mem_of_mem_nhds hy
state_before: case intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : ↑s ∈ 𝓝 y
x : M
this : Tendsto (fun c => y + c • x) (𝓝[{x | IsUnit x}] 0) (𝓝 y)
u : Rˣ
hu : y + ↑u • x ∈ s
⊢ x ∈ s

tactic: rwa [s.add_mem_iff_right hy', ← Units.smul_def, s.smul_mem_iff' u] at hu
state_before: case intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : TopologicalSpace R
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : ContinuousAdd M
inst✝² : Module R M
inst✝¹ : ContinuousSMul R M
inst✝ : NeBot (𝓝[{x | IsUnit x}] 0)
s : Submodule R M
y : M
hy : ↑s ∈ 𝓝 y
x : M
this : Tendsto (fun c => y + c • x) (𝓝[{x | IsUnit x}] 0) (𝓝 y)
u : Rˣ
hu : y + ↑u • x ∈ s
hy' : y ∈ ↑s
⊢ x ∈ s