Skip to content

Commit f6fc5ed

Browse files
mathlib-splicebot[bot]jjdishere
authored andcommitted
chore(Data/NNReal/Defs): fix LinearOrderedCommGroupWithZero on ℝ≥0 (leanprover-community#40208)
This PR was automatically created from PR leanprover-community#36911 by @jjdishere via a [review comment](leanprover-community#36911 (comment)) by @faenuccio. Co-authored-by: jjdishere <107380768+jjdishere@users.noreply.github.com>
1 parent b4cd026 commit f6fc5ed

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Mathlib/Data/NNReal/Defs.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ noncomputable instance : Semifield ℝ≥0 := fast_instance%
115115
rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
116116
(fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)
117117

118-
noncomputable section
119-
deriving instance LinearOrderedCommGroupWithZero for NNReal
120-
end
118+
instance : IsOrderedRing ℝ≥0 :=
119+
Nonneg.isOrderedRing
120+
121+
instance : IsStrictOrderedRing ℝ≥0 :=
122+
Nonneg.isStrictOrderedRing
123+
124+
noncomputable instance : LinearOrderedCommGroupWithZero ℝ≥0 where
125+
bot_le h := h.2
121126

122127
example {p q : ℝ≥0} (h1p : 0 < p) (h2p : p ≤ q) : q⁻¹ ≤ p⁻¹ := by
123128
with_reducible_and_instances exact inv_anti₀ h1p h2p

0 commit comments

Comments
 (0)