case refine'_1
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x : E
h : StarConvex ℝ x s
hne : Set.Nonempty s
p : ↑unitInterval × ↑s
⊢ ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s

case refine'_2
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x : E
h : StarConvex ℝ x s
hne : Set.Nonempty s
⊢ Continuous fun p =>
    { val := ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s) }

case refine'_3
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ContinuousMap.toFun
      (ContinuousMap.mk fun p =>
        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
      (0, x) =
    ↑(ContinuousMap.id ↑s) x

case refine'_4
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ContinuousMap.toFun
      (ContinuousMap.mk fun p =>
        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
      (1, x) =
    ↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x : E
h : StarConvex ℝ x s
hne : Set.Nonempty s
⊢ ContractibleSpace ↑s
refine'
  (contractible_iff_id_nullhomotopic s).2
    ⟨⟨x, h.mem hne⟩,
      ⟨⟨⟨fun p => ⟨p.1.1 • x + (1 - p.1.1) • (p.2 : E), _⟩, _⟩, fun x => _, fun x => _⟩⟩⟩
no goals
case refine'_1
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x : E
h : StarConvex ℝ x s
hne : Set.Nonempty s
p : ↑unitInterval × ↑s
⊢ ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s
exact h p.2.2 p.1.2.1 (sub_nonneg.2 p.1.2.2) (add_sub_cancel'_right _ _)
no goals
case refine'_2
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x : E
h : StarConvex ℝ x s
hne : Set.Nonempty s
⊢ Continuous fun p =>
    { val := ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s) }
exact
  ((continuous_subtype_val.fst'.smul continuous_const).add
        ((continuous_const.sub continuous_subtype_val.fst').smul
          continuous_subtype_val.snd')).subtype_mk
    _
case refine'_3.a
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ↑(ContinuousMap.toFun
        (ContinuousMap.mk fun p =>
          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
        (0, x)) =
    ↑(↑(ContinuousMap.id ↑s) x)
case refine'_3
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ContinuousMap.toFun
      (ContinuousMap.mk fun p =>
        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
      (0, x) =
    ↑(ContinuousMap.id ↑s) x
ext1
no goals
case refine'_3.a
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ↑(ContinuousMap.toFun
        (ContinuousMap.mk fun p =>
          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
        (0, x)) =
    ↑(↑(ContinuousMap.id ↑s) x)
simp
case refine'_4.a
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ↑(ContinuousMap.toFun
        (ContinuousMap.mk fun p =>
          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
        (1, x)) =
    ↑(↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x)
case refine'_4
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ContinuousMap.toFun
      (ContinuousMap.mk fun p =>
        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
      (1, x) =
    ↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x
ext1
no goals
case refine'_4.a
E : Type u_1
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul ℝ E
s : Set E
x✝ : E
h : StarConvex ℝ x✝ s
hne : Set.Nonempty s
x : ↑s
⊢ ↑(ContinuousMap.toFun
        (ContinuousMap.mk fun p =>
          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })
        (1, x)) =
    ↑(↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x)
simp