Skip to content

Commit

Permalink
feat: add lemmas about AffineMap.lineMap (#4254)
Browse files Browse the repository at this point in the history
Add `Convex.mapsTo_lineMap`, `Convex.lineMap_mem`.
  • Loading branch information
urkud committed May 31, 2023
1 parent 6fa529a commit d90140d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Mathlib/Analysis/Convex/Basic.lean
Expand Up @@ -472,11 +472,18 @@ theorem Convex.smul_mem_of_zero_mem (hs : Convex π•œ s) {x : E} (zero_mem : (0
simpa using hs.add_smul_mem zero_mem (by simpa using hx) ht
#align convex.smul_mem_of_zero_mem Convex.smul_mem_of_zero_mem

theorem Convex.mapsTo_lineMap (h : Convex π•œ s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) :
MapsTo (AffineMap.lineMap x y) (Icc (0 : π•œ) 1) s := by
simpa only [mapsTo', segment_eq_image_lineMap] using h.segment_subset hx hy

theorem Convex.lineMap_mem (h : Convex π•œ s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {t : π•œ}
(ht : t ∈ Icc 0 1) : AffineMap.lineMap x y t ∈ s :=
h.mapsTo_lineMap hx hy ht

theorem Convex.add_smul_sub_mem (h : Convex π•œ s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {t : π•œ}
(ht : t ∈ Icc (0 : π•œ) 1) : x + t β€’ (y - x) ∈ s := by
apply h.segment_subset hx hy
rw [segment_eq_image']
exact mem_image_of_mem _ ht
rw [add_comm]
exact h.lineMap_mem hx hy ht
#align convex.add_smul_sub_mem Convex.add_smul_sub_mem

/-- Affine subspaces are convex. -/
Expand Down

0 comments on commit d90140d

Please sign in to comment.