This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,15 @@ begin
195
195
euclidean_domain.mul_div_cancel _ hq]
196
196
end
197
197
198
+ lemma dvd_div_of_mul_dvd {a b c : R} (h : a * b ∣ c) : b ∣ c / a :=
199
+ begin
200
+ rcases eq_or_ne a 0 with rfl | ha,
201
+ { simp only [div_zero, dvd_zero] },
202
+ rcases h with ⟨d, rfl⟩,
203
+ refine ⟨d, _⟩,
204
+ rw [mul_assoc, mul_div_cancel_left _ ha]
205
+ end
206
+
198
207
section
199
208
open_locale classical
200
209
Original file line number Diff line number Diff line change @@ -1110,14 +1110,23 @@ not_lt.mp (mt (eq_zero_of_dvd_of_nat_abs_lt_nat_abs hst) ht)
1110
1110
lemma nat_abs_eq_of_dvd_dvd {s t : ℤ} (hst : s ∣ t) (hts : t ∣ s) : nat_abs s = nat_abs t :=
1111
1111
nat.dvd_antisymm (nat_abs_dvd_iff_dvd.mpr hst) (nat_abs_dvd_iff_dvd.mpr hts)
1112
1112
1113
- lemma div_dvd_of_ne_zero_dvd {s t : ℤ} (hst : s ∣ t) : (t / s) ∣ t :=
1113
+ lemma div_dvd_of_dvd {s t : ℤ} (hst : s ∣ t) : (t / s) ∣ t :=
1114
1114
begin
1115
- by_cases hs : s = 0 ,
1116
- { simp [*] at *, },
1115
+ rcases eq_or_ne s 0 with rfl | hs ,
1116
+ { simpa using hst },
1117
1117
rcases hst with ⟨c, hc⟩,
1118
1118
simp [hc, int.mul_div_cancel_left _ hs],
1119
1119
end
1120
1120
1121
+ lemma dvd_div_of_mul_dvd {a b c : ℤ} (h : a * b ∣ c) : b ∣ c / a :=
1122
+ begin
1123
+ rcases eq_or_ne a 0 with rfl | ha,
1124
+ { simp only [int.div_zero, dvd_zero] },
1125
+ rcases h with ⟨d, rfl⟩,
1126
+ refine ⟨d, _⟩,
1127
+ rw [mul_assoc, int.mul_div_cancel_left _ ha],
1128
+ end
1129
+
1121
1130
/-! ### to_nat -/
1122
1131
1123
1132
theorem to_nat_eq_max : ∀ (a : ℤ), (to_nat a : ℤ) = max a 0
You can’t perform that action at this time.
0 commit comments