@@ -1147,9 +1147,7 @@ The typeclass that restricts all terms of `α` to have this property is `no_zero
1147
1147
lemma is_left_regular_of_non_zero_divisor [ring α] (k : α)
1148
1148
(h : ∀ (x : α), k * x = 0 → x = 0 ) : is_left_regular k :=
1149
1149
begin
1150
- intros x y h',
1151
- rw ←sub_eq_zero,
1152
- refine h _ _,
1150
+ refine λ x y (h' : k * x = k * y), sub_eq_zero.mp (h _ _),
1153
1151
rw [mul_sub, sub_eq_zero, h']
1154
1152
end
1155
1153
@@ -1158,10 +1156,7 @@ The typeclass that restricts all terms of `α` to have this property is `no_zero
1158
1156
lemma is_right_regular_of_non_zero_divisor [ring α] (k : α)
1159
1157
(h : ∀ (x : α), x * k = 0 → x = 0 ) : is_right_regular k :=
1160
1158
begin
1161
- intros x y h',
1162
- simp only at h',
1163
- rw ←sub_eq_zero,
1164
- refine h _ _,
1159
+ refine λ x y (h' : x * k = y * k), sub_eq_zero.mp (h _ _),
1165
1160
rw [sub_mul, sub_eq_zero, h']
1166
1161
end
1167
1162
@@ -1172,6 +1167,10 @@ lemma is_regular_of_ne_zero' [ring α] [no_zero_divisors α] {k : α} (hk : k
1172
1167
is_right_regular_of_non_zero_divisor k
1173
1168
(λ x h, (no_zero_divisors.eq_zero_or_eq_zero_of_mul_eq_zero h).resolve_right hk)⟩
1174
1169
1170
+ lemma is_regular_iff_ne_zero' [nontrivial α] [ring α] [no_zero_divisors α] {k : α} :
1171
+ is_regular k ↔ k ≠ 0 :=
1172
+ ⟨λ h, by { rintro rfl, exact not_not.mpr h.left not_is_left_regular_zero }, is_regular_of_ne_zero'⟩
1173
+
1175
1174
/-- A ring with no zero divisors is a cancel_monoid_with_zero.
1176
1175
1177
1176
Note this is not an instance as it forms a typeclass loop. -/
0 commit comments