Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 31c24aa

Browse files
committed
feat(algebra/star/basic): refactor star_ordered_ring to include add_submonoid.closure (#18854)
Per [Zulip](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Star.20ordered.20ring), this refactors `star_ordered_ring` so that the condition `star_ordered_ring.nonneg_iff` is changed from `∀ r : R, 0 ≤ r ↔ ∃ s, r = star s * s` to something morally equivalent to `∀ x : R, 0 ≤ x ↔ x ∈ add_submonoid.closure (set.range (λ s : R, star s * s))`. In fact, we actually change the structure field `nonneg_iff` to `le_iff`, which characterizes `· ≤ ·` instead of just `0 ≤ ·`. When `R` is a `non_unital_ring`, there is effectively no change (see how we recover `star_ordered_ring.nonneg_iff` and also `star_ordered_ring.of_nonneg_iff`), but it gives a more useful and sensible condition when `R` is only a `non_unital_semiring`. For instance, now `conjugate_le_conjugate` holds for `non_unital_semiring`. There are essentially two reasons for this change. 1. It would be nice if things like `ℚ` could be `star_ordered_ring`s. This is a minor reason, but it should be a nice convenience. This instance is added in this PR in a new file. 2. Much more importantly, we want to declare the positive elements in a `star_ordered_ring` as an `add_submonoid`, but to accomplish this with the previous definition requires much more stringent type class assumptions (e.g., C⋆-algebras) and sophisticated machinery (the continuous functional calculus) in order to show that the sum of positive elements is positive. This change essentially allows us to defer that proof obligation to the settings where it will matter that a positive element really does have the form `star s * s`. We remark that even for C⋆-algebras, the fact that the sum of positive elements (i.e., those of the form `star s * s`) is positive is a deep result which was first shown in 1952 by [Fukamiya](http://www.sci.kumamoto-u.ac.jp/~kjm/BKS/kjmpdf/KJSM/v1-4-fukamiya.pdf), and then again in 1953 by [Kelley and Vaught](https://www.ams.org/journals/tran/1953-074-01/S0002-9947-1953-0054175-2/S0002-9947-1953-0054175-2.pdf). These proofs are in essence very similar, but the latter is more aesthetically pleasing, and it is this proof that appears in all the textbooks. I went looking and did not see another proof anywhere in the literature. We provide a few convenience constructors for `star_ordered_ring` in the form of reducible definitions which can apply when `R` is either a `non_unital_ring` (so we only need to characterize nonnegativity), and / or when positive elements have exactly the form `star s * s`. In this way, we can effectively maintain the status quo (see the instances for `real` and `complex`).
1 parent e354e86 commit 31c24aa

File tree

9 files changed

+266
-88
lines changed

9 files changed

+266
-88
lines changed

docs/references.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,18 @@ @Book{ kechris1995
14731473
url = {https://doi.org/10.1007/978-1-4612-4190-4}
14741474
}
14751475

1476+
@Article{ kelleyVaught1953,
1477+
author = {Kelley, J. L. and Vaught, R. L.},
1478+
title = {The positive cone in {Banach} algebras},
1479+
journal = {Trans. Am. Math. Soc.},
1480+
issn = {0002-9947},
1481+
volume = {74},
1482+
pages = {44--55},
1483+
year = {1953},
1484+
language = {English},
1485+
doi = {10.2307/1990847}
1486+
}
1487+
14761488
@Article{ kleiman1979,
14771489
author = {Kleiman, Steven Lawrence},
14781490
title = {Misconceptions about {$K\_X$}},

src/algebra/star/basic.lean

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,12 @@ These are implemented as "mixin" typeclasses, so to summon a star ring (for exam
2222
one needs to write `(R : Type) [ring R] [star_ring R]`.
2323
This avoids difficulties with diamond inheritance.
2424
25-
We also define the class `star_ordered_ring R`, which says that the order on `R` respects the
26-
star operation, i.e. an element `r` is nonnegative iff there exists an `s` such that
27-
`r = star s * s`.
28-
2925
For now we simply do not introduce notations,
3026
as different users are expected to feel strongly about the relative merits of
3127
`r^*`, `r†`, `rᘁ`, and so on.
3228
3329
Our star rings are actually star semirings, but of course we can prove
3430
`star_neg : star (-r) = - star r` when the underlying semiring is a ring.
35-
36-
## TODO
37-
38-
* In a Banach star algebra without a well-defined square root, the natural ordering is given by the
39-
positive cone which is the closure of the sums of elements `star r * r`. A weaker version of
40-
`star_ordered_ring` could be defined for this case. Note that the current definition has the
41-
advantage of not requiring a topology.
4231
-/
4332

4433
assert_not_exists finset
@@ -365,62 +354,6 @@ def star_ring_of_comm {R : Type*} [comm_semiring R] : star_ring R :=
365354
star_add := λ x y, rfl,
366355
..star_semigroup_of_comm }
367356

368-
/--
369-
An ordered `*`-ring is a ring which is both an `ordered_add_comm_group` and a `*`-ring,
370-
and `0 ≤ r ↔ ∃ s, r = star s * s`.
371-
-/
372-
class star_ordered_ring (R : Type u) [non_unital_semiring R] [partial_order R]
373-
extends star_ring R :=
374-
(add_le_add_left : ∀ a b : R, a ≤ b → ∀ c : R, c + a ≤ c + b)
375-
(nonneg_iff : ∀ r : R, 0 ≤ r ↔ ∃ s, r = star s * s)
376-
377-
namespace star_ordered_ring
378-
379-
@[priority 100] -- see note [lower instance priority]
380-
instance [non_unital_ring R] [partial_order R] [star_ordered_ring R] : ordered_add_comm_group R :=
381-
{ ..show non_unital_ring R, by apply_instance,
382-
..show partial_order R, by apply_instance,
383-
..show star_ordered_ring R, by apply_instance }
384-
385-
end star_ordered_ring
386-
387-
section non_unital_semiring
388-
389-
variables [non_unital_semiring R] [partial_order R] [star_ordered_ring R]
390-
391-
lemma star_mul_self_nonneg {r : R} : 0 ≤ star r * r :=
392-
(star_ordered_ring.nonneg_iff _).mpr ⟨r, rfl⟩
393-
394-
lemma star_mul_self_nonneg' {r : R} : 0 ≤ r * star r :=
395-
by { nth_rewrite_rhs 0 [←star_star r], exact star_mul_self_nonneg }
396-
397-
lemma conjugate_nonneg {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ star c * a * c :=
398-
begin
399-
obtain ⟨x, rfl⟩ := (star_ordered_ring.nonneg_iff _).1 ha,
400-
exact (star_ordered_ring.nonneg_iff _).2 ⟨x * c, by rw [star_mul, ←mul_assoc, mul_assoc _ _ c]⟩,
401-
end
402-
403-
lemma conjugate_nonneg' {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ c * a * star c :=
404-
by simpa only [star_star] using conjugate_nonneg ha (star c)
405-
406-
end non_unital_semiring
407-
408-
section non_unital_ring
409-
410-
variables [non_unital_ring R] [partial_order R] [star_ordered_ring R]
411-
412-
lemma conjugate_le_conjugate {a b : R} (hab : a ≤ b) (c : R) : star c * a * c ≤ star c * b * c :=
413-
begin
414-
rw ←sub_nonneg at hab ⊢,
415-
convert conjugate_nonneg hab c,
416-
simp only [mul_sub, sub_mul],
417-
end
418-
419-
lemma conjugate_le_conjugate' {a b : R} (hab : a ≤ b) (c : R) : c * a * star c ≤ c * b * star c :=
420-
by simpa only [star_star] using conjugate_le_conjugate hab (star c)
421-
422-
end non_unital_ring
423-
424357
/--
425358
A star module `A` over a star ring `R` is a module which is a star add monoid,
426359
and the two star structures are compatible in the sense

src/algebra/star/chsh.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ begin
133133
T.A₀_sa, T.A₁_sa, T.B₀_sa, T.B₁_sa, mul_comm B₀, mul_comm B₁], },
134134
rw idem',
135135
conv_rhs { congr, skip, congr, rw ←sa, },
136-
convert smul_le_smul_of_nonneg (star_mul_self_nonneg : 0 ≤ star P * P) _,
136+
convert smul_le_smul_of_nonneg (star_mul_self_nonneg P) _,
137137
{ simp, },
138138
{ apply_instance, },
139139
{ norm_num, } },
@@ -221,11 +221,11 @@ begin
221221
have P2_nonneg : 0 ≤ P^2,
222222
{ rw [sq],
223223
conv { congr, skip, congr, rw ←P_sa, },
224-
convert (star_mul_self_nonneg : 0 ≤ star P * P), },
224+
convert (star_mul_self_nonneg P), },
225225
have Q2_nonneg : 0 ≤ Q^2,
226226
{ rw [sq],
227227
conv { congr, skip, congr, rw ←Q_sa, },
228-
convert (star_mul_self_nonneg : 0 ≤ star Q * Q), },
228+
convert (star_mul_self_nonneg Q), },
229229
convert smul_le_smul_of_nonneg (add_nonneg P2_nonneg Q2_nonneg)
230230
(le_of_lt (show 0 < √2⁻¹, by norm_num)), -- `norm_num` can't directly show `0 ≤ √2⁻¹`
231231
simp, },

src/algebra/star/order.lean

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
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

src/analysis/normed_space/star/continuous_functional_calculus.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ begin
100100
rw [←spectrum.gelfand_transform_eq (star a' * a'), continuous_map.spectrum_eq_range],
101101
rintro - ⟨φ, rfl⟩,
102102
rw [gelfand_transform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ],
103-
rw [complex.eq_coe_norm_of_nonneg star_mul_self_nonneg, ←map_star, ←map_mul],
103+
rw [complex.eq_coe_norm_of_nonneg (star_mul_self_nonneg _), ←map_star, ←map_mul],
104104
exact ⟨complex.zero_le_real.2 (norm_nonneg _),
105105
complex.real_le_real.2 (alg_hom.norm_apply_le_self φ (star a' * a'))⟩, }
106106
end

src/data/complex/basic.lean

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -666,18 +666,19 @@ With `z ≤ w` iff `w - z` is real and nonnegative, `ℂ` is a star ordered ring
666666
(That is, a star ring in which the nonnegative elements are those of the form `star z * z`.)
667667
-/
668668
protected def star_ordered_ring : star_ordered_ring ℂ :=
669-
{ nonneg_iff := λ r, by
670-
{ refine ⟨λ hr, ⟨real.sqrt r.re, _⟩, λ h, _⟩,
671-
{ have h₁ : 0 ≤ r.re := by { rw [le_def] at hr, exact hr.1 },
672-
have h₂ : r.im = 0 := by { rw [le_def] at hr, exact hr.2.symm },
673-
ext,
674-
{ simp only [of_real_im, star_def, of_real_re, sub_zero, conj_re, mul_re, mul_zero,
675-
←real.sqrt_mul h₁ r.re, real.sqrt_mul_self h₁] },
676-
{ simp only [h₂, add_zero, of_real_im, star_def, zero_mul, conj_im,
677-
mul_im, mul_zero, neg_zero] } },
678-
{ obtain ⟨s, rfl⟩ := h,
679-
simp only [←norm_sq_eq_conj_mul_self, norm_sq_nonneg, zero_le_real, star_def] } },
680-
..complex.strict_ordered_comm_ring }
669+
star_ordered_ring.of_nonneg_iff' (λ _ _, add_le_add_left) $ λ r,
670+
begin
671+
refine ⟨λ hr, ⟨real.sqrt r.re, _⟩, λ h, _⟩,
672+
{ have h₁ : 0 ≤ r.re := by { rw [le_def] at hr, exact hr.1 },
673+
have h₂ : r.im = 0 := by { rw [le_def] at hr, exact hr.2.symm },
674+
ext,
675+
{ simp only [of_real_im, star_def, of_real_re, sub_zero, conj_re, mul_re, mul_zero,
676+
←real.sqrt_mul h₁ r.re, real.sqrt_mul_self h₁] },
677+
{ simp only [h₂, add_zero, of_real_im, star_def, zero_mul, conj_im,
678+
mul_im, mul_zero, neg_zero] } },
679+
{ obtain ⟨s, rfl⟩ := h,
680+
simp only [←norm_sq_eq_conj_mul_self, norm_sq_nonneg, zero_le_real, star_def] },
681+
end
681682

682683
localized "attribute [instance] complex.star_ordered_ring" in complex_order
683684

0 commit comments

Comments
 (0)