@@ -3,12 +3,9 @@ Copyright (c) 2019 Alexander Bentkamp. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Alexander Bentkamp, Yury Kudryashov, Yaël Dillies
55-/
6- import Mathlib.Algebra.Order.BigOperators.Ring.Finset
7- import Mathlib.Algebra.Order.Module.Synonym
86import Mathlib.Algebra.Ring.Action.Pointwise.Set
97import Mathlib.Analysis.Convex.Star
108import Mathlib.Tactic.Field
11- import Mathlib.Tactic.NoncommRing
129import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Defs
1310
1411/-!
@@ -164,6 +161,8 @@ theorem convex_segment [IsOrderedRing 𝕜] (x y : E) : Convex 𝕜 [x -[𝕜] y
164161 · rw [add_add_add_comm, ← mul_add, ← mul_add, habp, habq, mul_one, mul_one, hab]
165162 · match_scalars <;> noncomm_ring
166163
164+ /-- See `Convex.semilinear_image` for a version for semilinar maps, but requiring that `𝕜` be a
165+ linear order, instead of just a partial order. -/
167166theorem Convex.linear_image (hs : Convex 𝕜 s) (f : E →ₗ[𝕜] F) : Convex 𝕜 (f '' s) := by
168167 rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ a b ha hb hab
169168 exact ⟨a • x + b • y, hs hx hy ha hb hab, by rw [f.map_add, f.map_smul, f.map_smul]⟩
@@ -486,9 +485,29 @@ end AddCommGroup
486485
487486end OrderedRing
488487
489- section LinearOrderedSemiring
488+ section LinearOrder
490489
491- variable [Semiring 𝕜] [LinearOrder 𝕜] [IsOrderedRing 𝕜] [AddCommMonoid E]
490+ variable [Semiring 𝕜] [AddCommMonoid E]
491+ section SemilinearMap
492+
493+ variable [PartialOrder 𝕜]
494+ variable {𝕜' : Type *} [Semiring 𝕜'] [PartialOrder 𝕜']
495+ variable {σ : 𝕜 →+* 𝕜'} [RingHomSurjective σ]
496+ variable {F' : Type *} [AddCommMonoid F'] [Module 𝕜' F'] [Module 𝕜 E]
497+
498+ theorem Convex.semilinear_image {s : Set E} (hs : Convex 𝕜 s) (hσ : ∀ {s t}, σ s ≤ σ t ↔ s ≤ t)
499+ (f : E →ₛₗ[σ] F') : Convex 𝕜' (f '' s) := by
500+ rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ a b ha hb hab
501+ obtain ⟨r, rfl⟩ : ∃ r : 𝕜, σ r = a := RingHomSurjective.is_surjective ..
502+ obtain ⟨t, rfl⟩ : ∃ t : 𝕜, σ t = b := RingHomSurjective.is_surjective ..
503+ refine ⟨r • x + t • y, hs hx hy (by simp_all [(@hσ 0 r).mp]) (by simp_all [(@hσ 0 t).mp])
504+ ?_, by simp⟩
505+ apply_fun σ using injective_of_le_imp_le _ hσ.mp
506+ simpa
507+
508+ end SemilinearMap
509+
510+ variable [LinearOrder 𝕜] [IsOrderedRing 𝕜]
492511
493512theorem Convex_subadditive_le [SMul 𝕜 E] {f : E → 𝕜} (hf1 : ∀ x y, f (x + y) ≤ (f x) + (f y))
494513 (hf2 : ∀ ⦃c⦄ x, 0 ≤ c → f (c • x) ≤ c * f x) (B : 𝕜) :
@@ -500,7 +519,7 @@ theorem Convex_subadditive_le [SMul 𝕜 E] {f : E → 𝕜} (hf1 : ∀ x y, f (
500519 _ ≤ a • B + b • B := by gcongr <;> assumption
501520 _ ≤ B := by rw [← add_smul, hs, one_smul]
502521
503- end LinearOrderedSemiring
522+ end LinearOrder
504523
505524theorem Convex.midpoint_mem [Ring 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
506525 [AddCommGroup E] [Module 𝕜 E] [Invertible (2 : 𝕜)] {s : Set E} {x y : E}
@@ -590,6 +609,10 @@ protected theorem convex (K : Submodule 𝕜 E) : Convex 𝕜 (↑K : Set E) :=
590609protected theorem starConvex (K : Submodule 𝕜 E) : StarConvex 𝕜 (0 : E) K :=
591610 K.convex K.zero_mem
592611
612+ theorem Convex.semilinear_range {𝕜' : Type *} [Semiring 𝕜'] {σ : 𝕜' →+* 𝕜}
613+ [RingHomSurjective σ] {F' : Type *} [AddCommMonoid F'] [Module 𝕜' F']
614+ (f : F' →ₛₗ[σ] E) : Convex 𝕜 (LinearMap.range f : Set E) := Submodule.convex ..
615+
593616end Submodule
594617
595618section CommSemiring
0 commit comments