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

Commit 0926e67

Browse files
kim-emrobertylewis
andcommitted
feat(algebra/star): star_ordered_ring (#4685)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
1 parent bd38c5f commit 0926e67

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/algebra/ordered_ring.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,10 @@ instance linear_ordered_comm_ring.to_integral_domain [s : linear_ordered_comm_ri
828828
@[priority 100] -- see Note [lower instance priority]
829829
instance linear_ordered_comm_ring.to_linear_ordered_semiring [d : linear_ordered_comm_ring α] :
830830
linear_ordered_semiring α :=
831+
-- One might hope that `{ ..linear_ordered_ring.to_linear_ordered_semiring, ..d }`
832+
-- achieved the same result here.
833+
-- Unfortunately with that definition we see mismatched `preorder ℝ` instances in
834+
-- `topology.metric_space.basic`.
831835
let s : linear_ordered_semiring α := @linear_ordered_ring.to_linear_ordered_semiring α _ in
832836
{ zero_mul := @linear_ordered_semiring.zero_mul α s,
833837
mul_zero := @linear_ordered_semiring.mul_zero α s,

src/algebra/star/basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,17 @@ local attribute [instance] star_ring_of_comm
150150
@[simp] lemma star_id_of_comm {R : Type*} [comm_semiring R] {x : R} : star x = x := rfl
151151

152152
end
153+
154+
/--
155+
An ordered *-ring is a ring which is both an ordered ring and a *-ring,
156+
and `0 ≤ star r * r` for every `r`.
157+
158+
(In a Banach algebra, the natural ordering is given by the positive cone
159+
which is the closure of the sums of elements `star r * r`.
160+
This ordering makes the Banach algebra an ordered *-ring.)
161+
-/
162+
class star_ordered_ring (R : Type u) [ordered_semiring R] extends star_ring R :=
163+
(star_mul_self_nonneg : ∀ r : R, 0 ≤ star r * r)
164+
165+
lemma star_mul_self_nonneg [ordered_semiring R] [star_ordered_ring R] {r : R} : 0 ≤ star r * r :=
166+
star_ordered_ring.star_mul_self_nonneg r

0 commit comments

Comments
 (0)