English
Further variant of injectivity for toNat.
Русский
Дальнейшее вариативное утверждение инъективности toNat.
LaTeX
$$$\forall x,y : BitVec w,\; toNat(x) = toNat(y) \Rightarrow x = y$$$
Lean4
theorem toFin_nsmul (n : ℕ) (x : BitVec w) : toFin (n • x) = n • x.toFin :=
toFin_mul _ _ |>.trans <| by
open scoped Fin.CommRing in simp only [natCast_eq_ofNat, toFin_ofNat, Fin.ofNat_eq_cast, nsmul_eq_mul]