Skip to content

Commit 6c644c2

Browse files
sgouezelBergschaf
authored andcommitted
feat: the smul on measures is ordered (leanprover-community#40101)
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent 076dee9 commit 6c644c2

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

Mathlib/Algebra/Order/AddTorsor.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ instance [CommMonoid G] [Preorder G] [IsOrderedMonoid G] : IsOrderedSMul G G whe
7777
smul_le_smul_left _ _ := mul_le_mul_right
7878
smul_le_smul_right _ _ := mul_le_mul_left
7979

80-
@[to_additive]
80+
@[to_additive (attr := gcongr)]
8181
theorem IsOrderedSMul.smul_le_smul [LE G] [Preorder P] [SMul G P] [IsOrderedSMul G P]
8282
{a b : G} {c d : P} (hab : a ≤ b) (hcd : c ≤ d) : a • c ≤ b • d :=
8383
(IsOrderedSMul.smul_le_smul_left _ _ hcd _).trans (IsOrderedSMul.smul_le_smul_right _ _ hab _)

Mathlib/Data/ENNReal/Action.lean

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Johannes Hölzl, Yury Kudryashov
66
module
77

88
public import Mathlib.Algebra.Module.Torsion.Field
9+
public import Mathlib.Algebra.Order.AddTorsor
910
public import Mathlib.Data.ENNReal.Operations
1011

1112
/-!
@@ -104,11 +105,15 @@ instance : PosSMulStrictMono ℝ≥0 ℝ≥0∞ where
104105
instance : SMulPosMono ℝ≥0 ℝ≥0where
105106
smul_le_smul_of_nonneg_right _r _ _a _b hab := _root_.mul_le_mul_left (coe_le_coe.2 hab) _
106107

107-
instance : CovariantClass ℝ≥0∞ ℝ≥0∞ (· • ·) (· ≤ ·) :=
108-
inferInstanceAs <| CovariantClass ℝ≥0∞ ℝ≥0∞ (· * ·) (· ≤ ·)
108+
instance : IsOrderedModule ℝ≥0 ℝ≥0where
109109

110-
instance : CovariantClass ℝ≥0 ℝ≥0∞ (· • ·) (· ≤ ·) :=
111-
fun x x y hxy ↦ by simpa [ENNReal.smul_def] using mul_le_mul_right hxy _⟩
110+
example : CovariantClass ℝ≥0∞ ℝ≥0∞ (· • ·) (· ≤ ·) := inferInstance
111+
112+
instance : IsOrderedSMul ℝ≥0 ℝ≥0where
113+
smul_le_smul_left a b hab c := by gcongr
114+
smul_le_smul_right a b hab c := by gcongr
115+
116+
example : CovariantClass ℝ≥0 ℝ≥0∞ (· • ·) (· ≤ ·) := inferInstance
112117

113118
end Actions
114119

Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,13 @@ instance [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] [CovariantC
10871087
simp only [smul_apply]
10881088
gcongr
10891089

1090+
instance [SMul R ℝ≥0∞] [LE R] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] [IsOrderedSMul R ℝ≥0∞] :
1091+
IsOrderedSMul R (Measure α) where
1092+
smul_le_smul_left μ ν hμν a s := by gcongr
1093+
smul_le_smul_right a b hab μ s := by
1094+
simp only [smul_apply]
1095+
gcongr
1096+
10901097
section sInf
10911098

10921099
variable {m : Set (Measure α)}

0 commit comments

Comments
 (0)