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.LinearAlgebra.AffineSpace.Ordered

47 declarations. Mathlib docs · Source

Ordered modules as affine spaces

In this file we prove some theorems about slope and lineMap in the case when the module E acting on the codomain PE of a function is an ordered module over its domain k. We also prove inequalities that can be used to link convexity of a function on an interval to monotonicity of the slope, see section docstring below for details.

Implementation notes

We do not introduce the notion of ordered affine spaces (yet?). Instead, we prove various theorems for an ordered module interpreted as an affine space.

Tags

affine space, ordered module, slope

Monotonicity of lineMap

In this section we prove that lineMap a b r is monotone (strictly or not) in its arguments if other arguments belong to specific domains.

Convexity and slope

Given an interval [a, b] and a point c ∈ (a, b), c = lineMap a b r, there are a few ways to say that the point (c, f c) is above/below the segment [(a, f a), (b, f b)]:

  • compare f c to lineMap (f a) (f b) r;
  • compare slope f a c to slope f a b;
  • compare slope f c b to slope f a b;
  • compare slope f a c to slope f c b.

In this section we prove equivalence of these four approaches. In order to make the statements more readable, we introduce local notation c = lineMap a b r. Then we prove lemmas like

lemma map_le_lineMap_iff_slope_le_slope_left (h : 0 < r * (b - a)) :
    f c ≤ lineMap (f a) (f b) r ↔ slope f a c ≤ slope f a b :=

For each inequality between f c and lineMap (f a) (f b) r we provide 3 lemmas:

  • *_left relates it to an inequality on slope f a c and slope f a b;
  • *_right relates it to an inequality on slope f a b and slope f c b;
  • no-suffix version relates it to an inequality on slope f a c and slope f c b.

These inequalities can be used to restate convexOn in terms of monotonicity of the slope.

theorem lineMap_mono_left E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a a' b : E}
  {r : k}, a ≤ a' → r ≤ 1 → (AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a' b) r

theorem lineMap_strict_mono_left E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a a' b : E}
  {r : k}, a < a' → r < 1 → (AffineMap.lineMap a b) r < (AffineMap.lineMap a' b) r

theorem lineMap_mono_right E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E] {a b b' : E}
  {r : k}, b ≤ b' → 0 ≤ r → (AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a b') r

theorem lineMap_strict_mono_right E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E] {a b b' : E}
  {r : k}, b < b' → 0 < r → (AffineMap.lineMap a b) r < (AffineMap.lineMap a b') r

theorem lineMap_mono_endpoints E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a a' b b' : E}
  {r : k}, a ≤ a' → b ≤ b' → 0 ≤ r → r ≤ 1 → (AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a' b') r

theorem lineMap_strict_mono_endpoints E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a a' b b' : E}
  {r : k}, a < a' → b < b' → 0 ≤ r → r ≤ 1 → (AffineMap.lineMap a b) r < (AffineMap.lineMap a' b') r

theorem lineMap_lt_lineMap_iff_of_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a b : E}
  {r r' : k} [PosSMulReflectLT k E], r < r' → ((AffineMap.lineMap a b) r < (AffineMap.lineMap a b) r' ↔ a < b)

theorem left_lt_lineMap_iff_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a b : E} {r : k}
  [PosSMulReflectLT k E], 0 < r → (a < (AffineMap.lineMap a b) r ↔ a < b)

theorem lineMap_lt_left_iff_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a b : E} {r : k}
  [PosSMulReflectLT k E], 0 < r → ((AffineMap.lineMap a b) r < a ↔ b < a)

theorem lineMap_lt_right_iff_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a b : E} {r : k}
  [PosSMulReflectLT k E], r < 1 → ((AffineMap.lineMap a b) r < b ↔ a < b)

theorem right_lt_lineMap_iff_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedRing k] [inst_3 : AddCommGroup E]
  [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E] [IsStrictOrderedModule k E] {a b : E} {r : k}
  [PosSMulReflectLT k E], r < 1 → (b < (AffineMap.lineMap a b) r ↔ b < a)

theorem lineMap_le_lineMap_iff_of_lt' E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r r' : k},
  a < b → ((AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a b) r' ↔ r ≤ r')

theorem left_le_lineMap_iff_nonneg E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → (a ≤ (AffineMap.lineMap a b) r ↔ 0 ≤ r)

theorem lineMap_le_left_iff_nonpos E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → ((AffineMap.lineMap a b) r ≤ a ↔ r ≤ 0)

theorem right_le_lineMap_iff_one_le E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → (b ≤ (AffineMap.lineMap a b) r ↔ 1 ≤ r)

theorem lineMap_le_right_iff_le_one E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → ((AffineMap.lineMap a b) r ≤ b ↔ r ≤ 1)

theorem lineMap_lt_lineMap_iff_of_lt' E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r r' : k},
  a < b → ((AffineMap.lineMap a b) r < (AffineMap.lineMap a b) r' ↔ r < r')

theorem left_lt_lineMap_iff_pos E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → (a < (AffineMap.lineMap a b) r ↔ 0 < r)

theorem lineMap_lt_left_iff_neg E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → ((AffineMap.lineMap a b) r < a ↔ r < 0)

theorem right_lt_lineMap_iff_one_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → (b < (AffineMap.lineMap a b) r ↔ 1 < r)

theorem lineMap_lt_right_iff_lt_one E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a b : E} {r : k}, a < b → ((AffineMap.lineMap a b) r < b ↔ r < 1)

theorem midpoint_le_midpoint E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Ring k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] {a a' b b' : E} [inst_8 : Invertible 2],
  a ≤ a' → b ≤ b' → midpoint k a b ≤ midpoint k a' b'

theorem lineMap_le_lineMap_iff_of_lt E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E} {r r' : k},
  r < r' → ((AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a b) r' ↔ a ≤ b)

theorem left_le_lineMap_iff_le E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E} {r : k}, 0 < r → (a ≤ (AffineMap.lineMap a b) r ↔ a ≤ b)

theorem left_le_midpoint E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E}, a ≤ midpoint k a b ↔ a ≤ b

theorem lineMap_le_left_iff_le E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E} {r : k}, 0 < r → ((AffineMap.lineMap a b) r ≤ a ↔ b ≤ a)

theorem midpoint_le_left E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E}, midpoint k a b ≤ a ↔ b ≤ a

theorem lineMap_le_right_iff_le E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E} {r : k}, r < 1 → ((AffineMap.lineMap a b) r ≤ b ↔ a ≤ b)

theorem midpoint_le_right E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E}, midpoint k a b ≤ b ↔ a ≤ b

theorem right_le_lineMap_iff_le E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E} {r : k}, r < 1 → (b ≤ (AffineMap.lineMap a b) r ↔ b ≤ a)

theorem right_le_midpoint E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {a b : E}, b ≤ midpoint k a b ↔ b ≤ a

theorem map_le_lineMap_iff_slope_le_slope_left E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < r * (b - a) →
    (f ((AffineMap.lineMap a b) r) ≤ (AffineMap.lineMap (f a) (f b)) r ↔
      slope f a ((AffineMap.lineMap a b) r) ≤ slope f a b)

Given c = lineMap a b r, a < c, the point (c, f c) is non-strictly below the segment [(a, f a), (b, f b)] if and only if slope f a c ≤ slope f a b.

theorem lineMap_le_map_iff_slope_le_slope_left E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < r * (b - a) →
    ((AffineMap.lineMap (f a) (f b)) r ≤ f ((AffineMap.lineMap a b) r) ↔
      slope f a b ≤ slope f a ((AffineMap.lineMap a b) r))

Given c = lineMap a b r, a < c, the point (c, f c) is non-strictly above the segment [(a, f a), (b, f b)] if and only if slope f a b ≤ slope f a c.

theorem map_lt_lineMap_iff_slope_lt_slope_left E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < r * (b - a) →
    (f ((AffineMap.lineMap a b) r) < (AffineMap.lineMap (f a) (f b)) r ↔
      slope f a ((AffineMap.lineMap a b) r) < slope f a b)

Given c = lineMap a b r, a < c, the point (c, f c) is strictly below the segment [(a, f a), (b, f b)] if and only if slope f a c < slope f a b.

theorem lineMap_lt_map_iff_slope_lt_slope_left E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < r * (b - a) →
    ((AffineMap.lineMap (f a) (f b)) r < f ((AffineMap.lineMap a b) r) ↔
      slope f a b < slope f a ((AffineMap.lineMap a b) r))

Given c = lineMap a b r, a < c, the point (c, f c) is strictly above the segment [(a, f a), (b, f b)] if and only if slope f a b < slope f a c.

theorem map_le_lineMap_iff_slope_le_slope_right E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < (1 - r) * (b - a) →
    (f ((AffineMap.lineMap a b) r) ≤ (AffineMap.lineMap (f a) (f b)) r ↔
      slope f a b ≤ slope f ((AffineMap.lineMap a b) r) b)

Given c = lineMap a b r, c < b, the point (c, f c) is non-strictly below the segment [(a, f a), (b, f b)] if and only if slope f a b ≤ slope f c b.

theorem lineMap_le_map_iff_slope_le_slope_right E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < (1 - r) * (b - a) →
    ((AffineMap.lineMap (f a) (f b)) r ≤ f ((AffineMap.lineMap a b) r) ↔
      slope f ((AffineMap.lineMap a b) r) b ≤ slope f a b)

Given c = lineMap a b r, c < b, the point (c, f c) is non-strictly above the segment [(a, f a), (b, f b)] if and only if slope f c b ≤ slope f a b.

theorem map_lt_lineMap_iff_slope_lt_slope_right E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < (1 - r) * (b - a) →
    (f ((AffineMap.lineMap a b) r) < (AffineMap.lineMap (f a) (f b)) r ↔
      slope f a b < slope f ((AffineMap.lineMap a b) r) b)

Given c = lineMap a b r, c < b, the point (c, f c) is strictly below the segment [(a, f a), (b, f b)] if and only if slope f a b < slope f c b.

theorem lineMap_lt_map_iff_slope_lt_slope_right E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [inst_2 : AddCommGroup E]
  [inst_3 : PartialOrder E] [IsOrderedAddMonoid E] [inst_5 : Module k E] [IsStrictOrderedModule k E]
  [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  0 < (1 - r) * (b - a) →
    ((AffineMap.lineMap (f a) (f b)) r < f ((AffineMap.lineMap a b) r) ↔
      slope f ((AffineMap.lineMap a b) r) b < slope f a b)

Given c = lineMap a b r, c < b, the point (c, f c) is strictly above the segment [(a, f a), (b, f b)] if and only if slope f c b < slope f a b.

theorem map_le_lineMap_iff_slope_le_slope E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  a < b →
    0 < r →
      r < 1 →
        (f ((AffineMap.lineMap a b) r) ≤ (AffineMap.lineMap (f a) (f b)) r ↔
          slope f a ((AffineMap.lineMap a b) r) ≤ slope f ((AffineMap.lineMap a b) r) b)

Given c = lineMap a b r, a < c < b, the point (c, f c) is non-strictly below the segment [(a, f a), (b, f b)] if and only if slope f a c ≤ slope f c b.

theorem lineMap_le_map_iff_slope_le_slope E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  a < b →
    0 < r →
      r < 1 →
        ((AffineMap.lineMap (f a) (f b)) r ≤ f ((AffineMap.lineMap a b) r) ↔
          slope f ((AffineMap.lineMap a b) r) b ≤ slope f a ((AffineMap.lineMap a b) r))

Given c = lineMap a b r, a < c < b, the point (c, f c) is non-strictly above the segment [(a, f a), (b, f b)] if and only if slope f c b ≤ slope f a c.

theorem map_lt_lineMap_iff_slope_lt_slope E0 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  a < b →
    0 < r →
      r < 1 →
        (f ((AffineMap.lineMap a b) r) < (AffineMap.lineMap (f a) (f b)) r ↔
          slope f a ((AffineMap.lineMap a b) r) < slope f ((AffineMap.lineMap a b) r) b)

Given c = lineMap a b r, a < c < b, the point (c, f c) is strictly below the segment [(a, f a), (b, f b)] if and only if slope f a c < slope f c b.

theorem lineMap_lt_map_iff_slope_lt_slope E1 #

∀ {k : Type u_1} {E : Type u_2} [inst : Field k] [inst_1 : LinearOrder k] [IsStrictOrderedRing k]
  [inst_3 : AddCommGroup E] [inst_4 : PartialOrder E] [IsOrderedAddMonoid E] [inst_6 : Module k E]
  [IsStrictOrderedModule k E] [PosSMulReflectLE k E] {f : k → E} {a b r : k},
  a < b →
    0 < r →
      r < 1 →
        ((AffineMap.lineMap (f a) (f b)) r < f ((AffineMap.lineMap a b) r) ↔
          slope f ((AffineMap.lineMap a b) r) b < slope f a ((AffineMap.lineMap a b) r))

Given c = lineMap a b r, a < c < b, the point (c, f c) is strictly above the segment [(a, f a), (b, f b)] if and only if slope f c b < slope f a c.

theorem slope_pos_iff E0 #

∀ {𝕜 : Type u_3} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {f : 𝕜 → 𝕜} {x₀ b : 𝕜},
  x₀ < b → (0 < slope f x₀ b ↔ f x₀ < f b)

theorem slope_pos_iff_gt E1 #

∀ {𝕜 : Type u_3} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {f : 𝕜 → 𝕜} {x₀ b : 𝕜},
  b < x₀ → (0 < slope f x₀ b ↔ f b < f x₀)

theorem pos_of_slope_pos E1 #

∀ {𝕜 : Type u_3} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {f : 𝕜 → 𝕜} {x₀ b : 𝕜},
  x₀ < b → 0 < slope f x₀ b → f x₀ = 0 → 0 < f b

theorem neg_of_slope_pos E1 #

∀ {𝕜 : Type u_3} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {f : 𝕜 → 𝕜} {x₀ b : 𝕜},
  b < x₀ → 0 < slope f x₀ b → f x₀ = 0 → f b < 0