@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Christopher Hoskin, Yaël Dillies
5
5
-/
6
6
import Mathlib.Algebra.Order.Group.Unbundled.Abs
7
+ import Mathlib.Algebra.Notation
7
8
8
9
/-!
9
10
# Positive & negative parts
@@ -12,22 +13,15 @@ Mathematical structures possessing an absolute value often also possess a unique
12
13
elements into "positive" and "negative" parts which are in some sense "disjoint" (e.g. the Jordan
13
14
decomposition of a measure).
14
15
15
- This file defines `posPart ` and `negPart `, the positive and negative parts of an element in a
16
- lattice ordered group.
16
+ This file provides instances of `PosPart ` and `NegPart `, the positive and negative parts of an
17
+ element in a lattice ordered group.
17
18
18
19
## Main statements
19
20
20
21
* `posPart_sub_negPart`: Every element `a` can be decomposed into `a⁺ - a⁻`, the difference of its
21
22
positive and negative parts.
22
23
* `posPart_inf_negPart_eq_zero`: The positive and negative parts are coprime.
23
24
24
- ## Notations
25
-
26
- * `a⁺ᵐ = a ⊔ 1`: *Positive component* of an element `a` of a multiplicative lattice ordered group
27
- * `a⁻ᵐ = a⁻¹ ⊔ 1`: *Negative component* of an element `a` of a multiplicative lattice ordered group
28
- * `a⁺ = a ⊔ 0`: *Positive component* of an element `a` of a lattice ordered group
29
- * `a⁻ = (-a) ⊔ 0`: *Negative component* of an element `a` of a lattice ordered group
30
-
31
25
## References
32
26
33
27
* [ Birkhoff, Lattice-ordered Groups ] [birkhoff1942 ]
@@ -54,20 +48,21 @@ variable [Group α] {a b : α}
54
48
/-- The *positive part* of an element `a` in a lattice ordered group is `a ⊔ 1`, denoted `a⁺ᵐ`. -/
55
49
@[to_additive
56
50
"The *positive part* of an element `a` in a lattice ordered group is `a ⊔ 0`, denoted `a⁺`." ]
57
- def oneLePart (a : α) : α := a ⊔ 1
51
+ instance instOneLePart : OneLePart α where
52
+ oneLePart a := a ⊔ 1
58
53
59
54
/-- The *negative part* of an element `a` in a lattice ordered group is `a⁻¹ ⊔ 1`, denoted `a⁻ᵐ `.
60
55
-/
61
56
@[to_additive
62
57
"The *negative part* of an element `a` in a lattice ordered group is `(-a) ⊔ 0`, denoted `a⁻`." ]
63
- def leOnePart (a : α) : α := a⁻¹ ⊔ 1
58
+ instance instLeOnePart : LeOnePart α where
59
+ leOnePart a := a⁻¹ ⊔ 1
60
+
61
+ @[to_additive] lemma leOnePart_def (a : α) : a⁻ᵐ = a⁻¹ ⊔ 1 := rfl
64
62
65
- @[inherit_doc] postfix :max "⁺ᵐ " => oneLePart
66
- @[inherit_doc] postfix :max "⁻ᵐ" => leOnePart
67
- @[inherit_doc] postfix :max "⁺" => posPart
68
- @[inherit_doc] postfix :max "⁻" => negPart
63
+ @[to_additive] lemma oneLePart_def (a : α) : a⁺ᵐ = a ⊔ 1 := rfl
69
64
70
- @[to_additive] lemma oneLePart_mono : Monotone (oneLePart : α → α) :=
65
+ @[to_additive] lemma oneLePart_mono : Monotone (·⁺ᵐ : α → α) :=
71
66
fun _a _b hab ↦ sup_le_sup_right hab _
72
67
73
68
@[to_additive (attr := simp)] lemma oneLePart_one : (1 : α)⁺ᵐ = 1 := sup_idem _
@@ -124,8 +119,8 @@ lemma leOnePart_eq_one : a⁻ᵐ = 1 ↔ 1 ≤ a := by simp [leOnePart_eq_one']
124
119
125
120
-- Bourbaki A.VI.12 Prop 9 a)
126
121
@[to_additive (attr := simp)] lemma oneLePart_div_leOnePart (a : α) : a⁺ᵐ / a⁻ᵐ = a := by
127
- rw [div_eq_mul_inv, mul_inv_eq_iff_eq_mul, leOnePart , mul_sup, mul_one, mul_inv_cancel, sup_comm ,
128
- oneLePart ]
122
+ rw [div_eq_mul_inv, mul_inv_eq_iff_eq_mul, leOnePart_def , mul_sup, mul_one, mul_inv_cancel,
123
+ sup_comm, oneLePart_def ]
129
124
130
125
@[to_additive (attr := simp)] lemma leOnePart_div_oneLePart (a : α) : a⁻ᵐ / a⁺ᵐ = a⁻¹ := by
131
126
rw [← inv_div, oneLePart_div_leOnePart]
@@ -148,16 +143,16 @@ variable [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
148
143
149
144
@[to_additive]
150
145
lemma leOnePart_eq_inv_inf_one (a : α) : a⁻ᵐ = (a ⊓ 1 )⁻¹ := by
151
- rw [leOnePart , ← inv_inj, inv_sup, inv_inv, inv_inv, inv_one]
146
+ rw [leOnePart_def , ← inv_inj, inv_sup, inv_inv, inv_inv, inv_one]
152
147
153
148
-- Bourbaki A.VI.12 Prop 9 d)
154
149
@[to_additive] lemma oneLePart_mul_leOnePart (a : α) : a⁺ᵐ * a⁻ᵐ = |a|ₘ := by
155
- rw [oneLePart , sup_mul, one_mul, leOnePart , mul_sup, mul_one, mul_inv_cancel, sup_assoc,
150
+ rw [oneLePart_def , sup_mul, one_mul, leOnePart_def , mul_sup, mul_one, mul_inv_cancel, sup_assoc,
156
151
← sup_assoc a, sup_eq_right.2 le_sup_right]
157
152
exact sup_eq_left.2 <| one_le_mabs a
158
153
159
154
@[to_additive] lemma leOnePart_mul_oneLePart (a : α) : a⁻ᵐ * a⁺ᵐ = |a|ₘ := by
160
- rw [oneLePart , mul_sup, mul_one, leOnePart , sup_mul, one_mul, inv_mul_cancel, sup_assoc,
155
+ rw [oneLePart_def , mul_sup, mul_one, leOnePart_def , sup_mul, one_mul, inv_mul_cancel, sup_assoc,
161
156
← @sup_assoc _ _ a, sup_eq_right.2 le_sup_right]
162
157
exact sup_eq_left.2 <| one_le_mabs a
163
158
@@ -213,22 +208,22 @@ section LinearOrder
213
208
variable [LinearOrder α] [Group α] {a b : α}
214
209
215
210
@[to_additive] lemma oneLePart_eq_ite : a⁺ᵐ = if 1 ≤ a then a else 1 := by
216
- rw [oneLePart , ← maxDefault, ← sup_eq_maxDefault]; simp_rw [sup_comm]
211
+ rw [oneLePart_def , ← maxDefault, ← sup_eq_maxDefault]; simp_rw [sup_comm]
217
212
218
213
@[to_additive (attr := simp) posPart_pos_iff] lemma one_lt_oneLePart_iff : 1 < a⁺ᵐ ↔ 1 < a :=
219
214
lt_iff_lt_of_le_iff_le <| (one_le_oneLePart _).le_iff_eq.trans oneLePart_eq_one
220
215
221
216
@[to_additive posPart_eq_of_posPart_pos]
222
217
lemma oneLePart_of_one_lt_oneLePart (ha : 1 < a⁺ᵐ) : a⁺ᵐ = a := by
223
- rw [oneLePart , right_lt_sup, not_le] at ha; exact oneLePart_eq_self.2 ha.le
218
+ rw [oneLePart_def , right_lt_sup, not_le] at ha; exact oneLePart_eq_self.2 ha.le
224
219
225
220
@[to_additive (attr := simp)] lemma oneLePart_lt : a⁺ᵐ < b ↔ a < b ∧ 1 < b := sup_lt_iff
226
221
227
222
section covariantmul
228
223
variable [CovariantClass α α (· * ·) (· ≤ ·)]
229
224
230
225
@[to_additive] lemma leOnePart_eq_ite : a⁻ᵐ = if a ≤ 1 then a⁻¹ else 1 := by
231
- simp_rw [← one_le_inv']; rw [leOnePart , ← maxDefault, ← sup_eq_maxDefault]; simp_rw [sup_comm]
226
+ simp_rw [← one_le_inv']; rw [leOnePart_def , ← maxDefault, ← sup_eq_maxDefault]; simp_rw [sup_comm]
232
227
233
228
@[to_additive (attr := simp) negPart_pos_iff] lemma one_lt_ltOnePart_iff : 1 < a⁻ᵐ ↔ a < 1 :=
234
229
lt_iff_lt_of_le_iff_le <| (one_le_leOnePart _).le_iff_eq.trans leOnePart_eq_one
0 commit comments