Skip to content

Commit 5b8e2e1

Browse files
committed
chore: replace lt_two_pow_self with lt_two_pow_self
1 parent d2ee68c commit 5b8e2e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Init/Data/BitVec/Lemmas.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6403,7 +6403,7 @@ theorem cpop_zero :
64036403

64046404
theorem toNat_cpop_le (x : BitVec w) :
64056405
x.cpop.toNat ≤ w := by
6406-
have hlt := Nat.lt_pow_self (a := 2) (n := w) (by omega)
6406+
have hlt := Nat.lt_two_pow_self (n := w)
64076407
have hle := cpopNatRec_zero_le (x := x) (n := w)
64086408
simp only [cpop, toNat_ofNat, ge_iff_le]
64096409
rw [Nat.mod_eq_of_lt (by omega)]
@@ -6450,7 +6450,7 @@ theorem toNat_cpop (x : BitVec w) :
64506450
x.cpop.toNat = x.cpopNatRec w 0 := by
64516451
have := cpopNatRec_zero_le x w
64526452
have := toNat_cpop_le x
6453-
have := @Nat.lt_pow_self w 2 (by omega)
6453+
have := Nat.lt_two_pow_self (n := w)
64546454
rw [cpop, toNat_ofNat, Nat.mod_eq_of_lt]
64556455
omega
64566456

@@ -6486,7 +6486,7 @@ theorem cpop_cons {x : BitVec w} {b : Bool} :
64866486
theorem cpop_concat {x : BitVec w} {b : Bool} :
64876487
(x.concat b).cpop = b.toNat + x.cpop.setWidth (w + 1) := by
64886488
have := cpopNatRec_zero_le (x := x) (n := w)
6489-
have := Nat.lt_pow_self (a := 2) (n := w) (by omega)
6489+
have := Nat.lt_two_pow_self (n := w)
64906490
rw [cpop, cpop, cpopNatRec_concat_of_lt,
64916491
Nat.add_one_sub_one, natCast_eq_ofNat, ofNat_add]
64926492
congr
@@ -6497,7 +6497,7 @@ theorem cpop_concat {x : BitVec w} {b : Bool} :
64976497
theorem toNat_cpop_concat {x : BitVec w} {b : Bool} :
64986498
(x.concat b).cpop.toNat = b.toNat + x.cpop.toNat := by
64996499
have := toNat_cpop_le (x := x)
6500-
have := Nat.lt_pow_self (a := 2) (n := w + 1) (by omega)
6500+
have := Nat.lt_two_pow_self (n := w + 1)
65016501
simp only [cpop_concat, natCast_eq_ofNat, toNat_add, toNat_ofNat, toNat_setWidth, Nat.lt_add_one,
65026502
toNat_mod_cancel_of_lt, Nat.mod_add_mod]
65036503
rw [Nat.mod_eq_of_lt]
@@ -6542,7 +6542,7 @@ theorem cpop_append {x : BitVec w} {y : BitVec u} :
65426542
apply eq_of_toNat_eq
65436543
have := toNat_cpop_le x
65446544
have := toNat_cpop_le y
6545-
have := Nat.lt_pow_self (n := w + u) (a := 2) (by omega)
6545+
have := Nat.lt_two_pow_self (n := w + u)
65466546
simp only [toNat_cpop_append, toNat_add, toNat_setWidth, Nat.add_mod_mod, Nat.mod_add_mod]
65476547
rw [Nat.mod_eq_of_lt (by omega)]
65486548

0 commit comments

Comments
 (0)