The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V22. Affine, Euclidean and convex geometry

Mathlib.Geometry.Convex.Segment

38 declarations. Mathlib docs · Source

Segments in convex spaces

In an R-convex space, we define the following objects:

  • Icc R x y: Closed segment joining x and y.
  • Ioo R x y: Open segment joining x and y.
  • Ico R x y: Half-open segment joining x and y.

Implementation notes

We don't provide the left-open equivalent to Set.Ioc since Ico x y = Ioc y x. This is in contrast to Set.Ico and Set.Ioc. See also Ioo_insert_left and Ioo_insert_right.

def Convexity.Icc E1 #

(R : Type u_1) →
  {X : Type u_2} →
    [inst : Semiring R] →
      [inst_1 : PartialOrder R] → [inst_2 : IsStrictOrderedRing R] → [Convexity.ConvexSpace R X] → X → X → Set X

Segment in a convex space.

def Convexity.Ioo E1 #

(R : Type u_1) →
  {X : Type u_2} →
    [inst : Semiring R] →
      [inst_1 : PartialOrder R] → [inst_2 : IsStrictOrderedRing R] → [Convexity.ConvexSpace R X] → X → X → Set X

Open segment in a convex space. Note that Ioo R x x = {x} instead of ∅ if the base semiring has some element between 0 and 1.

def Convexity.Ico E1 #

(R : Type u_1) →
  {X : Type u_2} →
    [inst : Semiring R] →
      [inst_1 : PartialOrder R] → [inst_2 : IsStrictOrderedRing R] → [Convexity.ConvexSpace R X] → X → X → Set X

Left-open segment in a convex space. Note that Ico R x x = {x} instead of ∅ . We do not implement a right-open segment Ioc R a b. Instead use Ico R b a.

theorem Convexity.Icc_symm E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), Convexity.Icc R x y = Convexity.Icc R y x

[x,y] = [y,x]

theorem Convexity.Ioo_symm E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), Convexity.Ioo R x y = Convexity.Ioo R y x

(x,y) = (y,x)

theorem Convexity.Ioo_subset_Ico E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), Convexity.Ioo R x y ⊆ Convexity.Ico R x y

theorem Convexity.Ico_subset_Icc E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), Convexity.Ico R x y ⊆ Convexity.Icc R x y

theorem Convexity.Ioo_subset_Icc E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), Convexity.Ioo R x y ⊆ Convexity.Icc R x y

theorem Convexity.convexCombPair_mem_Icc E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} ⦃a b : R⦄ (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1),
  Convexity.convexCombPair a b ha hb hab x y ∈ Convexity.Icc R x y

theorem Convexity.convexCombPair_mem_Ioo E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} ⦃a b : R⦄ (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1),
  Convexity.convexCombPair a b ⋯ ⋯ hab x y ∈ Convexity.Ioo R x y

theorem Convexity.convexCombPair_mem_Ico E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} ⦃a b : R⦄ (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1),
  Convexity.convexCombPair a b ⋯ hb hab x y ∈ Convexity.Ico R x y

theorem Convexity.forall_mem_Icc_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} (p : X → Prop),
  (∀ z ∈ Convexity.Icc R x y, p z) ↔
    ∀ ⦃a b : R⦄ (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1), p (Convexity.convexCombPair a b ha hb hab x y)

theorem Convexity.forall_mem_Ioo_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} (p : X → Prop),
  (∀ z ∈ Convexity.Ioo R x y, p z) ↔
    ∀ ⦃a b : R⦄ (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1), p (Convexity.convexCombPair a b ⋯ ⋯ hab x y)

theorem Convexity.forall_mem_Ico_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {x y : X} (p : X → Prop),
  (∀ z ∈ Convexity.Ico R x y, p z) ↔
    ∀ ⦃a b : R⦄ (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1), p (Convexity.convexCombPair a b ⋯ hb hab x y)

theorem Convexity.Icc_subset_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {s : Set X} {x y : X},
  Convexity.Icc R x y ⊆ s ↔
    ∀ ⦃a b : R⦄ (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1), Convexity.convexCombPair a b ha hb hab x y ∈ s

theorem Convexity.Ioo_subset_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {s : Set X} {x y : X},
  Convexity.Ioo R x y ⊆ s ↔
    ∀ ⦃a b : R⦄ (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1), Convexity.convexCombPair a b ⋯ ⋯ hab x y ∈ s

theorem Convexity.Ico_subset_iff E0 #

∀ {R : Type u_2} {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {s : Set X} {x y : X},
  Convexity.Ico R x y ⊆ s ↔
    ∀ ⦃a b : R⦄ (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1), Convexity.convexCombPair a b ⋯ hb hab x y ∈ s

theorem Convexity.left_mem_Icc E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), x ∈ Convexity.Icc R x y

theorem Convexity.right_mem_Icc E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), y ∈ Convexity.Icc R x y

theorem Convexity.left_mem_Ico E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), x ∈ Convexity.Ico R x y

theorem Convexity.Icc_subset_iff_mem_of_isConvexSet E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {s : Set X},
  Convexity.IsConvexSet R s → ∀ (x y : X), Convexity.Icc R x y ⊆ s ↔ x ∈ s ∧ y ∈ s

theorem Convexity.Icc_self E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x : X), Convexity.Icc R x x = {x}

theorem Convexity.Ioo_subset_singleton E1 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x : X), Convexity.Ioo R x x ⊆ {x}

theorem Convexity.Ico_self E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x : X), Convexity.Ico R x x = {x}

theorem Convexity.Ioo_insert_left E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), insert x (Convexity.Ioo R x y) = Convexity.Ico R x y

theorem Convexity.Ioo_insert_right E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), insert y (Convexity.Ioo R x y) = Convexity.Ico R y x

theorem Convexity.Ico_insert E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] (x y : X), insert y (Convexity.Ico R x y) = Convexity.Icc R x y

theorem Convexity.IsAffineMap.image_Icc E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ (a b : X), f '' Convexity.Icc R a b = Convexity.Icc R (f a) (f b)

theorem Convexity.IsAffineMap.mem_Icc_image E0 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ {a b c : X}, c ∈ Convexity.Icc R a b → f c ∈ Convexity.Icc R (f a) (f b)

theorem Convexity.IsAffineMap.image_Ioo E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ (a b : X), f '' Convexity.Ioo R a b = Convexity.Ioo R (f a) (f b)

theorem Convexity.IsAffineMap.mem_Ioo_image E0 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ {a b c : X}, c ∈ Convexity.Ioo R a b → f c ∈ Convexity.Ioo R (f a) (f b)

theorem Convexity.IsAffineMap.image_Ico E1 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ (a b : X), f '' Convexity.Ico R a b = Convexity.Ico R (f a) (f b)

theorem Convexity.IsAffineMap.mem_Ico_image E0 #

∀ {R : Type u_1} {X : Type u_2} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_3} [inst_4 : Convexity.ConvexSpace R Y] {f : X → Y},
  Convexity.IsAffineMap R f → ∀ {a b c : X}, c ∈ Convexity.Ico R a b → f c ∈ Convexity.Ico R (f a) (f b)

theorem Convexity.Prod.Icc_subset E1 #

∀ (R : Type u_3) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_2} [inst_4 : Convexity.ConvexSpace R Y] (x y : X × Y),
  Convexity.Icc R x y ⊆ Convexity.Icc R x.1 y.1 ×ˢ Convexity.Icc R x.2 y.2

theorem Convexity.Prod.Ioo_subset E1 #

∀ (R : Type u_3) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_2} [inst_4 : Convexity.ConvexSpace R Y] (x y : X × Y),
  Convexity.Ioo R x y ⊆ Convexity.Ioo R x.1 y.1 ×ˢ Convexity.Ioo R x.2 y.2

theorem Convexity.Prod.Ico_subset E1 #

∀ (R : Type u_3) {X : Type u_1} [inst : Semiring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] {Y : Type u_2} [inst_4 : Convexity.ConvexSpace R Y] (x y : X × Y),
  Convexity.Ico R x y ⊆ Convexity.Ico R x.1 y.1 ×ˢ Convexity.Ico R x.2 y.2

theorem Convexity.Ioo_self E0 #

∀ (R : Type u_2) {X : Type u_1} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
  [inst_3 : Convexity.ConvexSpace R X] [DenselyOrdered R] (x : X), Convexity.Ioo R x x = {x}

theorem Convexity.isConvexSet_iff_Icc_subset_of_mem E1 #

∀ (K : Type u_1) {X : Type u_2} [inst : DivisionSemiring K] [inst_1 : LinearOrder K] [inst_2 : IsStrictOrderedRing K]
  [inst_3 : Convexity.ConvexSpace K X] {s : Set X},
  Convexity.IsConvexSet K s ↔ ∀ x ∈ s, ∀ y ∈ s, Convexity.Icc K x y ⊆ s