# Documentation

Mathlib.Analysis.Convex.Star

# Star-convex sets #

This files defines star-convex sets (aka star domains, star-shaped set, radially convex set).

A set is star-convex at x if every segment from x to a point in the set is contained in the set.

This is the prototypical example of a contractible set in homotopy theory (by scaling every point towards x), but has wider uses.

Note that this has nothing to do with star rings, Star and co.

## Main declarations #

• StarConvex 𝕜 x s: s is star-convex at x with scalars 𝕜.

## Implementation notes #

Instead of saying that a set is star-convex, we say a set is star-convex at a point. This has the advantage of allowing us to talk about convexity as being "everywhere star-convexity" and of making the union of star-convex sets be star-convex.

Incidentally, this choice means we don't need to assume a set is nonempty for it to be star-convex. Concretely, the empty set is star-convex at every point.

## TODO #

Balanced sets are star-convex.

The closure of a star-convex set is star-convex.

Star-convex sets are contractible.

A nonempty open star-convex set in ℝ^n is diffeomorphic to the entire space.

def StarConvex (𝕜 : Type u_1) {E : Type u_2} [] [] [SMul 𝕜 E] (x : E) (s : Set E) :

Star-convexity of sets. s is star-convex at x if every segment from x to a point in s is contained in s.

Instances For
theorem starConvex_iff_segment_subset {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} :
StarConvex 𝕜 x s ∀ ⦃y : E⦄, y ssegment 𝕜 x y s
theorem StarConvex.segment_subset {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} (h : StarConvex 𝕜 x s) {y : E} (hy : y s) :
segment 𝕜 x y s
theorem StarConvex.openSegment_subset {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} (h : StarConvex 𝕜 x s) {y : E} (hy : y s) :
openSegment 𝕜 x y s
theorem starConvex_iff_pointwise_add_subset {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} :
StarConvex 𝕜 x s ∀ ⦃a b : 𝕜⦄, 0 a0 ba + b = 1a {x} + b s s

Alternative definition of star-convexity, in terms of pointwise set operations.

theorem starConvex_empty {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] (x : E) :
theorem starConvex_univ {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] (x : E) :
StarConvex 𝕜 x Set.univ
theorem StarConvex.inter {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} {t : Set E} (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 x t) :
StarConvex 𝕜 x (s t)
theorem starConvex_sInter {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {S : Set (Set E)} (h : ∀ (s : Set E), s SStarConvex 𝕜 x s) :
StarConvex 𝕜 x (⋂₀ S)
theorem starConvex_iInter {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {ι : Sort u_4} {s : ιSet E} (h : ∀ (i : ι), StarConvex 𝕜 x (s i)) :
StarConvex 𝕜 x (⋂ (i : ι), s i)
theorem StarConvex.union {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {s : Set E} {t : Set E} (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 x t) :
StarConvex 𝕜 x (s t)
theorem starConvex_iUnion {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {ι : Sort u_4} {s : ιSet E} (hs : ∀ (i : ι), StarConvex 𝕜 x (s i)) :
StarConvex 𝕜 x (⋃ (i : ι), s i)
theorem starConvex_sUnion {𝕜 : Type u_1} {E : Type u_2} [] [] [SMul 𝕜 E] {x : E} {S : Set (Set E)} (hS : ∀ (s : Set E), s SStarConvex 𝕜 x s) :
StarConvex 𝕜 x (⋃₀ S)
theorem StarConvex.prod {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [SMul 𝕜 E] [SMul 𝕜 F] {x : E} {y : F} {s : Set E} {t : Set F} (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 y t) :
StarConvex 𝕜 (x, y) (s ×ˢ t)
theorem starConvex_pi {𝕜 : Type u_1} [] {ι : Type u_4} {E : ιType u_5} [(i : ι) → AddCommMonoid (E i)] [(i : ι) → SMul 𝕜 (E i)] {x : (i : ι) → E i} {s : Set ι} {t : (i : ι) → Set (E i)} (ht : ∀ ⦃i : ι⦄, i sStarConvex 𝕜 (x i) (t i)) :
StarConvex 𝕜 x (Set.pi s t)
theorem StarConvex.mem {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (h : ) :
x s
theorem starConvex_iff_forall_pos {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hx : x s) :
StarConvex 𝕜 x s ∀ ⦃y : E⦄, y s∀ ⦃a b : 𝕜⦄, 0 < a0 < ba + b = 1a x + b y s
theorem starConvex_iff_forall_ne_pos {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hx : x s) :
StarConvex 𝕜 x s ∀ ⦃y : E⦄, y sx y∀ ⦃a b : 𝕜⦄, 0 < a0 < ba + b = 1a x + b y s
theorem starConvex_iff_openSegment_subset {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hx : x s) :
StarConvex 𝕜 x s ∀ ⦃y : E⦄, y sopenSegment 𝕜 x y s
theorem starConvex_singleton {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] (x : E) :
StarConvex 𝕜 x {x}
theorem StarConvex.linear_image {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (f : E →ₗ[𝕜] F) :
StarConvex 𝕜 (f x) (f '' s)
theorem StarConvex.is_linear_image {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) {f : EF} (hf : ) :
StarConvex 𝕜 (f x) (f '' s)
theorem StarConvex.linear_preimage {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} {s : Set F} (f : E →ₗ[𝕜] F) (hs : StarConvex 𝕜 (f x) s) :
StarConvex 𝕜 x (f ⁻¹' s)
theorem StarConvex.is_linear_preimage {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} {s : Set F} {f : EF} (hs : StarConvex 𝕜 (f x) s) (hf : ) :
StarConvex 𝕜 x (f ⁻¹' s)
theorem StarConvex.add {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {y : E} {s : Set E} {t : Set E} (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 y t) :
StarConvex 𝕜 (x + y) (s + t)
theorem StarConvex.add_left {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (z : E) :
StarConvex 𝕜 (z + x) ((fun x => z + x) '' s)
theorem StarConvex.add_right {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (z : E) :
StarConvex 𝕜 (x + z) ((fun x => x + z) '' s)
theorem StarConvex.preimage_add_right {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {z : E} {s : Set E} (hs : StarConvex 𝕜 (z + x) s) :
StarConvex 𝕜 x ((fun x => z + x) ⁻¹' s)

The translation of a star-convex set is also star-convex.

theorem StarConvex.preimage_add_left {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {z : E} {s : Set E} (hs : StarConvex 𝕜 (x + z) s) :
StarConvex 𝕜 x ((fun x => x + z) ⁻¹' s)

The translation of a star-convex set is also star-convex.

theorem StarConvex.sub' {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {y : E} {s : Set (E × E)} (hs : StarConvex 𝕜 (x, y) s) :
StarConvex 𝕜 (x - y) ((fun x => x.fst - x.snd) '' s)
theorem StarConvex.smul {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (c : 𝕜) :
StarConvex 𝕜 (c x) (c s)
theorem StarConvex.preimage_smul {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] {x : E} {s : Set E} {c : 𝕜} (hs : StarConvex 𝕜 (c x) s) :
StarConvex 𝕜 x ((fun z => c z) ⁻¹' s)
theorem StarConvex.affinity {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) (z : E) (c : 𝕜) :
StarConvex 𝕜 (z + c x) ((fun x => z + c x) '' s)
theorem starConvex_zero_iff {𝕜 : Type u_1} {E : Type u_2} [] [] [] {s : Set E} :
StarConvex 𝕜 0 s ∀ ⦃x : E⦄, x s∀ ⦃a : 𝕜⦄, 0 aa 1a x s
theorem StarConvex.add_smul_mem {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {y : E} {s : Set E} (hs : StarConvex 𝕜 x s) (hy : x + y s) {t : 𝕜} (ht₀ : 0 t) (ht₁ : t 1) :
x + t y s
theorem StarConvex.smul_mem {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 0 s) (hx : x s) {t : 𝕜} (ht₀ : 0 t) (ht₁ : t 1) :
t x s
theorem StarConvex.add_smul_sub_mem {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {y : E} {s : Set E} (hs : StarConvex 𝕜 x s) (hy : y s) {t : 𝕜} (ht₀ : 0 t) (ht₁ : t 1) :
x + t (y - x) s
theorem StarConvex.affine_preimage {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} (f : E →ᵃ[𝕜] F) {s : Set F} (hs : StarConvex 𝕜 (f x) s) :
StarConvex 𝕜 x (f ⁻¹' s)

The preimage of a star-convex set under an affine map is star-convex.

theorem StarConvex.affine_image {𝕜 : Type u_1} {E : Type u_2} {F : Type u_3} [] [] [] [Module 𝕜 E] [Module 𝕜 F] {x : E} (f : E →ᵃ[𝕜] F) {s : Set E} (hs : StarConvex 𝕜 x s) :
StarConvex 𝕜 (f x) (f '' s)

The image of a star-convex set under an affine map is star-convex.

theorem StarConvex.neg {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 x s) :
StarConvex 𝕜 (-x) (-s)
theorem StarConvex.sub {𝕜 : Type u_1} {E : Type u_2} [] [] [Module 𝕜 E] {x : E} {y : E} {s : Set E} {t : Set E} (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 y t) :
StarConvex 𝕜 (x - y) (s - t)
theorem starConvex_iff_div {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] {x : E} {s : Set E} :
StarConvex 𝕜 x s ∀ ⦃y : E⦄, y s∀ ⦃a b : 𝕜⦄, 0 a0 b0 < a + b(a / (a + b)) x + (b / (a + b)) y s

Alternative definition of star-convexity, using division.

theorem StarConvex.mem_smul {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] {x : E} {s : Set E} (hs : StarConvex 𝕜 0 s) (hx : x s) {t : 𝕜} (ht : 1 t) :
x t s

#### Star-convex sets in an ordered space #

Relates starConvex and Set.ordConnected.

theorem Set.OrdConnected.starConvex {𝕜 : Type u_1} {E : Type u_2} [] [Module 𝕜 E] [] {x : E} {s : Set E} (hs : ) (hx : x s) (h : ∀ (y : E), y sx y y x) :
StarConvex 𝕜 x s
theorem starConvex_iff_ordConnected {𝕜 : Type u_1} {x : 𝕜} {s : Set 𝕜} (hx : x s) :
StarConvex 𝕜 x s
theorem StarConvex.ordConnected {𝕜 : Type u_1} {x : 𝕜} {s : Set 𝕜} (hx : x s) :
StarConvex 𝕜 x s

Alias of the forward direction of starConvex_iff_ordConnected.