Zulip Chat Archive

Stream: new members

Topic: bounded UInt8.toUInt64


Arthur Paulino (Sep 25 2025 at 12:27):

Hi all, this is probably silly, but I'm not being able to prove this. Help is appreciated!

example (u8 : UInt8) : u8.toUInt64 < 256 := by
  sorry

Markus Himmel (Sep 25 2025 at 12:30):

example (u8 : UInt8) : u8.toUInt64 < 256 := by
  simpa [UInt64.lt_iff_toNat_lt] using UInt8.toNat_lt _

Henrik Böving (Sep 25 2025 at 12:31):

Of course also:

import Std.Tactic.BVDecide

example (u8 : UInt8) : u8.toUInt64 < 256 := by
  bv_decide

Last updated: Dec 20 2025 at 21:32 UTC