@@ -105,6 +105,10 @@ noncomputable instance : linear_ordered_comm_monoid_with_zero ℝ≥0∞ :=
105
105
.. ennreal.linear_ordered_add_comm_monoid_with_top,
106
106
.. (show comm_semiring ℝ≥0 ∞, from infer_instance) }
107
107
108
+ instance : unique (add_units ℝ≥0 ∞) :=
109
+ { default := 0 ,
110
+ uniq := λ a, add_units.ext $ le_zero_iff.1 $ by { rw ←a.add_neg, exact le_self_add } }
111
+
108
112
instance : inhabited ℝ≥0 ∞ := ⟨0 ⟩
109
113
110
114
instance : has_coe ℝ≥0 ℝ≥0 ∞ := ⟨ option.some ⟩
@@ -1056,6 +1060,12 @@ by rw [div_eq_mul_inv, mul_assoc, ennreal.inv_mul_cancel h0 hI, mul_one]
1056
1060
protected lemma mul_div_cancel' (h0 : a ≠ 0 ) (hI : a ≠ ∞) : a * (b / a) = b :=
1057
1061
by rw [mul_comm, ennreal.div_mul_cancel h0 hI]
1058
1062
1063
+ protected lemma mul_comm_div : a / b * c = a * (c / b) :=
1064
+ by simp only [div_eq_mul_inv, mul_comm, mul_assoc]
1065
+
1066
+ protected lemma mul_div_right_comm : a * b / c = a / c * b :=
1067
+ by simp only [div_eq_mul_inv, mul_comm, mul_assoc]
1068
+
1059
1069
instance : has_involutive_inv ℝ≥0 ∞ :=
1060
1070
{ inv := has_inv.inv,
1061
1071
inv_inv := λ a, by
@@ -1077,6 +1087,9 @@ inv_top ▸ inv_inj
1077
1087
1078
1088
protected lemma inv_ne_zero : a⁻¹ ≠ 0 ↔ a ≠ ∞ := by simp
1079
1089
1090
+ protected lemma div_pos (ha : a ≠ 0 ) (hb : b ≠ ∞) : 0 < a / b :=
1091
+ ennreal.mul_pos ha $ ennreal.inv_ne_zero.2 hb
1092
+
1080
1093
protected lemma mul_inv {a b : ℝ≥0 ∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0 ) :
1081
1094
(a * b)⁻¹ = a⁻¹ * b⁻¹ :=
1082
1095
begin
0 commit comments