Skip to content

Commit f033e7e

Browse files
committed
feat(Analysis/Convex): Lifting convex sets along scalar towers (#29075)
This PR continues the work from #25637. Original PR: #25637
1 parent 19c125d commit f033e7e

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

β€ŽMathlib/Analysis/Convex/Basic.leanβ€Ž

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,21 @@ end LinearOrderedAddCommMonoid
306306

307307
end Module
308308

309+
section IsScalarTower
310+
311+
variable [ZeroLEOneClass π•œ] [Module π•œ E]
312+
variable (R : Type*) [Semiring R] [PartialOrder R] [Module R E]
313+
variable [Module R π•œ] [IsScalarTower R π•œ E]
314+
315+
/-- Lift the convexity of a set up through a scalar tower. -/
316+
theorem Convex.lift [SMulPosMono R π•œ] {s : Set E} (hs : Convex π•œ s) : Convex R s := by
317+
intro x hx y hy a b ha hb hab
318+
suffices (a β€’ (1 : π•œ)) β€’ x + (b β€’ (1 : π•œ)) β€’ y ∈ s by simpa using this
319+
refine hs hx hy ?_ ?_ (by simpa [add_smul] using congr($(hab) β€’ (1 : π•œ)))
320+
all_goals exact zero_smul R (1 : π•œ) β–Έ smul_le_smul_of_nonneg_right β€Ή_β€Ί zero_le_one
321+
322+
end IsScalarTower
323+
309324
end AddCommMonoid
310325

311326
section LinearOrderedAddCommMonoid
@@ -526,7 +541,7 @@ theorem Convex.exists_mem_add_smul_eq (h : Convex π•œ s) {x y : E} {p q : π•œ}
526541
refine ⟨_, convex_iff_div.1 h hx hy hp hq hpq, ?_⟩
527542
match_scalars <;> field_simp
528543

529-
theorem Convex.add_smul (h_conv : Convex π•œ s) {p q : π•œ} (hp : 0 ≀ p) (hq : 0 ≀ q) :
544+
protected theorem Convex.add_smul (h_conv : Convex π•œ s) {p q : π•œ} (hp : 0 ≀ p) (hq : 0 ≀ q) :
530545
(p + q) β€’ s = p β€’ s + q β€’ s := (add_smul_subset _ _ _).antisymm <| by
531546
rintro _ ⟨_, ⟨v₁, h₁, rfl⟩, _, ⟨vβ‚‚, hβ‚‚, rfl⟩, rfl⟩
532547
exact h_conv.exists_mem_add_smul_eq h₁ hβ‚‚ hp hq

β€ŽMathlib/Analysis/Convex/Between.leanβ€Ž

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,32 @@ theorem wbtw_self_iff {x y : P} : Wbtw R x y x ↔ y = x := by
365365

366366
end OrderedRing
367367

368+
section lift
369+
370+
variable [ZeroLEOneClass R]
371+
variable (R' : Type*) [Ring R'] [PartialOrder R']
372+
variable [Module R' V] [Module R' R] [IsScalarTower R' R V] [SMulPosMono R' R]
373+
374+
theorem affineSegment.lift (x y : P) : affineSegment R' x y βŠ† affineSegment R x y := by
375+
rintro p ⟨a, ⟨⟨haβ‚€, haβ‚βŸ©, rfl⟩⟩
376+
refine ⟨a β€’ 1, ⟨?_, ?_⟩, by simp [lineMap_apply]⟩
377+
Β· rw [← zero_smul R' (1 : R)]
378+
exact smul_le_smul_of_nonneg_right haβ‚€ zero_le_one
379+
Β· nth_rw 2 [← one_smul R' 1]
380+
exact smul_le_smul_of_nonneg_right ha₁ zero_le_one
381+
382+
variable {R'} in
383+
/-- Lift a `Wbtw` predicate from one ring to another along a scalar tower. -/
384+
theorem Wbtw.lift {x y z : P} (h : Wbtw R' x y z) : Wbtw R x y z :=
385+
affineSegment.lift R R' x z h
386+
387+
variable {R'} in
388+
/-- Lift a `Sbtw` predicate from one ring to another along a scalar tower. -/
389+
theorem Sbtw.lift {x y z : P} (h : Sbtw R' x y z) : Sbtw R x y z :=
390+
⟨h.wbtw.lift R, h.2⟩
391+
392+
end lift
393+
368394
@[simp]
369395
theorem not_sbtw_self_left (x y : P) : Β¬Sbtw R x x y :=
370396
fun h => h.ne_left rfl

β€ŽMathlib/Analysis/Convex/Segment.leanβ€Ž

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ section MulActionWithZero
9797
variable (π•œ)
9898
variable [ZeroLEOneClass π•œ] [MulActionWithZero π•œ E]
9999

100-
101100
theorem left_mem_segment (x y : E) : x ∈ [x -[π•œ] y] :=
102101
⟨1, 0, zero_le_one, le_refl 0, add_zero 1, by rw [zero_smul, one_smul, add_zero]⟩
103102

@@ -141,6 +140,24 @@ theorem openSegment_subset_iff_segment_subset (hx : x ∈ s) (hy : y ∈ s) :
141140
openSegment π•œ x y βŠ† s ↔ [x -[π•œ] y] βŠ† s := by
142141
simp only [← insert_endpoints_openSegment, insert_subset_iff, *, true_and]
143142

143+
section lift
144+
145+
variable (R : Type*) [Semiring R] [PartialOrder R] [Module R E]
146+
variable [Module R π•œ] [IsScalarTower R π•œ E]
147+
148+
theorem segment.lift [SMulPosMono R π•œ] (x y : E) : segment R x y βŠ† segment π•œ x y := by
149+
rintro z ⟨a, b, ha, hb, hab, hxy⟩
150+
refine ⟨_, _, ?_, ?_, by simpa [add_smul] using congr($(hab) β€’ (1 : π•œ)), by simpa⟩
151+
all_goals exact zero_smul R (1 : π•œ) β–Έ smul_le_smul_of_nonneg_right β€Ή_β€Ί zero_le_one
152+
153+
theorem openSegment.lift [Nontrivial π•œ] [SMulPosStrictMono R π•œ] (x y : E) :
154+
openSegment R x y βŠ† openSegment π•œ x y := by
155+
rintro z ⟨a, b, ha, hb, hab, hxy⟩
156+
refine ⟨_, _, ?_, ?_, by simpa [add_smul] using congr($(hab) β€’ (1 : π•œ)), by simpa⟩
157+
all_goals exact zero_smul R (1 : π•œ) β–Έ smul_lt_smul_of_pos_right β€Ή_β€Ί zero_lt_one
158+
159+
end lift
160+
144161
end Module
145162

146163
end OrderedSemiring

0 commit comments

Comments
Β (0)