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 +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 439
439
lemma tsub_tsub_tsub_cancel_right (h : c ≤ b) : (a - c) - (b - c) = a - b :=
440
440
by rw [tsub_tsub, add_tsub_cancel_of_le h]
441
441
442
+ lemma tsub_lt_of_lt (h : a < b) : a - c < b :=
443
+ lt_of_le_of_lt tsub_le_self h
444
+
442
445
/-! ### Lemmas that assume that an element is `add_le_cancellable`. -/
443
446
444
447
namespace add_le_cancellable
Original file line number Diff line number Diff line change @@ -1289,6 +1289,15 @@ lemma dvd_left_injective : function.injective ((∣) : ℕ → ℕ → Prop) :=
1289
1289
lemma div_lt_div_of_lt_of_dvd {a b d : ℕ} (hdb : d ∣ b) (h : a < b) : a / d < b / d :=
1290
1290
by { rw nat.lt_div_iff_mul_lt hdb, exact lt_of_le_of_lt (mul_div_le a d) h }
1291
1291
1292
+ lemma mul_add_mod (a b c : ℕ) : (a * b + c) % b = c % b :=
1293
+ by simp [nat.add_mod]
1294
+
1295
+ lemma mul_add_mod_of_lt {a b c : ℕ} (h : c < b) : (a * b + c) % b = c :=
1296
+ by rw [nat.mul_add_mod, nat.mod_eq_of_lt h]
1297
+
1298
+ lemma pred_eq_self_iff {n : ℕ} : n.pred = n ↔ n = 0 :=
1299
+ by { cases n; simp [(nat.succ_ne_self _).symm] }
1300
+
1292
1301
/-! ### `find` -/
1293
1302
section find
1294
1303
You can’t perform that action at this time.
0 commit comments