-- Mathlib/Analysis/Convex/Strict.lean
theorem StrictConvex.preimage_smul (hs : StrictConvex 𝕜 s) (c : 𝕜) :
    StrictConvex 𝕜 ((fun z => c • z) ⁻¹' s)

Proof state:
case pos
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
h✝ : 0 ∈ s
⊢ StrictConvex 𝕜 univ

Tactic:
exact strictConvex_univ

Result:
no goals

Proof state:
case inl
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
⊢ StrictConvex 𝕜 (if 0 ∈ s then univ else ∅)

Tactic:
split_ifs

Result:
case pos
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
h✝ : 0 ∈ s
⊢ StrictConvex 𝕜 univ

case neg
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
h✝ : 0 ∉ s
⊢ StrictConvex 𝕜 ∅

Proof state:
case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ Continuous ⇑((LinearMap.lsmul 𝕜 E) c)

Tactic:
unfold LinearMap.lsmul LinearMap.mk₂ LinearMap.mk₂' LinearMap.mk₂'ₛₗ

Result:
case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ Continuous
    ⇑({ toFun := fun m => { toFun := (fun x1 x2 => x1 • x2) m, map_add' := ⋯, map_smul' := ⋯ }, map_add' := ⋯,
          map_smul' := ⋯ }
        c)

Proof state:
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
⊢ StrictConvex 𝕜 ((fun z => c • z) ⁻¹' s)

Tactic:
obtain rfl | hc := eq_or_ne c 0

Result:
case inl
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
⊢ StrictConvex 𝕜 ((fun z => 0 • z) ⁻¹' s)

case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ StrictConvex 𝕜 ((fun z => c • z) ⁻¹' s)

Proof state:
case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ Continuous
    ⇑({ toFun := fun m => { toFun := (fun x1 x2 => x1 • x2) m, map_add' := ⋯, map_smul' := ⋯ }, map_add' := ⋯,
          map_smul' := ⋯ }
        c)

Tactic:
exact continuous_const_smul _

Result:
no goals

Proof state:
case neg
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
h✝ : 0 ∉ s
⊢ StrictConvex 𝕜 ∅

Tactic:
exact strictConvex_empty

Result:
no goals

Proof state:
case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ StrictConvex 𝕜 ((fun z => c • z) ⁻¹' s)

Tactic:
refine hs.linear_preimage (LinearMap.lsmul _ _ c) ?_ (smul_right_injective E hc)

Result:
case inr
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
c : 𝕜
hc : c ≠ 0
⊢ Continuous ⇑((LinearMap.lsmul 𝕜 E) c)

Proof state:
case inl
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
⊢ StrictConvex 𝕜 ((fun z => 0 • z) ⁻¹' s)

Tactic:
simp_rw [zero_smul, preimage_const]

Result:
case inl
𝕜 : Type u_1
E : Type u_3
inst✝⁵ : OrderedCommSemiring 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : Module 𝕜 E
inst✝¹ : NoZeroSMulDivisors 𝕜 E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : StrictConvex 𝕜 s
⊢ StrictConvex 𝕜 (if 0 ∈ s then univ else ∅)