|
| 1 | +/- |
| 2 | +Copyright (c) 2023 Scott Morrison. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Scott Morrison |
| 5 | +-/ |
| 6 | + |
| 7 | +import algebra.star.basic |
| 8 | +import group_theory.submonoid.basic |
| 9 | + |
| 10 | +/-! # Star ordered rings |
| 11 | +
|
| 12 | +We define the class `star_ordered_ring R`, which says that the order on `R` respects the |
| 13 | +star operation, i.e. an element `r` is nonnegative iff it is in the `add_submonoid` generated by |
| 14 | +elements of the form `star s * s`. In many cases, including all C⋆-algebras, this can be reduced to |
| 15 | +`0 ≤ r ↔ ∃ s, r = star s * s`. However, this generality is slightly more convenient (e.g., it |
| 16 | +allows us to register a `star_ordered_ring` instance for `ℚ`), and more closely resembles the |
| 17 | +literature (see the seminal paper [*The positive cone in Banach algebras*][kelleyVaught1953]) |
| 18 | +
|
| 19 | +In order to accodomate `non_unital_semiring R`, we actually don't characterize nonnegativity, but |
| 20 | +rather the entire `≤` relation with `star_ordered_ring.le_iff`. However, notice that when `R` is a |
| 21 | +`non_unital_ring`, these are equivalent (see `star_ordered_ring.nonneg_iff` and |
| 22 | +`star_ordered_ring.of_nonneg_iff`). |
| 23 | +
|
| 24 | +## TODO |
| 25 | +
|
| 26 | +* In a Banach star algebra without a well-defined square root, the natural ordering is given by the |
| 27 | +positive cone which is the _closure_ of the sums of elements `star r * r`. A weaker version of |
| 28 | +`star_ordered_ring` could be defined for this case (again, see |
| 29 | +[*The positive cone in Banach algebras*][kelleyVaught1953]). Note that the current definition has |
| 30 | +the advantage of not requiring a topology. |
| 31 | +-/ |
| 32 | + |
| 33 | +universe u |
| 34 | +variable {R : Type u} |
| 35 | + |
| 36 | +/-- |
| 37 | +An ordered `*`-ring is a ring which is both an `ordered_add_comm_group` and a `*`-ring, |
| 38 | +and the nonnegative elements constitute precisely the `add_submonoid` generated by |
| 39 | +elements of the form `star s * s`. |
| 40 | +
|
| 41 | +If you are working with a `non_unital_ring` and not a `non_unital_semiring`, it may be more |
| 42 | +convenient do declare instances using `star_ordered_ring.of_nonneg_iff'`. -/ |
| 43 | +class star_ordered_ring (R : Type u) [non_unital_semiring R] [partial_order R] |
| 44 | + extends star_ring R := |
| 45 | +(add_le_add_left : ∀ a b : R, a ≤ b → ∀ c : R, c + a ≤ c + b) |
| 46 | +(le_iff : ∀ x y : R, |
| 47 | + x ≤ y ↔ ∃ p, p ∈ add_submonoid.closure (set.range $ λ s, star s * s) ∧ y = x + p) |
| 48 | + |
| 49 | +namespace star_ordered_ring |
| 50 | + |
| 51 | +@[priority 100] -- see note [lower instance priority] |
| 52 | +instance to_ordered_add_comm_monoid [non_unital_semiring R] [partial_order R] |
| 53 | + [star_ordered_ring R] : ordered_add_comm_monoid R := |
| 54 | +{ ..show non_unital_semiring R, by apply_instance, |
| 55 | + ..show partial_order R, by apply_instance, |
| 56 | + ..show star_ordered_ring R, by apply_instance } |
| 57 | + |
| 58 | +@[priority 100] -- see note [lower instance priority] |
| 59 | +instance to_has_exists_add_of_le [non_unital_semiring R] [partial_order R] |
| 60 | + [star_ordered_ring R] : has_exists_add_of_le R := |
| 61 | +{ exists_add_of_le := λ a b h, match (le_iff _ _).mp h with ⟨p, _, hp⟩ := ⟨p, hp⟩ end } |
| 62 | + |
| 63 | +@[priority 100] -- see note [lower instance priority] |
| 64 | +instance to_ordered_add_comm_group [non_unital_ring R] [partial_order R] [star_ordered_ring R] : |
| 65 | + ordered_add_comm_group R := |
| 66 | +{ ..show non_unital_ring R, by apply_instance, |
| 67 | + ..show partial_order R, by apply_instance, |
| 68 | + ..show star_ordered_ring R, by apply_instance } |
| 69 | + |
| 70 | +/-- To construct a `star_ordered_ring` instance it suffices to show that `x ≤ y` if and only if |
| 71 | +`y = x + star s * s` for some `s : R`. |
| 72 | +
|
| 73 | +This is provided for convenience because it holds in some common scenarios (e.g.,`ℝ≥0`, `C(X, ℝ≥0)`) |
| 74 | +and obviates the hassle of `add_submonoid.closure_induction` when creating those instances. |
| 75 | +
|
| 76 | +If you are working with a `non_unital_ring` and not a `non_unital_semiring`, see |
| 77 | +`star_ordered_ring.of_nonneg_iff` for a more convenient version. -/ |
| 78 | +@[reducible] -- set note [reducible non-instances] |
| 79 | +def of_le_iff [non_unital_semiring R] [partial_order R] [star_ring R] |
| 80 | + (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y) |
| 81 | + (h_le_iff : ∀ x y : R, x ≤ y ↔ ∃ s, y = x + star s * s) : |
| 82 | + star_ordered_ring R := |
| 83 | +{ add_le_add_left := @h_add, |
| 84 | + le_iff := λ x y, |
| 85 | + begin |
| 86 | + refine ⟨λ h, _, _⟩, |
| 87 | + { obtain ⟨p, hp⟩ := (h_le_iff x y).mp h, |
| 88 | + exact ⟨star p * p, add_submonoid.subset_closure ⟨p, rfl⟩, hp⟩ }, |
| 89 | + { rintro ⟨p, hp, hpxy⟩, |
| 90 | + revert x y hpxy, |
| 91 | + refine add_submonoid.closure_induction hp _ (λ x y h, add_zero x ▸ h.ge) _, |
| 92 | + { rintro _ ⟨s, rfl⟩ x y rfl, |
| 93 | + nth_rewrite 0 [←add_zero x], |
| 94 | + refine h_add _ x, |
| 95 | + exact (h_le_iff _ _).mpr ⟨s, by rw [zero_add]⟩ }, |
| 96 | + { rintro a b ha hb x y rfl, |
| 97 | + nth_rewrite 0 [←add_zero x], |
| 98 | + refine h_add ((ha 0 _ (zero_add a).symm).trans (hb a _ rfl)) x } } |
| 99 | + end, |
| 100 | + .. ‹star_ring R› } |
| 101 | + |
| 102 | +/-- When `R` is a non-unital ring, to construct a `star_ordered_ring` instance it suffices to |
| 103 | +show that the nonnegative elements are precisely those elements in the `add_submonoid` generated |
| 104 | +by `star s * s` for `s : R`. -/ |
| 105 | +@[reducible] -- set note [reducible non-instances] |
| 106 | +def of_nonneg_iff [non_unital_ring R] [partial_order R] [star_ring R] |
| 107 | + (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y) |
| 108 | + (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ x ∈ add_submonoid.closure (set.range $ λ s : R, star s * s)) : |
| 109 | + star_ordered_ring R := |
| 110 | +{ add_le_add_left := @h_add, |
| 111 | + le_iff := λ x y, |
| 112 | + begin |
| 113 | + haveI : covariant_class R R (+) (≤) := ⟨λ _ _ _ h, h_add h _⟩, |
| 114 | + simpa only [←sub_eq_iff_eq_add', sub_nonneg, exists_eq_right'] using h_nonneg_iff (y - x), |
| 115 | + end, |
| 116 | + .. ‹star_ring R› } |
| 117 | + |
| 118 | +/-- When `R` is a non-unital ring, to construct a `star_ordered_ring` instance it suffices to |
| 119 | +show that the nonnegative elements are precisely those elements of the form `star s * s` |
| 120 | +for `s : R`. |
| 121 | +
|
| 122 | +This is provided for convenience because it holds in many common scenarios (e.g.,`ℝ`, `ℂ`, or |
| 123 | +any C⋆-algebra), and obviates the hassle of `add_submonoid.closure_induction` when creating those |
| 124 | +instances. -/ |
| 125 | +@[reducible] -- set note [reducible non-instances] |
| 126 | +def of_nonneg_iff' [non_unital_ring R] [partial_order R] [star_ring R] |
| 127 | + (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y) |
| 128 | + (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ ∃ s, x = star s * s) : |
| 129 | + star_ordered_ring R := |
| 130 | +of_le_iff @h_add |
| 131 | +begin |
| 132 | + haveI : covariant_class R R (+) (≤) := ⟨λ _ _ _ h, h_add h _⟩, |
| 133 | + simpa [sub_eq_iff_eq_add', sub_nonneg] using λ x y, h_nonneg_iff (y - x), |
| 134 | +end |
| 135 | + |
| 136 | +lemma nonneg_iff [non_unital_semiring R] [partial_order R] [star_ordered_ring R] |
| 137 | + {x : R} : 0 ≤ x ↔ x ∈ add_submonoid.closure (set.range $ λ s : R, star s * s) := |
| 138 | +by simp only [le_iff, zero_add, exists_eq_right'] |
| 139 | + |
| 140 | +end star_ordered_ring |
| 141 | + |
| 142 | +section non_unital_semiring |
| 143 | + |
| 144 | +variables [non_unital_semiring R] [partial_order R] [star_ordered_ring R] |
| 145 | + |
| 146 | +lemma star_mul_self_nonneg (r : R) : 0 ≤ star r * r := |
| 147 | +star_ordered_ring.nonneg_iff.mpr $ add_submonoid.subset_closure ⟨r, rfl⟩ |
| 148 | + |
| 149 | +lemma star_mul_self_nonneg' (r : R) : 0 ≤ r * star r := |
| 150 | +by { nth_rewrite_rhs 0 [←star_star r], exact star_mul_self_nonneg (star r) } |
| 151 | + |
| 152 | +lemma conjugate_nonneg {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ star c * a * c := |
| 153 | +begin |
| 154 | + rw star_ordered_ring.nonneg_iff at ha, |
| 155 | + refine add_submonoid.closure_induction ha (λ x hx, _) (by rw [mul_zero, zero_mul]) |
| 156 | + (λ x y hx hy, _), |
| 157 | + { obtain ⟨x, rfl⟩ := hx, |
| 158 | + convert star_mul_self_nonneg (x * c) using 1, |
| 159 | + rw [star_mul, ←mul_assoc, mul_assoc _ _ c] }, |
| 160 | + { calc 0 ≤ star c * x * c + 0 : by rw [add_zero]; exact hx |
| 161 | + ... ≤ star c * x * c + star c * y * c : star_ordered_ring.add_le_add_left _ _ hy _ |
| 162 | + ... ≤ _ : by rw [mul_add, add_mul] } |
| 163 | +end |
| 164 | + |
| 165 | +lemma conjugate_nonneg' {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ c * a * star c := |
| 166 | +by simpa only [star_star] using conjugate_nonneg ha (star c) |
| 167 | + |
| 168 | +lemma conjugate_le_conjugate {a b : R} (hab : a ≤ b) (c : R) : star c * a * c ≤ star c * b * c := |
| 169 | +begin |
| 170 | + rw [star_ordered_ring.le_iff] at hab ⊢, |
| 171 | + obtain ⟨p, hp, rfl⟩ := hab, |
| 172 | + simp_rw [←star_ordered_ring.nonneg_iff] at hp ⊢, |
| 173 | + exact ⟨star c * p * c, conjugate_nonneg hp c, by simp only [add_mul, mul_add]⟩, |
| 174 | +end |
| 175 | + |
| 176 | +lemma conjugate_le_conjugate' {a b : R} (hab : a ≤ b) (c : R) : c * a * star c ≤ c * b * star c := |
| 177 | +by simpa only [star_star] using conjugate_le_conjugate hab (star c) |
| 178 | + |
| 179 | +end non_unital_semiring |
0 commit comments