Skip to content

Commit e0d8b5b

Browse files
chore: remove unused lemmas about bit0/1 (#14672)
1 parent fffcdb5 commit e0d8b5b

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

Mathlib/Data/Int/Defs.lean

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,8 @@ protected lemma two_mul : ∀ n : ℤ, 2 * n = n + n
169169
rw [Int.ofNat_mul_negSucc, Nat.two_mul, ofNat_add, Int.neg_add]
170170
rfl
171171

172-
section deprecated
173-
set_option linter.deprecated false
174-
175-
@[norm_cast, deprecated (since := "2022-11-23")]
176-
lemma ofNat_bit0 (n : ℕ) : (↑(bit0 n) : ℤ) = bit0 ↑n := rfl
177-
#align int.coe_nat_bit0 Int.ofNat_bit0
178-
179-
@[norm_cast, deprecated (since := "2022-11-23")]
180-
lemma ofNat_bit1 (n : ℕ) : (↑(bit1 n) : ℤ) = bit1 ↑n := rfl
181-
#align int.coe_nat_bit1 Int.ofNat_bit1
182-
183-
end deprecated
172+
#noalign int.coe_nat_bit0
173+
#noalign int.coe_nat_bit1
184174

185175
protected lemma mul_le_mul_iff_of_pos_right (ha : 0 < a) : b * a ≤ c * a ↔ b ≤ c :=
186176
⟨(le_of_mul_le_mul_right · ha), (Int.mul_le_mul_of_nonneg_right · (Int.le_of_lt ha))⟩

Mathlib/LinearAlgebra/Matrix/ZPow.lean

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,7 @@ theorem Commute.zpow_zpow_self (A : M) (m n : ℤ) : Commute (A ^ m) (A ^ n) :=
239239
Commute.zpow_zpow (Commute.refl A) _ _
240240
#align matrix.commute.zpow_zpow_self Matrix.Commute.zpow_zpow_self
241241

242-
set_option linter.deprecated false in
243-
theorem zpow_bit0 (A : M) (n : ℤ) : A ^ bit0 n = A ^ n * A ^ n := by
244-
rcases le_total 0 n with nonneg | nonpos
245-
· exact zpow_add_of_nonneg nonneg nonneg
246-
· exact zpow_add_of_nonpos nonpos nonpos
247-
#align matrix.zpow_bit0 Matrix.zpow_bit0
242+
#noalign matrix.zpow_bit0
248243

249244
theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n + 1) = A ^ n * A
250245
| (n : ℕ), _ => by simp only [pow_succ, ← Nat.cast_succ, zpow_natCast]
@@ -256,12 +251,7 @@ theorem zpow_add_one_of_ne_neg_one {A : M} : ∀ n : ℤ, n ≠ -1 → A ^ (n +
256251
simp_rw [zpow_neg_natCast, ← inv_pow', h, zero_pow $ Nat.succ_ne_zero _, zero_mul]
257252
#align matrix.zpow_add_one_of_ne_neg_one Matrix.zpow_add_one_of_ne_neg_one
258253

259-
set_option linter.deprecated false in
260-
theorem zpow_bit1 (A : M) (n : ℤ) : A ^ bit1 n = A ^ n * A ^ n * A := by
261-
rw [bit1, zpow_add_one_of_ne_neg_one, zpow_bit0]
262-
intro h
263-
simpa using congr_arg bodd h
264-
#align matrix.zpow_bit1 Matrix.zpow_bit1
254+
#noalign matrix.zpow_bit1
265255

266256
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
267257
| (m : ℕ), (n : ℕ) => by rw [zpow_natCast, zpow_natCast, ← pow_mul, ← zpow_natCast, Int.ofNat_mul]
@@ -308,15 +298,8 @@ theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i
308298
h.mul_pow n.succ, (h.pow_pow _ _).eq]
309299
#align matrix.commute.mul_zpow Matrix.Commute.mul_zpow
310300

311-
set_option linter.deprecated false in
312-
theorem zpow_bit0' (A : M) (n : ℤ) : A ^ bit0 n = (A * A) ^ n :=
313-
(zpow_bit0 A n).trans (Commute.mul_zpow (Commute.refl A) n).symm
314-
#align matrix.zpow_bit0' Matrix.zpow_bit0'
315-
316-
set_option linter.deprecated false in
317-
theorem zpow_bit1' (A : M) (n : ℤ) : A ^ bit1 n = (A * A) ^ n * A := by
318-
rw [zpow_bit1, Commute.mul_zpow (Commute.refl A)]
319-
#align matrix.zpow_bit1' Matrix.zpow_bit1'
301+
#noalign matrix.zpow_bit0'
302+
#noalign matrix.zpow_bit1'
320303

321304
theorem zpow_neg_mul_zpow_self (n : ℤ) {A : M} (h : IsUnit A.det) : A ^ (-n) * A ^ n = 1 := by
322305
rw [zpow_neg h, nonsing_inv_mul _ (h.det_zpow _)]

0 commit comments

Comments
 (0)