Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the definitions from the standard library of Lean for the scalars #427

Open
sonmarcho opened this issue Feb 1, 2025 · 0 comments
Open

Comments

@sonmarcho
Copy link
Member

sonmarcho commented Feb 1, 2025

Lean now defines types like UInt8, Int8, etc. We should use those, or at least define the scalars in terms of BitVec as it is a more natural representation of machine integers and also allows us to benefit from native support.

For instance, omega already supports reasoning about the bounds of bit vectors, meaning we don't have to do this work in scalar_tac:

example (x y : BitVec 8) : x.toNat + y.toNat ≤ 512 := by omega

We may want to wait a bit before updating the definitions, because there is good native support for BitVec, but not yet for the machine integers like UInt8 which are not properly handled by omega and bv_decide yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant