Theorem: AffineSubspace.isConnected_setOf_wOppSide
File: Mathlib/Analysis/Convex/Side.lean

tactic: obtain ⟨p, hp⟩ := h
state_before: R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : Set.Nonempty ↑s
⊢ IsConnected {y | WOppSide s x y}

tactic: haveI : Nonempty s := ⟨⟨p, hp⟩⟩
state_before: case intro
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
⊢ IsConnected {y | WOppSide s x y}

tactic: by_cases hx : x ∈ s
state_before: case intro
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
⊢ IsConnected {y | WOppSide s x y}

tactic: simp only [wOppSide_of_left_mem, hx]
state_before: case pos
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
hx : x ∈ s
⊢ IsConnected {y | WOppSide s x y}

tactic: have := AddTorsor.connectedSpace V P
state_before: case pos
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
hx : x ∈ s
⊢ IsConnected {y | True}

tactic: exact isConnected_univ
state_before: case pos
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this✝ : Nonempty { x // x ∈ s }
hx : x ∈ s
this : ConnectedSpace P
⊢ IsConnected {y | True}

tactic: rw [setOf_wOppSide_eq_image2 hx hp, ← Set.image_prod]
state_before: case neg
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
hx : ¬x ∈ s
⊢ IsConnected {y | WOppSide s x y}

tactic: refine' (isConnected_Iic.prod (isConnected_iff_connectedSpace.2 _)).image _
  ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn
state_before: case neg
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
hx : ¬x ∈ s
⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Iic 0 ×ˢ ↑s)

tactic: convert AddTorsor.connectedSpace s.direction s
state_before: case neg
R : Type ?u.487918
V : Type u_1
V' : Type ?u.487924
P : Type u_2
P' : Type ?u.487930
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x p : P
hp : p ∈ ↑s
this : Nonempty { x // x ∈ s }
hx : ¬x ∈ s
⊢ ConnectedSpace ↑↑s